We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e82ec68 commit c0b1338Copy full SHA for c0b1338
chapter08/8-4-linebuf.c
@@ -139,7 +139,7 @@ int _flushbuf(int x, FILE *fp)
139
140
if (fp->flag & _UNBUF)
141
bufsize = 1;
142
- else if (fp->flag & _EOF) /* coordinate with fflush */
+ else if (fp->flag & _EOF) /* flush written data only (fflush) */
143
bufsize = BUFSIZ - fp->cnt;
144
else
145
bufsize = BUFSIZ;
@@ -196,7 +196,7 @@ int fflush(FILE *fp)
196
for ( ; fp < cond; fp++) {
197
if ((fp->flag & (_WRITE | _EOF | _ERR)) != _WRITE)
198
return EOF;
199
- fp->flag |= _EOF; /* coordinate with _flushbuf */
+ fp->flag |= _EOF; /* singal EOF to _flushbuf */
200
if (_flushbuf(*fp->ptr, fp) < 0)
201
202
*fp->ptr = '\0';
0 commit comments