output.h (1a0fda2b547365c9453523592a445dfe21266d4b) | output.h (c3f57269e604d9e4c9d5f1312a751fd796415202) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 22 unchanged lines hidden (view full) --- 31 * 32 * @(#)output.h 8.2 (Berkeley) 5/4/95 33 * $FreeBSD$ 34 */ 35 36#ifndef OUTPUT_INCL 37 38#include <stdarg.h> | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 22 unchanged lines hidden (view full) --- 31 * 32 * @(#)output.h 8.2 (Berkeley) 5/4/95 33 * $FreeBSD$ 34 */ 35 36#ifndef OUTPUT_INCL 37 38#include <stdarg.h> |
39#include <stddef.h> |
|
39 40struct output { 41 char *nextc; 42 int nleft; 43 char *buf; 44 int bufsize; 45 short fd; 46 short flags; --- 7 unchanged lines hidden (view full) --- 54 &errout */ 55 56void out1str(const char *); 57void out1qstr(const char *); 58void out2str(const char *); 59void out2qstr(const char *); 60void outstr(const char *, struct output *); 61void outqstr(const char *, struct output *); | 40 41struct output { 42 char *nextc; 43 int nleft; 44 char *buf; 45 int bufsize; 46 short fd; 47 short flags; --- 7 unchanged lines hidden (view full) --- 55 &errout */ 56 57void out1str(const char *); 58void out1qstr(const char *); 59void out2str(const char *); 60void out2qstr(const char *); 61void outstr(const char *, struct output *); 62void outqstr(const char *, struct output *); |
63void outbin(const void *, size_t, struct output *); |
|
62void emptyoutbuf(struct output *); 63void flushall(void); 64void flushout(struct output *); 65void freestdout(void); 66void outfmt(struct output *, const char *, ...) __printflike(2, 3); 67void out1fmt(const char *, ...) __printflike(1, 2); 68void out2fmt_flush(const char *, ...) __printflike(1, 2); 69void fmtstr(char *, int, const char *, ...) __printflike(3, 4); 70void doformat(struct output *, const char *, va_list) __printflike(2, 0); 71int xwrite(int, const char *, int); 72 73#define outc(c, file) (--(file)->nleft < 0? (emptyoutbuf(file), *(file)->nextc++ = (c)) : (*(file)->nextc++ = (c))) 74#define out1c(c) outc(c, out1); 75#define out2c(c) outc(c, out2); 76 77#define OUTPUT_INCL 78#endif | 64void emptyoutbuf(struct output *); 65void flushall(void); 66void flushout(struct output *); 67void freestdout(void); 68void outfmt(struct output *, const char *, ...) __printflike(2, 3); 69void out1fmt(const char *, ...) __printflike(1, 2); 70void out2fmt_flush(const char *, ...) __printflike(1, 2); 71void fmtstr(char *, int, const char *, ...) __printflike(3, 4); 72void doformat(struct output *, const char *, va_list) __printflike(2, 0); 73int xwrite(int, const char *, int); 74 75#define outc(c, file) (--(file)->nleft < 0? (emptyoutbuf(file), *(file)->nextc++ = (c)) : (*(file)->nextc++ = (c))) 76#define out1c(c) outc(c, out1); 77#define out2c(c) outc(c, out2); 78 79#define OUTPUT_INCL 80#endif |