/[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 588 by ph10, Sat Jan 15 11:22:47 2011 UTC revision 589 by ph10, Sat Jan 15 11:31:39 2011 UTC
# Line 1349  while (ptr < endptr) Line 1349  while (ptr < endptr)
1349    
1350        /* We have to split the line(s) up if colouring, and search for further        /* We have to split the line(s) up if colouring, and search for further
1351        matches, but not of course if the line is a non-match. */        matches, but not of course if the line is a non-match. */
1352    
1353        if (do_colour && !invert)        if (do_colour && !invert)
1354          {          {
1355          int plength;          int plength;
1356          int last_offset = 0;          int last_offset = 0;
1357          FWRITE(ptr, 1, offsets[0], stdout);          FWRITE(ptr, 1, offsets[0], stdout);
1358          fprintf(stdout, "%c[%sm", 0x1b, colour_string);          fprintf(stdout, "%c[%sm", 0x1b, colour_string);
# Line 1372  while (ptr < endptr) Line 1372  while (ptr < endptr)
1372            }            }
1373    
1374          /* In multiline mode, we may have already printed the complete line          /* In multiline mode, we may have already printed the complete line
1375          and its line-ending characters (if they matched the pattern), so there          and its line-ending characters (if they matched the pattern), so there
1376          may be no more to print. */          may be no more to print. */
1377    
1378          plength = (linelength + endlinelength) - last_offset;          plength = (linelength + endlinelength) - last_offset;
1379          if (plength > 0)          if (plength > 0)
1380            FWRITE(ptr + last_offset, 1, plength, stdout);            FWRITE(ptr + last_offset, 1, plength, stdout);

Legend:
Removed from v.588  
changed lines
  Added in v.589

  ViewVC Help
Powered by ViewVC 1.1.5