Lines Matching refs:obuf_len
102 int obuf_len; /* how many bytes are in it */ member
114 ctx->obuf_len=0; in linebuffer_new()
175 while ((foundnl || p - in > ctx->obuf_size - ctx->obuf_len) in linebuffer_write()
176 && ctx->obuf_len > 0) in linebuffer_write()
178 int orig_olen = ctx->obuf_len; in linebuffer_write()
180 i = ctx->obuf_size - ctx->obuf_len; in linebuffer_write()
185 memcpy(&(ctx->obuf[ctx->obuf_len]), in linebuffer_write()
187 ctx->obuf_len += p - in; in linebuffer_write()
194 memcpy(&(ctx->obuf[ctx->obuf_len]), in linebuffer_write()
196 ctx->obuf_len += i; in linebuffer_write()
207 ctx->obuf, ctx->obuf_len); in linebuffer_write()
210 ctx->obuf_len = orig_olen; in linebuffer_write()
222 if (i < ctx->obuf_len) in linebuffer_write()
224 ctx->obuf_len - i); in linebuffer_write()
225 ctx->obuf_len-=i; in linebuffer_write()
259 memcpy(&(ctx->obuf[ctx->obuf_len]), in, inl); in linebuffer_write()
260 ctx->obuf_len += inl; in linebuffer_write()
280 ctx->obuf_len=0; in linebuffer_ctrl()
285 ret=(long)ctx->obuf_len; in linebuffer_ctrl()
288 ret=(long)ctx->obuf_len; in linebuffer_ctrl()
306 if (ctx->obuf_len > obs) in linebuffer_ctrl()
308 ctx->obuf_len = obs; in linebuffer_ctrl()
310 memcpy(p, ctx->obuf, ctx->obuf_len); in linebuffer_ctrl()
325 if (ctx->obuf_len <= 0) in linebuffer_ctrl()
334 if (ctx->obuf_len > 0) in linebuffer_ctrl()
337 ctx->obuf, ctx->obuf_len); in linebuffer_ctrl()
339 fprintf(stderr,"FLUSH %3d -> %3d\n",ctx->obuf_len,r); in linebuffer_ctrl()
343 if (r < ctx->obuf_len) in linebuffer_ctrl()
345 ctx->obuf_len - r); in linebuffer_ctrl()
346 ctx->obuf_len-=r; in linebuffer_ctrl()
350 ctx->obuf_len=0; in linebuffer_ctrl()