/[pcre]/code/trunk/pcregrep.c
ViewVC logotype

Diff of /code/trunk/pcregrep.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 325 by ph10, Sat Mar 8 17:13:02 2008 UTC revision 345 by ph10, Mon Apr 28 15:10:02 2008 UTC
# Line 1395  if ((sep = isdirectory(pathname)) != 0) Line 1395  if ((sep = isdirectory(pathname)) != 0)
1395        int frc, nflen;        int frc, nflen;
1396        sprintf(buffer, "%.512s%c%.128s", pathname, sep, nextfile);        sprintf(buffer, "%.512s%c%.128s", pathname, sep, nextfile);
1397        nflen = strlen(nextfile);        nflen = strlen(nextfile);
1398    
1399        if (isdirectory(buffer))        if (isdirectory(buffer))
1400          {          {
1401          if (exclude_dir_compiled != NULL &&          if (exclude_dir_compiled != NULL &&
1402              pcre_exec(exclude_dir_compiled, NULL, nextfile, nflen, 0, 0, NULL, 0) >= 0)              pcre_exec(exclude_dir_compiled, NULL, nextfile, nflen, 0, 0, NULL, 0) >= 0)
1403            continue;            continue;
1404    
1405          if (include_dir_compiled != NULL &&          if (include_dir_compiled != NULL &&
1406              pcre_exec(include_dir_compiled, NULL, nextfile, nflen, 0, 0, NULL, 0) < 0)              pcre_exec(include_dir_compiled, NULL, nextfile, nflen, 0, 0, NULL, 0) < 0)
1407            continue;            continue;
1408          }          }
1409        else        else
1410          {          {
1411          if (exclude_compiled != NULL &&          if (exclude_compiled != NULL &&
1412              pcre_exec(exclude_compiled, NULL, nextfile, nflen, 0, 0, NULL, 0) >= 0)              pcre_exec(exclude_compiled, NULL, nextfile, nflen, 0, 0, NULL, 0) >= 0)
1413            continue;            continue;
1414    
1415          if (include_compiled != NULL &&          if (include_compiled != NULL &&
1416              pcre_exec(include_compiled, NULL, nextfile, nflen, 0, 0, NULL, 0) < 0)              pcre_exec(include_compiled, NULL, nextfile, nflen, 0, 0, NULL, 0) < 0)
1417            continue;            continue;
1418          }          }
1419    
1420        frc = grep_or_recurse(buffer, dir_recurse, FALSE);        frc = grep_or_recurse(buffer, dir_recurse, FALSE);
1421        if (frc > 1) rc = frc;        if (frc > 1) rc = frc;

Legend:
Removed from v.325  
changed lines
  Added in v.345

  ViewVC Help
Powered by ViewVC 1.1.5