summaryrefslogtreecommitdiff
path: root/macos/source/macglob.h
blob: 17415e1f2dd81f2e5aba94e7f405a2e914bdeb3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
  Copyright (c) 1990-1999 Info-ZIP.  All rights reserved.

  See the accompanying file LICENSE, version 1999-Oct-05 or later
  (the contents of which are also included in zip.h) for terms of use.
  If, for some reason, both of these files are missing, the Info-ZIP license
  also may be found at:  ftp://ftp.cdrom.com/pub/infozip/license.html
*/
#ifndef _MACGLOBAL_
#define _MACGLOBAL_

#include <time.h>

/*
all my Global vars are defined here.
*/

#define ResourceFork    -1
#define DataFork        1
#define NoFork          0

/*
all my Global vars are defined here.
*/
typedef struct {
    short       CurrentFork;
    short       MacZipMode;

    Boolean     isMacStatValid;
    Boolean     HaveGMToffset;

    short CurrTextEncodingBase;

    /* info about the current file */
    Boolean         isDirectory;
    char            FullPath[NAME_MAX];
    char            FileName[NAME_MAX];
    FSSpec          fileSpec;

    long            dirID;
    CInfoPBRec      fpb;

    /* time infos about the current file */
    time_t          CreatDate;
    time_t          ModDate;
    time_t          BackDate;
    long            Cr_UTCoffs; /* offset "local time - UTC" for CreatDate */
    long            Md_UTCoffs; /* offset "local time - UTC" for ModDate */
    long            Bk_UTCoffs; /* offset "local time - UTC" for BackDate */

    /* some statistics over all*/
    unsigned long   FoundFiles;
    unsigned long   FoundDirectories;
    unsigned long   RawCountOfItems;
    unsigned long   BytesOfData;

    unsigned long   attrsize;

    /* some switches and user parameters */
    Boolean         DataForkOnly;
    Boolean         StoreFullPath;
    Boolean         StoreFoldersAlso;  /* internal switch is true if '-r' is set */
    unsigned short  SearchLevels;
    char            Pattern[NAME_MAX];
    Boolean         IncludeInvisible;
    Boolean         StatingProgress;

    char            SearchDir[NAME_MAX];
    char            CurrentPath[NAME_MAX];

    /* current zip / tempzip file info */
    char            ZipFullPath[NAME_MAX];

    FSSpec          ZipFileSpec;
    unsigned long   ZipFileType;
    char            TempZipFullPath[NAME_MAX];
    FSSpec          TempZipFileSpec;

} MacZipGlobals;



void UserStop(void);


#endif