… | |
… | |
462 | |
462 | |
463 | p = concat_line (logfile->buf, buff); |
463 | p = concat_line (logfile->buf, buff); |
464 | free (logfile->buf); logfile->buf = p; |
464 | free (logfile->buf); logfile->buf = p; |
465 | |
465 | |
466 | logfile->lastpartial = logfile->partial; |
466 | logfile->lastpartial = logfile->partial; |
|
|
467 | /* there are 3 ways we could have exited the loop: reading '\n', |
|
|
468 | * reaching EOF, or filling the buffer; the 2nd and 3rd of these |
|
|
469 | * both result in a partial line */ |
467 | logfile->partial = ch == EOF; |
470 | logfile->partial = ch != '\n'; |
468 | |
471 | |
469 | if (logfile->partial && opt_whole) |
472 | if (logfile->partial && opt_whole) |
470 | return 0; |
473 | return 0; |
471 | |
474 | |
472 | #if HAS_REGEX |
475 | #if HAS_REGEX |