zlib_io.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. Stdio->zlib interface
  3. */
  4. /*
  5. #define ZLIB_FILES
  6. #ifdef ZLIB_FILES
  7. */
  8. #define FFILE gzFile
  9. #define ffopen gzopen
  10. #define ffread(buffer,s1,s2,f) gzread(f,buffer,(s1)*(s2))
  11. #define ffwrite(buffer,s1,s2,f) gzwrite(f,buffer,(s1)*(s2))
  12. #define ffseek gzseek
  13. #define fftell gztell
  14. #define ffclose gzclose
  15. #define ffputs(string,f) gzputs(f,string)
  16. #define ffgets(string,n,f) gzgets(f,string,n)
  17. #define ffputc(c,f) gzputc(f,c)
  18. #define ffgetc gzgetc
  19. #define ffeof gzeof
  20. /*
  21. #else
  22. #define FFILE FILE *
  23. #define ffopen fopen
  24. #define ffread(buffer,s1,s2,f) fread(buffer,s1,s2,f)
  25. #define ffwrite(buffer,s1,s2,f) fwrite(buffer,s1,s2,f)
  26. #define ffseek fseek
  27. #define fftell ftell
  28. #define ffclose fclose
  29. #define ffputs(string,f) fputs(string,f)
  30. #define ffgets(string,n,f) fgets(string,n,f)
  31. #define ffputc(c,f) fputc(c,f)
  32. #define ffgetc fgetc
  33. #define ffeof feof
  34. #endif
  35. */