[BACK]Return to pattern.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / less

Diff for /src/usr.bin/less/pattern.c between version 1.1 and 1.2

version 1.1, 2011/09/16 17:47:07 version 1.2, 2014/04/12 01:01:19
Line 16 
Line 16 
 #include "pattern.h"  #include "pattern.h"
   
 extern int caseless;  extern int caseless;
   extern int less_is_more;
   
 /*  /*
  * Compile a search pattern, for future use by match_pattern.   * Compile a search pattern, for future use by match_pattern.
Line 31 
Line 32 
 #if HAVE_POSIX_REGCOMP  #if HAVE_POSIX_REGCOMP
                 regex_t *comp = (regex_t *) ecalloc(1, sizeof(regex_t));                  regex_t *comp = (regex_t *) ecalloc(1, sizeof(regex_t));
                 regex_t **pcomp = (regex_t **) comp_pattern;                  regex_t **pcomp = (regex_t **) comp_pattern;
                 if (regcomp(comp, pattern, REGCOMP_FLAG))                  if (regcomp(comp, pattern, less_is_more ? 0 : REGCOMP_FLAG))
                 {                  {
                         free(comp);                          free(comp);
                         error("Invalid pattern", NULL_PARG);                          error("Invalid pattern", NULL_PARG);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2