Lines Matching defs:dest
164 emptyoutbuf(struct output *dest)
168 if (dest->buf == NULL) {
170 dest->buf = ckmalloc(dest->bufsize);
171 dest->nextc = dest->buf;
172 dest->nleft = dest->bufsize;
174 } else if (dest->fd == MEM_OUT) {
175 offset = dest->bufsize;
177 dest->bufsize <<= 1;
178 dest->buf = ckrealloc(dest->buf, dest->bufsize);
179 dest->nleft = dest->bufsize - offset;
180 dest->nextc = dest->buf + offset;
183 flushout(dest);
185 dest->nleft--;
198 flushout(struct output *dest)
201 if (dest->buf == NULL || dest->nextc == dest->buf || dest->fd < 0)
203 if (xwrite(dest->fd, dest->buf, dest->nextc - dest->buf) < 0)
204 dest->flags |= OUTPUT_ERR;
205 dest->nextc = dest->buf;
206 dest->nleft = dest->bufsize;
293 doformat(struct output *dest, const char *f, va_list ap)
297 if ((fp = fwopen(dest, doformat_wr)) != NULL) {