Lines Matching refs:n

63   size_t n = chunk->dlen - chunk->w_offset;  in chunk_append()  local
65 if(n) { in chunk_append()
66 n = CURLMIN(n, len); in chunk_append()
67 memcpy(p, buf, n); in chunk_append()
68 chunk->w_offset += n; in chunk_append()
70 return n; in chunk_append()
77 size_t n = chunk->w_offset - chunk->r_offset; in chunk_read() local
79 if(!n) { in chunk_read()
82 else if(n <= len) { in chunk_read()
83 memcpy(buf, p, n); in chunk_read()
85 return n; in chunk_read()
96 size_t n = chunk->w_offset - chunk->r_offset; in chunk_unwrite() local
98 if(!n) { in chunk_unwrite()
101 else if(n <= len) { in chunk_unwrite()
103 return n; in chunk_unwrite()
116 size_t n = chunk->dlen - chunk->w_offset; /* free amount */ in chunk_slurpn() local
120 if(!n) { in chunk_slurpn()
124 if(max_len && n > max_len) in chunk_slurpn()
125 n = max_len; in chunk_slurpn()
126 nread = reader(reader_ctx, p, n, err); in chunk_slurpn()
128 DEBUGASSERT((size_t)nread <= n); in chunk_slurpn()
153 size_t n = chunk->w_offset - chunk->r_offset; in chunk_skip() local
155 if(n) { in chunk_skip()
156 n = CURLMIN(n, amount); in chunk_skip()
157 chunk->r_offset += n; in chunk_skip()
161 return n; in chunk_skip()
453 size_t n; in Curl_bufq_write() local
465 n = chunk_append(tail, buf, len); in Curl_bufq_write()
466 if(!n) in Curl_bufq_write()
468 nwritten += n; in Curl_bufq_write()
469 buf += n; in Curl_bufq_write()
470 len -= n; in Curl_bufq_write()
484 ssize_t n; in Curl_bufq_cwrite() local
486 n = Curl_bufq_write(q, (const unsigned char *)buf, len, &result); in Curl_bufq_cwrite()
487 *pnwritten = (n < 0) ? 0 : (size_t)n; in Curl_bufq_cwrite()
504 size_t n; in Curl_bufq_read() local
508 n = chunk_read(q->head, buf, len); in Curl_bufq_read()
509 if(n) { in Curl_bufq_read()
510 nread += n; in Curl_bufq_read()
511 buf += n; in Curl_bufq_read()
512 len -= n; in Curl_bufq_read()
526 ssize_t n; in Curl_bufq_cread() local
528 n = Curl_bufq_read(q, (unsigned char *)buf, len, &result); in Curl_bufq_cread()
529 *pnread = (n < 0) ? 0 : (size_t)n; in Curl_bufq_cread()
573 size_t n; in Curl_bufq_skip() local
576 n = chunk_skip(q->head, amount); in Curl_bufq_skip()
577 amount -= n; in Curl_bufq_skip()
619 ssize_t nwritten = 0, n; in Curl_bufq_write_pass() local
625 n = Curl_bufq_pass(q, writer, writer_ctx, err); in Curl_bufq_write_pass()
626 if(n < 0) { in Curl_bufq_write_pass()
637 n = Curl_bufq_write(q, buf, len, err); in Curl_bufq_write_pass()
638 if(n < 0) { in Curl_bufq_write_pass()
648 if(n == 0) 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()
708 ssize_t nread = 0, n; in bufq_slurpn() local
713 n = Curl_bufq_sipn(q, max_len, reader, reader_ctx, err); in bufq_slurpn()
714 if(n < 0) { in bufq_slurpn()
723 else if(n == 0) { 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()