summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/grep/grep.h4
-rw-r--r--usr.bin/grep/util.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/grep/grep.h b/usr.bin/grep/grep.h
index 8163bf0627c..1d886d57c20 100644
--- a/usr.bin/grep/grep.h
+++ b/usr.bin/grep/grep.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: grep.h,v 1.8 2003/07/02 21:04:10 deraadt Exp $ */
+/* $OpenBSD: grep.h,v 1.9 2004/01/19 16:12:04 otto Exp $ */
/*-
* Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav
@@ -43,7 +43,7 @@
typedef struct {
size_t len;
int line_no;
- int off;
+ off_t off;
char *file;
char *dat;
} str_t;
diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c
index a5ee22c9127..341d787ce44 100644
--- a/usr.bin/grep/util.c
+++ b/usr.bin/grep/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.20 2004/01/18 19:01:55 espie Exp $ */
+/* $OpenBSD: util.c,v 1.21 2004/01/19 16:12:04 otto Exp $ */
/*-
* Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav
@@ -517,7 +517,8 @@ printline(str_t *line, int sep)
if (bflag) {
if (n)
putchar(sep);
- printf("%lu", (unsigned long)line->off);
+ printf("%lld", (long long)line->off);
+ ++n;
}
if (n)
putchar(sep);