From 22249a963575f911670ef98f90a75c8493ff1afa Mon Sep 17 00:00:00 2001 From: Xin LI Date: Thu, 21 Jun 2007 10:39:24 +0000 Subject: [PATCH] Restore a historical behavior that +foo is considered as a filename by more(1). The less(1) behavior is keep intact. PR: bin/51488 Prodded by: demon Approved by: re (hrs) --- contrib/less/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/less/main.c b/contrib/less/main.c index 6d0a022ae82..84b58b92962 100644 --- a/contrib/less/main.c +++ b/contrib/less/main.c @@ -142,7 +142,8 @@ main(argc, argv) if (s != NULL) scan_option(save(s)); -#define isoptstring(s) (((s)[0] == '-' || (s)[0] == '+') && (s)[1] != '\0') +#define isoptstring(s) less_is_more ? (((s)[0] == '-') && (s)[1] != '\0') : \ + (((s)[0] == '-' || (s)[0] == '+') && (s)[1] != '\0') while (argc > 0 && (isoptstring(*argv) || isoptpending())) { s = *argv++;