macglob.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. Copyright (c) 1990-1999 Info-ZIP. All rights reserved.
  3. See the accompanying file LICENSE, version 1999-Oct-05 or later
  4. (the contents of which are also included in zip.h) for terms of use.
  5. If, for some reason, both of these files are missing, the Info-ZIP license
  6. also may be found at: ftp://ftp.cdrom.com/pub/infozip/license.html
  7. */
  8. #ifndef _MACGLOBAL_
  9. #define _MACGLOBAL_
  10. #include <time.h>
  11. /*
  12. all my Global vars are defined here.
  13. */
  14. #define ResourceFork -1
  15. #define DataFork 1
  16. #define NoFork 0
  17. /*
  18. all my Global vars are defined here.
  19. */
  20. typedef struct {
  21. short CurrentFork;
  22. short MacZipMode;
  23. Boolean isMacStatValid;
  24. Boolean HaveGMToffset;
  25. short CurrTextEncodingBase;
  26. /* info about the current file */
  27. Boolean isDirectory;
  28. char FullPath[NAME_MAX];
  29. char FileName[NAME_MAX];
  30. FSSpec fileSpec;
  31. long dirID;
  32. CInfoPBRec fpb;
  33. /* time infos about the current file */
  34. time_t CreatDate;
  35. time_t ModDate;
  36. time_t BackDate;
  37. long Cr_UTCoffs; /* offset "local time - UTC" for CreatDate */
  38. long Md_UTCoffs; /* offset "local time - UTC" for ModDate */
  39. long Bk_UTCoffs; /* offset "local time - UTC" for BackDate */
  40. /* some statistics over all*/
  41. unsigned long FoundFiles;
  42. unsigned long FoundDirectories;
  43. unsigned long RawCountOfItems;
  44. unsigned long BytesOfData;
  45. unsigned long attrsize;
  46. /* some switches and user parameters */
  47. Boolean DataForkOnly;
  48. Boolean StoreFullPath;
  49. Boolean StoreFoldersAlso; /* internal switch is true if '-r' is set */
  50. unsigned short SearchLevels;
  51. char Pattern[NAME_MAX];
  52. Boolean IncludeInvisible;
  53. Boolean StatingProgress;
  54. char SearchDir[NAME_MAX];
  55. char CurrentPath[NAME_MAX];
  56. /* current zip / tempzip file info */
  57. char ZipFullPath[NAME_MAX];
  58. FSSpec ZipFileSpec;
  59. unsigned long ZipFileType;
  60. char TempZipFullPath[NAME_MAX];
  61. FSSpec TempZipFileSpec;
  62. } MacZipGlobals;
  63. void UserStop(void);
  64. #endif