/curl/lib/ |
H A D | curl_endian.c | 42 unsigned short Curl_read16_le(const unsigned char *buf) in Curl_read16_le() argument 44 return (unsigned short)(((unsigned short)buf[0]) | in Curl_read16_le() 45 ((unsigned short)buf[1] << 8)); in Curl_read16_le() 61 unsigned int Curl_read32_le(const unsigned char *buf) in Curl_read32_le() argument 63 return ((unsigned int)buf[0]) | ((unsigned int)buf[1] << 8) | in Curl_read32_le() 64 ((unsigned int)buf[2] << 16) | ((unsigned int)buf[3] << 24); in Curl_read32_le() 80 unsigned short Curl_read16_be(const unsigned char *buf) in Curl_read16_be() argument 82 return (unsigned short)(((unsigned short)buf[0] << 8) | in Curl_read16_be() 83 ((unsigned short)buf[1])); in Curl_read16_be()
|
H A D | strerror.c | 589 *buf = '\0'; in get_winsock_error() 766 return buf; in get_winsock_error() 785 *buf = '\0'; in get_winapi_error() 799 *buf = '\0'; in get_winapi_error() 811 return (*buf ? buf : NULL); in get_winapi_error() 849 *buf = '\0'; in Curl_strerror() 921 return buf; in Curl_strerror() 939 *buf = '\0'; in Curl_winapi_strerror() 961 return buf; in Curl_winapi_strerror() 981 *buf = '\0'; in Curl_sspi_strerror() [all …]
|
H A D | hostip4.c | 131 struct hostent *buf = NULL; in Curl_ipv4_resolve_r() local 157 buf = calloc(1, CURL_HOSTENT_SIZE); in Curl_ipv4_resolve_r() 158 if(!buf) in Curl_ipv4_resolve_r() 169 (struct hostent *)buf, in Curl_ipv4_resolve_r() 170 (char *)buf + sizeof(struct hostent), in Curl_ipv4_resolve_r() 188 (struct hostent *)buf, in Curl_ipv4_resolve_r() 255 (struct hostent *)buf, in Curl_ipv4_resolve_r() 265 h = buf; /* result expected in h */ in Curl_ipv4_resolve_r() 280 free(buf); in Curl_ipv4_resolve_r() 297 if(buf) /* used a *_r() function */ in Curl_ipv4_resolve_r() [all …]
|
H A D | getenv.c | 41 char *buf = NULL; in GetEnv() 48 tmp = realloc(buf, rc); in GetEnv() 50 free(buf); in GetEnv() 54 buf = tmp; in GetEnv() 59 rc = GetEnvironmentVariableA(variable, buf, bufsize); in GetEnv() 61 free(buf); in GetEnv() 67 return buf; in GetEnv()
|
H A D | cw-out.c | 104 struct cw_out_buf *buf; member 130 ctx->buf = NULL; in cw_out_init() 136 while(ctx->buf) { in cw_out_bufs_free() 139 ctx->buf = next; in cw_out_bufs_free() 253 buf += nwritten; in cw_out_ptr_flush() 338 if(!ctx->buf || (ctx->buf->type != otype) || (otype == CW_OUT_HDS)) { in cw_out_append() 343 ctx->buf = cwbuf; in cw_out_append() 345 DEBUGASSERT(ctx->buf && (ctx->buf->type == otype)); in cw_out_append() 346 return Curl_dyn_addn(&ctx->buf->b, buf, blen); in cw_out_append() 359 if(ctx->buf && ctx->buf->type != otype) { in cw_out_do_write() [all …]
|
H A D | http_chunks.c | 156 buf++; in httpchunk_readwrite() 184 if(*buf == 0x0a) { in httpchunk_readwrite() 196 buf++; in httpchunk_readwrite() 238 if(*buf == 0x0a) { in httpchunk_readwrite() 247 buf++; in httpchunk_readwrite() 253 if((*buf == 0x0d) || (*buf == 0x0a)) { in httpchunk_readwrite() 305 buf++; in httpchunk_readwrite() 313 buf++; in httpchunk_readwrite() 327 if((*buf != 0x0d) && (*buf != 0x0a)) { in httpchunk_readwrite() 334 buf++; in httpchunk_readwrite() [all …]
|
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 | warnless.h | 66 ssize_t curlx_read(int fd, void *buf, size_t count); 68 ssize_t curlx_write(int fd, const void *buf, size_t count); 79 #define read(fd, buf, count) curlx_read(fd, buf, count) argument 81 #define write(fd, buf, count) curlx_write(fd, buf, count) argument
|
H A D | rtsp.c | 662 ++buf; in rtsp_filter_rtp() 676 if(Curl_dyn_addn(&rtspc->buf, buf, 1)) { in rtsp_filter_rtp() 681 ++buf; in rtsp_filter_rtp() 715 if(Curl_dyn_addn(&rtspc->buf, buf, 1)) { in rtsp_filter_rtp() 720 ++buf; in rtsp_filter_rtp() 730 if(Curl_dyn_addn(&rtspc->buf, buf, 1)) { in rtsp_filter_rtp() 735 ++buf; in rtsp_filter_rtp() 751 if(Curl_dyn_addn(&rtspc->buf, buf, needed)) { in rtsp_filter_rtp() 769 if(Curl_dyn_addn(&rtspc->buf, buf, blen)) { in rtsp_filter_rtp() 774 buf += blen; in rtsp_filter_rtp() [all …]
|
H A D | curl_get_line.c | 39 int Curl_get_line(struct dynbuf *buf, FILE *input) in Curl_get_line() argument 43 Curl_dyn_reset(buf); in Curl_get_line() 53 result = Curl_dyn_addn(buf, b, rlen); in Curl_get_line() 64 result = Curl_dyn_addn(buf, "\n", 1); in Curl_get_line()
|
H A D | curl_endian.h | 28 unsigned short Curl_read16_le(const unsigned char *buf); 31 unsigned int Curl_read32_le(const unsigned char *buf); 34 unsigned short Curl_read16_be(const unsigned char *buf);
|
H A D | strdup.c | 114 char *buf = malloc(length + 1); in Curl_memdup0() local 115 if(!buf) in Curl_memdup0() 117 memcpy(buf, src, length); in Curl_memdup0() 118 buf[length] = 0; in Curl_memdup0() 119 return buf; in Curl_memdup0()
|
H A D | krb5.c | 146 enc.value = buf; in krb5_decode() 535 Curl_dyn_reset(&buf->buf); in read_data() 546 result = Curl_dyn_addn(&buf->buf, buffer, nread); in read_data() 553 Curl_dyn_ptr(&buf->buf), in read_data() 557 Curl_dyn_setlen(&buf->buf, nread); in read_data() 565 size_t size = Curl_dyn_len(&buf->buf); in buffer_read() 568 memcpy(data, Curl_dyn_ptr(&buf->buf) + buf->index, len); in buffer_read() 708 char *buf; in Curl_sec_read_msg() local 726 free(buf); in Curl_sec_read_msg() 734 free(buf); in Curl_sec_read_msg() [all …]
|
H A D | strerror.h | 31 const char *Curl_strerror(int err, char *buf, size_t buflen); 33 const char *Curl_winapi_strerror(DWORD err, char *buf, size_t buflen); 36 const char *Curl_sspi_strerror(int err, char *buf, size_t buflen);
|
H A D | curl_gssapi.c | 96 char *buf, size_t len) { in display_gss_error() argument 111 len += msnprintf(buf + len, GSS_LOG_BUFFER_LEN - len, in display_gss_error() 137 char buf[GSS_LOG_BUFFER_LEN]; 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() 145 infof(data, "%s%s", prefix, buf); in Curl_gss_log_error()
|
H A D | bufq.h | 178 const unsigned char *buf, size_t len, 182 const char *buf, 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,
|
/curl/tests/unit/ |
H A D | unit3200.c | 91 struct dynbuf buf; variable 94 Curl_dyn_init(&buf, len); 108 line = Curl_dyn_ptr(&buf); 112 line = Curl_dyn_ptr(&buf); 120 line = Curl_dyn_ptr(&buf); 124 line = Curl_dyn_ptr(&buf); 132 line = Curl_dyn_ptr(&buf); 141 line = Curl_dyn_ptr(&buf); 150 line = Curl_dyn_ptr(&buf); 159 line = Curl_dyn_ptr(&buf); [all …]
|
H A D | unit3205.c | 695 char buf[64] = ""; variable 722 buf[0] = '\0'; 725 Curl_cipher_suite_get_str(test->id, buf, sizeof(buf), true); 727 if(strcmp(buf, expect) != 0) { 730 test->id, buf, expect); 735 buf[0] = '\0'; 738 Curl_cipher_suite_get_str(test->id, buf, sizeof(buf), false); 748 if(strcmp(buf, expect) != 0) { 751 test->id, buf, expect);
|
H A D | unit1604.c | 49 char *buf = malloc(256); in getflagstr() local 50 if(buf) { in getflagstr() 51 msnprintf(buf, 256, "%s,%s", in getflagstr() 57 return buf; in getflagstr() 62 char *buf = malloc(256); in getcurlcodestr() local 63 if(buf) { in getcurlcodestr() 64 msnprintf(buf, 256, "%s (%d)", in getcurlcodestr() 72 return buf; in getcurlcodestr()
|
/curl/tests/libtest/ |
H A D | lib557.c | 1235 rc = curl_msnprintf(buf, sizeof(buf), in test_weird_arguments() 1287 rc = curl_msnprintf(buf, sizeof(buf), in test_weird_arguments() 1336 curl_msnprintf(buf, sizeof(buf), "%f", 9.0); in test_float_formatting() 1339 curl_msnprintf(buf, sizeof(buf), "%.1f", 9.1); in test_float_formatting() 1342 curl_msnprintf(buf, sizeof(buf), "%.2f", 9.1); in test_float_formatting() 1345 curl_msnprintf(buf, sizeof(buf), "%.0f", 9.1); in test_float_formatting() 1348 curl_msnprintf(buf, sizeof(buf), "%0f", 9.1); in test_float_formatting() 1351 curl_msnprintf(buf, sizeof(buf), "%10f", 9.1); in test_float_formatting() 1363 curl_msnprintf(buf, sizeof(buf), "%.-2f", 9.1); in test_float_formatting() 1455 curl_msnprintf(buf, sizeof(buf), "%o %x %X", in test_oct_hex_formatting() [all …]
|
H A D | lib553.c | 38 static char buf[1024]; in myreadfunc() local 41 memset(buf, 'A', sizeof(buf)); in myreadfunc() 47 if(size > sizeof(buf)) in myreadfunc() 48 size = sizeof(buf); in myreadfunc() 50 memcpy(ptr, buf, size); in myreadfunc()
|
/curl/tests/server/ |
H A D | base64.pl | 28 my $buf; 29 while(read(STDIN, $buf, 60*57)) { 30 my $enc = encode_base64($buf);
|
/curl/src/ |
H A D | tool_parsecfg.c | 95 struct curlx_dynbuf buf; in parseconfig() local 97 curlx_dyn_init(&buf, MAX_CONFIG_LINE_LENGTH); in parseconfig() 100 while(!rc && my_get_line(file, &buf, &fileerror)) { in parseconfig() 104 line = curlx_dyn_ptr(&buf); in parseconfig() 121 curlx_dyn_reset(&buf); in parseconfig() 245 curlx_dyn_reset(&buf); in parseconfig() 247 curlx_dyn_free(&buf); in parseconfig() 307 char buf[4096]; in my_get_line() local 312 if(!fgets(buf, sizeof(buf), fp)) in my_get_line() 315 if(curlx_dyn_add(db, buf)) { in my_get_line() [all …]
|
H A D | tool_cb_prg.c | 73 char buf[MAX_BARLENGTH + 2]; in fly() local 79 buf[0] = '\r'; in fly() 80 memset(&buf[1], ' ', bar->width); in fly() 81 buf[bar->width + 1] = '\0'; in fly() 83 memcpy(&buf[bar->bar + 1], "-=O=-", 5); in fly() 86 buf[pos] = '#'; in fly() 88 buf[pos] = '#'; in fly() 90 buf[pos] = '#'; in fly() 92 buf[pos] = '#'; in fly() 94 fputs(buf, bar->out); in fly()
|
/curl/lib/vtls/ |
H A D | keylog.c | 99 char buf[256]; in Curl_tls_keylog_write_line() local 106 if(linelen == 0 || linelen > sizeof(buf) - 2) { in Curl_tls_keylog_write_line() 111 memcpy(buf, line, linelen); in Curl_tls_keylog_write_line() 113 buf[linelen++] = '\n'; in Curl_tls_keylog_write_line() 115 buf[linelen] = '\0'; in Curl_tls_keylog_write_line() 119 fputs(buf, keylog_file_fp); in Curl_tls_keylog_write_line()
|