00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _ZIPAPI_H
00011 #define _ZIPAPI_H
00012
00013 #include "zip.h"
00014
00015 #ifdef WIN32
00016 # ifndef PATH_MAX
00017 # define PATH_MAX 260
00018 # endif
00019 #else
00020 # ifndef PATH_MAX
00021 # define PATH_MAX 128
00022 # endif
00023 #endif
00024
00025 #if defined(WINDLL) || defined(API)
00026 #include <windows.h>
00027
00028 #ifdef WIN32
00029 # define far
00030 # define _far
00031 # define __far
00032 # define near
00033 # define _near
00034 # define __near
00035 #endif
00036
00037
00038
00039
00040
00041 #define ZPVER_LEN sizeof(ZpVer)
00042
00043
00044
00045 #define D2_MAJORVER 0
00046 #define D2_MINORVER 0
00047 #define D2_PATCHLEVEL 0
00048
00049
00050 typedef struct _zip_ver {
00051 uch major;
00052 uch minor;
00053 uch patchlevel;
00054 uch not_used;
00055 } _zip_version_type;
00056
00057 typedef struct _ZpVer {
00058 ulg structlen;
00059 ulg flag;
00060 char betalevel[10];
00061 char date[20];
00062 char zlib_version[10];
00063 _zip_version_type zip;
00064 _zip_version_type os2dll;
00065 _zip_version_type windll;
00066 } ZpVer;
00067
00068 # ifndef EXPENTRY
00069 # define EXPENTRY WINAPI
00070 # endif
00071
00072 #ifndef DEFINED_ONCE
00073 #define DEFINED_ONCE
00074 typedef int (WINAPI DLLPRNT) (LPSTR, unsigned long);
00075 typedef int (WINAPI DLLPASSWORD) (LPSTR, int, LPCSTR, LPCSTR);
00076 typedef int (WINAPI DLLSERVICE) (LPCSTR, unsigned long);
00077 #endif
00078 typedef int (WINAPI DLLCOMMENT)(LPSTR);
00079
00080
00081
00082 typedef struct {
00083 LPSTR Date;
00084 LPSTR szRootDir;
00085 LPSTR szTempDir;
00086 BOOL fTemp;
00087 BOOL fSuffix;
00088 BOOL fEncrypt;
00089 BOOL fSystem;
00090 BOOL fVolume;
00091 BOOL fExtra;
00092 BOOL fNoDirEntries;
00093 BOOL fExcludeDate;
00094 BOOL fIncludeDate;
00095 BOOL fVerbose;
00096 BOOL fQuiet;
00097 BOOL fCRLF_LF;
00098 BOOL fLF_CRLF;
00099 BOOL fJunkDir;
00100 BOOL fGrow;
00101 BOOL fForce;
00102 BOOL fMove;
00103 BOOL fDeleteEntries;
00104 BOOL fUpdate;
00105 BOOL fFreshen;
00106 BOOL fJunkSFX;
00107 BOOL fLatestTime;
00108 BOOL fComment;
00109 BOOL fOffsets;
00110 BOOL fPrivilege;
00111 BOOL fEncryption;
00112
00113 int fRecurse;
00114 int fRepair;
00115 char fLevel;
00116 } ZPOPT, _far *LPZPOPT;
00117
00118 typedef struct {
00119 int argc;
00120 LPSTR lpszZipFN;
00121 char **FNV;
00122 } ZCL, _far *LPZCL;
00123
00124 typedef struct {
00125 DLLPRNT *print;
00126 DLLCOMMENT *comment;
00127 DLLPASSWORD *password;
00128 DLLSERVICE *ServiceApplication;
00129 } ZIPUSERFUNCTIONS, far * LPZIPUSERFUNCTIONS;
00130
00131 extern LPZIPUSERFUNCTIONS lpZipUserFunctions;
00132
00133 void EXPENTRY ZpVersion(ZpVer far *);
00134 int EXPENTRY ZpInit(LPZIPUSERFUNCTIONS lpZipUserFunc);
00135 BOOL EXPENTRY ZpSetOptions(LPZPOPT Opts);
00136 ZPOPT EXPENTRY ZpGetOptions(void);
00137 int EXPENTRY ZpArchive(ZCL C);
00138
00139 #if defined(ZIPLIB) || defined(COM_OBJECT)
00140 # define ydays zp_ydays
00141 #endif
00142
00143
00144
00145
00146 #if 0
00147 int EXPENTRY ZpMain (int argc, char **argv);
00148 int EXPENTRY ZpAltMain (int argc, char **argv, ZpInit *init);
00149 #endif
00150 #endif
00151
00152 #endif