I thought I'd look for other examples after the grep fix. ok?
Index: csplit.c =================================================================== RCS file: /cvs/src/usr.bin/csplit/csplit.c,v retrieving revision 1.8 diff -u -p -r1.8 csplit.c --- csplit.c 11 Oct 2015 17:43:03 -0000 1.8 +++ csplit.c 8 Dec 2015 17:57:50 -0000 @@ -80,7 +80,7 @@ int kflag; /* Keep output if error oc /* * Other miscellaneous globals (XXX too many) */ -long lineno; /* Current line number in input file */ +off_t lineno; /* Current line number in input file */ long reps; /* Number of repetitions for this pattern */ long nfiles; /* Number of files output so far */ long maxfiles; /* Maximum number of files we can create */ @@ -439,7 +439,7 @@ do_rexp(const char *expr) void do_lineno(const char *expr) { - long lastline, tgtline; + off_t lastline, tgtline; char *ep, *p; FILE *ofp; @@ -455,7 +455,8 @@ do_lineno(const char *expr) ofp = newfile(); while (lineno + 1 != lastline) { if ((p = get_line()) == NULL) - errx(1, "%ld: out of range", lastline); + errx(1, "%lld: out of range", + (long long)lastline); if (fputs(p, ofp) != 0) break; }