summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6f133ca)
In Getc(), removed the increment of the byte count at EOF,
it didn't seem correct or necessary.
if (read_more (&m, iob) == 0) {
/* Pretend that we read a character. That's what stdio does. */
++m.readpos;
if (read_more (&m, iob) == 0) {
/* Pretend that we read a character. That's what stdio does. */
++m.readpos;
- /* Don't seem to need the following but maybe because no
- caller of m_getfld () looks at it. */
- ++m.bytes_read;
*/
cp = buf;
i = *bufsz-1;
*/
cp = buf;
i = *bufsz-1;
- for (j = 0; c != '\n' && c != EOF && j++ <= i; ) {
+ while (c != '\n' && c != EOF && j++ < i) {
*cp++ = c = Getc (iob);
}
*cp++ = c = Getc (iob);
}