* Copyright (c) 1987, 1992 The Regents of the University of California.
* %sccs.include.redist.c%
"@(#) Copyright (c) 1987, 1992 The Regents of the University of California.\n\
static char sccsid
[] = "@(#)rev.c 5.1 (Berkeley) %G%";
void warn
__P((const char *, ...));
register char *filename
, *p
, *t
;
while ((ch
= getopt(argc
, argv
, "")) != EOF
)
if ((fp
= fopen(*argv
, "r")) == NULL
) {
warn("%s: %s", *argv
, strerror(errno
));
while (p
= fgetline(fp
, &len
)) {
for (t
= p
+ len
- 1; t
>= p
; --t
)
warn("%s: %s", filename
, strerror(errno
));
warn(const char *fmt
, ...)
(void)fprintf(stderr
, "rev: ");
(void)vfprintf(stderr
, fmt
, ap
);
(void)fprintf(stderr
, "\n");
(void)fprintf(stderr
, "usage: rev [file ...]\n");