분류 전체보기683 fgetln char * fgetln(FILE *fp, size_t *lenp) #include #include #include #include "local.h" /* * Expand the line buffer. Return -1 on error. #ifdef notdef * The `new size' does not account for a terminating '\0', * so we add 1 here. #endif */ int __slbexpand(FILE *fp, size_t newsize) { void *p; #ifdef notdef ++newsize; #endif if (fp->_lb._size >= newsize) return (0); if ((p = realloc(fp->_lb._base, news.. 2016. 7. 9. 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. fprintf int fprintf(FILE *fp, const char *fmt, ...) #include #include int fprintf(FILE *fp, const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = vfprintf(fp, fmt, ap); va_end(ap); return (ret); } 2016. 7. 9. fscanf int fscanf(FILE *fp, const char *fmt, ...) #include #include int fscanf(FILE *fp, const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = vfscanf(fp, fmt, ap); va_end(ap); return (ret); } 2016. 7. 9. 이전 1 ··· 136 137 138 139 140 141 142 ··· 171 다음