Lines Matching refs:obuf_len
53 int obuf_len; /* how many bytes are in it */ member
71 ctx->obuf_len = 0; in linebuffer_new()
136 while ((foundnl || p - in > ctx->obuf_size - ctx->obuf_len) in linebuffer_write()
137 && ctx->obuf_len > 0) { in linebuffer_write()
138 int orig_olen = ctx->obuf_len; in linebuffer_write()
140 i = ctx->obuf_size - ctx->obuf_len; in linebuffer_write()
143 memcpy(&(ctx->obuf[ctx->obuf_len]), in, p - in); in linebuffer_write()
144 ctx->obuf_len += p - in; in linebuffer_write()
149 memcpy(&(ctx->obuf[ctx->obuf_len]), in, i); in linebuffer_write()
150 ctx->obuf_len += i; in linebuffer_write()
156 i = BIO_write(b->next_bio, ctx->obuf, ctx->obuf_len); in linebuffer_write()
158 ctx->obuf_len = orig_olen; in linebuffer_write()
166 if (i < ctx->obuf_len) in linebuffer_write()
167 memmove(ctx->obuf, ctx->obuf + i, ctx->obuf_len - i); in linebuffer_write()
168 ctx->obuf_len -= i; in linebuffer_write()
196 memcpy(&(ctx->obuf[ctx->obuf_len]), in, inl); in linebuffer_write()
197 ctx->obuf_len += inl; in linebuffer_write()
216 ctx->obuf_len = 0; in linebuffer_ctrl()
222 ret = (long)ctx->obuf_len; in linebuffer_ctrl()
225 ret = (long)ctx->obuf_len; in linebuffer_ctrl()
243 if (ctx->obuf_len > obs) { in linebuffer_ctrl()
244 ctx->obuf_len = obs; in linebuffer_ctrl()
246 memcpy(p, ctx->obuf, ctx->obuf_len); in linebuffer_ctrl()
263 if (ctx->obuf_len <= 0) { in linebuffer_ctrl()
270 if (ctx->obuf_len > 0) { in linebuffer_ctrl()
271 r = BIO_write(b->next_bio, ctx->obuf, ctx->obuf_len); in linebuffer_ctrl()
275 if (r < ctx->obuf_len) in linebuffer_ctrl()
276 memmove(ctx->obuf, ctx->obuf + r, ctx->obuf_len - r); in linebuffer_ctrl()
277 ctx->obuf_len -= r; in linebuffer_ctrl()
279 ctx->obuf_len = 0; in linebuffer_ctrl()