Home
last modified time | relevance | path

Searched refs:ptr (Results 1 – 25 of 234) sorted by relevance

12345678910

/curl/tests/libtest/
H A Dlib1537.c33 char *ptr = NULL; in test() local
47 printf("%s\n", ptr); in test()
48 curl_free(ptr); in test()
51 ptr = curl_escape((char *)a, asize); in test()
52 if(!ptr) { in test()
56 printf("%s\n", ptr); in test()
58 raw = curl_easy_unescape(NULL, ptr, (int)strlen(ptr), &outlen); in test()
65 raw = curl_unescape(ptr, (int)strlen(ptr)); in test()
75 curl_free(ptr); in test()
79 printf("escape -1 length: %s\n", ptr); in test()
[all …]
H A Dlib558.c33 char *ptr = NULL; in test() local
43 ptr = malloc(558); in test()
44 Curl_safefree(ptr); in test()
47 ptr = curl_easy_escape(NULL, (char *)a, asize); in test()
48 if(ptr) in test()
49 curl_free(ptr); in test()
H A Dlib552.c39 FILE *stream, unsigned char *ptr, size_t size, in dump() argument
61 fprintf(stream, "%02x ", ptr[i + c]); in dump()
68 if(nohex && (i + c + 1 < size) && ptr[i + c] == 0x0D && in dump()
69 ptr[i + c + 1] == 0x0A) { in dump()
74 (ptr[i + c] >= 0x20) && (ptr[i + c] < 0x80) ? ptr[i + c] : '.'); in dump()
76 if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D && in dump()
77 ptr[i + c + 2] == 0x0A) { in dump()
131 static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *stream) in read_callback() argument
138 memcpy(ptr, databuf + current_offset, given); in read_callback()
144 static size_t write_callback(char *ptr, size_t size, size_t nmemb, in write_callback() argument
[all …]
H A Dtesttrace.c37 const unsigned char *ptr, size_t size, int nohex) in libtest_debug_dump() argument
59 fprintf(stream, "%02x ", ptr[i + c]); in libtest_debug_dump()
67 (i + c + 1 < size) && (ptr[i + c] == 0x0D) && in libtest_debug_dump()
68 (ptr[i + c + 1] == 0x0A)) { in libtest_debug_dump()
72 fprintf(stream, "%c", ((ptr[i + c] >= 0x20) && (ptr[i + c] < 0x80)) ? in libtest_debug_dump()
73 ptr[i + c] : '.'); in libtest_debug_dump()
76 (i + c + 2 < size) && (ptr[i + c + 1] == 0x0D) && in libtest_debug_dump()
77 (ptr[i + c + 2] == 0x0A)) { in libtest_debug_dump()
H A Dlib509.c53 static char *custom_strdup(const char *ptr) in custom_strdup() argument
56 return (strdup)(ptr); in custom_strdup()
59 static void *custom_realloc(void *ptr, size_t size) in custom_realloc() argument
62 return (realloc)(ptr, size); in custom_realloc()
65 static void custom_free(void *ptr) in custom_free() argument
68 (free)(ptr); in custom_free()
H A Dlib1509.c30 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()
91 size_t WriteHeader(char *ptr, size_t size, size_t nmemb, void *stream) in WriteHeader() argument
93 (void)ptr; in WriteHeader()
/curl/lib/
H A Dcurl_multibyte.h60 #define curlx_convert_UTF8_to_tchar(ptr) curlx_convert_UTF8_to_wchar((ptr)) argument
61 #define curlx_convert_tchar_to_UTF8(ptr) curlx_convert_wchar_to_UTF8((ptr)) argument
72 #define curlx_convert_UTF8_to_tchar(ptr) (strdup)(ptr) argument
73 #define curlx_convert_tchar_to_UTF8(ptr) (strdup)(ptr) argument
84 #define curlx_unicodefree(ptr) \ argument
86 if(ptr) { \
87 (free)(ptr); \
88 (ptr) = NULL; \
H A Dbufref.c42 br->ptr = NULL; in Curl_bufref_init()
59 DEBUGASSERT(br->ptr || !br->len); in Curl_bufref_free()
61 if(br->ptr && br->dtor) in Curl_bufref_free()
62 br->dtor((void *) br->ptr); in Curl_bufref_free()
65 br->ptr = NULL; in Curl_bufref_free()
76 DEBUGASSERT(ptr || !len); in Curl_bufref_set()
80 br->ptr = (const unsigned char *) ptr; in Curl_bufref_set()
94 return br->ptr; in Curl_bufref_ptr()
116 DEBUGASSERT(ptr || !len); in Curl_bufref_memdup()
119 if(ptr) { in Curl_bufref_memdup()
[all …]
H A Dstrtok.c33 Curl_strtok_r(char *ptr, const char *sep, char **end) in Curl_strtok_r() argument
35 if(!ptr) in Curl_strtok_r()
37 ptr = *end; in Curl_strtok_r()
40 while(*ptr && strchr(sep, *ptr)) in Curl_strtok_r()
41 ++ptr; in Curl_strtok_r()
43 if(*ptr) { in Curl_strtok_r()
45 char *start = ptr; in Curl_strtok_r()
H A Dcurl_memory.h127 typedef void (*curl_free_callback)(void *ptr);
128 typedef void *(*curl_realloc_callback)(void *ptr, size_t size);
155 #define strdup(ptr) Curl_cstrdup(ptr) argument
161 #define realloc(ptr,size) Curl_crealloc(ptr, size) argument
163 #define free(ptr) Curl_cfree(ptr) argument
168 # define wcsdup(ptr) Curl_cwcsdup(ptr) argument
170 # define _wcsdup(ptr) Curl_cwcsdup(ptr) argument
172 # define _tcsdup(ptr) Curl_cwcsdup(ptr) argument
175 # define _tcsdup(ptr) Curl_cstrdup(ptr) argument
H A Dsetopt.c1783 if(ptr && !*ptr) { in setopt_cptr()
1833 if(ptr) { in setopt_cptr()
1883 if(!ptr) in setopt_cptr()
2276 if(ptr && ptr[0]) { in setopt_cptr()
2464 if(ptr) in setopt_cptr()
2471 if(ptr) in setopt_cptr()
2546 if(ptr && !strcasecompare(ptr, "SRP")) in setopt_cptr()
2551 if(ptr && !strcasecompare(ptr, "SRP")) in setopt_cptr()
2613 if(ptr) { in setopt_cptr()
2649 if(ptr) in setopt_cptr()
[all …]
H A Dmemdebug.h60 CURL_EXTERN ALLOC_SIZE(2) void *curl_dbg_realloc(void *ptr,
64 CURL_EXTERN void curl_dbg_free(void *ptr, int line, const char *source);
116 #define strdup(ptr) curl_dbg_strdup(ptr, __LINE__, __FILE__) argument
122 #define realloc(ptr,size) curl_dbg_realloc(ptr, size, __LINE__, __FILE__) argument
124 #define free(ptr) curl_dbg_free(ptr, __LINE__, __FILE__) argument
133 # define wcsdup(ptr) curl_dbg_wcsdup(ptr, __LINE__, __FILE__) argument
135 # define _wcsdup(ptr) curl_dbg_wcsdup(ptr, __LINE__, __FILE__) argument
137 # define _tcsdup(ptr) curl_dbg_wcsdup(ptr, __LINE__, __FILE__) argument
140 # define _tcsdup(ptr) curl_dbg_strdup(ptr, __LINE__, __FILE__) argument
208 #define Curl_safefree(ptr) \ argument
[all …]
H A Dcurl_range.c41 char *ptr; in Curl_range() local
47 from_t = curlx_strtoofft(data->state.range, &ptr, 10, &from); in Curl_range()
50 while(*ptr && (ISBLANK(*ptr) || (*ptr == '-'))) in Curl_range()
51 ptr++; in Curl_range()
52 to_t = curlx_strtoofft(ptr, &ptr2, 10, &to); in Curl_range()
H A Dformdata.c527 struct FormInfo *ptr; in FormAdd() local
528 for(ptr = first_form; ptr != NULL; ptr = ptr->more) { in FormAdd()
529 if(ptr->name_alloc) { in FormAdd()
530 Curl_safefree(ptr->name); in FormAdd()
531 ptr->name_alloc = FALSE; in FormAdd()
533 if(ptr->value_alloc) { in FormAdd()
656 struct FormInfo *ptr; in FormAdd() local
657 for(ptr = form; ptr != NULL; ptr = ptr->more) { in FormAdd()
658 if(ptr->name_alloc) { in FormAdd()
662 if(ptr->value_alloc) { in FormAdd()
[all …]
/curl/src/
H A Dtool_easysrc.c140 struct curl_slist *ptr; in easysrc_perform() local
148 for(ptr = easysrc_toohard->first; ptr; ptr = ptr->next) in easysrc_perform()
175 struct curl_slist *ptr; in dumpeasysrc() local
197 for(ptr = easysrc_decl->first; ptr; ptr = ptr->next) in dumpeasysrc()
198 fprintf(out, " %s\n", ptr->data); in dumpeasysrc()
205 for(ptr = easysrc_data->first; ptr; ptr = ptr->next) in dumpeasysrc()
206 fprintf(out, " %s\n", ptr->data); in dumpeasysrc()
211 for(ptr = easysrc_code->first; ptr; ptr = ptr->next) { in dumpeasysrc()
212 if(ptr->data[0]) { in dumpeasysrc()
222 for(ptr = easysrc_clean->first; ptr; ptr = ptr->next) in dumpeasysrc()
[all …]
H A Dtool_writeout.c553 while(ptr && *ptr && !done) { in ourWriteOut()
554 if('%' == *ptr && ptr[1]) { in ourWriteOut()
558 ptr += 2; in ourWriteOut()
622 ptr += 8; in ourWriteOut()
642 ptr += 8; in ourWriteOut()
643 if((ptr[0] == '>') && (ptr[1] == '>')) { in ourWriteOut()
645 ptr += 2; in ourWriteOut()
674 ptr += 2; in ourWriteOut()
678 else if('\\' == *ptr && ptr[1]) { in ourWriteOut()
695 ptr += 2; in ourWriteOut()
[all …]
H A Dtool_formparse.c330 char *ptr = *str; in get_param_word() local
337 ++ptr; in get_param_word()
338 while(*ptr) { in get_param_word()
340 if(ptr[1] == '\\' || ptr[1] == '"') { in get_param_word()
356 if(*ptr == '\\' && (ptr[1] == '\\' || ptr[1] == '"')) in get_param_word()
363 ++ptr; in get_param_word()
364 while(*ptr && *ptr != ';' && *ptr != endchar) { in get_param_word()
367 ++ptr; in get_param_word()
374 ++ptr; in get_param_word()
380 while(*ptr && *ptr != ';' && *ptr != endchar) in get_param_word()
[all …]
H A Dtool_msgs.c53 char *ptr; in voutf() local
61 ptr = print_buffer; in voutf()
68 while(!ISBLANK(ptr[cut]) && cut) { in voutf()
76 (void)fwrite(ptr, cut + 1, 1, tool_stderr); in voutf()
78 ptr += cut + 1; /* skip the space too */ in voutf()
82 fputs(ptr, tool_stderr); in voutf()
/curl/docs/examples/
H A Dprotofeats.c38 const char *const *ptr; in main() local
44 for(ptr = ver->protocols; *ptr; ++ptr) in main()
45 printf(" %s\n", *ptr); in main()
47 for(ptr = ver->feature_names; *ptr; ++ptr) in main()
48 printf(" %s\n", *ptr); in main()
H A Dmulti-debugcallback.c37 static void dump(const char *text, FILE *stream, unsigned char *ptr, in dump() argument
60 fprintf(stream, "%02x ", ptr[i + c]); in dump()
67 if(nohex && (i + c + 1 < size) && ptr[i + c] == 0x0D && in dump()
68 ptr[i + c + 1] == 0x0A) { in dump()
73 (ptr[i + c] >= 0x20) && (ptr[i + c] < 0x80) ? ptr[i + c] : '.'); in dump()
75 if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D && in dump()
76 ptr[i + c + 2] == 0x0A) { in dump()
H A Ddebug.c37 FILE *stream, unsigned char *ptr, size_t size, in dump() argument
60 fprintf(stream, "%02x ", ptr[i + c]); in dump()
67 if(nohex && (i + c + 1 < size) && ptr[i + c] == 0x0D && in dump()
68 ptr[i + c + 1] == 0x0A) { in dump()
73 (ptr[i + c] >= 0x20) && (ptr[i + c] < 0x80) ? ptr[i + c] : '.'); in dump()
75 if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D && in dump()
76 ptr[i + c + 2] == 0x0A) { in dump()
H A Dhttp2-download.c53 void dump(const char *text, unsigned int num, unsigned char *ptr, size_t size, in dump() argument
76 fprintf(stderr, "%02x ", ptr[i + c]); in dump()
83 if(nohex && (i + c + 1 < size) && ptr[i + c] == 0x0D && in dump()
84 ptr[i + c + 1] == 0x0A) { in dump()
89 (ptr[i + c] >= 0x20) && (ptr[i + c] < 0x80) ? ptr[i + c] : '.'); in dump()
91 if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D && in dump()
92 ptr[i + c + 2] == 0x0A) { in dump()
/curl/tests/server/
H A Dgetpart.c283 char *ptr; in getpart() local
315 ptr = buffer; in getpart()
316 EAT_SPACE(ptr); in getpart()
318 if('<' != *ptr) { in getpart()
329 ptr++; in getpart()
331 if('/' == *ptr) { in getpart()
336 ptr++; in getpart()
337 end = ptr; in getpart()
403 end = ptr; in getpart()
420 ptr = end; in getpart()
[all …]
H A Drtspd.c226 char *ptr; in ProcessRequest() local
247 if(ptr) { in ProcessRequest()
272 while(*ptr && !ISDIGIT(*ptr)) in ProcessRequest()
273 ptr++; in ProcessRequest()
275 req->testno = strtol(ptr, &ptr, 10); in ProcessRequest()
396 ptr = strchr(ptr, '\n'); in ProcessRequest()
401 } while(ptr && *ptr); in ProcessRequest()
475 while(*ptr && ISSPACE(*ptr)) in ProcessRequest()
1003 free(ptr); in send_doc()
1034 ptr = strchr(ptr, '\n'); in send_doc()
[all …]
/curl/tests/unit/
H A Dunit1650.c189 char *ptr; variable
201 ptr = (char *)buffer;
209 o = strlen(ptr);
211 ptr += o;
219 l = strlen(ptr);
221 ptr += l;
223 msnprintf(ptr, len, " ");
225 ptr++;
230 msnprintf(ptr, len, "%s ", Curl_dyn_ptr(&d.cname[u]));
231 o = strlen(ptr);
[all …]

Completed in 39 milliseconds

12345678910