| 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); |
| 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; |
| 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 && |