/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 | 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 | 38 size_t size, char nohex) 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 unsigned char *data, size_t size, in my_trace() argument 116 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 | 53 void dump(const char *text, unsigned int num, unsigned char *ptr, size_t size, in dump() argument 66 num, text, (unsigned long)size, (unsigned long)size); in dump() 68 for(i = 0; i < size; i += width) { in dump() 75 if(i + c < size) in dump() 81 for(c = 0; (c < width) && (i + c < size); c++) { in dump() 83 if(nohex && (i + c + 1 < size) && ptr[i + c] == 0x0D && in dump() 91 if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D && in dump() 103 char *data, size_t size, in my_trace() argument 137 dump(text, num, (unsigned char *)data, size, 1); in my_trace()
|
H A D | http2-pushinmemory.c | 37 size_t size; member 41 write_cb(void *contents, size_t size, size_t nmemb, void *userp) in write_cb() argument 43 size_t realsize = size * nmemb; in write_cb() 45 char *ptr = realloc(mem->memory, mem->size + realsize + 1); in write_cb() 53 memcpy(&(mem->memory[mem->size]), contents, realsize); in write_cb() 54 mem->size += realsize; in write_cb() 55 mem->memory[mem->size] = 0; in write_cb() 67 chunk->size = 0; /* no data at this point */ in init_memory()
|
H A D | ftpuploadresume.c | 34 static size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, in getcontentlengthfunc() argument 44 return size * nmemb; in getcontentlengthfunc() 48 static size_t discardfunc(void *ptr, size_t size, size_t nmemb, void *stream) in discardfunc() argument 52 return size * nmemb; in discardfunc() 56 static size_t readfunc(char *ptr, size_t size, size_t nmemb, void *stream) in readfunc() argument 64 n = fread(ptr, size, nmemb, f) * size; in readfunc()
|
H A D | http2-serverpush.c | 41 void dump(const char *text, unsigned char *ptr, size_t size, 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() 91 char *data, size_t size, in my_trace() argument 123 dump(text, (unsigned char *)data, size, 1); in my_trace()
|
/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 char *data, size_t size, void *userp) in libtest_debug_cb() argument 141 libtest_debug_dump(timebuf, text, stderr, (unsigned char *)data, size, in libtest_debug_cb()
|
H A D | lib1509.c | 30 size_t WriteOutput(char *ptr, size_t size, size_t nmemb, void *stream); 31 size_t WriteHeader(char *ptr, size_t size, size_t nmemb, void *stream); 85 size_t WriteOutput(char *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(char *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/lib/ |
H A D | inet_ntop.h | 29 char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size); 36 #define Curl_inet_ntop(af,addr,buf,size) \ argument 37 inet_ntop(af, addr, buf, size) 39 #define Curl_inet_ntop(af,addr,buf,size) \ argument 40 inet_ntop(af, addr, buf, (curl_socklen_t)(size))
|
H A D | curl_memory.h | 126 typedef void *(*curl_malloc_callback)(size_t size); 128 typedef void *(*curl_realloc_callback)(void *ptr, size_t size); 130 typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size); 157 #define malloc(size) Curl_cmalloc(size) argument 159 #define calloc(nbelem,size) Curl_ccalloc(nbelem, size) argument 161 #define realloc(ptr,size) Curl_crealloc(ptr, size) argument
|
H A D | md4.c | 108 md4_update(ctx, size, data); in MD4_Update() 188 unsigned long size; member 195 ctx->size = 0; in MD4_Init() 204 ctx->size = size; in MD4_Update() 218 ctx->size = 0; in MD4_Final() 403 } while(size -= 64); in my_md4_body() 441 if(size < available) { in MD4_Update() 448 size -= available; in MD4_Update() 452 if(size >= 64) { in MD4_Update() 454 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() 192 char *Curl_inet_ntop(int af, const void *src, char *buf, size_t size) in Curl_inet_ntop() argument 196 return inet_ntop4((const unsigned char *)src, buf, size); in Curl_inet_ntop() 198 return inet_ntop6((const unsigned char *)src, buf, size); in Curl_inet_ntop()
|
/curl/src/ |
H A D | tool_cb_dbg.c | 91 char *data, size_t size, in tool_debug_cb() argument 159 if(size > 0) { in tool_debug_cb() 162 for(i = 0; i < size - 1; i++) { in tool_debug_cb() 176 newl = (size && (data[size - 1] != '\n')); in tool_debug_cb() 183 (void)fwrite(data, size, 1, output); in tool_debug_cb() 184 newl = (size && (data[size - 1] != '\n')); in tool_debug_cb() 200 fprintf(output, "[%zu bytes data]\n", size); in tool_debug_cb() 261 text, size, size); in dump() 263 for(i = 0; i < size; i += width) { in dump() 270 if(i + c < size) in dump() [all …]
|
/curl/lib/vauth/ |
H A D | ntlm.c | 355 size_t size; in Curl_auth_create_ntlm_type1_message() local 410 size = 32 + hostlen + domlen; in Curl_auth_create_ntlm_type1_message() 479 size_t size; in Curl_auth_create_ntlm_type3_message() local 669 DEBUGASSERT(size == 64); in Curl_auth_create_ntlm_type3_message() 675 size += 0x18; in Curl_auth_create_ntlm_type3_message() 690 size += ntresplen; in Curl_auth_create_ntlm_type3_message() 713 DEBUGASSERT(size == domoff); in Curl_auth_create_ntlm_type3_message() 719 size += domlen; in Curl_auth_create_ntlm_type3_message() 721 DEBUGASSERT(size == useroff); in Curl_auth_create_ntlm_type3_message() 727 size += userlen; in Curl_auth_create_ntlm_type3_message() [all …]
|
/curl/docs/libcurl/opts/ |
H A D | CURLINFO_HEADER_SIZE.md | 19 CURLINFO_HEADER_SIZE - get size of retrieved headers 31 Pass a pointer to a long to receive the total size of all the headers 34 The total includes the size of any received headers suppressed by 50 long size; 51 res = curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &size); 53 printf("Header size: %ld bytes\n", size);
|
/curl/tests/http/clients/ |
H A D | h2-upgrade-extreme.c | 57 char *data, size_t size, in debug_cb() argument 84 if(size > 0) { in debug_cb() 87 for(i = 0; i < size - 1; i++) { in debug_cb() 101 newl = (size && (data[size - 1] != '\n')) ? 1 : 0; in debug_cb() 108 (void)fwrite(data, size, 1, output); in debug_cb() 109 newl = (size && (data[size - 1] != '\n')) ? 1 : 0; in debug_cb() 119 fprintf(output, "[%ld bytes data]\n", (long)size); in debug_cb() 133 static size_t write_cb(char *ptr, size_t size, size_t nmemb, void *opaque) in write_cb() argument 137 return size * nmemb; in write_cb()
|