|
|
1.1.1.2 ! root 1: /* tailor.h -- Not copyrighted 1991 Mark Adler */ ! 2: ! 3: /* const's are inconsistently used across ANSI libraries--kill for all ! 4: header files. */ ! 5: #ifdef __GNUC__ ! 6: # if __GNUC__ != 2 ! 7: # define const ! 8: # endif ! 9: #else ! 10: # define const ! 11: #endif ! 12: ! 13: ! 14: /* Use prototypes and ANSI libraries if __STDC__ */ ! 15: #ifdef __STDC__ ! 16: # ifndef PROTO ! 17: # define PROTO ! 18: # endif /* !PROTO */ ! 19: # define MODERN ! 20: #endif /* __STDC__ */ ! 21: ! 22: ! 23: /* Use prototypes and ANSI libraries if Silicon Graphics */ ! 24: #ifdef sgi ! 25: # ifndef PROTO ! 26: # define PROTO ! 27: # endif /* !PROTO */ ! 28: # define MODERN ! 29: #endif /* sgi */ ! 30: ! 31: ! 32: /* Define MSDOS for Turbo C as well as Microsoft C */ ! 33: #ifdef __POWERC /* For Power C too */ ! 34: # define __TURBOC__ ! 35: #endif /* __POWERC */ ! 36: ! 37: ! 38: /* Use prototypes and ANSI libraries if Microsoft or Borland C */ ! 39: #ifdef MSDOS ! 40: # ifndef PROTO ! 41: # define PROTO ! 42: # endif /* !PROTO */ ! 43: # define MODERN ! 44: #endif /* MSDOS */ ! 45: ! 46: ! 47: /* Turn off prototypes if requested */ ! 48: #ifdef NOPROTO ! 49: # ifdef PROTO ! 50: # undef PROTO ! 51: # endif /* PROTO */ ! 52: #endif /* NOPROT */ ! 53: ! 54: ! 55: /* Used to remove arguments in function prototypes for non-ANSI C */ ! 56: #ifdef PROTO ! 57: # define OF(a) a ! 58: #else /* !PROTO */ ! 59: # define OF(a) () ! 60: #endif /* ?PROTO */ ! 61: ! 62: ! 63: /* Allow far and huge allocation for small model (Microsoft C or Turbo C) */ ! 64: #ifdef MSDOS ! 65: # ifndef DYN_ALLOC ! 66: # define DYN_ALLOC ! 67: # endif ! 68: # ifdef __TURBOC__ ! 69: # include <alloc.h> ! 70: # define fcalloc calloc /* Assumes that all arrays are < 64K for MSDOS */ ! 71: # else /* !__TURBOC__ */ ! 72: # include <malloc.h> ! 73: # define farmalloc _fmalloc ! 74: # define farfree _ffree ! 75: # define fcalloc(nitems,itemsize) halloc((long)(nitems),(itemsize)) ! 76: # endif /* ?__TURBOC__ */ ! 77: #else /* !MSDOS */ ! 78: # define huge ! 79: # define far ! 80: # define near ! 81: # define farmalloc malloc ! 82: # define farfree free ! 83: # define fcalloc calloc ! 84: #endif /* ?MSDOS */ ! 85: ! 86: /* Define MSVMS if either MSDOS or VMS defined */ ! 87: #ifdef MSDOS ! 88: # define MSVMS ! 89: #else /* !MSDOS */ ! 90: # ifdef VMS ! 91: # define MSVMS ! 92: # endif /* VMS */ ! 93: #endif /* ?MSDOS */ ! 94: ! 95: ! 96: /* Define void, voidp, and extent (size_t) */ ! 97: #include <stdio.h> ! 98: #ifdef MODERN ! 99: # if !defined(M_XENIX) && !defined(__GNUC__) ! 100: # include <stddef.h> ! 101: # endif /* !M_XENIX */ ! 102: # include <stdlib.h> ! 103: typedef void voidp; ! 104: #else /* !MODERN */ ! 105: #ifndef M_XENIX ! 106: # define void int ! 107: #endif ! 108: typedef char voidp; ! 109: #endif /* ?MODERN */ ! 110: typedef unsigned int extent; ! 111: ! 112: /* Get types and stat */ ! 113: #ifdef VMS ! 114: # include <types.h> ! 115: # include <stat.h> ! 116: #else /* !VMS */ ! 117: # include <sys/types.h> ! 118: # include <sys/stat.h> ! 119: #endif /* ?VMS */ ! 120: ! 121: ! 122: /* Cheap fix for unlink on VMS */ ! 123: #ifdef VMS ! 124: # define unlink delete ! 125: #endif /* VMS */ ! 126: ! 127: ! 128: /* For Pyramid */ ! 129: #ifdef pyr ! 130: # define strrchr rindex ! 131: # define ZMEM ! 132: #endif /* pyr */ ! 133: ! 134: ! 135: /* File operations--use "b" for binary if allowed */ ! 136: #ifdef MODERN ! 137: # define FOPR "rb" ! 138: # define FOPM "r+b" ! 139: # define FOPW "w+b" ! 140: #else /* !MODERN */ ! 141: # define FOPR "r" ! 142: # define FOPM "r+" ! 143: # define FOPW "w+" ! 144: #endif /* ?MODERN */ ! 145: ! 146: ! 147: /* Define this symbol if your target allows access to unaligned data. ! 148: * This is not mandatory, just a speed optimization. The compressed ! 149: * output is strictly identical. ! 150: */ ! 151: #if defined(MSDOS) || defined(M_XENIX) || defined(i386) || defined(mc68020) || defined(vax) ! 152: # define UNALIGNED_OK ! 153: #endif ! 154: ! 155: ! 156: /* Under MSDOS we may run out of memory when processing a large number ! 157: * of files. Compile with MEDIUM_MEM to reduce the memory requirements or ! 158: * with MIN_MEM to use as little memory as possible. ! 159: */ ! 160: #ifdef SMALL_MEM ! 161: # define BSZ 2048 /* Buffer size for files */ ! 162: #else ! 163: #ifdef MEDIUM_MEM ! 164: # define BSZ 8192 ! 165: #else ! 166: # define BSZ 16384 ! 167: #endif ! 168: #endif ! 169: ! 170: /* end of tailor.h */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.