zip.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * ZIP support routines for PhysicsFS.
  3. *
  4. * Please see the file LICENSE in the source's root directory.
  5. *
  6. * This file written by Ryan C. Gordon.
  7. */
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #define __PHYSICSFS_INTERNAL__
  11. #include "physfs_internal.h"
  12. /* template for filehandles. */
  13. const FileHandle __PHYSFS_FileHandle_ZIP =
  14. {
  15. NULL, /* opaque */
  16. NULL, /* dirReader */
  17. ZIP_read, /* read() method */
  18. NULL, /* write() method */
  19. ZIP_eof, /* eof() method */
  20. ZIP_tell, /* tell() method */
  21. ZIP_seek, /* seek() method */
  22. ZIP_close, /* close() method */
  23. };
  24. /* template for directories. */
  25. const DirReader __PHYSFS_DirReader_ZIP =
  26. {
  27. NULL, /* opaque */
  28. ZIP_enumerate, /* enumerateFiles() method */
  29. ZIP_isDirectory, /* isDirectory() method */
  30. ZIP_isSymLink, /* isSymLink() method */
  31. ZIP_isOpenable, /* isOpenable() method */
  32. ZIP_openRead, /* openRead() method */
  33. ZIP_dirClose, /* close() method */
  34. };
  35. const __PHYSFS_ArchiveInfo __PHYSFS_ArchiveInfo_ZIP =
  36. {
  37. "ZIP",
  38. "PkZip/WinZip/Info-Zip compatible"
  39. };
  40. /* end of zip.c ... */