Lines Matching refs:buf
104 struct cw_out_buf *buf; member
111 const char *buf, size_t nbytes);
130 ctx->buf = NULL; in cw_out_init()
136 while(ctx->buf) { in cw_out_bufs_free()
137 struct cw_out_buf *next = ctx->buf->next; in cw_out_bufs_free()
138 cw_out_buf_free(ctx->buf); in cw_out_bufs_free()
139 ctx->buf = next; in cw_out_bufs_free()
145 struct cw_out_buf *cwbuf = ctx->buf; in cw_out_bufs_len()
198 const char *buf, size_t blen, in cw_out_ptr_flush() argument
223 nwritten = wcb((char *)buf, 1, wlen, wcb_data); in cw_out_ptr_flush()
253 buf += nwritten; in cw_out_ptr_flush()
330 const char *buf, size_t blen) in cw_out_append() argument
338 if(!ctx->buf || (ctx->buf->type != otype) || (otype == CW_OUT_HDS)) { in cw_out_append()
342 cwbuf->next = ctx->buf; 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()
353 const char *buf, size_t blen) in cw_out_do_write() argument
359 if(ctx->buf && ctx->buf->type != otype) { in cw_out_do_write()
360 result = cw_out_flush_chain(ctx, data, &ctx->buf, TRUE); in cw_out_do_write()
365 if(ctx->buf) { in cw_out_do_write()
367 result = cw_out_append(ctx, otype, buf, blen); in cw_out_do_write()
370 result = cw_out_flush_chain(ctx, data, &ctx->buf, flush_all); in cw_out_do_write()
378 buf, blen, &consumed); in cw_out_do_write()
383 result = cw_out_append(ctx, otype, buf + consumed, blen - consumed); in cw_out_do_write()
401 const char *buf, size_t blen) in cw_out_write() argument
409 result = cw_out_do_write(ctx, data, CW_OUT_BODY, flush_all, buf, blen); in cw_out_write()
415 result = cw_out_do_write(ctx, data, CW_OUT_HDS, flush_all, buf, blen); in cw_out_write()
453 result = cw_out_flush_chain(ctx, data, &ctx->buf, flush_all); in cw_out_flush()