diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-02-16 19:48:22 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2004-02-16 19:48:22 +0000 |
commit | 5c0721459e11dce47bbb72f53b93b1dd182c025f (patch) | |
tree | f382051d0f85f080496808614f9fb79bccb58236 /usr.bin/tail/tail.c | |
parent | 3f2dad64aa7b17535fbbe86ef6791e09b1c3ce35 (diff) |
make -b and -c work with large offsets; tweak from millert@
ok henning@ itojun@ millert@
Diffstat (limited to 'usr.bin/tail/tail.c')
-rw-r--r-- | usr.bin/tail/tail.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tail/tail.c b/usr.bin/tail/tail.c index 333eddcf7a2..dd4fef2cdde 100644 --- a/usr.bin/tail/tail.c +++ b/usr.bin/tail/tail.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tail.c,v 1.11 2003/06/10 22:20:52 deraadt Exp $ */ +/* $OpenBSD: tail.c,v 1.12 2004/02/16 19:48:21 otto Exp $ */ /*- * Copyright (c) 1991, 1993 @@ -42,7 +42,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)tail.c 8.1 (Berkeley) 6/6/93"; #endif -static char rcsid[] = "$OpenBSD: tail.c,v 1.11 2003/06/10 22:20:52 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: tail.c,v 1.12 2004/02/16 19:48:21 otto Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -69,7 +69,7 @@ main(int argc, char *argv[]) { struct stat sb; FILE *fp; - long off = 0; + off_t off = 0; enum STYLE style; int ch, first; char *p; @@ -89,7 +89,7 @@ main(int argc, char *argv[]) #define ARG(units, forward, backward) { \ if (style) \ usage(); \ - off = strtol(optarg, &p, 10) * (units); \ + off = strtoll(optarg, &p, 10) * (units); \ if (*p) \ errx(1, "illegal offset -- %s", optarg); \ switch(optarg[0]) { \ |