summaryrefslogtreecommitdiffstats
path: root/contrib/less/search.c
diff options
context:
space:
mode:
authorps <ps@FreeBSD.org>2000-05-23 05:51:17 +0000
committerps <ps@FreeBSD.org>2000-05-23 05:51:17 +0000
commit4f86a08dc712d931c98124b30e0d97d63fc21649 (patch)
tree870fabd51c68a3aec2554ef44a5bd75293c9fbae /contrib/less/search.c
parentd00f222c77a8ab0c3c81f9d60defbbec4eb69be7 (diff)
downloadFreeBSD-src-4f86a08dc712d931c98124b30e0d97d63fc21649.zip
FreeBSD-src-4f86a08dc712d931c98124b30e0d97d63fc21649.tar.gz
Make less act like more(1) when it is invoked as more.
Obtained from: NetBSD
Diffstat (limited to 'contrib/less/search.c')
-rw-r--r--contrib/less/search.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/less/search.c b/contrib/less/search.c
index f533527..030bdab 100644
--- a/contrib/less/search.c
+++ b/contrib/less/search.c
@@ -1,3 +1,4 @@
+/* $FreeBSD$ */
/*
* Copyright (C) 1984-2000 Mark Nudelman
*
@@ -22,7 +23,7 @@
#if HAVE_POSIX_REGCOMP
#include <regex.h>
#ifdef REG_EXTENDED
-#define REGCOMP_FLAG REG_EXTENDED
+#define REGCOMP_FLAG (more_mode ? 0 : REG_EXTENDED)
#else
#define REGCOMP_FLAG 0
#endif
@@ -52,6 +53,7 @@ extern int linenums;
extern int sc_height;
extern int jump_sline;
extern int bs_mode;
+extern int more_mode;
extern POSITION start_attnpos;
extern POSITION end_attnpos;
#if HILITE_SEARCH
OpenPOWER on IntegriCloud