diff options
| author | Xin LI <delphij@FreeBSD.org> | 2019-06-29 04:39:01 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2019-06-29 04:39:01 +0000 |
| commit | 6aa86b45318b321ba7e9cc3c221ab9062ddac4a0 (patch) | |
| tree | ed38a1d35ad0e927ec1b5282deedc86014f9181d /option.c | |
| parent | b04073e3aef4b6c7e7d2755a7bbc098e5f2a03f8 (diff) | |
Diffstat (limited to 'option.c')
| -rw-r--r-- | option.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/option.c b/option.c index 8ba67bce31874..d402e11752c1a 100644 --- a/option.c +++ b/option.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1984-2017 Mark Nudelman + * Copyright (C) 1984-2019 Mark Nudelman * * You may distribute under the terms of either the GNU General Public * License or the Less License, as specified in the README file. @@ -150,8 +150,11 @@ scan_option(s) if (s == NULL) return; if (*str == '+') + { + if (every_first_cmd != NULL) + free(every_first_cmd); every_first_cmd = save(str+1); - else + } else { ungetcc(CHAR_END_COMMAND); ungetsc(str); @@ -530,7 +533,7 @@ opt_prompt(o) * the previous option. */ public int -isoptpending() +isoptpending(VOID_PARAM) { return (pendopt != NULL); } @@ -551,7 +554,7 @@ nostring(printopt) * Print error message if a STRING type option is not followed by a string. */ public void -nopendopt() +nopendopt(VOID_PARAM) { nostring(opt_desc(pendopt)); } @@ -699,7 +702,7 @@ getfraction(sp, printopt, errp) * Get the value of the -e flag. */ public int -get_quit_at_eof() +get_quit_at_eof(VOID_PARAM) { if (!less_is_more) return quit_at_eof; |
