123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- #ifndef __crypt_h
- #define __crypt_h
- #ifdef CRYPT
- # undef CRYPT
- #endif
- #if defined(NO_CRYPT)
- # define CRYPT 0
- #else
- #if defined(USE_CRYPT)
- # define CRYPT 1
- #else
- #if !defined(SFX)
- # define CRYPT 1
- #else
- # define CRYPT 0
- #endif
- #endif
- #endif
- #if CRYPT
- #ifdef CR_BETA
- # undef CR_BETA
- #endif
- #define CR_MAJORVER 2
- #define CR_MINORVER 91
- #ifdef CR_BETA
- # define CR_BETA_VER "c BETA"
- # define CR_VERSION_DATE "05 Jan 2007"
- #else
- # define CR_BETA_VER ""
- # define CR_VERSION_DATE "05 Jan 2007"
- # define CR_RELEASE
- #endif
- #ifndef __G
- # define __G
- # define __G__
- # define __GDEF
- # define __GPRO void
- # define __GPRO__
- #endif
- #if defined(MSDOS) || defined(OS2) || defined(WIN32)
- # ifndef DOS_OS2_W32
- # define DOS_OS2_W32
- # endif
- #endif
- #if defined(DOS_OS2_W32) || defined(__human68k__)
- # ifndef DOS_H68_OS2_W32
- # define DOS_H68_OS2_W32
- # endif
- #endif
- #if defined(VM_CMS) || defined(MVS)
- # ifndef CMS_MVS
- # define CMS_MVS
- # endif
- #endif
- #ifdef ZIP
- # ifdef REALLY_SHORT_SYMS
- # define decrypt_byte zdcrby
- # else
- # define decrypt_byte zp_decrypt_byte
- # endif
- # define update_keys zp_update_keys
- # define init_keys zp_init_keys
- #else
- # ifdef REALLY_SHORT_SYMS
- # define decrypt_byte dcrbyt
- # endif
- #endif
- #define IZ_PWLEN 80
- #ifndef PWLEN
- # define PWLEN IZ_PWLEN
- #endif
- #define RAND_HEAD_LEN 12
- #define zencode(c,t) (t=decrypt_byte(__G), update_keys(c), t^(c))
- #define zdecode(c) update_keys(__G__ c ^= decrypt_byte(__G))
- int decrypt_byte OF((__GPRO));
- int update_keys OF((__GPRO__ int c));
- void init_keys OF((__GPRO__ ZCONST char *passwd));
- #ifdef ZIP
- void crypthead OF((ZCONST char *, ulg));
- # ifdef UTIL
- int zipcloak OF((struct zlist far *, ZCONST char *));
- int zipbare OF((struct zlist far *, ZCONST char *));
- # else
- unsigned zfwrite OF((zvoid *, extent, extent));
- extern char *key;
- # endif
- #endif
- #if (defined(UNZIP) && !defined(FUNZIP))
- int decrypt OF((__GPRO__ ZCONST char *passwrd));
- #endif
- #ifdef FUNZIP
- extern int encrypted;
- # ifdef NEXTBYTE
- # undef NEXTBYTE
- # endif
- # define NEXTBYTE \
- (encrypted? update_keys(__G__ getc(G.in)^decrypt_byte(__G)) : getc(G.in))
- #endif
- #else
- #define zencode
- #define zdecode
- #define zfwrite(b,s,c) bfwrite(b,s,c,BFWRITE_DATA)
- #endif
- #endif
|