Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 122) 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()
38 r = uv_os_homedir(homedir, &len); 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()
[all …]
H A Dtest-tmpdir.c31 size_t len; in TEST_IMPL() local
36 len = sizeof tmpdir; in TEST_IMPL()
40 r = uv_os_tmpdir(tmpdir, &len); 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()
[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-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()
97 size_t len; in TEST_IMPL() local
112 len = sizeof buf; in TEST_IMPL()
116 len = sizeof buf; in TEST_IMPL()
127 len = sizeof buf; in TEST_IMPL()
135 len = sizeof buf; in TEST_IMPL()
145 len = sizeof buf; in TEST_IMPL()
149 len = sizeof buf; in TEST_IMPL()
[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()
/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.c231 socklen_t len; in uv__socket_sockopt() local
1118 size_t len; in uv_os_homedir() local
1145 *size = len; in uv_os_homedir()
1154 size_t len; in uv_os_tmpdir() local
1191 if (len > 1 && buf[len - 1] == '/') { in uv_os_tmpdir()
1192 len--; in uv_os_tmpdir()
1197 *size = len; in uv_os_tmpdir()
1433 size_t len; in uv_os_getenv() local
1451 *size = len; in uv_os_getenv()
1487 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.c359 socklen_t len; in uv_guess_handle() local
378 len = sizeof(ss); in uv_guess_handle()
379 if (getsockname(file, (struct sockaddr*) &ss, &len)) { in uv_guess_handle()
399 len = sizeof(ss); in uv_guess_handle()
400 if (getsockname(file, (struct sockaddr*) &ss, &len)) { in uv_guess_handle()
416 len = sizeof(type); in uv_guess_handle()
417 if (getsockopt(file, SOL_SOCKET, SO_TYPE, &type, &len)) in uv_guess_handle()
430 if (len == 0) in uv_guess_handle()
H A Dfs.c734 ssize_t len; in uv__fs_readlink() local
772 if (len == -1) { in uv__fs_readlink()
806 ssize_t len; in uv__fs_realpath() local
837 size_t len; in uv__fs_sendfile_emul() local
843 len = req->bufsml[0].len; in uv__fs_sendfile_emul()
1038 size_t len; in uv__fs_sendfile() local
1042 len = req->bufsml[0].len; in uv__fs_sendfile()
1075 off_t len; in uv__fs_sendfile() local
1095 len = 0; in uv__fs_sendfile()
1100 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()
H A Dasync.c183 ssize_t len; in uv__async_send() local
188 len = 1; in uv__async_send()
195 len = sizeof(val); in uv__async_send()
201 r = write(fd, buf, len); in uv__async_send()
204 if (r == len) in uv__async_send()
H A Dfsevents.c222 int len; in uv__fsevents_event_cb() local
254 len = strlen(path); in uv__fsevents_event_cb()
260 if (len < handle->realpath_len) in uv__fsevents_event_cb()
266 if (handle->realpath_len != len && in uv__fsevents_event_cb()
277 len -= handle->realpath_len; in uv__fsevents_event_cb()
283 if (len == 0) { in uv__fsevents_event_cb()
287 while (len < handle->realpath_len && path[-1] != '/') { in uv__fsevents_event_cb()
289 len++; in uv__fsevents_event_cb()
296 len--; in uv__fsevents_event_cb()
307 event = uv__malloc(sizeof(*event) + len); in uv__fsevents_event_cb()
[all …]
/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()
397 size_t len; in uv_get_process_title() local
589 assert(len > 0 && len < ARRAY_SIZE(key_name)); in uv_cpu_info()
936 size_t len; in uv_os_homedir() local
964 *size = len; in uv_os_homedir()
973 size_t len; in uv_os_tmpdir() local
978 len = 0; in uv_os_tmpdir()
984 len += 1; in uv_os_tmpdir()
989 len = GetTempPathW(len, path); in uv_os_tmpdir()
1000 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 120 milliseconds

12345