Lines Matching refs:size_t
43 static size_t chunk_len(const struct buf_chunk *chunk) in chunk_len()
48 static size_t chunk_space(const struct buf_chunk *chunk) in chunk_space()
59 static size_t chunk_append(struct buf_chunk *chunk, in chunk_append()
60 const unsigned char *buf, size_t len) in chunk_append()
63 size_t n = chunk->dlen - chunk->w_offset; in chunk_append()
73 static size_t chunk_read(struct buf_chunk *chunk, in chunk_read()
74 unsigned char *buf, size_t len) in chunk_read()
77 size_t n = chunk->w_offset - chunk->r_offset; in chunk_read()
94 static size_t chunk_unwrite(struct buf_chunk *chunk, size_t len) in chunk_unwrite()
96 size_t n = chunk->w_offset - chunk->r_offset; in chunk_unwrite()
111 static ssize_t chunk_slurpn(struct buf_chunk *chunk, size_t max_len, in chunk_slurpn()
116 size_t n = chunk->dlen - chunk->w_offset; /* free amount */ in chunk_slurpn()
128 DEBUGASSERT((size_t)nread <= n); in chunk_slurpn()
135 const unsigned char **pbuf, size_t *plen) in chunk_peek()
142 static void chunk_peek_at(const struct buf_chunk *chunk, size_t offset, in chunk_peek_at()
143 const unsigned char **pbuf, size_t *plen) in chunk_peek_at()
151 static size_t chunk_skip(struct buf_chunk *chunk, size_t amount) in chunk_skip()
153 size_t n = chunk->w_offset - chunk->r_offset; in chunk_skip()
177 size_t chunk_size, size_t spare_max) in Curl_bufcp_init()
231 size_t chunk_size, size_t max_chunks, int opts) in bufq_init()
242 void Curl_bufq_init2(struct bufq *q, size_t chunk_size, size_t max_chunks, in Curl_bufq_init2()
248 void Curl_bufq_init(struct bufq *q, size_t chunk_size, size_t max_chunks) in Curl_bufq_init()
254 size_t max_chunks, int opts) in Curl_bufq_initp()
279 size_t Curl_bufq_len(const struct bufq *q) in Curl_bufq_len()
282 size_t len = 0; in Curl_bufq_len()
290 size_t Curl_bufq_space(const struct bufq *q) in Curl_bufq_space()
292 size_t space = 0; in Curl_bufq_space()
448 const unsigned char *buf, size_t len, in Curl_bufq_write()
453 size_t n; in Curl_bufq_write()
481 const char *buf, size_t len, in Curl_bufq_cwrite()
482 size_t *pnwritten) in Curl_bufq_cwrite()
487 *pnwritten = (n < 0) ? 0 : (size_t)n; in Curl_bufq_cwrite()
491 CURLcode Curl_bufq_unwrite(struct bufq *q, size_t len) in Curl_bufq_unwrite()
500 ssize_t Curl_bufq_read(struct bufq *q, unsigned char *buf, size_t len, in Curl_bufq_read()
504 size_t n; in Curl_bufq_read()
523 CURLcode Curl_bufq_cread(struct bufq *q, char *buf, size_t len, in Curl_bufq_cread()
524 size_t *pnread) in Curl_bufq_cread()
529 *pnread = (n < 0) ? 0 : (size_t)n; in Curl_bufq_cread()
534 const unsigned char **pbuf, size_t *plen) in Curl_bufq_peek()
548 bool Curl_bufq_peek_at(struct bufq *q, size_t offset, in Curl_bufq_peek_at()
549 const unsigned char **pbuf, size_t *plen) in Curl_bufq_peek_at()
552 size_t clen; in Curl_bufq_peek_at()
571 void Curl_bufq_skip(struct bufq *q, size_t amount) in Curl_bufq_skip()
573 size_t n; in Curl_bufq_skip()
586 size_t blen; in Curl_bufq_pass()
608 Curl_bufq_skip(q, (size_t)chunk_written); in Curl_bufq_pass()
615 const unsigned char *buf, size_t len, in Curl_bufq_write_pass()
652 buf += (size_t)n; in Curl_bufq_write_pass()
653 len -= (size_t)n; in Curl_bufq_write_pass()
654 nwritten += (size_t)n; in Curl_bufq_write_pass()
665 ssize_t Curl_bufq_sipn(struct bufq *q, size_t max_len, in Curl_bufq_sipn()
704 static ssize_t bufq_slurpn(struct bufq *q, size_t max_len, in bufq_slurpn()
728 nread += (size_t)n; in bufq_slurpn()
730 DEBUGASSERT((size_t)n <= max_len); in bufq_slurpn()
731 max_len -= (size_t)n; in bufq_slurpn()