/curl/lib/ |
H A D | bufref.c | 43 br->len = 0; in Curl_bufref_init() 59 DEBUGASSERT(br->ptr || !br->len); in Curl_bufref_free() 66 br->len = 0; in Curl_bufref_free() 76 DEBUGASSERT(ptr || !len); in Curl_bufref_set() 81 br->len = len; in Curl_bufref_set() 92 DEBUGASSERT(br->ptr || !br->len); in Curl_bufref_ptr() 104 DEBUGASSERT(br->ptr || !br->len); in Curl_bufref_len() 106 return br->len; in Curl_bufref_len() 115 DEBUGASSERT(br->ptr || !br->len); in Curl_bufref_memdup() 116 DEBUGASSERT(ptr || !len); in Curl_bufref_memdup() [all …]
|
H A D | inet_ntop.c | 64 size_t len; in inet_ntop4() local 75 len = strlen(tmp); in inet_ntop4() 76 if(len == 0 || len >= size) { in inet_ntop4() 100 int len; in inet_ntop6() member 115 best.len = 0; in inet_ntop6() 116 cur.len = 0; in inet_ntop6() 121 cur.base = i; cur.len = 1; in inet_ntop6() 124 cur.len++; in inet_ntop6() 127 if(best.base == -1 || cur.len > best.len) in inet_ntop6() 132 if((cur.base != -1) && (best.base == -1 || cur.len > best.len)) in inet_ntop6() [all …]
|
H A D | curl_trc.c | 96 int len; in Curl_failf() local 106 error[len] = '\0'; in Curl_failf() 123 int len = 0; in trc_infof() local 127 len += mvsnprintf(buffer + len, (MAXINFO + 1) - len, fmt, ap); in trc_infof() 129 --len; in trc_infof() 135 buffer[len] = '\0'; in trc_infof() 156 int len = 0; in Curl_trc_cf_infof() local 159 len += msnprintf(buffer + len, MAXINFO - len, "[%s] ", in Curl_trc_cf_infof() 162 len += msnprintf(buffer + len, MAXINFO - len, "[%s-%d] ", in Curl_trc_cf_infof() 165 len += msnprintf(buffer + len, MAXINFO - len, "[%s] ", cf->cft->name); in Curl_trc_cf_infof() [all …]
|
H A D | curl_gssapi.c | 96 char *buf, size_t len) { in display_gss_error() argument 110 if(GSS_LOG_BUFFER_LEN > len + status_string.length + 3) { in display_gss_error() 111 len += msnprintf(buf + len, GSS_LOG_BUFFER_LEN - len, in display_gss_error() 119 return len; in display_gss_error() 138 size_t len = 0; in Curl_gss_log_error() local 141 len = display_gss_error(major, GSS_C_GSS_CODE, buf, len); in Curl_gss_log_error() 143 display_gss_error(minor, GSS_C_MECH_CODE, buf, len); in Curl_gss_log_error()
|
H A D | krb5.c | 156 return len; in krb5_decode() 166 int len; in krb5_encode() local 189 return len; in krb5_encode() 522 int len; in read_data() local 526 result = socket_read(data, sockindex, &len, sizeof(len)); in read_data() 530 if(len) { in read_data() 531 len = (int)ntohl((uint32_t)len); in read_data() 550 } while(len); in read_data() 570 return len; in buffer_read() 677 if(len <= 0) in sec_write() [all …]
|
H A D | parsedate.c | 215 if(len > 3) in checkday() 217 else if(len == 3) in checkday() 223 if((ilen == len) && in checkday() 235 if(len != 3) in checkmonth() 258 if((ilen == len) && in checktz() 379 size_t len = 0; in parsedate() local 383 len++; in parsedate() 386 if(len != NAME_LEN) { in parsedate() 388 wdaynum = checkday(date, len); in parsedate() 400 tzoff = checktz(date, len); in parsedate() [all …]
|
H A D | bufq.c | 82 else if(n <= len) { in chunk_read() 90 return len; in chunk_read() 101 else if(n <= len) { in chunk_unwrite() 107 return len; in chunk_unwrite() 282 size_t len = 0; in Curl_bufq_len() local 287 return len; in Curl_bufq_len() 456 while(len) { in Curl_bufq_write() 470 len -= n; in Curl_bufq_write() 494 len -= chunk_unwrite(q->tail, len); in Curl_bufq_unwrite() 512 len -= n; in Curl_bufq_read() [all …]
|
H A D | bufq.h | 178 const unsigned char *buf, size_t len, 182 const char *buf, size_t len, 189 CURLcode Curl_bufq_unwrite(struct bufq *q, size_t len); 197 ssize_t Curl_bufq_read(struct bufq *q, unsigned char *buf, size_t len, 200 CURLcode Curl_bufq_cread(struct bufq *q, char *buf, size_t len, 226 const unsigned char *buf, size_t len, 241 unsigned char *buf, size_t len, 274 const unsigned char *buf, size_t len,
|
H A D | http_aws_sigv4.c | 344 size_t len; in parse_content_sha_hdr() local 361 while(len > 0 && ISBLANK(value[len-1])) in parse_content_sha_hdr() 362 --len; in parse_content_sha_hdr() 364 *value_len = len; in parse_content_sha_hdr() 427 size_t len; member 435 if(aa->len == 0) in compare_func() 437 if(bb->len == 0) in compare_func() 439 return strncmp(aa->p, bb->p, aa->len < bb->len ? aa->len : bb->len); in compare_func() 455 for(; len && !result; q++, len--) { in canon_string() 553 if(!ap->len) in canon_query() [all …]
|
H A D | socks.c | 588 size_t len = 0; in do_SOCKS5() local 735 len = 0; in do_SOCKS5() 746 len += proxy_user_len; in do_SOCKS5() 759 sx->outstanding = len; in do_SOCKS5() 858 len = 0; in do_SOCKS5() 883 socksreq[len++] = in do_SOCKS5() 902 len = 0; in do_SOCKS5() 954 sx->outstanding = len; in do_SOCKS5() 1037 len = 4 + 16 + 2; in do_SOCKS5() 1040 len = 4 + 4 + 2; in do_SOCKS5() [all …]
|
/curl/src/ |
H A D | tool_strdup.c | 29 size_t len; in strdup() local 35 len = strlen(str) + 1; in strdup() 37 newstr = malloc(len); in strdup() 41 memcpy(newstr, str, len); in strdup()
|
H A D | tool_doswin.c | 107 size_t len; in sanitize_file_name() local 134 len = strlen(file_name); in sanitize_file_name() 173 p = &target[len]; in sanitize_file_name() 193 len = strlen(target); in sanitize_file_name() 207 len = strlen(target); in sanitize_file_name() 247 size_t len; in truncate_dryrun() local 252 len = strlen(path); in truncate_dryrun() 254 if(truncate_pos > len) in truncate_dryrun() 450 size_t len; in rename_if_reserved_dos() local 469 if(len > PATH_MAX-1) in rename_if_reserved_dos() [all …]
|
H A D | tool_msgs.c | 52 size_t len; in voutf() local 59 len = strlen(print_buffer); in voutf() 62 while(len > 0) { in voutf() 65 if(len > width) { in voutf() 79 len -= cut + 1; in voutf() 84 len = 0; in voutf()
|
/curl/tests/libtest/ |
H A D | lib677.c | 81 size_t len = 0; in test() local 86 sizeof(testcmd) - 1 - pos, &len); in test() 96 if(len > 0) in test() 97 pos += len; in test() 107 ec = curl_easy_recv(curl, testbuf + pos, sizeof(testbuf) - pos, &len); in test() 117 if(len > 0) in test() 118 pos += len; in test() 120 if(len <= 0) in test()
|
H A D | lib668.c | 38 size_t len = strlen(pooh->readptr); in read_callback() local 42 if(len > nmemb) in read_callback() 43 len = nmemb; in read_callback() 44 if(len) { in read_callback() 45 memcpy(ptr, pooh->readptr, len); in read_callback() 46 pooh->readptr += len; in read_callback() 48 return len; in read_callback()
|
H A D | lib1948.c | 30 size_t len; member 37 size_t tocopy = (putdata->len < totalsize) ? putdata->len : totalsize; in put_callback() 39 putdata->len -= tocopy; in put_callback() 60 pbuf.len = strlen(testput); in test()
|
H A D | lib1485.c | 43 size_t len = size * nmemb; in header_callback() local 48 if(len == 2 && hd[0] == '\r' && hd[1] == '\n') { in header_callback() 77 return len; in header_callback() 83 size_t len = size * nmemb; in write_callback() local 85 st->out_len += (curl_off_t)len; in write_callback() 86 return len; in write_callback()
|
/curl/docs/examples/ |
H A D | imap-append.c | 75 size_t len = strlen(data); in payload_source() local 76 if(room < len) in payload_source() 77 len = room; in payload_source() 78 memcpy(ptr, data, len); in payload_source() 79 upload_ctx->bytes_read += len; in payload_source() 81 return len; in payload_source()
|
H A D | smtp-mail.c | 80 size_t len = strlen(data); in payload_source() local 81 if(room < len) in payload_source() 82 len = room; in payload_source() 83 memcpy(ptr, data, len); in payload_source() 84 upload_ctx->bytes_read += len; in payload_source() 86 return len; in payload_source()
|
H A D | smtp-authzid.c | 83 size_t len = strlen(data); in payload_source() local 84 if(room < len) in payload_source() 85 len = room; in payload_source() 86 memcpy(ptr, data, len); in payload_source() 87 upload_ctx->bytes_read += len; in payload_source() 89 return len; in payload_source()
|
H A D | smtp-multi.c | 73 size_t len = strlen(data); in payload_source() local 74 if(room < len) in payload_source() 75 len = room; in payload_source() 76 memcpy(ptr, data, len); in payload_source() 77 upload_ctx->bytes_read += len; in payload_source() 79 return len; in payload_source()
|
H A D | smtp-tls.c | 77 size_t len = strlen(data); in payload_source() local 78 if(room < len) in payload_source() 79 len = room; in payload_source() 80 memcpy(ptr, data, len); in payload_source() 81 upload_ctx->bytes_read += len; in payload_source() 83 return len; in payload_source()
|
H A D | smtp-ssl.c | 77 size_t len = strlen(data); in payload_source() local 78 if(room < len) in payload_source() 79 len = room; in payload_source() 80 memcpy(ptr, data, len); in payload_source() 81 upload_ctx->bytes_read += len; in payload_source() 83 return len; in payload_source()
|
/curl/tests/server/ |
H A D | getpart.c | 221 if(!*len) in decodedata() 243 *len = src_len; in decodedata() 288 } len; in getpart() local 339 len.sig = end - ptr; in getpart() 340 if(len.sig > MAX_TAG_LEN) { in getpart() 344 memcpy(ptag, ptr, len.uns); in getpart() 345 ptag[len.uns] = '\0'; in getpart() 405 len.sig = end - ptr; in getpart() 411 ptag[len.uns] = '\0'; in getpart() 425 len.sig = end - ptr; in getpart() [all …]
|
/curl/tests/unit/ |
H A D | curlcheck.h | 45 #define verify_memory(dynamic, check, len) \ argument 47 if(dynamic && memcmp(dynamic, check, len)) { \ 49 "'%s' is not\n", __FILE__, __LINE__, len, \ 50 hexdump((const unsigned char *)check, len)); \ 52 hexdump((const unsigned char *)dynamic, len)); \
|