Lines Matching refs:len
60 const unsigned char *buf, size_t len) in chunk_append() argument
66 n = CURLMIN(n, len); in chunk_append()
74 unsigned char *buf, size_t len) in chunk_read() argument
82 else if(n <= len) { in chunk_read()
88 memcpy(buf, p, len); in chunk_read()
89 chunk->r_offset += len; in chunk_read()
90 return len; in chunk_read()
94 static size_t chunk_unwrite(struct buf_chunk *chunk, size_t len) in chunk_unwrite() argument
101 else if(n <= len) { in chunk_unwrite()
106 chunk->w_offset -= len; in chunk_unwrite()
107 return len; in chunk_unwrite()
282 size_t len = 0; in Curl_bufq_len() local
284 len += chunk_len(chunk); in Curl_bufq_len()
287 return len; in Curl_bufq_len()
448 const unsigned char *buf, size_t len, in Curl_bufq_write() argument
456 while(len) { in Curl_bufq_write()
465 n = chunk_append(tail, buf, len); in Curl_bufq_write()
470 len -= n; in Curl_bufq_write()
472 if(nwritten == 0 && len) { in Curl_bufq_write()
481 const char *buf, size_t len, in Curl_bufq_cwrite() argument
486 n = Curl_bufq_write(q, (const unsigned char *)buf, len, &result); in Curl_bufq_cwrite()
491 CURLcode Curl_bufq_unwrite(struct bufq *q, size_t len) in Curl_bufq_unwrite() argument
493 while(len && q->tail) { in Curl_bufq_unwrite()
494 len -= chunk_unwrite(q->tail, len); in Curl_bufq_unwrite()
497 return len ? CURLE_AGAIN : CURLE_OK; in Curl_bufq_unwrite()
500 ssize_t Curl_bufq_read(struct bufq *q, unsigned char *buf, size_t len, in Curl_bufq_read() argument
507 while(len && q->head) { in Curl_bufq_read()
508 n = chunk_read(q->head, buf, len); in Curl_bufq_read()
512 len -= n; in Curl_bufq_read()
523 CURLcode Curl_bufq_cread(struct bufq *q, char *buf, size_t len, in Curl_bufq_cread() argument
528 n = Curl_bufq_read(q, (unsigned char *)buf, len, &result); in Curl_bufq_cread()
615 const unsigned char *buf, size_t len, in Curl_bufq_write_pass() argument
622 while(len) { in Curl_bufq_write_pass()
637 n = Curl_bufq_write(q, buf, len, err); in Curl_bufq_write_pass()
653 len -= (size_t)n; in Curl_bufq_write_pass()
657 if(!nwritten && len) { in Curl_bufq_write_pass()