aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTim Vanderhoek <hoek@FreeBSD.org>2000-05-09 03:54:49 +0000
committerTim Vanderhoek <hoek@FreeBSD.org>2000-05-09 03:54:49 +0000
commit89b6ebf5ce2251081a4f08e540c3bb79193257c9 (patch)
treea8ee3a21e0de99ed7c85c1b86a8abcfc7ff6880d /usr.bin
parentcad33530834cf58d7fd9343a6e6c4a62d9fffe0c (diff)
Notes
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/more/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/more/main.c b/usr.bin/more/main.c
index cbe853c33cd8..a41f8e968d4e 100644
--- a/usr.bin/more/main.c
+++ b/usr.bin/more/main.c
@@ -93,7 +93,8 @@ edit(filename)
{
register int f;
register char *m;
- off_t initial_pos, prev_pos, position();
+ off_t initial_pos, position();
+ static off_t prev_pos;
static int didpipe;
char message[MAXPATHLEN + 50], *p;
char *rindex(), *strerror(), *save(), *bad_file();
@@ -107,7 +108,7 @@ edit(filename)
filename = save(av[curr_ac]);
}
else if (strcmp(filename, "#") == 0) {
- if (*previous_file == '\0') {
+ if (!previous_file || *previous_file == '\0') {
error("no previous file");
return(0);
}