home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / zip21.zip / wizdll / wizzip.h < prev    next >
C/C++ Source or Header  |  1996-04-19  |  5KB  |  156 lines

  1. /*
  2.  WizZip 1.0 header file
  3. */
  4. #ifndef _WIZZIP_H
  5. #define _WIZZIP_H
  6.  
  7. #ifndef MSWIN
  8. #define MSWIN
  9. #endif
  10.  
  11. /* Porting definations between Win 3.1x and Win32 */
  12. #ifdef WIN32
  13. #  define far
  14. #  define _far
  15. #  define __far
  16. #  define near
  17. #  define _near
  18. #  define __near
  19. #endif
  20.  
  21.  
  22. #define IDM_ENCRYPT_VERIFY          200
  23. #define IDM_ZIP_TARGET             201
  24. #define IDM_ZIP_SUFFIX             202
  25. #define IDM_ZIP_ENCRYPT             203
  26. #define IDM_ZIP_SYSTEM             204
  27. #define IDM_ZIP_VOLUME             205
  28. #define IDM_ZIP_EXTRA             206
  29. #define IDM_ZIP_NO_DIR_ENTRIES   207
  30. #define IDM_ZIP_DATE             208
  31. #define IDM_ZIP_VERBOSE             209
  32. #define IDM_ZIP_QUIET             210
  33. #define IDM_ZIP_CRLF_LF          211
  34. #define IDM_ZIP_LF_CRLF             212
  35. #define IDM_ZIP_JUNKDIR             213
  36. #define IDM_ZIP_RECURSE             214
  37. #define IDM_ZIP_GROW             215
  38. #define IDM_ZIP_FORCE             216
  39. #define IDM_ZIP_MOVE             217
  40. #define IDM_ZIP_DELETE_ENTRIES   218
  41. #define IDM_ZIP_UPDATE             219
  42. #define IDM_ZIP_FRESHEN             220
  43. #define IDM_GETFILES_HELP        221
  44. #define IDM_ZIP_JUNKSFX          222
  45. #define IDM_ZIP_TIME             223
  46.  
  47. /* Keep the following in order */
  48. #define IDM_ZIP_LEVEL0           230
  49. #define IDM_ZIP_LEVEL1           231
  50. #define IDM_ZIP_LEVEL2           232
  51. #define IDM_ZIP_LEVEL3           233
  52. #define IDM_ZIP_LEVEL4           234
  53. #define IDM_ZIP_LEVEL5           235
  54. #define IDM_ZIP_LEVEL6           236
  55. #define IDM_ZIP_LEVEL7           237
  56. #define IDM_ZIP_LEVEL8           238
  57. #define IDM_ZIP_LEVEL9           239
  58.  
  59. #define IDC_SELECT_ALL           242
  60. #define IDC_DESELECT_ALL         243
  61. #define IDC_ADD                   245
  62. #define IDC_DELETE                246
  63. #define IDC_FILE_LIST            244
  64.  
  65. #define IDM_SAVE_ZIP_TO_DIR      250
  66.  
  67. #ifndef NDEBUG
  68. #  define WinAssert(exp) \
  69.         {\
  70.         if (!(exp))\
  71.             {\
  72.             char szBuffer[40];\
  73.             sprintf(szBuffer, "File %s, Line %d",\
  74.                     __FILE__, __LINE__) ;\
  75.             if (IDABORT == MessageBox((HWND)NULL, szBuffer,\
  76.                 "Assertion Error",\
  77.                 MB_ABORTRETRYIGNORE|MB_ICONSTOP))\
  78.                     FatalExit(-1);\
  79.             }\
  80.         }
  81.  
  82. #else
  83. #  define WinAssert(exp)
  84. #endif
  85.  
  86. #define cchFilesMax 4096
  87.  
  88. typedef int (far *DLLPRNT) (FILE *, unsigned int, char *);
  89. typedef void (far *DLLSND) (void);
  90.  
  91. typedef struct {
  92. DLLPRNT print;
  93. DLLSND sound;
  94. FILE *Stdout;
  95. HWND hInst;
  96. /* Zip flag section */
  97. BOOL fEncryptVerify;
  98. BOOL fSuffix;
  99. BOOL fEncrypt;
  100. BOOL fSystem;           /* include system and hidden files */
  101. BOOL fVolume;           /* Include volume label */
  102. BOOL fExtra;            /* Include extra attributes */
  103. BOOL fNoDirEntries;     /* Do not add directory entries */
  104. BOOL fDate;             /* Exclude files earlier than specified date */
  105. BOOL fVerbose;          /* Mention oddities in zip file structure */
  106. BOOL fQuiet;            /* Quiet operation */
  107. char fLevel;            /* Compression level (0 - 9) */
  108. BOOL fCRLF_LF;
  109. BOOL fLF_CRLF;          /* Translate end-of-line */
  110. BOOL fJunkDir;          /* Junk directory names */
  111. BOOL fRecurse;          /* Recurse into subdirectories */
  112. BOOL fGrow;             /* Allow appending to a zip file */
  113. BOOL fForce;            /* Make entries using DOS names (k for Katz) */
  114. BOOL fMove;             /* Delete files added or updated in zip file */
  115. BOOL fDeleteEntries;    /* Delete files from zip file */
  116. BOOL fUpdate;           /* Update zip file--overwrite only if newer */
  117. BOOL fFreshen;          /* Freshen zip file--overwrite only */
  118. BOOL fJunkSFX;          /* Junk SFX prefix */
  119. BOOL fLatestTime;       /* Set zip file time to time of latest file in it */
  120. /* End Zip Flag section */
  121. char Date[7];           /* Date to include after */
  122. int  argc;              /* Count of files to zip */
  123. LPSTR lpszZipFN;
  124. char **FNV;
  125. } ZCL, _far *LPZCL;
  126.  
  127.  
  128. #ifndef WIZZIPDLL
  129. /* Zip Flags */
  130. typedef struct
  131. {
  132. unsigned int   fSaveZipToDir : 1;
  133. unsigned int   fSaveUnZipFromDir : 1;
  134. } ZF, *PZF;
  135.  
  136. extern ZF zf;
  137. extern ZCL zcl;
  138. extern LPZCL lpZCL;
  139. extern void WizZipWndProc(HWND hWnd, WORD wMessage, WPARAM wParam, LPARAM lParam);
  140. extern void GetWizZipOptions(void);
  141. extern void StripDirectory(LPSTR lpDir);
  142. extern void MakeArchive(HWND hWnd);
  143. extern BOOL WINAPI GetFilesProc(HWND hwndDlg, WORD wMessage, WPARAM wParam, LPARAM lParam);
  144. extern WINAPI (far *DllZipUpFiles)(ZCL far *C);
  145. #else
  146. extern WINAPI DllZipUpFiles(ZCL far *C);
  147. #endif /* WIZZIPDLL */
  148.  
  149. extern HWND hGetFilesDlg;
  150. extern char szFilesToAdd[80];
  151. extern char rgszFiles[cchFilesMax];
  152.  
  153.  
  154. #endif /* _WIZZIP_H */
  155.  
  156.