sclose1 stdio stdio #include #include #include #include "local.h" /* * Small standard I/O/seek/close functions. * These maintain the `known seek offset' for seek optimisation. */ int __sread(void *cookie, char *buf, int n) { FILE *fp = cookie; int ret; ret = read(fp->_file, buf, n); /* if the read succeeded, update the current offset */ if (ret >= 0) fp->_offset += ret; else fp->_flags &= ~__SOFF;/* paranoia .. 2016. 7. 9. 이전 1 다음