diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2015-11-19 17:50:05 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2015-11-19 17:50:05 +0000 |
commit | 7e93d06b71185308b6a3c3295b4bbead7f4d5aa0 (patch) | |
tree | 46befb3934164ee48f168e2cc84126558d3d225f /usr.bin/tail/extern.h | |
parent | 3ea70f02c2b97325aeb062585273131d1d14106d (diff) |
another try to allow tailing multiple files. maybe it works?
commit now to allow people to test.
from Martijn van Duren
Diffstat (limited to 'usr.bin/tail/extern.h')
-rw-r--r-- | usr.bin/tail/extern.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/usr.bin/tail/extern.h b/usr.bin/tail/extern.h index 948f4e49bb0..628d875b1cb 100644 --- a/usr.bin/tail/extern.h +++ b/usr.bin/tail/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.11 2008/11/13 18:33:03 landry Exp $ */ +/* $OpenBSD: extern.h,v 1.12 2015/11/19 17:50:04 tedu Exp $ */ /* $NetBSD: extern.h,v 1.3 1994/11/23 07:42:00 jtc Exp $ */ /*- @@ -36,17 +36,23 @@ if (write(STDOUT_FILENO, p, size) != size) \ oerr(); +struct tailfile { + char *fname; + FILE *fp; + struct stat sb; +}; + enum STYLE { NOTSET = 0, FBYTES, FLINES, RBYTES, RLINES, REVERSE }; -void forward(FILE *, enum STYLE, off_t, struct stat *); -void reverse(FILE *, enum STYLE, off_t, struct stat *); +void forward(struct tailfile *, int, enum STYLE, off_t); +void reverse(struct tailfile *, int, enum STYLE, off_t); -int bytes(FILE *, off_t); -int lines(FILE *, off_t); +int bytes(struct tailfile *, off_t); +int lines(struct tailfile *, off_t); -void ierr(void); +void ierr(const char *); void oerr(void); +void printfname(const char *); extern int fflag, rflag, rval; -extern char *fname; extern int is_stdin; |