Debian Codegraph @

macos/osdep.h

raw
1 /*
2 Copyright (c) 1990-2007 Info-ZIP. All rights reserved.
3
4 See the accompanying file LICENSE, version 2007-Mar-4 or later
5 (the contents of which are also included in zip.h) for terms of use.
6 If, for some reason, all these files are missing, the Info-ZIP license
7 also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
8 */
9 #ifndef __MACOS_OSDEP_H
10 #define __MACOS_OSDEP_H 1
11
12 #ifndef MACOS
13 # define MACOS
14 #endif
15
16
17 #include <setjmp.h>
18 #include <types.h>
19 #include <signal.h>
20 #include <stdio.h>
21 #include <stdlib.h>
22 #include <unix.h>
23 #include <unistd.h>
24 #include <console.h>
25
26 #include <Errors.h>
27 #include <Files.h>
28
29 #include "unixlike.h"
30 #include "macglob.h"
31
32 #define NO_MKTEMP 1
33 #define PASSWD_FROM_STDIN 1
34 #define NO_SYMLINKS 1
35
36 #define USE_ZIPMAIN 1
37
38 #define USE_CASE_MAP 1 /* case_map is used to ignore case in comparisons */
39
40
41
42
43 /*
44 #define DEBUG_TIME
45 */
46
47 #if (!defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME))
48 # define USE_EF_UT_TIME
49 #endif
50
51 #undef IZ_CHECK_TZ
52
53 #ifndef ZP_NEED_MEMCOMPR
54 # define ZP_NEED_MEMCOMPR
55 #endif
56
57
58 #define EXDEV 18
59
60 #define PATHCUT ':'
61
62
63 /* file operations use "b" for binary */
64 #define FOPR "rb"
65 #define FOPM "r+b"
66 #define FOPW "wb"
67
68 /*
69 #define DEBUG
70 */
71
72 /* These functions are defined as a macro instead of a function.
73 so we have to undefine them for replacing (see printf.c) */
74 #undef getc
75 #undef getchar
76 #undef putchar
77
78
79
80 void setfiletype(char *file, unsigned long Creator, unsigned long Type);
81
82 char *GetZipVersionsInfo(void);
83 char *GetZipVersionLocal(void);
84 char *GetZipCopyright(void);
85
86 void InitAllVars(void);
87
88 void PrintFileInfo(void);
89
90
91
92 int fprintf(FILE *file, const char *format, ...);
93 int printf(const char *format, ...);
94 void perror(const char *parm1);
95 int macgetch(void);
96
97
98 int MacOpen(const char *path,int oflag,...);
99 FILE *MacFopen(const char *path,const char *mode);
100 #define fopen(path, mode) MacFopen(path, mode)
101 #define open(path, oflag) MacOpen(path, oflag)
102
103
104 char *GetComment(char *filename);
105 int readlink(char *path, char *buf, int size);
106
107 void PrintStatProgress(char *msg);
108 void InformProgress(const long progressMax, const long progressSoFar );
109 void ShowCounter(Boolean reset);
110 void leftStatusString(char *status);
111
112
113
114
115 #define PROCNAME(n) (action == ADD || action == UPDATE ? wild(n) : \
116 procname(n, 1))
117
118 #endif /* __MACOS_OSDEP_H */