123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- #include "../zip.h"
- #if defined(LARGE_FILE_SUPPORT) && !defined(__CYGWIN__)
- # ifdef USE_STRM_INPUT
- # ifndef zftello
- zoff_t zftello(stream)
- FILE *stream;
- {
- fpos_t fpos = 0;
- if (fgetpos(stream, &fpos) != 0) {
- return -1L;
- } else {
- return fpos;
- }
- }
- # endif
- # ifndef zfseeko
- int zfseeko(stream, offset, origin)
- FILE *stream;
- zoff_t offset;
- int origin;
- {
-
- #if ((defined(_MSC_VER) && (_MSC_VER >= 1200)) || \
- (defined(__MINGW32__) && defined(__MSVCRT_VERSION__)))
-
- stream->_flag &= ~_IOEOF;
- #else
-
- clearerr(stream);
- #endif
- if (origin == SEEK_CUR) {
-
- offset += zftello(stream);
- origin = SEEK_SET;
- }
- fflush(stream);
- if (_lseeki64(fileno(stream), offset, origin) == (zoff_t)-1L) {
- return -1;
- } else {
- return 0;
- }
- }
- # endif
- # endif
- #endif
- #if 0
- FILE* zfopen(filename, mode)
- const char *filename;
- const char *mode;
- {
- FILE* fTemp;
- fTemp = fopen(filename, mode);
- if( fTemp == NULL )
- return NULL;
-
- setbuf(fTemp, NULL);
- return fTemp;
- }
- #endif
|