Archive-Unzip-Burst
view release on metacpan or search on metacpan
unzip-6.0/unzpriv.h view on Meta::CPAN
# endif
#endif
#ifdef NEED_ISO_OEM_INIT
void prepare_ISO_OEM_translat OF((__GPRO)); /* local */
#endif
#if (defined(MALLOC_WORK) && defined(MY_ZCALLOC))
zvoid far *zcalloc OF((unsigned int, unsigned int));
zvoid zcfree OF((zvoid far *));
#endif /* MALLOC_WORK && MY_ZCALLOC */
#ifdef SYSTEM_SPECIFIC_CTOR
void SYSTEM_SPECIFIC_CTOR OF((__GPRO)); /* local */
#endif
#ifdef SYSTEM_SPECIFIC_DTOR
void SYSTEM_SPECIFIC_DTOR OF((__GPRO)); /* local */
#endif
/************/
/* Macros */
/************/
#ifndef MAX
# define MAX(a,b) ((a) > (b) ? (a) : (b))
#endif
#ifndef MIN
# define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
#ifdef DEBUG
# if (defined(THEOS) && defined(NO_BOGUS_SPC))
# define NO_DEBUG_IN_MACROS
# define Trace(x) _fprintf x
# else
# define Trace(x) fprintf x
# endif
#else
# define Trace(x)
#endif
#ifdef DEBUG_TIME
# define TTrace(x) fprintf x
#else
# define TTrace(x)
#endif
#ifdef NO_DEBUG_IN_MACROS
# define MTrace(x)
#else
# define MTrace(x) Trace(x)
#endif
#if (defined(UNIX) || defined(T20_VMS)) /* generally old systems */
# define ToLower(x) ((char)(isupper((int)x)? tolower((int)x) : x))
#else
# define ToLower tolower /* assumed "smart"; used in match() */
#endif
#ifdef USE_STRM_INPUT
/* ``Replace'' the unbuffered UNIX style I/O function with similar
* standard C functions from <stdio.h>.
*/
# define read(fd,buf,n) fread((buf),1,(n),(FILE *)(fd))
# ifdef zlseek
# undef zlseek
# endif
# define zlseek(fd,o,w) zfseeko((FILE *)(fd),(o),(w))
# define close(fd) fclose((FILE *)(fd))
#endif /* USE_STRM_INPUT */
/* The return value of the Info() "macro function" is never checked in
* UnZip. Otherwise, to get the same behaviour as for (*G.message)(), the
* Info() definition for "FUNZIP" would have to be corrected:
* #define Info(buf,flag,sprf_arg) \
* (fputs((char *)(sprintf sprf_arg, (buf)), \
* (flag)&1? stderr : stdout) < 0)
*/
#ifndef Info /* may already have been defined for redirection */
# ifdef FUNZIP
# define Info(buf,flag,sprf_arg) \
fputs((char *)(sprintf sprf_arg, (buf)), (flag)&1? stderr : stdout)
# else
# ifdef INT_SPRINTF /* optimized version for "int sprintf()" flavour */
# define Info(buf,flag,sprf_arg) \
(*G.message)((zvoid *)&G, (uch *)(buf), (ulg)sprintf sprf_arg, (flag))
# else /* generic version, does not use sprintf() return value */
# define Info(buf,flag,sprf_arg) \
(*G.message)((zvoid *)&G, (uch *)(buf), \
(ulg)(sprintf sprf_arg, strlen((char *)(buf))), (flag))
# endif
# endif
#endif /* !Info */
/* This wrapper macro around fzofft() is just defined to "hide" the
* argument needed to reference the global storage buffers.
*/
#define FmZofft(val, pre, post) fzofft(__G__ val, pre, post)
/* The following macro wrappers around the fnfilter function are used many
* times to prepare archive entry names or name components for displaying
* listings and (warning/error) messages. They use sections in the upper half
* of 'slide' as buffer, since their output is normally fed through the
* Info() macro with 'slide' (the start of this area) as message buffer.
*/
#define FnFilter1(fname) \
fnfilter((fname), slide + (extent)(WSIZE>>1), (extent)(WSIZE>>2))
#define FnFilter2(fname) \
fnfilter((fname), slide + (extent)((WSIZE>>1) + (WSIZE>>2)),\
(extent)(WSIZE>>2))
#ifndef FUNZIP /* used only in inflate.c */
# define MESSAGE(str,len,flag) (*G.message)((zvoid *)&G,(str),(len),(flag))
#endif
#if 0 /* Optimization: use the (const) result of crc32(0L,NULL,0) */
# define CRCVAL_INITIAL crc32(0L, NULL, 0)
#else
# define CRCVAL_INITIAL 0L
#endif
#ifdef SYMLINKS
/* This macro defines the Zip "made by" hosts that are considered
to support storing symbolic link entries. */
# define SYMLINK_HOST(hn) ((hn) == UNIX_ || (hn) == ATARI_ || \
(hn) == ATHEOS_ || (hn) == BEOS_ || (hn) == VMS_)
#endif
#ifndef TEST_NTSD /* "NTSD valid?" checking function */
# define TEST_NTSD NULL /* ... is not available */
( run in 1.103 second using v1.01-cache-2.11-cpan-5735350b133 )