summaryrefslogtreecommitdiffstats
path: root/contrib/less
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2007-06-21 10:39:24 +0000
committerdelphij <delphij@FreeBSD.org>2007-06-21 10:39:24 +0000
commitc42a76d47fee6466cac768757f65afe30dd6eb89 (patch)
tree433d9017ada96e11fc7984d39f5fcd259da8a269 /contrib/less
parent84d4dbb618d1bcabae2a9014accb0d7f5fe80a39 (diff)
downloadFreeBSD-src-c42a76d47fee6466cac768757f65afe30dd6eb89.zip
FreeBSD-src-c42a76d47fee6466cac768757f65afe30dd6eb89.tar.gz
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)
Diffstat (limited to 'contrib/less')
-rw-r--r--contrib/less/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/less/main.c b/contrib/less/main.c
index 6d0a022..84b58b9 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++;
OpenPOWER on IntegriCloud