=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/less/pattern.c,v retrieving revision 1.1 retrieving revision 1.2 diff -c -r1.1 -r1.2 *** src/usr.bin/less/pattern.c 2011/09/16 17:47:07 1.1 --- src/usr.bin/less/pattern.c 2014/04/12 01:01:19 1.2 *************** *** 16,21 **** --- 16,22 ---- #include "pattern.h" extern int caseless; + extern int less_is_more; /* * Compile a search pattern, for future use by match_pattern. *************** *** 31,37 **** #if HAVE_POSIX_REGCOMP regex_t *comp = (regex_t *) ecalloc(1, sizeof(regex_t)); regex_t **pcomp = (regex_t **) comp_pattern; ! if (regcomp(comp, pattern, REGCOMP_FLAG)) { free(comp); error("Invalid pattern", NULL_PARG); --- 32,38 ---- #if HAVE_POSIX_REGCOMP regex_t *comp = (regex_t *) ecalloc(1, sizeof(regex_t)); regex_t **pcomp = (regex_t **) comp_pattern; ! if (regcomp(comp, pattern, less_is_more ? 0 : REGCOMP_FLAG)) { free(comp); error("Invalid pattern", NULL_PARG);