/[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 717 by ph10, Sun Sep 11 14:31:21 2011 UTC revision 718 by ph10, Wed Oct 5 16:11:19 2011 UTC
# Line 1397  while (ptr < endptr) Line 1397  while (ptr < endptr)
1397          for (;;)          for (;;)
1398            {            {
1399            startoffset = offsets[1];            startoffset = offsets[1];
1400            if (startoffset >= linelength + endlinelength ||            if (startoffset >= (int)linelength + endlinelength ||
1401                !match_patterns(matchptr, length, startoffset, offsets, &mrc))                !match_patterns(matchptr, length, startoffset, offsets, &mrc))
1402              break;              break;
1403            FWRITE(matchptr + startoffset, 1, offsets[0] - startoffset, stdout);            FWRITE(matchptr + startoffset, 1, offsets[0] - startoffset, stdout);
# Line 1460  while (ptr < endptr) Line 1460  while (ptr < endptr)
1460    /* If input is line buffered, and the buffer is not yet full, read another    /* If input is line buffered, and the buffer is not yet full, read another
1461    line and add it into the buffer. */    line and add it into the buffer. */
1462    
1463    if (input_line_buffered && bufflength < bufsize)    if (input_line_buffered && bufflength < (size_t)bufsize)
1464      {      {
1465      int add = read_one_line(ptr, bufsize - (ptr - main_buffer), in);      int add = read_one_line(ptr, bufsize - (ptr - main_buffer), in);
1466      bufflength += add;      bufflength += add;
# Line 1472  while (ptr < endptr) Line 1472  while (ptr < endptr)
1472    1/3 and refill it. Before we do this, if some unprinted "after" lines are    1/3 and refill it. Before we do this, if some unprinted "after" lines are
1473    about to be lost, print them. */    about to be lost, print them. */
1474    
1475    if (bufflength >= bufsize && ptr > main_buffer + 2*bufthird)    if (bufflength >= (size_t)bufsize && ptr > main_buffer + 2*bufthird)
1476      {      {
1477      if (after_context > 0 &&      if (after_context > 0 &&
1478          lastmatchnumber > 0 &&          lastmatchnumber > 0 &&

Legend:
Removed from v.717  
changed lines
  Added in v.718

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12