Lines Matching refs:obuf_len
53 int obuf_len; /* how many bytes are in it */ member
68 ctx->obuf_len = 0; in linebuffer_new()
133 while ((foundnl || p - in > ctx->obuf_size - ctx->obuf_len) in linebuffer_write()
134 && ctx->obuf_len > 0) { in linebuffer_write()
135 int orig_olen = ctx->obuf_len; in linebuffer_write()
137 i = ctx->obuf_size - ctx->obuf_len; in linebuffer_write()
140 memcpy(&(ctx->obuf[ctx->obuf_len]), in, p - in); in linebuffer_write()
141 ctx->obuf_len += p - in; in linebuffer_write()
146 memcpy(&(ctx->obuf[ctx->obuf_len]), in, i); in linebuffer_write()
147 ctx->obuf_len += i; in linebuffer_write()
153 i = BIO_write(b->next_bio, ctx->obuf, ctx->obuf_len); in linebuffer_write()
155 ctx->obuf_len = orig_olen; in linebuffer_write()
163 if (i < ctx->obuf_len) in linebuffer_write()
164 memmove(ctx->obuf, ctx->obuf + i, ctx->obuf_len - i); in linebuffer_write()
165 ctx->obuf_len -= i; in linebuffer_write()
193 memcpy(&(ctx->obuf[ctx->obuf_len]), in, inl); in linebuffer_write()
194 ctx->obuf_len += inl; in linebuffer_write()
213 ctx->obuf_len = 0; in linebuffer_ctrl()
219 ret = (long)ctx->obuf_len; in linebuffer_ctrl()
222 ret = (long)ctx->obuf_len; in linebuffer_ctrl()
240 if (ctx->obuf_len > obs) { in linebuffer_ctrl()
241 ctx->obuf_len = obs; in linebuffer_ctrl()
243 memcpy(p, ctx->obuf, ctx->obuf_len); in linebuffer_ctrl()
260 if (ctx->obuf_len <= 0) { in linebuffer_ctrl()
268 if (ctx->obuf_len > 0) { in linebuffer_ctrl()
269 r = BIO_write(b->next_bio, ctx->obuf, ctx->obuf_len); in linebuffer_ctrl()
273 if (r < ctx->obuf_len) in linebuffer_ctrl()
274 memmove(ctx->obuf, ctx->obuf + r, ctx->obuf_len - r); in linebuffer_ctrl()
275 ctx->obuf_len -= r; in linebuffer_ctrl()
277 ctx->obuf_len = 0; in linebuffer_ctrl()