/[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 323 by ph10, Sun Jan 20 20:07:32 2008 UTC revision 324 by ph10, Fri Mar 7 19:48:32 2008 UTC
# Line 1383  if ((sep = isdirectory(pathname)) != 0) Line 1383  if ((sep = isdirectory(pathname)) != 0)
1383    
1384      while ((nextfile = readdirectory(dir)) != NULL)      while ((nextfile = readdirectory(dir)) != NULL)
1385        {        {
1386        int frc, blen;        int frc, nflen;
1387        sprintf(buffer, "%.512s%c%.128s", pathname, sep, nextfile);        sprintf(buffer, "%.512s%c%.128s", pathname, sep, nextfile);
1388        blen = strlen(buffer);        nflen = strlen(nextfile);
1389    
1390        if (exclude_compiled != NULL &&        if (!isdirectory(buffer))
1391            pcre_exec(exclude_compiled, NULL, buffer, blen, 0, 0, NULL, 0) >= 0)          {
1392          continue;          if (exclude_compiled != NULL &&
1393                pcre_exec(exclude_compiled, NULL, nextfile, nflen, 0, 0, NULL, 0) >= 0)
1394        if (include_compiled != NULL &&            continue;
1395            pcre_exec(include_compiled, NULL, buffer, blen, 0, 0, NULL, 0) < 0)  
1396          continue;          if (include_compiled != NULL &&
1397                pcre_exec(include_compiled, NULL, nextfile, nflen, 0, 0, NULL, 0) < 0)
1398              continue;
1399            }
1400    
1401        frc = grep_or_recurse(buffer, dir_recurse, FALSE);        frc = grep_or_recurse(buffer, dir_recurse, FALSE);
1402        if (frc > 1) rc = frc;        if (frc > 1) rc = frc;

Legend:
Removed from v.323  
changed lines
  Added in v.324

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12