diff options
| author | Tim Vanderhoek <hoek@FreeBSD.org> | 2000-05-09 03:53:13 +0000 |
|---|---|---|
| committer | Tim Vanderhoek <hoek@FreeBSD.org> | 2000-05-09 03:53:13 +0000 |
| commit | 64e8edb8841297067e7e0d994504336c189a2eea (patch) | |
| tree | 6ad8bd2d253efd4b0c7a3e968148b385e940e020 /usr.bin | |
| parent | eee0e29c1d36283f28a166b11a7daa48af13b88d (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/more/main.c | 5 |
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); } |
