fflush1 fflush int fflush(FILE *fp) #include #include #include "local.h" /* Flush a single file, or (if fp is NULL) all files. */ int fflush(FILE *fp) { if (fp == NULL) return (_fwalk(__sflush)); if ((fp->_flags & (__SWR | __SRW)) == 0) { errno = EBADF; return (EOF); } return (__sflush(fp)); } int __sflush(FILE *fp) { unsigned char *p; int n, t; t = fp->_flags; if ((t & __SWR) == 0) return (0); if ((p = fp->_b.. 2016. 7. 9. 이전 1 다음