/libuv/test/ |
H A D | test-get-currentexe.c | 44 size_t size; in TEST_IMPL() local 49 r = uv_exepath(buffer, &size); in TEST_IMPL() 67 r = uv_exepath(NULL, &size); in TEST_IMPL() 73 size = 0; in TEST_IMPL() 74 r = uv_exepath(buffer, &size); in TEST_IMPL() 79 size = 1; in TEST_IMPL() 80 r = uv_exepath(buffer, &size); in TEST_IMPL() 82 ASSERT_OK(size); in TEST_IMPL() 87 size = 2; in TEST_IMPL() 90 ASSERT_EQ(1, size); in TEST_IMPL() [all …]
|
H A D | test-env-vars.c | 32 size_t size; in TEST_IMPL() local 50 size = BUF_SIZE; in TEST_IMPL() 57 size = 0; in TEST_IMPL() 70 size = BUF_SIZE; in TEST_IMPL() 78 size = BUF_SIZE - 1; in TEST_IMPL() 82 ASSERT_EQ(size, BUF_SIZE); in TEST_IMPL() 99 size = BUF_SIZE; in TEST_IMPL() 102 ASSERT_OK(size); in TEST_IMPL() 158 size = n + 1; in TEST_IMPL() 160 p = malloc(size); in TEST_IMPL() [all …]
|
H A D | test-gethostname.c | 28 size_t size; in TEST_IMPL() local 33 size = 1; in TEST_IMPL() 34 r = uv_os_gethostname(NULL, &size); in TEST_IMPL() 38 size = 0; in TEST_IMPL() 39 r = uv_os_gethostname(buf, &size); in TEST_IMPL() 51 size = UV_MAXHOSTNAMESIZE; in TEST_IMPL() 52 r = uv_os_gethostname(buf, &size); in TEST_IMPL() 54 ASSERT(size > 0 && size == strlen(buf)); in TEST_IMPL() 55 ASSERT_EQ(size + 1, enobufs_size); in TEST_IMPL()
|
H A D | task.h | 172 #define ASSERT_BASE_HEX(expr, a, operator, b, size) \ argument 185 for (i = 0; i < size; ++i) { \ 190 for (i = 0; i < size; ++i) { \ 227 #define ASSERT_MEM_EQ(a, b, size) \ argument 228 ASSERT_BASE_LEN(memcmp(a, b, size) == 0, a, ==, b, s, size) 230 #define ASSERT_MEM_NE(a, b, size) \ argument 231 ASSERT_BASE_LEN(memcmp(a, b, size) != 0, a, !=, b, s, size) 233 #define ASSERT_MEM_HEX_EQ(a, b, size) \ argument 234 ASSERT_BASE_HEX(memcmp(a, b, size) == 0, a, ==, b, size) 236 #define ASSERT_MEM_HEX_NE(a, b, size) \ argument [all …]
|
H A D | runner-win.c | 213 LARGE_INTEGER size; in process_output_size() local 214 if (!GetFileSizeEx(p->stdio_out, &size)) in process_output_size() 216 return (long int)size.QuadPart; in process_output_size() 243 DWORD size; in process_read_last_line() local 250 size = GetFileSize(p->stdio_out, NULL); in process_read_last_line() 251 if (size == INVALID_FILE_SIZE) in process_read_last_line() 254 if (size == 0) { in process_read_last_line() 260 if (size >= buffer_len) in process_read_last_line() 261 overlapped.Offset = size - buffer_len - 1; in process_read_last_line()
|
/libuv/src/unix/ |
H A D | freebsd.c | 69 if (buffer == NULL || size == NULL || *size == 0) in uv_exepath() 83 *size -= 1; in uv_exepath() 85 if (*size > abspath_size) in uv_exepath() 86 *size = abspath_size; in uv_exepath() 89 buffer[*size] = '\0'; in uv_exepath() 110 size_t size = sizeof(info); in uv_get_total_memory() local 193 size_t size; in uv_cpu_info() local 215 size = sizeof(cpuspeed); in uv_cpu_info() 220 size = sizeof(model); in uv_cpu_info() 224 size = sizeof(numcpus); in uv_cpu_info() [all …]
|
H A D | openbsd.c | 50 size_t size = sizeof(info); in uv_loadavg() local 69 if (buffer == NULL || size == NULL || *size == 0) in uv_exepath() 97 *size -= 1; in uv_exepath() 99 if (*size > exepath_size) in uv_exepath() 100 *size = exepath_size; in uv_exepath() 103 buffer[*size] = '\0'; in uv_exepath() 192 size_t size; in uv_cpu_info() local 196 size = sizeof(model); in uv_cpu_info() 201 size = sizeof(numcpus); in uv_cpu_info() 213 size = sizeof(cpuspeed); in uv_cpu_info() [all …]
|
H A D | netbsd.c | 55 size_t size = sizeof(info); in uv_loadavg() local 75 if (buffer == NULL || size == NULL || *size == 0) in uv_exepath() 94 *size = strlen(buffer); in uv_exepath() 102 size_t size = sizeof(info); in uv_get_free_memory() local 120 size_t size = sizeof(info); in uv_get_total_memory() local 172 size_t size = sizeof(info); in uv_uptime() local 194 size_t size; in uv_cpu_info() local 197 size = sizeof(model); in uv_cpu_info() 203 size = sizeof(numcpus); in uv_cpu_info() 209 size = sizeof(cpuspeed); in uv_cpu_info() [all …]
|
H A D | darwin.c | 73 if (buffer == NULL || size == NULL || *size == 0) in uv_exepath() 87 *size -= 1; in uv_exepath() 88 if (*size > abspath_size) in uv_exepath() 89 *size = abspath_size; in uv_exepath() 92 buffer[*size] = '\0'; in uv_exepath() 114 size_t size = sizeof(info); in uv_get_total_memory() local 135 size_t size = sizeof(info); in uv_loadavg() local 170 size_t size = sizeof(info); in uv_uptime() local 187 size_t size; in uv_cpu_info() local 194 size = sizeof(model); in uv_cpu_info() [all …]
|
H A D | os390-proctitle.c | 41 size_t size; in uv_setup_args() local 49 size = 0; in uv_setup_args() 51 size += strlen(argv[i]) + 1; in uv_setup_args() 54 size += (argc + 1) * sizeof(char*); in uv_setup_args() 56 new_argv = uv__malloc(size); in uv_setup_args() 63 size = strlen(argv[i]) + 1; in uv_setup_args() 64 memcpy(s, argv[i], size); in uv_setup_args() 66 s += size; in uv_setup_args() 105 int uv_get_process_title(char* buffer, size_t size) { in uv_get_process_title() argument 108 if (buffer == NULL || size == 0) in uv_get_process_title() [all …]
|
H A D | proctitle.c | 49 size_t size; in uv_setup_args() local 61 size = pt.cap; in uv_setup_args() 63 size += strlen(argv[i]) + 1; in uv_setup_args() 66 size += (argc + 1) * sizeof(char*); in uv_setup_args() 68 new_argv = uv__malloc(size); in uv_setup_args() 75 size = pt.cap; in uv_setup_args() 79 size = strlen(argv[i]) + 1; in uv_setup_args() 81 memcpy(s, argv[i], size); in uv_setup_args() 83 s += size; in uv_setup_args() 128 if (buffer == NULL || size == 0) in uv_get_process_title() [all …]
|
H A D | aix-common.c | 60 int uv_exepath(char* buffer, size_t* size) { in uv_exepath() argument 66 if (buffer == NULL || size == NULL || *size == 0) in uv_exepath() 73 *size -= 1; in uv_exepath() 74 if (*size > cached_len) in uv_exepath() 75 *size = cached_len; 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 D | procfs-exepath.c | 28 int uv_exepath(char* buffer, size_t* size) { in uv_exepath() argument 31 if (buffer == NULL || size == NULL || *size == 0) in uv_exepath() 34 n = *size - 1; in uv_exepath() 42 *size = n; in uv_exepath()
|
H A D | os390-syscalls.c | 112 if (len <= lst->size) in maybe_resize() 115 if (lst->size == 0) in maybe_resize() 119 event = lst->items[lst->size - 1]; in maybe_resize() 135 lst->size = newsize; in maybe_resize() 195 lst->size = 0; in child_fork() 219 lst->size = 0; in epoll_create1() 284 nmsgsfds_t size; in epoll_wait() local 299 if (lst->size > EP_MAX_PFDS) { in epoll_wait() 309 assert(lst->size > 0); in epoll_wait() 310 _SET_FDS_MSGS(size, 1, lst->size - 1); in epoll_wait() [all …]
|
H A D | haiku.c | 36 int uv_exepath(char* buffer, size_t* size) { in uv_exepath() argument 41 if (buffer == NULL || size == NULL || *size == 0) in uv_exepath() 49 abspath_len = uv__strscpy(buffer, abspath, *size); in uv_exepath() 50 *size -= 1; in uv_exepath() 51 if (abspath_len >= 0 && *size > (size_t)abspath_len) in uv_exepath() 52 *size = (size_t)abspath_len; in uv_exepath()
|
H A D | hurd.c | 39 int uv_exepath(char* buffer, size_t* size) { in uv_exepath() argument 45 if (buffer == NULL || size == NULL || *size == 0) in uv_exepath() 48 if (*size - 1 > 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 D | getaddrinfo.c | 226 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() 238 if (*size <= len) { in uv_if_indextoname() 239 *size = len + 1; in uv_if_indextoname() 245 *size = len; 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 D | qnx.c | 58 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()
|
/libuv/src/win/ |
H A D | fs-fd-hash-inl.h | 49 LARGE_INTEGER size; member 64 size_t size; member 86 uv__fd_hash[i].size = 0; in uv__fd_hash_init() 111 size_t first_group_size = bucket_ptr->size % UV__FD_HASH_GROUP_SIZE; \ 145 i = bucket_ptr->size % UV__FD_HASH_GROUP_SIZE; in uv__fd_hash_add() 147 if (bucket_ptr->size != 0 && i == 0) { in uv__fd_hash_add() 157 bucket_ptr->size += 1; in uv__fd_hash_add() 177 bucket_ptr->size -= 1; in uv__fd_hash_remove() 179 i = bucket_ptr->size % UV__FD_HASH_GROUP_SIZE; in uv__fd_hash_remove() 184 if (bucket_ptr->size != 0 && in uv__fd_hash_remove() [all …]
|
H A D | fs-event.c | 161 size_t size; in uv_fs_event_start() local 197 size = GetLongPathNameW(pathw, NULL, 0); in uv_fs_event_start() 199 if (size) { in uv_fs_event_start() 205 size = GetLongPathNameW(pathw, long_path, size); in uv_fs_event_start() 206 if (size) { in uv_fs_event_start() 207 long_path[size] = '\0'; in uv_fs_event_start() 419 int err, sizew, size; in uv__process_fs_event_req() local 484 filenamew[size - 1] = L'\0'; in uv__process_fs_event_req() 489 if (size) { in uv__process_fs_event_req() 495 size = GetLongPathNameW(filenamew, long_filenamew, size); in uv__process_fs_event_req() [all …]
|
H A D | getaddrinfo.c | 349 int uv_if_indextoname(unsigned int ifindex, char* buffer, size_t* size) { in uv_if_indextoname() argument 354 if (buffer == NULL || size == NULL || *size == 0) in uv_if_indextoname() 367 return uv__copy_utf16_to_utf8(wname, -1, buffer, size); in uv_if_indextoname() 370 int uv_if_indextoiid(unsigned int ifindex, char* buffer, size_t* size) { in uv_if_indextoiid() argument 373 if (buffer == NULL || size == NULL || *size == 0) in uv_if_indextoiid() 376 r = snprintf(buffer, *size, "%d", ifindex); in uv_if_indextoiid() 381 if (r >= (int) *size) { in uv_if_indextoiid() 382 *size = r + 1; in uv_if_indextoiid() 386 *size = r; in uv_if_indextoiid()
|
H A D | getnameinfo.c | 45 size_t size; in uv__getnameinfo_work() local 61 size = sizeof(req->host); in uv__getnameinfo_work() 62 ret = uv__copy_utf16_to_utf8(host, -1, req->host, &size); in uv__getnameinfo_work() 68 size = sizeof(req->service); in uv__getnameinfo_work() 69 ret = uv__copy_utf16_to_utf8(service, -1, req->service, &size); in uv__getnameinfo_work()
|
/libuv/docs/code/progress/ |
H A D | main.c | 13 int size = *((int*) req->data); in fake_download() local 15 while (downloaded < size) { in fake_download() 16 percentage = downloaded*100.0/size; in fake_download() 40 int size = 10240; in main() local 41 req.data = (void*) &size; in main()
|
/libuv/src/ |
H A D | inet.c | 29 static int inet_ntop4(const unsigned char *src, char *dst, size_t size); 30 static int inet_ntop6(const unsigned char *src, char *dst, size_t size); 35 int uv_inet_ntop(int af, const void* src, char* dst, size_t size) { in uv_inet_ntop() argument 38 return (inet_ntop4(src, dst, size)); in uv_inet_ntop() 40 return (inet_ntop6(src, dst, size)); in uv_inet_ntop() 48 static int inet_ntop4(const unsigned char *src, char *dst, size_t size) { in inet_ntop4() argument 54 if (l <= 0 || (size_t) l >= size) { in inet_ntop4() 57 uv__strscpy(dst, tmp, size); in inet_ntop4() 62 static int inet_ntop6(const unsigned char *src, char *dst, size_t size) { in inet_ntop6() argument 139 if ((size_t) (tp - tmp) > size) in inet_ntop6() [all …]
|
H A D | uv-common.c | 75 void* uv__malloc(size_t size) { in uv__malloc() argument 76 if (size > 0) in uv__malloc() 97 if (size > 0) in uv__realloc() 106 newptr = uv__realloc(ptr, size); in uv__reallocf() 108 if (size > 0) in uv__reallocf() 314 dst, size); in uv_ip_name() 317 dst, size); in uv_ip_name() 648 *size = 0; in uv_fs_event_getpath() 653 if (required_len >= *size) { in uv_fs_event_getpath() 654 *size = required_len + 1; in uv_fs_event_getpath() [all …]
|