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)
This commit is contained in:
Xin LI 2007-06-21 10:39:24 +00:00
parent 7bd250d818
commit 22249a9635
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=170963

View File

@ -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++;