"SfR Fresh" - the SfR Freeware/Shareware Archive

Member "c-headers/api.h" of archive zip232dN.zip:


As a special service "SfR Fresh" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.
    1 /*
    2   Copyright (c) 1990-2005 Info-ZIP.  All rights reserved.
    3 
    4   See the accompanying file LICENSE, version 2004-May-22 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.info-zip.org/pub/infozip/license.html
    8 */
    9 /* Only the Windows DLL is currently supported */
   10 #ifndef _ZIPAPI_H
   11 #define _ZIPAPI_H
   12 
   13 #include "zip.h"
   14 
   15 #ifdef WIN32
   16 #   ifndef PATH_MAX
   17 #      define PATH_MAX 260
   18 #   endif
   19 #else
   20 #   ifndef PATH_MAX
   21 #      define PATH_MAX 128
   22 #   endif
   23 #endif
   24 
   25 #if defined(WINDLL) || defined(API)
   26 #include <windows.h>
   27 /* Porting definations between Win 3.1x and Win32 */
   28 #ifdef WIN32
   29 #  define far
   30 #  define _far
   31 #  define __far
   32 #  define near
   33 #  define _near
   34 #  define __near
   35 #endif
   36 
   37 /*---------------------------------------------------------------------------
   38     Prototypes for public Zip API (DLL) functions.
   39   ---------------------------------------------------------------------------*/
   40 
   41 #define ZPVER_LEN    sizeof(ZpVer)
   42 /* These defines are set to zero for now, until OS/2 comes out
   43    with a dll.
   44  */
   45 #define D2_MAJORVER 0
   46 #define D2_MINORVER 0
   47 #define D2_PATCHLEVEL 0
   48 
   49 /* intended to be a private struct: */
   50 typedef struct _zip_ver {
   51     uch major;              /* e.g., integer 5 */
   52     uch minor;              /* e.g., 2 */
   53     uch patchlevel;         /* e.g., 0 */
   54     uch not_used;
   55 } _zip_version_type;
   56 
   57 typedef struct _ZpVer {
   58     ulg structlen;          /* length of the struct being passed */
   59     ulg flag;               /* bit 0: is_beta   bit 1: uses_zlib */
   60     char betalevel[10];     /* e.g., "g BETA" or "" */
   61     char date[20];          /* e.g., "4 Sep 95" (beta) or "4 September 1995" */
   62     char zlib_version[10];  /* e.g., "0.95" or NULL */
   63     _zip_version_type zip;
   64     _zip_version_type os2dll;
   65     _zip_version_type windll;
   66 } ZpVer;
   67 
   68 #  ifndef EXPENTRY
   69 #    define EXPENTRY WINAPI
   70 #  endif
   71 
   72 #ifndef DEFINED_ONCE
   73 #define DEFINED_ONCE
   74 typedef int (WINAPI DLLPRNT) (LPSTR, unsigned long);
   75 typedef int (WINAPI DLLPASSWORD) (LPSTR, int, LPCSTR, LPCSTR);
   76 typedef int (WINAPI DLLSERVICE) (LPCSTR, unsigned long);
   77 #endif
   78 typedef int (WINAPI DLLCOMMENT)(LPSTR);
   79 
   80 /* Structures */
   81 
   82 typedef struct {        /* zip options */
   83 LPSTR Date;             /* Date to include after */
   84 LPSTR szRootDir;        /* Directory to use as base for zipping */
   85 LPSTR szTempDir;        /* Temporary directory used during zipping */
   86 BOOL fTemp;             /* Use temporary directory '-b' during zipping */
   87 BOOL fSuffix;           /* include suffixes (not implemented) */
   88 BOOL fEncrypt;          /* encrypt files */
   89 BOOL fSystem;           /* include system and hidden files */
   90 BOOL fVolume;           /* Include volume label */
   91 BOOL fExtra;            /* Exclude extra attributes */
   92 BOOL fNoDirEntries;     /* Do not add directory entries */
   93 BOOL fExcludeDate;      /* Exclude files newer than specified date */
   94 BOOL fIncludeDate;      /* Include only files newer than specified date */
   95 BOOL fVerbose;          /* Mention oddities in zip file structure */
   96 BOOL fQuiet;            /* Quiet operation */
   97 BOOL fCRLF_LF;          /* Translate CR/LF to LF */
   98 BOOL fLF_CRLF;          /* Translate LF to CR/LF */
   99 BOOL fJunkDir;          /* Junk directory names */
  100 BOOL fGrow;             /* Allow appending to a zip file */
  101 BOOL fForce;            /* Make entries using DOS names (k for Katz) */
  102 BOOL fMove;             /* Delete files added or updated in zip file */
  103 BOOL fDeleteEntries;    /* Delete files from zip file */
  104 BOOL fUpdate;           /* Update zip file--overwrite only if newer */
  105 BOOL fFreshen;          /* Freshen zip file--overwrite only */
  106 BOOL fJunkSFX;          /* Junk SFX prefix */
  107 BOOL fLatestTime;       /* Set zip file time to time of latest file in it */
  108 BOOL fComment;          /* Put comment in zip file */
  109 BOOL fOffsets;          /* Update archive offsets for SFX files */
  110 BOOL fPrivilege;        /* Use privileges (WIN32 only) */
  111 BOOL fEncryption;       /* TRUE if encryption supported, else FALSE.
  112                            this is a read only flag */
  113 int  fRecurse;          /* Recurse into subdirectories. 1 => -r, 2 => -R */
  114 int  fRepair;           /* Repair archive. 1 => -F, 2 => -FF */
  115 char fLevel;            /* Compression level (0 - 9) */
  116 } ZPOPT, _far *LPZPOPT;
  117 
  118 typedef struct {
  119 int  argc;              /* Count of files to zip */
  120 LPSTR lpszZipFN;        /* name of archive to create/update */
  121 char **FNV;             /* array of file names to zip up */
  122 } ZCL, _far *LPZCL;
  123 
  124 typedef struct {
  125 DLLPRNT *print;
  126 DLLCOMMENT *comment;
  127 DLLPASSWORD *password;
  128 DLLSERVICE *ServiceApplication;
  129 } ZIPUSERFUNCTIONS, far * LPZIPUSERFUNCTIONS;
  130 
  131 extern LPZIPUSERFUNCTIONS lpZipUserFunctions;
  132 
  133 void  EXPENTRY ZpVersion(ZpVer far *);
  134 int   EXPENTRY ZpInit(LPZIPUSERFUNCTIONS lpZipUserFunc);
  135 BOOL  EXPENTRY ZpSetOptions(LPZPOPT Opts);
  136 ZPOPT EXPENTRY ZpGetOptions(void);
  137 int   EXPENTRY ZpArchive(ZCL C);
  138 
  139 #if defined(ZIPLIB) || defined(COM_OBJECT)
  140 #   define ydays zp_ydays
  141 #endif
  142 
  143 
  144 
  145 /* Functions not yet supported */
  146 #if 0
  147 int      EXPENTRY ZpMain            (int argc, char **argv);
  148 int      EXPENTRY ZpAltMain         (int argc, char **argv, ZpInit *init);
  149 #endif
  150 #endif /* WINDLL? || API? */
  151 
  152 #endif /* _ZIPAPI_H */