Lines Matching defs:buf
56 static void tty_alloc(uv_handle_t* handle, size_t size, uv_buf_t* buf) {
57 buf->base = malloc(size);
58 ASSERT_NOT_NULL(buf->base);
59 buf->len = size;
62 static void tty_read(uv_stream_t* tty_in, ssize_t nread, const uv_buf_t* buf) {
67 print_err_msg(expect_str, expect_nread, buf->base, nread);
70 if (strncmp(buf->base, expect_str, nread) != 0) {
71 print_err_msg(expect_str, expect_nread, buf->base, nread);
84 WCHAR buf[2];
110 ret = ToUnicode(virt_key, KEV(0).wVirtualScanCode, kb_state, buf, 2, 0);
120 KEV(0).uChar.UnicodeChar = buf[0];
126 KEV(0).uChar.UnicodeChar = KEV(1).uChar.UnicodeChar = buf[0];