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