Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 71) sorted by relevance

123

/libuv/docs/code/udp-dhcp/
H A Dmain.c43 uv_buf_t buffer; in make_discover_msg() local
45 memset(buffer.base, 0, buffer.len); in make_discover_msg()
48 buffer.base[0] = 0x1; in make_discover_msg()
50 buffer.base[1] = 0x1; in make_discover_msg()
52 buffer.base[2] = 0x6; in make_discover_msg()
54 buffer.base[3] = 0x0; in make_discover_msg()
59 buffer.base[8] = 0x0; in make_discover_msg()
84 buffer.base[241] = 1; in make_discover_msg()
89 buffer.base[244] = 4; in make_discover_msg()
90 buffer.base[245] = 1; in make_discover_msg()
[all …]
/libuv/test/
H A Dtest-get-currentexe.c42 char buffer[PATHMAX]; in TEST_IMPL() local
48 size = sizeof(buffer) / sizeof(buffer[0]); in TEST_IMPL()
58 match = strstr(buffer, path); in TEST_IMPL()
66 size = sizeof(buffer) / sizeof(buffer[0]); in TEST_IMPL()
70 r = uv_exepath(buffer, NULL); in TEST_IMPL()
77 memset(buffer, -1, sizeof(buffer)); in TEST_IMPL()
83 ASSERT_EQ(buffer[0], '\0'); in TEST_IMPL()
85 memset(buffer, -1, sizeof(buffer)); in TEST_IMPL()
91 ASSERT_NE(buffer[0], '\0'); in TEST_IMPL()
92 ASSERT_EQ(buffer[1], '\0'); in TEST_IMPL()
[all …]
H A Dtest-tty-escape-sequence-processing.c394 snprintf(buffer, sizeof(buffer), "%sA", CSI); in TEST_IMPL()
412 snprintf(buffer, sizeof(buffer), "%sA", CSI); in TEST_IMPL()
445 snprintf(buffer, sizeof(buffer), "%sB", CSI); in TEST_IMPL()
463 snprintf(buffer, sizeof(buffer), "%sB", CSI); in TEST_IMPL()
496 snprintf(buffer, sizeof(buffer), "%sC", CSI); in TEST_IMPL()
514 snprintf(buffer, sizeof(buffer), "%sC", CSI); in TEST_IMPL()
524 snprintf(buffer, sizeof(buffer), "%sC", CSI); in TEST_IMPL()
557 snprintf(buffer, sizeof(buffer), "%sD", CSI); in TEST_IMPL()
575 snprintf(buffer, sizeof(buffer), "%sD", CSI); in TEST_IMPL()
585 snprintf(buffer, sizeof(buffer), "%sD", CSI); in TEST_IMPL()
[all …]
H A Dtest-uname.c37 uv_utsname_t buffer; in TEST_IMPL() local
45 r = uv_os_uname(&buffer); in TEST_IMPL()
50 ASSERT_OK(strcmp(buffer.sysname, buf.sysname)); in TEST_IMPL()
51 ASSERT_OK(strcmp(buffer.version, buf.version)); in TEST_IMPL()
55 ASSERT_OK(strcmp(buffer.release, temp)); in TEST_IMPL()
57 ASSERT_OK(strcmp(buffer.release, buf.release)); in TEST_IMPL()
61 ASSERT_OK(strcmp(buffer.machine, "ppc64")); in TEST_IMPL()
63 ASSERT_OK(strcmp(buffer.machine, buf.machine)); in TEST_IMPL()
H A Dtest-platform-output.c28 char buffer[512]; in TEST_IMPL() local
46 err = uv_get_process_title(buffer, sizeof(buffer)); in TEST_IMPL()
50 size = sizeof(buffer); in TEST_IMPL()
51 err = uv_cwd(buffer, &size); in TEST_IMPL()
53 printf("uv_cwd: %s\n", buffer); in TEST_IMPL()
171 uv_ip4_name(&interfaces[i].address.address4, buffer, sizeof(buffer)); in TEST_IMPL()
173 uv_ip6_name(&interfaces[i].address.address6, buffer, sizeof(buffer)); in TEST_IMPL()
176 printf(" address: %s\n", buffer); in TEST_IMPL()
179 uv_ip4_name(&interfaces[i].netmask.netmask4, buffer, sizeof(buffer)); in TEST_IMPL()
180 printf(" netmask: %s\n", buffer); in TEST_IMPL()
[all …]
H A Dtest-process-title.c28 char buffer[512]; in set_title() local
31 err = uv_get_process_title(buffer, sizeof(buffer)); in set_title()
37 err = uv_get_process_title(buffer, sizeof(buffer)); in set_title()
40 ASSERT_OK(strcmp(buffer, title)); in set_title()
45 char buffer[512]; in uv_get_process_title_edge_cases() local
53 r = uv_get_process_title(buffer, 0); in uv_get_process_title_edge_cases()
57 r = uv_get_process_title(buffer, 1); in uv_get_process_title_edge_cases()
H A Dtest-process-title-threadsafe.c43 char buffer[512]; in getter_thread_body() local
49 ASSERT_OK(uv_get_process_title(buffer, sizeof(buffer))); in getter_thread_body()
55 len = strlen(buffer); in getter_thread_body()
59 0 == strncmp(buffer, titles[0], len) || in getter_thread_body()
60 0 == strncmp(buffer, titles[1], len) || in getter_thread_body()
61 0 == strncmp(buffer, titles[2], len) || in getter_thread_body()
62 0 == strncmp(buffer, titles[3], len)); in getter_thread_body()
H A Dtest-poll-oob.c69 char buffer[5]; in poll_cb() local
74 memset(buffer, 0, 5); in poll_cb()
78 n = recv(client_fd, &buffer, 5, MSG_OOB); in poll_cb()
90 n = recv(client_fd, &buffer, 5, 0); in poll_cb()
94 ASSERT_OK(strncmp(buffer, "world", n)); in poll_cb()
100 ASSERT_OK(strncmp(buffer, "hello", n)); in poll_cb()
104 n = recv(server_fd, &buffer, 5, 0); in poll_cb()
108 ASSERT_OK(strncmp(buffer, "world", n)); in poll_cb()
118 n = recv(server_fd, &buffer, 3, 0); in poll_cb()
122 ASSERT_OK(strncmp(buffer, "foo", n)); in poll_cb()
H A Drun-tests.c147 char buffer[256]; in maybe_run_test() local
149 ASSERT_PTR_EQ(buffer, fgets(buffer, sizeof(buffer) - 1, stdin)); in maybe_run_test()
150 buffer[sizeof(buffer) - 1] = '\0'; in maybe_run_test()
151 fputs(buffer, stdout); in maybe_run_test()
H A Drunner-win.c241 char * buffer, in process_read_last_line() argument
255 buffer[0] = '\0'; in process_read_last_line()
263 if (!ReadFile(p->stdio_out, buffer, buffer_len - 1, &read, &overlapped)) in process_read_last_line()
268 if (buffer[start] == '\n' || buffer[start] == '\r') in process_read_last_line()
273 memmove(buffer, buffer + start, read - start); in process_read_last_line()
275 buffer[read - start] = '\0'; in process_read_last_line()
H A Dtest-poll.c225 static char buffer[74]; local
228 r = recv(context->sock, buffer, sizeof buffer, 0);
246 static char buffer[931]; local
250 r = recv(context->sock, buffer, sizeof buffer, 0);
307 static char buffer[103]; local
309 int send_bytes = MIN(TRANSFER_BYTES - context->sent, sizeof buffer);
313 r = send(context->sock, buffer, send_bytes, 0);
331 static char buffer[1234]; local
337 r = send(context->sock, buffer, send_bytes, 0);
351 send_bytes = MIN(TRANSFER_BYTES - context->sent, sizeof buffer);
[all …]
/libuv/src/win/
H A Dprocess-stdio.c44 *((unsigned int*) (buffer))
172 BYTE* buffer; in uv__stdio_create() local
188 if (buffer == NULL) { in uv__stdio_create()
194 CHILD_STDIO_COUNT(buffer) = count; in uv__stdio_create()
349 *buffer_ptr = buffer; in uv__stdio_create()
353 uv__stdio_destroy(buffer); in uv__stdio_create()
361 count = CHILD_STDIO_COUNT(buffer); in uv__stdio_destroy()
369 uv__free(buffer); in uv__stdio_destroy()
376 count = CHILD_STDIO_COUNT(buffer); in uv__stdio_noinherit()
390 if (buffer == NULL) in uv__stdio_verify()
[all …]
H A Dutil.c1608 uv__strscpy(buffer->sysname, "Windows_NT", sizeof(buffer->sysname)); in uv_os_uname()
1625 uv__strscpy(buffer->machine, "x86_64", sizeof(buffer->machine)); in uv_os_uname()
1628 uv__strscpy(buffer->machine, "ia64", sizeof(buffer->machine)); in uv_os_uname()
1631 uv__strscpy(buffer->machine, "i386", sizeof(buffer->machine)); in uv_os_uname()
1641 uv__strscpy(buffer->machine, "i686", sizeof(buffer->machine)); in uv_os_uname()
1644 uv__strscpy(buffer->machine, "mips", sizeof(buffer->machine)); in uv_os_uname()
1648 uv__strscpy(buffer->machine, "alpha", sizeof(buffer->machine)); in uv_os_uname()
1651 uv__strscpy(buffer->machine, "powerpc", sizeof(buffer->machine)); in uv_os_uname()
1654 uv__strscpy(buffer->machine, "sh", sizeof(buffer->machine)); in uv_os_uname()
1657 uv__strscpy(buffer->machine, "arm", sizeof(buffer->machine)); in uv_os_uname()
[all …]
H A Dfs-event.c44 handle->buffer, in uv__fs_event_queue_readdirchanges()
143 handle->buffer = NULL; in uv_fs_event_init()
288 if (!handle->buffer) { in uv_fs_event_start()
291 if (!handle->buffer) { in uv_fs_event_start()
299 handle->buffer, in uv_fs_event_start()
348 if (handle->buffer) { in uv_fs_event_start()
349 uv__free(handle->buffer); in uv_fs_event_start()
350 handle->buffer = NULL; in uv_fs_event_start()
609 if (handle->buffer) { in uv__fs_event_endgame()
610 uv__free(handle->buffer); in uv__fs_event_endgame()
[all …]
/libuv/docs/code/idle-compute/
H A Dmain.c8 char buffer[1024]; variable
22 buffer[stdin_watcher.result] = '\0'; in on_type()
23 printf("Typed %s\n", buffer); in on_type()
25 uv_buf_t buf = uv_buf_init(buffer, 1024); in on_type()
39 uv_buf_t buf = uv_buf_init(buffer, 1024); in main()
/libuv/src/unix/
H A Dprocfs-exepath.c28 int uv_exepath(char* buffer, size_t* size) { in uv_exepath() argument
31 if (buffer == NULL || size == NULL || *size == 0) in uv_exepath()
36 n = readlink("/proc/self/exe", buffer, n); in uv_exepath()
41 buffer[n] = '\0'; in uv_exepath()
H A Daix-common.c60 int uv_exepath(char* buffer, size_t* size) { in uv_exepath() argument
66 if (buffer == NULL || size == NULL || *size == 0) in uv_exepath()
76 memcpy(buffer, original_exepath, *size); in uv_exepath()
77 buffer[*size] = '\0'; in uv_exepath()
88 return uv__search_path(args, buffer, size); in uv_exepath()
H A Dno-proctitle.c39 int uv_get_process_title(char* buffer, size_t size) { in uv_get_process_title() argument
40 if (buffer == NULL || size == 0) in uv_get_process_title()
43 buffer[0] = '\0'; in uv_get_process_title()
H A Dbsd-proctitle.c72 int uv_get_process_title(char* buffer, size_t size) { in uv_get_process_title() argument
75 if (buffer == NULL || size == 0) in uv_get_process_title()
89 memcpy(buffer, process_title, len); in uv_get_process_title()
96 buffer[len] = '\0'; in uv_get_process_title()
H A Dcore.c770 buffer = scratch; in uv_cwd()
774 *size = strlen(buffer); in uv_cwd()
778 buffer[*size] = '\0'; in uv_cwd()
781 if (buffer == scratch) { in uv_cwd()
1206 buffer[len] = '\0'; in uv_os_tmpdir()
1705 if (buffer == NULL) in uv_os_uname()
1713 r = uv__strscpy(buffer->sysname, buf.sysname, sizeof(buffer->sysname)); in uv_os_uname()
1728 r = uv__strscpy(buffer->release, buf.release, sizeof(buffer->release)); in uv_os_uname()
1733 r = uv__strscpy(buffer->version, buf.version, sizeof(buffer->version)); in uv_os_uname()
1738 r = uv__strscpy(buffer->machine, "ppc64", sizeof(buffer->machine)); in uv_os_uname()
[all …]
H A Dgetaddrinfo.c226 int uv_if_indextoname(unsigned int ifindex, char* buffer, size_t* size) { in uv_if_indextoname() argument
230 if (buffer == NULL || size == NULL || *size == 0) in uv_if_indextoname()
243 memcpy(buffer, ifname_buf, len); in uv_if_indextoname()
244 buffer[len] = '\0'; in uv_if_indextoname()
250 int uv_if_indextoiid(unsigned int ifindex, char* buffer, size_t* size) { in uv_if_indextoiid() argument
251 return uv_if_indextoname(ifindex, buffer, size); in uv_if_indextoiid()
H A Dhurd.c39 int uv_exepath(char* buffer, size_t* size) { in uv_exepath() argument
45 if (buffer == NULL || size == NULL || *size == 0) in uv_exepath()
57 copied = uv__strscpy(buffer, exepath, *size); in uv_exepath()
60 *size = copied < 0 ? strlen(buffer) : (size_t) copied; in uv_exepath()
H A Dqnx.c58 int uv_exepath(char* buffer, size_t* size) { in uv_exepath() argument
60 if (buffer == NULL || size == NULL || *size == 0) in uv_exepath()
64 strlcpy(buffer, path, *size); in uv_exepath()
65 *size = strlen(buffer); in uv_exepath()
H A Dproctitle.c127 int uv_get_process_title(char* buffer, size_t size) { in uv_get_process_title() argument
128 if (buffer == NULL || size == 0) in uv_get_process_title()
144 memcpy(buffer, process_title.str, process_title.len + 1); in uv_get_process_title()
146 buffer[process_title.len] = '\0'; in uv_get_process_title()
/libuv/docs/src/
H A Dfs_poll.rst61 .. c:function:: int uv_fs_poll_getpath(uv_fs_poll_t* handle, char* buffer, size_t* size)
63 Get the path being monitored by the handle. The buffer must be preallocated
65 On success, `buffer` will contain the path and `size` its length. If the buffer
70 and the buffer is not null terminated.
73 byte on `UV_ENOBUFS`, and the buffer is null terminated

Completed in 54 milliseconds

123