Lines Matching refs:buf
10 uv_buf_t buf; member
18 void alloc_buffer(uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf) { in alloc_buffer() argument
19 *buf = uv_buf_init((char*) malloc(suggested_size), suggested_size); in alloc_buffer()
24 free(wr->buf.base); in free_write_req()
36 void write_data(uv_stream_t *dest, size_t size, uv_buf_t buf, uv_write_cb cb) { in write_data() argument
38 req->buf = uv_buf_init((char*) malloc(size), size); in write_data()
39 memcpy(req->buf.base, buf.base, size); in write_data()
40 uv_write((uv_write_t*) req, (uv_stream_t*)dest, &req->buf, 1, cb); in write_data()
43 void read_stdin(uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf) { in read_stdin() argument
52 write_data((uv_stream_t *)&stdout_pipe, nread, *buf, on_stdout_write); in read_stdin()
53 write_data((uv_stream_t *)&file_pipe, nread, *buf, on_file_write); in read_stdin()
57 if (buf->base) in read_stdin()
58 free(buf->base); in read_stdin()