# endif /* !DYNAMIC_CRC_TABLE */
#endif /* MAKECRCH */
-#include "zutil.h" /* for STDC and FAR definitions */
+#include "zutil.h" /* for STDC definitions */
#define local static
#endif
#ifdef BYFOUR
local unsigned long crc32_little OF((unsigned long,
- const unsigned char FAR *, unsigned));
+ const unsigned char *, unsigned));
local unsigned long crc32_big OF((unsigned long,
- const unsigned char FAR *, unsigned));
+ const unsigned char *, unsigned));
# define TBLS 8
#else
# define TBLS 1
#ifdef DYNAMIC_CRC_TABLE
local volatile int crc_table_empty = 1;
-local z_crc_t FAR crc_table[TBLS][256];
+local z_crc_t crc_table[TBLS][256];
local void make_crc_table OF((void));
#ifdef MAKECRCH
- local void write_table OF((FILE *, const z_crc_t FAR *));
+ local void write_table OF((FILE *, const z_crc_t *));
#endif /* MAKECRCH */
/*
Generate tables for a byte-wise 32-bit CRC calculation on the polynomial:
if (out == NULL) return;
fprintf(out, "/* crc32.h -- tables for rapid CRC calculation\n");
fprintf(out, " * Generated automatically by crc32.c\n */\n\n");
- fprintf(out, "local const z_crc_t FAR ");
+ fprintf(out, "local const z_crc_t ");
fprintf(out, "crc_table[TBLS][256] =\n{\n {\n");
write_table(out, crc_table[0]);
# ifdef BYFOUR
#ifdef MAKECRCH
local void write_table(out, table)
FILE *out;
- const z_crc_t FAR *table;
+ const z_crc_t *table;
{
int n;
/* =========================================================================
* This function can be used by asm versions of crc32()
*/
-const z_crc_t FAR * ZEXPORT get_crc_table()
+const z_crc_t * ZEXPORT get_crc_table()
{
#ifdef DYNAMIC_CRC_TABLE
if (crc_table_empty)
make_crc_table();
#endif /* DYNAMIC_CRC_TABLE */
- return (const z_crc_t FAR *)crc_table;
+ return (const z_crc_t *)crc_table;
}
/* ========================================================================= */
/* ========================================================================= */
unsigned long ZEXPORT crc32(crc, buf, len)
unsigned long crc;
- const unsigned char FAR *buf;
+ const unsigned char *buf;
uInt len;
{
if (buf == Z_NULL) return 0UL;
/* ========================================================================= */
local unsigned long crc32_little(crc, buf, len)
unsigned long crc;
- const unsigned char FAR *buf;
+ const unsigned char *buf;
unsigned len;
{
register z_crc_t c;
- register const z_crc_t FAR *buf4;
+ register const z_crc_t *buf4;
c = (z_crc_t)crc;
c = ~c;
len--;
}
- buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
+ buf4 = (const z_crc_t *)(const void *)buf;
#ifndef CRC32_UNROLL_LESS
while (len >= 32) {
DOLIT4;
len -= 4;
}
- buf = (const unsigned char FAR *)buf4;
+ buf = (const unsigned char *)buf4;
if (len) do {
c = crc_table[0][(c ^ *buf++) & 0xff] ^ (c >> 8);
/* ========================================================================= */
local unsigned long crc32_big(crc, buf, len)
unsigned long crc;
- const unsigned char FAR *buf;
+ const unsigned char *buf;
unsigned len;
{
register z_crc_t c;
- register const z_crc_t FAR *buf4;
+ register const z_crc_t *buf4;
c = ZSWAP32((z_crc_t)crc);
c = ~c;
len--;
}
- buf4 = (const z_crc_t FAR *)(const void FAR *)buf;
+ buf4 = (const z_crc_t *)(const void *)buf;
buf4--;
while (len >= 32) {
DOBIG32;
len -= 4;
}
buf4++;
- buf = (const unsigned char FAR *)buf4;
+ buf = (const unsigned char *)buf4;
if (len) do {
c = crc_table[4][(c >> 24) ^ *buf++] ^ (c << 8);
* Generated automatically by crc32.c
*/
-local const z_crc_t FAR crc_table[TBLS][256] =
+local const z_crc_t crc_table[TBLS][256] =
{
{
0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL,
s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state));
if (s == Z_NULL) return Z_MEM_ERROR;
- strm->state = (struct internal_state FAR *)s;
+ strm->state = (struct internal_state *)s;
s->strm = strm;
s->wrap = wrap;
ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state));
if (ds == Z_NULL) return Z_MEM_ERROR;
- dest->state = (struct internal_state FAR *) ds;
+ dest->state = (struct internal_state *) ds;
zmemcpy((voidpf)ds, (voidpf)ss, sizeof(deflate_state));
ds->strm = dest;
ush dad; /* father node in Huffman tree */
ush len; /* length of bit string */
} dl;
-} FAR ct_data;
+} ct_data;
#define Freq fc.freq
#define Code fc.code
ct_data *dyn_tree; /* the dynamic tree */
int max_code; /* largest code with non zero frequency */
static_tree_desc *stat_desc; /* the corresponding static tree */
-} FAR tree_desc;
+} tree_desc;
typedef ush Pos;
-typedef Pos FAR Posf;
+typedef Pos Posf;
typedef unsigned IPos;
/* A Pos is an index in the character window. We use short instead of int to
* updated to the new high water mark.
*/
-} FAR deflate_state;
+} deflate_state;
typedef enum {
need_more, /* block not completed, need more input or more output */
/* zlib inflate or deflate stream */
z_stream strm; /* stream structure in-place (not a pointer) */
} gz_state;
-typedef gz_state FAR *gz_statep;
+typedef gz_state *gz_statep;
/* shared functions */
void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
#include "inffast.h"
/* function prototypes */
-local void fixedtables OF((struct inflate_state FAR *state));
+local void fixedtables OF((struct inflate_state *state));
/*
strm provides memory allocation functions in zalloc and zfree, or
int ZEXPORT inflateBackInit_(strm, windowBits, window, version, stream_size)
z_streamp strm;
int windowBits;
-unsigned char FAR *window;
+unsigned char *window;
const char *version;
int stream_size;
{
- struct inflate_state FAR *state;
+ struct inflate_state *state;
if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
stream_size != (int)(sizeof(z_stream)))
#else
strm->zfree = zcfree;
#endif
- state = (struct inflate_state FAR *)ZALLOC(strm, 1,
+ state = (struct inflate_state *)ZALLOC(strm, 1,
sizeof(struct inflate_state));
if (state == Z_NULL) return Z_MEM_ERROR;
Tracev((stderr, "inflate: allocated\n"));
- strm->state = (struct internal_state FAR *)state;
+ strm->state = (struct internal_state *)state;
state->dmax = 32768U;
state->wbits = windowBits;
state->wsize = 1U << windowBits;
may not be thread-safe.
*/
local void fixedtables(state)
-struct inflate_state FAR *state;
+struct inflate_state *state;
{
#ifdef BUILDFIXED
static int virgin = 1;
int ZEXPORT inflateBack(strm, in, in_desc, out, out_desc)
z_streamp strm;
in_func in;
-void FAR *in_desc;
+void *in_desc;
out_func out;
-void FAR *out_desc;
+void *out_desc;
{
- struct inflate_state FAR *state;
- z_const unsigned char FAR *next; /* next input */
- unsigned char FAR *put; /* next output */
+ struct inflate_state *state;
+ z_const unsigned char *next; /* next input */
+ unsigned char *put; /* next output */
unsigned have, left; /* available input and output */
unsigned long hold; /* bit buffer */
unsigned bits; /* bits in bit buffer */
unsigned copy; /* number of stored or match bytes to copy */
- unsigned char FAR *from; /* where to copy match bytes from */
+ unsigned char *from; /* where to copy match bytes from */
code here; /* current decoding table entry */
code last; /* parent table entry */
unsigned len; /* length to copy for repeats, bits to drop */
/* Check that the strm exists and that the state was initialized */
if (strm == Z_NULL || strm->state == Z_NULL)
return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
+ state = (struct inflate_state *)strm->state;
/* Reset the state */
strm->msg = Z_NULL;
while (state->have < 19)
state->lens[order[state->have++]] = 0;
state->next = state->codes;
- state->lencode = (code const FAR *)(state->next);
+ state->lencode = (code const *)(state->next);
state->lenbits = 7;
ret = inflate_table(CODES, state->lens, 19, &(state->next),
&(state->lenbits), state->work);
values here (9 and 6) without reading the comments in inftrees.h
concerning the ENOUGH constants, which depend on those values */
state->next = state->codes;
- state->lencode = (code const FAR *)(state->next);
+ state->lencode = (code const *)(state->next);
state->lenbits = 9;
ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
&(state->lenbits), state->work);
state->mode = BAD;
break;
}
- state->distcode = (code const FAR *)(state->next);
+ state->distcode = (code const *)(state->next);
state->distbits = 6;
ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
&(state->next), &(state->distbits), state->work);
z_streamp strm;
unsigned start; /* inflate()'s starting value for strm->avail_out */
{
- struct inflate_state FAR *state;
- z_const unsigned char FAR *in; /* local strm->next_in */
- z_const unsigned char FAR *last; /* have enough input while in < last */
- unsigned char FAR *out; /* local strm->next_out */
- unsigned char FAR *beg; /* inflate()'s initial strm->next_out */
- unsigned char FAR *end; /* while out < end, enough space available */
+ struct inflate_state *state;
+ z_const unsigned char *in; /* local strm->next_in */
+ z_const unsigned char *last; /* have enough input while in < last */
+ unsigned char *out; /* local strm->next_out */
+ unsigned char *beg; /* inflate()'s initial strm->next_out */
+ unsigned char *end; /* while out < end, enough space available */
#ifdef INFLATE_STRICT
unsigned dmax; /* maximum distance from zlib header */
#endif
unsigned wsize; /* window size or zero if not using window */
unsigned whave; /* valid bytes in the window */
unsigned wnext; /* window write index */
- unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */
+ unsigned char *window; /* allocated sliding window, if wsize != 0 */
unsigned long hold; /* local strm->hold */
unsigned bits; /* local strm->bits */
- code const FAR *lcode; /* local strm->lencode */
- code const FAR *dcode; /* local strm->distcode */
+ code const *lcode; /* local strm->lencode */
+ code const *dcode; /* local strm->distcode */
unsigned lmask; /* mask for first level of length codes */
unsigned dmask; /* mask for first level of distance codes */
code here; /* retrieved table entry */
/* window position, window bytes to copy */
unsigned len; /* match length, unused bytes */
unsigned dist; /* match distance */
- unsigned char FAR *from; /* where to copy match from */
+ unsigned char *from; /* where to copy match from */
/* copy state to local variables */
- state = (struct inflate_state FAR *)strm->state;
+ state = (struct inflate_state *)strm->state;
in = strm->next_in - OFF;
last = in + (strm->avail_in - 5);
out = strm->next_out - OFF;
#endif
/* function prototypes */
-local void fixedtables OF((struct inflate_state FAR *state));
-local int updatewindow OF((z_streamp strm, const unsigned char FAR *end,
+local void fixedtables OF((struct inflate_state *state));
+local int updatewindow OF((z_streamp strm, const unsigned char *end,
unsigned copy));
#ifdef BUILDFIXED
void makefixed OF((void));
#endif
-local unsigned syncsearch OF((unsigned FAR *have, const unsigned char FAR *buf,
+local unsigned syncsearch OF((unsigned *have, const unsigned char *buf,
unsigned len));
int ZEXPORT inflateResetKeep(strm)
z_streamp strm;
{
- struct inflate_state FAR *state;
+ struct inflate_state *state;
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
+ state = (struct inflate_state *)strm->state;
strm->total_in = strm->total_out = state->total = 0;
strm->msg = Z_NULL;
if (state->wrap) /* to support ill-conceived Java test suite */
int ZEXPORT inflateReset(strm)
z_streamp strm;
{
- struct inflate_state FAR *state;
+ struct inflate_state *state;
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
+ state = (struct inflate_state *)strm->state;
state->wsize = 0;
state->whave = 0;
state->wnext = 0;
int windowBits;
{
int wrap;
- struct inflate_state FAR *state;
+ struct inflate_state *state;
/* get the state */
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
+ state = (struct inflate_state *)strm->state;
/* extract wrap request from windowBits parameter */
if (windowBits < 0) {
int stream_size;
{
int ret;
- struct inflate_state FAR *state;
+ struct inflate_state *state;
if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
stream_size != (int)(sizeof(z_stream)))
#else
strm->zfree = zcfree;
#endif
- state = (struct inflate_state FAR *)
+ state = (struct inflate_state *)
ZALLOC(strm, 1, sizeof(struct inflate_state));
if (state == Z_NULL) return Z_MEM_ERROR;
Tracev((stderr, "inflate: allocated\n"));
- strm->state = (struct internal_state FAR *)state;
+ strm->state = (struct internal_state *)state;
state->window = Z_NULL;
ret = inflateReset2(strm, windowBits);
if (ret != Z_OK) {
int bits;
int value;
{
- struct inflate_state FAR *state;
+ struct inflate_state *state;
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
+ state = (struct inflate_state *)strm->state;
if (bits < 0) {
state->hold = 0;
state->bits = 0;
may not be thread-safe.
*/
local void fixedtables(state)
-struct inflate_state FAR *state;
+struct inflate_state *state;
{
#ifdef BUILDFIXED
static int virgin = 1;
const Bytef *end;
unsigned copy;
{
- struct inflate_state FAR *state;
+ struct inflate_state *state;
unsigned dist;
- state = (struct inflate_state FAR *)strm->state;
+ state = (struct inflate_state *)strm->state;
/* if it hasn't been done already, allocate space for the window */
if (state->window == Z_NULL) {
- state->window = (unsigned char FAR *)
+ state->window = (unsigned char *)
ZALLOC(strm, 1U << state->wbits,
sizeof(unsigned char));
if (state->window == Z_NULL) return 1;
z_streamp strm;
int flush;
{
- struct inflate_state FAR *state;
- z_const unsigned char FAR *next; /* next input */
- unsigned char FAR *put; /* next output */
+ struct inflate_state *state;
+ z_const unsigned char *next; /* next input */
+ unsigned char *put; /* next output */
unsigned have, left; /* available input and output */
unsigned long hold; /* bit buffer */
unsigned bits; /* bits in bit buffer */
unsigned in, out; /* save starting available input and output */
unsigned copy; /* number of stored or match bytes to copy */
- unsigned char FAR *from; /* where to copy match bytes from */
+ unsigned char *from; /* where to copy match bytes from */
code here; /* current decoding table entry */
code last; /* parent table entry */
unsigned len; /* length to copy for repeats, bits to drop */
(strm->next_in == Z_NULL && strm->avail_in != 0))
return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
+ state = (struct inflate_state *)strm->state;
if (state->mode == TYPE) state->mode = TYPEDO; /* skip check */
LOAD();
in = have;
while (state->have < 19)
state->lens[order[state->have++]] = 0;
state->next = state->codes;
- state->lencode = (const code FAR *)(state->next);
+ state->lencode = (const code *)(state->next);
state->lenbits = 7;
ret = inflate_table(CODES, state->lens, 19, &(state->next),
&(state->lenbits), state->work);
values here (9 and 6) without reading the comments in inftrees.h
concerning the ENOUGH constants, which depend on those values */
state->next = state->codes;
- state->lencode = (const code FAR *)(state->next);
+ state->lencode = (const code *)(state->next);
state->lenbits = 9;
ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
&(state->lenbits), state->work);
state->mode = BAD;
break;
}
- state->distcode = (const code FAR *)(state->next);
+ state->distcode = (const code *)(state->next);
state->distbits = 6;
ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
&(state->next), &(state->distbits), state->work);
int ZEXPORT inflateEnd(strm)
z_streamp strm;
{
- struct inflate_state FAR *state;
+ struct inflate_state *state;
if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
+ state = (struct inflate_state *)strm->state;
if (state->window != Z_NULL) ZFREE(strm, state->window);
ZFREE(strm, strm->state);
strm->state = Z_NULL;
Bytef *dictionary;
uInt *dictLength;
{
- struct inflate_state FAR *state;
+ struct inflate_state *state;
/* check state */
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
+ state = (struct inflate_state *)strm->state;
/* copy dictionary */
if (state->whave && dictionary != Z_NULL) {
const Bytef *dictionary;
uInt dictLength;
{
- struct inflate_state FAR *state;
+ struct inflate_state *state;
unsigned long dictid;
int ret;
/* check state */
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
+ state = (struct inflate_state *)strm->state;
if (state->wrap != 0 && state->mode != DICT)
return Z_STREAM_ERROR;
z_streamp strm;
gz_headerp head;
{
- struct inflate_state FAR *state;
+ struct inflate_state *state;
/* check state */
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
+ state = (struct inflate_state *)strm->state;
if ((state->wrap & 2) == 0) return Z_STREAM_ERROR;
/* save header structure */
zero for the first call.
*/
local unsigned syncsearch(have, buf, len)
-unsigned FAR *have;
-const unsigned char FAR *buf;
+unsigned *have;
+const unsigned char *buf;
unsigned len;
{
unsigned got;
unsigned len; /* number of bytes to look at or looked at */
unsigned long in, out; /* temporary to save total_in and total_out */
unsigned char buf[4]; /* to restore bit buffer to byte string */
- struct inflate_state FAR *state;
+ struct inflate_state *state;
/* check parameters */
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
+ state = (struct inflate_state *)strm->state;
if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR;
/* if first time, start search in bit buffer */
int ZEXPORT inflateSyncPoint(strm)
z_streamp strm;
{
- struct inflate_state FAR *state;
+ struct inflate_state *state;
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
+ state = (struct inflate_state *)strm->state;
return state->mode == STORED && state->bits == 0;
}
z_streamp dest;
z_streamp source;
{
- struct inflate_state FAR *state;
- struct inflate_state FAR *copy;
- unsigned char FAR *window;
+ struct inflate_state *state;
+ struct inflate_state *copy;
+ unsigned char *window;
unsigned wsize;
/* check input */
if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL ||
source->zalloc == (alloc_func)0 || source->zfree == (free_func)0)
return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)source->state;
+ state = (struct inflate_state *)source->state;
/* allocate space */
- copy = (struct inflate_state FAR *)
+ copy = (struct inflate_state *)
ZALLOC(source, 1, sizeof(struct inflate_state));
if (copy == Z_NULL) return Z_MEM_ERROR;
window = Z_NULL;
if (state->window != Z_NULL) {
- window = (unsigned char FAR *)
+ window = (unsigned char *)
ZALLOC(source, 1U << state->wbits, sizeof(unsigned char));
if (window == Z_NULL) {
ZFREE(source, copy);
zmemcpy(window, state->window, wsize);
}
copy->window = window;
- dest->state = (struct internal_state FAR *)copy;
+ dest->state = (struct internal_state *)copy;
return Z_OK;
}
z_streamp strm;
int subvert;
{
- struct inflate_state FAR *state;
+ struct inflate_state *state;
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
- state = (struct inflate_state FAR *)strm->state;
+ state = (struct inflate_state *)strm->state;
state->sane = !subvert;
#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
return Z_OK;
long ZEXPORT inflateMark(strm)
z_streamp strm;
{
- struct inflate_state FAR *state;
+ struct inflate_state *state;
if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
- state = (struct inflate_state FAR *)strm->state;
+ state = (struct inflate_state *)strm->state;
return ((long)(state->back) << 16) +
(state->mode == COPY ? state->length :
(state->mode == MATCH ? state->was - state->length : 0));
unsigned wsize; /* window size or zero if not using window */
unsigned whave; /* valid bytes in the window */
unsigned wnext; /* window write index */
- unsigned char FAR *window; /* allocated sliding window, if needed */
+ unsigned char *window; /* allocated sliding window, if needed */
/* bit accumulator */
unsigned long hold; /* input bit accumulator */
unsigned bits; /* number of bits in "in" */
/* for table and code decoding */
unsigned extra; /* extra bits needed */
/* fixed and dynamic code tables */
- code const FAR *lencode; /* starting table for length/literal codes */
- code const FAR *distcode; /* starting table for distance codes */
+ code const *lencode; /* starting table for length/literal codes */
+ code const *distcode; /* starting table for distance codes */
unsigned lenbits; /* index bits for lencode */
unsigned distbits; /* index bits for distcode */
/* dynamic table building */
unsigned nlen; /* number of length code lengths */
unsigned ndist; /* number of distance code lengths */
unsigned have; /* number of code lengths in lens[] */
- code FAR *next; /* next available space in codes[] */
+ code *next; /* next available space in codes[] */
unsigned short lens[320]; /* temporary storage for code lengths */
unsigned short work[288]; /* work area for code table building */
code codes[ENOUGH]; /* space for code tables */
*/
int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work)
codetype type;
-unsigned short FAR *lens;
+unsigned short *lens;
unsigned codes;
-code FAR * FAR *table;
-unsigned FAR *bits;
-unsigned short FAR *work;
+code * *table;
+unsigned *bits;
+unsigned short *work;
{
unsigned len; /* a code's length in bits */
unsigned sym; /* index of code symbols */
unsigned low; /* low bits for current root entry */
unsigned mask; /* mask for low root bits */
code here; /* table entry for duplication */
- code FAR *next; /* next available space in table */
- const unsigned short FAR *base; /* base value table to use */
- const unsigned short FAR *extra; /* extra bits table to use */
+ code *next; /* next available space in table */
+ const unsigned short *base; /* base value table to use */
+ const unsigned short *extra; /* extra bits table to use */
int end; /* use base and extra for symbol > end */
unsigned short count[MAXBITS+1]; /* number of codes of each length */
unsigned short offs[MAXBITS+1]; /* offsets in table for each length */
DISTS
} codetype;
-int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
- unsigned codes, code FAR * FAR *table,
- unsigned FAR *bits, unsigned short FAR *work));
+int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short *lens,
+ unsigned codes, code * *table,
+ unsigned *bits, unsigned short *work));
/* No need for _export, use ZLIB.DEF instead. */
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
# define ZEXPORT WINAPI
-# ifdef WIN32
-# define ZEXPORTVA WINAPIV
-# else
-# define ZEXPORTVA FAR CDECL
-# endif
+# define ZEXPORTVA WINAPIV
# endif
#endif
# define ZEXPORTVA
#endif
-#ifndef FAR
-# define FAR
-#endif
-
#if !defined(__MACTYPES__)
typedef unsigned char Byte; /* 8 bits */
#endif
typedef unsigned int uInt; /* 16 bits or more */
typedef unsigned long uLong; /* 32 bits or more */
-#ifdef SMALL_MEDIUM
- /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-# define Bytef Byte FAR
-#else
- typedef Byte FAR Bytef;
-#endif
-typedef char FAR charf;
-typedef int FAR intf;
-typedef uInt FAR uIntf;
-typedef uLong FAR uLongf;
+typedef Byte Bytef;
+typedef char charf;
+typedef int intf;
+typedef uInt uIntf;
+typedef uLong uLongf;
#ifdef STDC
typedef void const *voidpc;
- typedef void FAR *voidpf;
+ typedef void *voidpf;
typedef void *voidp;
#else
typedef Byte const *voidpc;
- typedef Byte FAR *voidpf;
+ typedef Byte *voidpf;
typedef Byte *voidp;
#endif
/* No need for _export, use ZLIB.DEF instead. */
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
# define ZEXPORT WINAPI
-# ifdef WIN32
-# define ZEXPORTVA WINAPIV
-# else
-# define ZEXPORTVA FAR CDECL
-# endif
+# define ZEXPORTVA WINAPIV
# endif
#endif
# define ZEXPORTVA
#endif
-#ifndef FAR
-# define FAR
-#endif
-
#if !defined(__MACTYPES__)
typedef unsigned char Byte; /* 8 bits */
#endif
typedef unsigned int uInt; /* 16 bits or more */
typedef unsigned long uLong; /* 32 bits or more */
-#ifdef SMALL_MEDIUM
- /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-# define Bytef Byte FAR
-#else
- typedef Byte FAR Bytef;
-#endif
-typedef char FAR charf;
-typedef int FAR intf;
-typedef uInt FAR uIntf;
-typedef uLong FAR uLongf;
+typedef Byte Bytef;
+typedef char charf;
+typedef int intf;
+typedef uInt uIntf;
+typedef uLong uLongf;
#ifdef STDC
typedef void const *voidpc;
- typedef void FAR *voidpf;
+ typedef void *voidpf;
typedef void *voidp;
#else
typedef Byte const *voidpc;
- typedef Byte FAR *voidpf;
+ typedef Byte *voidpf;
typedef Byte *voidp;
#endif
/* No need for _export, use ZLIB.DEF instead. */
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
# define ZEXPORT WINAPI
-# ifdef WIN32
-# define ZEXPORTVA WINAPIV
-# else
-# define ZEXPORTVA FAR CDECL
-# endif
+# define ZEXPORTVA WINAPIV
# endif
#endif
# define ZEXPORTVA
#endif
-#ifndef FAR
-# define FAR
-#endif
-
#if !defined(__MACTYPES__)
typedef unsigned char Byte; /* 8 bits */
#endif
typedef unsigned int uInt; /* 16 bits or more */
typedef unsigned long uLong; /* 32 bits or more */
-#ifdef SMALL_MEDIUM
- /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-# define Bytef Byte FAR
-#else
- typedef Byte FAR Bytef;
-#endif
-typedef char FAR charf;
-typedef int FAR intf;
-typedef uInt FAR uIntf;
-typedef uLong FAR uLongf;
+typedef Byte Bytef;
+typedef char charf;
+typedef int intf;
+typedef uInt uIntf;
+typedef uLong uLongf;
#ifdef STDC
typedef void const *voidpc;
- typedef void FAR *voidpf;
+ typedef void *voidpf;
typedef void *voidp;
#else
typedef Byte const *voidpc;
- typedef Byte FAR *voidpf;
+ typedef Byte *voidpf;
typedef Byte *voidp;
#endif
uLong total_out; /* total number of bytes output so far */
z_const char *msg; /* last error message, NULL if no error */
- struct internal_state FAR *state; /* not visible by applications */
+ struct internal_state *state; /* not visible by applications */
alloc_func zalloc; /* used to allocate the internal state */
free_func zfree; /* used to free the internal state */
uLong reserved; /* reserved for future use */
} z_stream;
-typedef z_stream FAR *z_streamp;
+typedef z_stream *z_streamp;
/*
gzip header information passed to and from zlib routines. See RFC 1952
when writing a gzip file) */
} gz_header;
-typedef gz_header FAR *gz_headerp;
+typedef gz_header *gz_headerp;
/*
The application must update next_in and avail_in when avail_in has dropped
/*
ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
- unsigned char FAR *window));
+ unsigned char *window));
Initialize the internal stream state for decompression using inflateBack()
calls. The fields zalloc, zfree and opaque in strm must be initialized
the version of the header file.
*/
-typedef unsigned (*in_func) OF((void FAR *,
- z_const unsigned char FAR * FAR *));
-typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
+typedef unsigned (*in_func) OF((void *,
+ z_const unsigned char * *));
+typedef int (*out_func) OF((void *, unsigned char *, unsigned));
ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
- in_func in, void FAR *in_desc,
- out_func out, void FAR *out_desc));
+ in_func in, void *in_desc,
+ out_func out, void *out_desc));
/*
inflateBack() does a raw inflate with a single call using a call-back
interface for input and output. This is potentially more efficient than
ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
const char *version, int stream_size));
ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
- unsigned char FAR *window,
+ unsigned char *window,
const char *version,
int stream_size));
#define deflateInit(strm, level) \
/* undocumented functions */
ZEXTERN const char * ZEXPORT zError OF((int));
ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
-ZEXTERN const z_crc_t FAR * ZEXPORT get_crc_table OF((void));
+ZEXTERN const z_crc_t * ZEXPORT get_crc_table OF((void));
ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int));
ZEXTERN int ZEXPORT inflateResetKeep OF((z_streamp));
ZEXTERN int ZEXPORT deflateResetKeep OF((z_streamp));
/* compile with -Dlocal if your debugger can't find static symbols */
typedef unsigned char uch;
-typedef uch FAR uchf;
+typedef uch uchf;
typedef unsigned short ush;
-typedef ush FAR ushf;
+typedef ush ushf;
typedef unsigned long ulg;
extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# endif
#endif
-#ifdef TOPS20
-# define OS_CODE 0x0a
-#endif
-
#ifdef WIN32
# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */
# define OS_CODE 0x0b
# endif
#endif
-#ifdef __50SERIES /* Prime/PRIMOS */
-# define OS_CODE 0x0f
-#endif
-
#if defined(_BEOS_) || defined(RISCOS)
# define fdopen(fd,mode) NULL /* No fdopen() */
#endif