summaryrefslogtreecommitdiff
path: root/usr.bin/tail/reverse.c
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2004-02-16 19:48:22 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2004-02-16 19:48:22 +0000
commit5c0721459e11dce47bbb72f53b93b1dd182c025f (patch)
treef382051d0f85f080496808614f9fb79bccb58236 /usr.bin/tail/reverse.c
parent3f2dad64aa7b17535fbbe86ef6791e09b1c3ce35 (diff)
make -b and -c work with large offsets; tweak from millert@
ok henning@ itojun@ millert@
Diffstat (limited to 'usr.bin/tail/reverse.c')
-rw-r--r--usr.bin/tail/reverse.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/tail/reverse.c b/usr.bin/tail/reverse.c
index 3bf04c6cc3d..011126a0d18 100644
--- a/usr.bin/tail/reverse.c
+++ b/usr.bin/tail/reverse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: reverse.c,v 1.14 2003/07/01 11:12:59 henning Exp $ */
+/* $OpenBSD: reverse.c,v 1.15 2004/02/16 19:48:21 otto Exp $ */
/* $NetBSD: reverse.c,v 1.6 1994/11/23 07:42:10 jtc Exp $ */
/*-
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)reverse.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: reverse.c,v 1.14 2003/07/01 11:12:59 henning Exp $";
+static char rcsid[] = "$OpenBSD: reverse.c,v 1.15 2004/02/16 19:48:21 otto Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -55,7 +55,7 @@ static char rcsid[] = "$OpenBSD: reverse.c,v 1.14 2003/07/01 11:12:59 henning Ex
#include "extern.h"
static void r_buf(FILE *);
-static int r_reg(FILE *, enum STYLE, long, struct stat *);
+static int r_reg(FILE *, enum STYLE, off_t, struct stat *);
#define COPYCHAR(fp, ch) \
do { \
@@ -91,7 +91,7 @@ void
reverse(fp, style, off, sbp)
FILE *fp;
enum STYLE style;
- long off;
+ off_t off;
struct stat *sbp;
{
if (style != REVERSE && off == 0)
@@ -117,7 +117,7 @@ reverse(fp, style, off, sbp)
* r_reg -- display a regular file in reverse order by line.
*/
static int
-r_reg(FILE *fp, enum STYLE style, long off, struct stat *sbp)
+r_reg(FILE *fp, enum STYLE style, off_t off, struct stat *sbp)
{
off_t start, pos, end;
int ch;