Lines Matching refs:dest
203 emptyoutbuf(struct output *dest) in emptyoutbuf() argument
207 if (dest->buf == NULL) { in emptyoutbuf()
209 dest->buf = ckmalloc(dest->bufsize); in emptyoutbuf()
210 dest->nextc = dest->buf; in emptyoutbuf()
211 dest->bufend = dest->buf + dest->bufsize; in emptyoutbuf()
213 } else if (dest->fd == MEM_OUT) { in emptyoutbuf()
214 offset = dest->nextc - dest->buf; in emptyoutbuf()
215 newsize = dest->bufsize << 1; in emptyoutbuf()
217 dest->buf = ckrealloc(dest->buf, newsize); in emptyoutbuf()
218 dest->bufsize = newsize; in emptyoutbuf()
219 dest->bufend = dest->buf + newsize; in emptyoutbuf()
220 dest->nextc = dest->buf + offset; in emptyoutbuf()
223 flushout(dest); in emptyoutbuf()
237 flushout(struct output *dest) in flushout() argument
240 if (dest->buf == NULL || dest->nextc == dest->buf || dest->fd < 0) in flushout()
242 if (xwrite(dest->fd, dest->buf, dest->nextc - dest->buf) < 0) in flushout()
243 dest->flags |= OUTPUT_ERR; in flushout()
244 dest->nextc = dest->buf; in flushout()
325 doformat(struct output *dest, const char *f, va_list ap) in doformat() argument
329 if ((fp = fwopen(dest, doformat_wr)) != NULL) { in doformat()