Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 124) sorted by relevance

12345

/libuv/test/
H A Dtest-homedir.c31 size_t len; in TEST_IMPL() local
35 len = sizeof homedir; in TEST_IMPL()
40 ASSERT_EQ(strlen(homedir), len); in TEST_IMPL()
41 ASSERT_GT(len, 0); in TEST_IMPL()
42 ASSERT_EQ(homedir[len], '\0'); in TEST_IMPL()
50 if (len == 1) in TEST_IMPL()
57 len = SMALLPATH; in TEST_IMPL()
60 ASSERT_GT(len, SMALLPATH); in TEST_IMPL()
63 r = uv_os_homedir(NULL, &len); in TEST_IMPL()
67 len = 0; in TEST_IMPL()
[all …]
H A Dtest-tmpdir.c31 size_t len; in TEST_IMPL() local
36 len = sizeof tmpdir; in TEST_IMPL()
43 ASSERT_GT(len, 0); in TEST_IMPL()
44 ASSERT_EQ(tmpdir[len], '\0'); in TEST_IMPL()
46 if (len > 1) { in TEST_IMPL()
47 last = tmpdir[len - 1]; in TEST_IMPL()
56 len = SMALLPATH; in TEST_IMPL()
59 ASSERT_GT(len, SMALLPATH); in TEST_IMPL()
62 r = uv_os_tmpdir(NULL, &len); in TEST_IMPL()
66 len = 0; in TEST_IMPL()
[all …]
H A Dtest-pipe-getsockname.c51 size_t len; in pipe_client_connect_cb() local
57 len = sizeof buf; in pipe_client_connect_cb()
70 len = sizeof buf; in pipe_client_connect_cb()
84 ASSERT_EQ(len, 6); in check_is_autobind_abstract_socket_name()
96 size_t len; in pipe_client_autobind_connect_cb() local
99 len = 5; in pipe_client_autobind_connect_cb()
101 len = 6; in pipe_client_autobind_connect_cb()
127 size_t len; in TEST_IMPL() local
142 len = sizeof buf; in TEST_IMPL()
146 len = sizeof buf; in TEST_IMPL()
[all …]
H A Dtest-get-passwd.c37 size_t len; in TEST_IMPL() local
44 ASSERT_GT(len, 0); in TEST_IMPL()
51 ASSERT_GT(len, 0); in TEST_IMPL()
56 ASSERT_GT(len, 0); in TEST_IMPL()
64 if (len == 1) in TEST_IMPL()
112 size_t len; in TEST_IMPL() local
123 (void) &len; in TEST_IMPL()
137 ASSERT_GT(len, 0); in TEST_IMPL()
146 ASSERT_GT(len, 0); in TEST_IMPL()
178 size_t len; in TEST_IMPL() local
[all …]
H A Dtest-process-title-threadsafe.c44 size_t len; in getter_thread_body() local
55 len = strlen(buffer); in getter_thread_body()
56 ASSERT_GT(len, 0); 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-osx-select.c36 buf->len = sizeof(slab); in alloc_cb()
53 size_t len; in TEST_IMPL() local
73 for (i = 0, len = strlen(str); i < len; i++) { in TEST_IMPL()
91 size_t len; in TEST_IMPL() local
127 for (i = 0, len = strlen(str); i < len; i++) { in TEST_IMPL()
H A Dtest-fs-poll.c174 size_t len; in TEST_IMPL() local
180 len = sizeof buf; in TEST_IMPL()
181 ASSERT_EQ(UV_EINVAL, uv_fs_poll_getpath(&poll_handle, buf, &len)); in TEST_IMPL()
183 len = sizeof buf; in TEST_IMPL()
184 ASSERT_OK(uv_fs_poll_getpath(&poll_handle, buf, &len)); in TEST_IMPL()
185 ASSERT_NE(0, buf[len - 1]); in TEST_IMPL()
186 ASSERT_EQ(buf[len], '\0'); in TEST_IMPL()
187 ASSERT_OK(memcmp(buf, FIXTURE, len)); in TEST_IMPL()
H A Dtest-tcp-rst.c41 buf->len = size; in alloc_cb()
68 ASSERT_EQ(qbuf.len, uv_try_write((uv_stream_t*) &tcp, &qbuf, 1)); in connect_cb()
87 qbuf.len = 3; in TEST_IMPL()
H A Dtest-idna.c225 ssize_t len; in TEST_IMPL() local
227 len = uv_wtf8_length_as_utf16(input); in TEST_IMPL()
228 ASSERT_GT(len, 0); in TEST_IMPL()
229 ASSERT_LT(len, ARRAY_SIZE(buf)); in TEST_IMPL()
230 uv_wtf8_to_utf16(input, buf, len); in TEST_IMPL()
H A Dtest-shutdown-simultaneous.c40 buf->len = size; in alloc_cb()
98 ASSERT_EQ(qbuf.len, uv_try_write((uv_stream_t*) &tcp, &qbuf, 1)); in connect_cb()
114 qbuf.len = 4; in TEST_IMPL()
/libuv/src/unix/
H A Dproctitle.c57 pt.len = strlen(argv[0]); in uv_setup_args()
58 pt.cap = pt.len + 1; in uv_setup_args()
98 size_t len; in uv_set_process_title() local
105 len = strlen(title); in uv_set_process_title()
110 if (len >= pt->cap) { in uv_set_process_title()
111 len = 0; in uv_set_process_title()
113 len = pt->cap - 1; in uv_set_process_title()
116 memcpy(pt->str, title, len); in uv_set_process_title()
117 memset(pt->str + len, '\0', pt->cap - len); in uv_set_process_title()
118 pt->len = len; in uv_set_process_title()
[all …]
H A Dgetaddrinfo.c148 size_t len; in uv_getaddrinfo() local
190 len = 0; in uv_getaddrinfo()
194 len += sizeof(*hints); in uv_getaddrinfo()
199 len += service_len; in uv_getaddrinfo()
228 size_t len; in uv_if_indextoname() local
236 len = strnlen(ifname_buf, sizeof(ifname_buf)); in uv_if_indextoname()
238 if (*size <= len) { in uv_if_indextoname()
239 *size = len + 1; in uv_if_indextoname()
243 memcpy(buffer, ifname_buf, len); in uv_if_indextoname()
244 buffer[len] = '\0'; in uv_if_indextoname()
[all …]
H A Dbsd-proctitle.c73 size_t len; in uv_get_process_title() local
82 len = strlen(process_title) + 1; in uv_get_process_title()
84 if (size < len) { in uv_get_process_title()
89 memcpy(buffer, process_title, len); in uv_get_process_title()
91 len = 0; in uv_get_process_title()
96 buffer[len] = '\0'; in uv_get_process_title()
H A Dcore.c241 socklen_t len; in uv__socket_sockopt() local
1128 size_t len; in uv_os_homedir() local
1155 *size = len; in uv_os_homedir()
1164 size_t len; in uv_os_tmpdir() local
1201 if (len > 1 && buf[len - 1] == '/') { in uv_os_tmpdir()
1202 len--; in uv_os_tmpdir()
1207 *size = len; in uv_os_tmpdir()
1443 size_t len; in uv_os_getenv() local
1461 *size = len; in uv_os_getenv()
1497 size_t len; in uv_os_gethostname() local
[all …]
H A Dos390-syscalls.c106 static void maybe_resize(uv__os390_epoll* lst, unsigned int len) { in maybe_resize() argument
112 if (len <= lst->size) in maybe_resize()
123 newsize = next_power_of_two(len); in maybe_resize()
392 size_t len; in mkdtemp() local
398 len = strlen(path); in mkdtemp()
399 ep = path + len; in mkdtemp()
400 if (len < num_x || strncmp(ep - num_x, "XXXXXX", num_x)) { in mkdtemp()
445 ssize_t os390_readlink(const char* path, char* buf, size_t len) { in os390_readlink() argument
454 tmpbuf = uv__malloc(len + 1); in os390_readlink()
460 rlen = readlink(path, tmpbuf, len); in os390_readlink()
[all …]
H A Dtty.c390 socklen_t len; in uv_guess_handle() local
409 len = sizeof(ss); in uv_guess_handle()
410 if (getsockname(file, (struct sockaddr*) &ss, &len)) { in uv_guess_handle()
430 len = sizeof(ss); in uv_guess_handle()
431 if (getsockname(file, (struct sockaddr*) &ss, &len)) { in uv_guess_handle()
447 len = sizeof(type); in uv_guess_handle()
448 if (getsockopt(file, SOL_SOCKET, SO_TYPE, &type, &len)) in uv_guess_handle()
461 if (len == 0) in uv_guess_handle()
H A Dfs.c742 ssize_t len; in uv__fs_readlink() local
780 if (len == -1) { in uv__fs_readlink()
814 ssize_t len; in uv__fs_realpath() local
845 size_t len; in uv__fs_sendfile_emul() local
851 len = req->bufsml[0].len; in uv__fs_sendfile_emul()
1046 size_t len; in uv__fs_sendfile() local
1050 len = req->bufsml[0].len; in uv__fs_sendfile()
1086 off_t len; in uv__fs_sendfile() local
1106 len = 0; in uv__fs_sendfile()
1111 len = req->bufsml[0].len; in uv__fs_sendfile()
[all …]
H A Dos390-proctitle.c106 size_t len; in uv_get_process_title() local
118 len = strlen(process_title); in uv_get_process_title()
120 if (size <= len) { in uv_get_process_title()
H A Dnetbsd.c243 int uv__random_sysctl(void* buf, size_t len) { in uv__random_sysctl() argument
249 while (len) { in uv__random_sysctl()
250 req = len < 32 ? len : 32; in uv__random_sysctl()
260 len -= count; in uv__random_sysctl()
/libuv/src/
H A Dinet.c84 best.len = 0; in inet_ntop6()
86 cur.len = 0; in inet_ntop6()
90 cur.base = i, cur.len = 1; in inet_ntop6()
92 cur.len++; in inet_ntop6()
95 if (best.base == -1 || cur.len > best.len) in inet_ntop6()
102 if (best.base == -1 || cur.len > best.len) in inet_ntop6()
115 i < (best.base + best.len)) { in inet_ntop6()
154 int len; in uv_inet_pton() local
160 len = p - src; in uv_inet_pton()
163 memcpy(s, src, len); in uv_inet_pton()
[all …]
H A Duv-common.c56 size_t len = strlen(s) + 1; in uv__strdup() local
57 char* m = uv__malloc(len); in uv__strdup()
60 return memcpy(m, s, len); in uv__strdup()
65 size_t len = strlen(s); in uv__strndup() local
66 if (n < len) in uv__strndup()
67 len = n; in uv__strndup()
68 m = uv__malloc(len + 1); in uv__strndup()
71 m[len] = '\0'; in uv__strndup()
72 return memcpy(m, s, len); in uv__strndup()
193 buf.len = len; in uv_buf_init()
[all …]
/libuv/src/win/
H A Dprocess.c454 if (len == 0) { in quote_cmd_arg()
464 target += len; in quote_cmd_arg()
475 target += len; in quote_cmd_arg()
650 size_t len; in make_program_env() local
662 ssize_t len; in make_program_env() local
665 if (len < 0) in make_program_env()
666 return len; in make_program_env()
684 ssize_t len; in make_program_env() local
691 ptr += len; in make_program_env()
735 ptr += len) { in make_program_env()
[all …]
H A Dutil.c183 *len = n; in uv__cwd()
391 size_t len; in uv_get_process_title() local
587 assert(len > 0 && len < ARRAY_SIZE(key_name)); in uv_cpu_info()
934 size_t len; in uv_os_homedir() local
967 *size = len; in uv_os_homedir()
976 size_t len; in uv_os_tmpdir() local
981 len = 0; in uv_os_tmpdir()
993 len += 1; in uv_os_tmpdir()
998 len = GetTempPathW(len, path); in uv_os_tmpdir()
1009 len--; in uv_os_tmpdir()
[all …]
H A Dsnprintf.c30 int snprintf(char* buf, size_t len, const char* fmt, ...) { in snprintf() argument
36 vsnprintf_s(buf, len, _TRUNCATE, fmt, ap); in snprintf()
/libuv/docs/code/tty/
H A Dmain.c21 buf1.len = strlen(buf1.base); in main()
26 buf.len = strlen(buf.base); in main()

Completed in 52 milliseconds

12345