Lines Matching refs:inbuf
94 struct ctl_buf inbuf;
174 buffer_init(ctx->inbuf);
373 if (allocated_p(ctx->inbuf))
374 ctl_bufput(&ctx->inbuf);
501 if (!allocated_p(ctx->inbuf) &&
502 ctl_bufget(&ctx->inbuf, ctx->logger) < 0) {
507 n = read(ctx->sock, ctx->inbuf.text + ctx->inbuf.used,
508 MAX_LINELEN - ctx->inbuf.used);
517 ctx->inbuf.used += n;
519 n, ctx->inbuf.used);
521 eos = memchr(ctx->inbuf.text, '\n', ctx->inbuf.used);
522 if (eos != NULL && eos != ctx->inbuf.text && eos[-1] == '\r') {
526 if (!arpacode_p(ctx->inbuf.text)) {
529 ctx->inbuf.text);
533 if (arpadone_p(ctx->inbuf.text))
535 else if (arpacont_p(ctx->inbuf.text))
540 ctx->inbuf.text);
544 (*tran->donefunc)(ctx, tran->uap, ctx->inbuf.text,
546 ctx->inbuf.used -= ((eos - ctx->inbuf.text) + 1);
547 if (ctx->inbuf.used == 0U)
548 ctl_bufput(&ctx->inbuf);
550 memmove(ctx->inbuf.text, eos + 1, ctx->inbuf.used);
558 if (allocated_p(ctx->inbuf))
562 if (ctx->inbuf.used == (size_t)MAX_LINELEN) {
564 ctx->inbuf.text);