for (c = 0; fgets(buffer, sizeof(buffer), in); c = buffer[0]) {
if (strncmp(buffer, delim3, ld3) == 0
- && (msgp == 1 || c == '\n')
- && ((cc = peekc(in)) == '\n' ||
- cc == EOF))
- break;
- else
+ && (msgp == 1 || c == '\n')) {
+ cc = getc(in);
+ ungetc(cc, in);
+ if (cc == '\n' || cc == EOF) {
+ break;
+ }
+ } else
pos += (long) strlen(buffer);
}