/curl/tests/unit/ |
H A D | unit1302.c | 56 size_t size = 0; variable 62 fail_unless(size == 4, "size should be 4"); 68 fail_unless(size == 4, "size should be 4"); 74 fail_unless(size == 4, "size should be 4"); 80 fail_unless(size == 8, "size should be 8"); 86 fail_unless(size == 8, "size should be 8"); 146 size = 1; /* not zero */ 155 size = 1; /* not zero */ 164 size = 1; /* not zero */ 173 size = 1; /* not zero */ [all …]
|
H A D | unit1654.c | 60 fail_unless(asi->list.size == 4, "wrong number of entries"); 66 fail_unless(asi->list.size == 5, "wrong number of entries"); 71 fail_unless(asi->list.size == 6, "wrong number of entries"); 78 fail_unless(asi->list.size == 8, "wrong number of entries"); 84 fail_unless(asi->list.size == 9, "wrong number of entries"); 91 fail_unless(asi->list.size == 10, "wrong number of entries"); 98 fail_unless(asi->list.size == 12, "wrong number of entries"); 104 fail_unless(asi->list.size == 10, "wrong number of entries");
|
H A D | unit1650.c | 59 size_t size; member 75 size_t size; member 158 size_t size = 0; variable 165 buffer, sizeof(buffer), &size); 171 if(size != req[i].size) { 173 req[i].size, size); 174 fprintf(stderr, "DNS encode made: %s\n", hexdump(buffer, size)); 175 abort_if(size != req[i].size, "size"); 177 if(req[i].packet && memcmp(req[i].packet, buffer, size)) { 180 hexdump((unsigned char *)req[i].packet, size)); [all …]
|
/curl/tests/data/ |
H A D | test571 | 53 rtp: part 2 channel 1 size 10 54 rtp: part 2 channel 0 size 500 55 rtp: part 2 channel 0 size 196 56 rtp: part 2 channel 0 size 124 59 rtp: part 3 channel 1 size 10 60 rtp: part 3 channel 0 size 50 62 rtp: part 4 channel 0 size 42 63 rtp: part 4 channel 1 size 30 65 rtp: part 4 channel 0 size 85 66 rtp: part 4 channel 1 size 24 [all …]
|
/curl/tests/ |
H A D | memanalyze.pl | 145 $size = $1; 155 $totalmem += $size; 156 $memsum += $size; 169 $size = $1*$2; 182 $memsum += $size; 204 $memsum += $size; 221 $size = $2; 227 $memsum += $size; 241 $size = $2; 247 $memsum += $size; [all …]
|
/curl/docs/examples/ |
H A D | getinmemory.c | 38 size_t size; member 42 WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp) in WriteMemoryCallback() argument 44 size_t realsize = size * nmemb; in WriteMemoryCallback() 47 char *ptr = realloc(mem->memory, mem->size + realsize + 1); in WriteMemoryCallback() 55 memcpy(&(mem->memory[mem->size]), contents, realsize); in WriteMemoryCallback() 56 mem->size += realsize; in WriteMemoryCallback() 57 mem->memory[mem->size] = 0; in WriteMemoryCallback() 70 chunk.size = 0; /* no data at this point */ in main() 106 printf("%lu bytes retrieved\n", (unsigned long)chunk.size); in main()
|
H A D | multi-debugcallback.c | 42 size_t size, char nohex) in dump() argument 54 text, (unsigned long)size, (unsigned long)size); in dump() 56 for(i = 0; i<size; i += width) { in dump() 63 if(i + c < size) in dump() 69 for(c = 0; (c < width) && (i + c < size); c++) { in dump() 71 if(nohex && (i + c + 1 < size) && ptr[i + c] == 0x0D && in dump() 79 if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D && in dump() 92 unsigned char *data, size_t size, in my_trace() argument 120 dump(text, stderr, data, size, TRUE); in my_trace()
|
H A D | postinmemory.c | 35 size_t size; member 39 WriteMemoryCallback(void *contents, size_t size, size_t nmemb, void *userp) in WriteMemoryCallback() argument 41 size_t realsize = size * nmemb; in WriteMemoryCallback() 44 char *ptr = realloc(mem->memory, mem->size + realsize + 1); in WriteMemoryCallback() 52 memcpy(&(mem->memory[mem->size]), contents, realsize); in WriteMemoryCallback() 53 mem->size += realsize; in WriteMemoryCallback() 54 mem->memory[mem->size] = 0; in WriteMemoryCallback() 67 chunk.size = 0; /* no data at this point */ in main()
|
H A D | debug.c | 37 FILE *stream, unsigned char *ptr, size_t size, in dump() argument 50 text, (unsigned long)size, (unsigned long)size); in dump() 52 for(i = 0; i<size; i += width) { in dump() 59 if(i + c < size) in dump() 65 for(c = 0; (c < width) && (i + c < size); c++) { in dump() 67 if(nohex && (i + c + 1 < size) && ptr[i + c] == 0x0D && in dump() 75 if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D && in dump() 88 char *data, size_t size, in my_trace() argument 121 dump(text, stderr, (unsigned char *)data, size, config->trace_ascii); in my_trace()
|
H A D | http2-download.c | 57 void dump(const char *text, unsigned int num, unsigned char *ptr, size_t size, in dump() argument 70 num, text, (unsigned long)size, (unsigned long)size); in dump() 72 for(i = 0; i<size; i += width) { in dump() 79 if(i + c < size) in dump() 85 for(c = 0; (c < width) && (i + c < size); c++) { in dump() 87 if(nohex && (i + c + 1 < size) && ptr[i + c] == 0x0D && in dump() 95 if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D && in dump() 107 char *data, size_t size, in my_trace() argument 141 dump(text, num, (unsigned char *)data, size, 1); in my_trace()
|
H A D | http2-pushinmemory.c | 41 size_t size; member 45 write_cb(void *contents, size_t size, size_t nmemb, void *userp) in write_cb() argument 47 size_t realsize = size * nmemb; in write_cb() 49 char *ptr = realloc(mem->memory, mem->size + realsize + 1); in write_cb() 57 memcpy(&(mem->memory[mem->size]), contents, realsize); in write_cb() 58 mem->size += realsize; in write_cb() 59 mem->memory[mem->size] = 0; in write_cb() 71 chunk->size = 0; /* no data at this point */ in init_memory()
|
/curl/tests/libtest/ |
H A D | lib552.c | 39 FILE *stream, unsigned char *ptr, size_t size, in dump() argument 51 fprintf(stream, "%s, %zu bytes (0x%zx)\n", text, size, size); in dump() 53 for(i = 0; i<size; i += width) { in dump() 60 if(i + c < size) in dump() 66 for(c = 0; (c < width) && (i + c < size); c++) { in dump() 68 if(nohex && (i + c + 1 < size) && ptr[i + c] == 0x0D && in dump() 76 if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D && in dump() 89 char *data, size_t size, in my_trace() argument 133 size_t amount = nmemb * size; /* Total bytes curl wants */ in read_callback() 147 int amount = curlx_uztosi(size * nmemb); in write_callback() [all …]
|
H A D | lib553.c | 35 static size_t myreadfunc(char *ptr, size_t size, size_t nmemb, void *stream) in myreadfunc() argument 43 size *= nmemb; in myreadfunc() 44 if(size > total) in myreadfunc() 45 size = total; in myreadfunc() 47 if(size > sizeof(buf)) in myreadfunc() 48 size = sizeof(buf); in myreadfunc() 50 memcpy(ptr, buf, size); in myreadfunc() 51 total -= size; in myreadfunc() 52 return size; in myreadfunc()
|
H A D | testtrace.c | 37 const unsigned char *ptr, size_t size, int nohex) in libtest_debug_dump() argument 49 size, size); in libtest_debug_dump() 51 for(i = 0; i < size; i += width) { in libtest_debug_dump() 58 if(i + c < size) in libtest_debug_dump() 64 for(c = 0; (c < width) && (i + c < size); c++) { in libtest_debug_dump() 67 (i + c + 1 < size) && (ptr[i + c] == 0x0D) && in libtest_debug_dump() 76 (i + c + 2 < size) && (ptr[i + c + 1] == 0x0D) && in libtest_debug_dump() 88 unsigned char *data, size_t size, in libtest_debug_cb() argument 143 libtest_debug_dump(timebuf, text, stderr, data, size, trace_cfg->nohex); in libtest_debug_cb()
|
H A D | lib1509.c | 30 size_t WriteOutput(void *ptr, size_t size, size_t nmemb, void *stream); 31 size_t WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream); 85 size_t WriteOutput(void *ptr, size_t size, size_t nmemb, void *stream) in WriteOutput() argument 87 fwrite(ptr, size, nmemb, stream); in WriteOutput() 88 return nmemb * size; in WriteOutput() 91 size_t WriteHeader(void *ptr, size_t size, size_t nmemb, void *stream) in WriteHeader() argument 96 realHeaderSize += curlx_uztoul(size * nmemb); in WriteHeader() 98 return nmemb * size; in WriteHeader()
|
H A D | lib509.c | 41 static void *custom_calloc(size_t nmemb, size_t size) in custom_calloc() argument 44 return (calloc)(nmemb, size); in custom_calloc() 47 static void *custom_malloc(size_t size) in custom_malloc() argument 50 return (malloc)(size); in custom_malloc() 59 static void *custom_realloc(void *ptr, size_t size) in custom_realloc() argument 62 return (realloc)(ptr, size); in custom_realloc()
|
/curl/src/ |
H A D | tool_cb_dbg.c | 93 char *data, size_t size, in tool_debug_cb() argument 161 if(size > 0) { in tool_debug_cb() 164 for(i = 0; i < size - 1; i++) { in tool_debug_cb() 178 newl = (size && (data[size - 1] != '\n')) ? TRUE : FALSE; in tool_debug_cb() 185 (void)fwrite(data, size, 1, output); in tool_debug_cb() 186 newl = (size && (data[size - 1] != '\n')) ? TRUE : FALSE; in tool_debug_cb() 202 fprintf(output, "[%zu bytes data]\n", size); in tool_debug_cb() 263 text, size, size); in dump() 265 for(i = 0; i < size; i += width) { in dump() 272 if(i + c < size) in dump() [all …]
|
/curl/lib/ |
H A D | curl_memory.h | 124 typedef void *(*curl_malloc_callback)(size_t size); 126 typedef void *(*curl_realloc_callback)(void *ptr, size_t size); 128 typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size); 155 #define malloc(size) Curl_cmalloc(size) argument 157 #define calloc(nbelem,size) Curl_ccalloc(nbelem, size) argument 159 #define realloc(ptr,size) Curl_crealloc(ptr, size) argument
|
H A D | md4.c | 105 md4_update(ctx, size, data); in MD4_Update() 185 unsigned long size; member 192 ctx->size = 0; in MD4_Init() 201 ctx->size = size; in MD4_Update() 215 ctx->size = 0; in MD4_Final() 400 } while(size -= 64); in my_md4_body() 438 if(size < available) { in MD4_Update() 445 size -= available; in MD4_Update() 449 if(size >= 64) { in MD4_Update() 451 size &= 0x3f; in MD4_Update() [all …]
|
H A D | inet_ntop.c | 61 static char *inet_ntop4 (const unsigned char *src, char *dst, size_t size) in inet_ntop4() argument 66 DEBUGASSERT(size >= 16); in inet_ntop4() 76 if(len == 0 || len >= size) { in inet_ntop4() 87 static char *inet_ntop6 (const unsigned char *src, char *dst, size_t size) in inet_ntop6() argument 173 if((size_t)(tp - tmp) > size) { in inet_ntop6() 193 char *Curl_inet_ntop(int af, const void *src, char *buf, size_t size) in Curl_inet_ntop() argument 197 return inet_ntop4((const unsigned char *)src, buf, size); in Curl_inet_ntop() 199 return inet_ntop6((const unsigned char *)src, buf, size); in Curl_inet_ntop()
|
/curl/lib/vauth/ |
H A D | ntlm.c | 359 size_t size; in Curl_auth_create_ntlm_type1_message() local 414 size = 32 + hostlen + domlen; in Curl_auth_create_ntlm_type1_message() 483 size_t size; in Curl_auth_create_ntlm_type3_message() local 685 DEBUGASSERT(size == 64); in Curl_auth_create_ntlm_type3_message() 691 size += 0x18; in Curl_auth_create_ntlm_type3_message() 706 size += ntresplen; in Curl_auth_create_ntlm_type3_message() 729 DEBUGASSERT(size == domoff); in Curl_auth_create_ntlm_type3_message() 735 size += domlen; in Curl_auth_create_ntlm_type3_message() 737 DEBUGASSERT(size == useroff); in Curl_auth_create_ntlm_type3_message() 743 size += userlen; in Curl_auth_create_ntlm_type3_message() [all …]
|
/curl/docs/libcurl/opts/ |
H A D | CURLINFO_HEADER_SIZE.md | 18 CURLINFO_HEADER_SIZE - get size of retrieved headers 30 Pass a pointer to a long to receive the total size of all the headers 33 The total includes the size of any received headers suppressed by 47 long size; 48 res = curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &size); 50 printf("Header size: %ld bytes\n", size);
|
/curl/tests/server/ |
H A D | fake_ntlm.c | 121 size_t size = 0; in main() local 205 error = getpart(&type1_input, &size, "ntlm_auth_type1", "input", stream); in main() 207 if(error || size == 0) { in main() 220 size = 0; in main() 223 if(error || size == 0) { in main() 239 size = 0; in main() 240 error = getpart(&type1_output, &size, "ntlm_auth_type1", "output", in main() 243 if(error || size == 0) { in main() 260 size = 0; in main() 261 error = getpart(&type3_output, &size, "ntlm_auth_type3", "output", in main() [all …]
|
/curl/tests/http/clients/ |
H A D | h2-upgrade-extreme.c | 60 char *data, size_t size, in debug_cb() argument 87 if(size > 0) { in debug_cb() 90 for(i = 0; i < size - 1; i++) { in debug_cb() 104 newl = (size && (data[size - 1] != '\n')) ? 1 : 0; in debug_cb() 111 (void)fwrite(data, size, 1, output); in debug_cb() 112 newl = (size && (data[size - 1] != '\n')) ? 1 : 0; in debug_cb() 122 fprintf(output, "[%ld bytes data]\n", (long)size); in debug_cb() 136 static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *opaque) in write_cb() argument 140 return size * nmemb; in write_cb()
|
H A D | upload-pausing.c | 60 char *data, size_t size, in debug_cb() argument 87 if(size > 0) { in debug_cb() 90 for(i = 0; i < size - 1; i++) { in debug_cb() 104 newl = (size && (data[size - 1] != '\n')) ? 1 : 0; in debug_cb() 111 (void)fwrite(data, size, 1, output); in debug_cb() 112 newl = (size && (data[size - 1] != '\n')) ? 1 : 0; in debug_cb() 122 fprintf(output, "[%ld bytes data]\n", (long)size); in debug_cb() 139 static size_t read_callback(char *ptr, size_t size, size_t nmemb, in read_callback() argument 142 (void)size; in read_callback()
|