head 1.1; branch 1.1.1; access; symbols trunk-20040613:1.1.1.2 mach64-last-merge:1.1.1.2 driinterface-0-0-3-20040303-merge:1.1.1.2 driinterface-0-0-3-20040303-premerge:1.1.1.2 driinterface-0-0-3-20040303:1.1.1.2 driinterface-0-0-3-branch:1.1.1.2.0.92 mach64-0-0-7-branch:1.1.1.2.0.90 driinterface-0-0-2-branch:1.1.1.2.0.88 newmesa-0-0-1-20031209-merge:1.1.1.2 trunk-20031209:1.1.1.2 newmesa-0-0-1-20031209:1.1.1.2 newmesa-0-0-1-branch:1.1.1.2.0.86 driinterface-0-0-1-branch:1.1.1.2.0.84 savage-2-0-0-branch:1.1.1.2.0.82 savage-2-0-0-fork:1.1.1.2 config-0-0-1-20031005-freeze:1.1.1.2 savage-1_0_0-20031002-trunk-premerge:1.1.1.2 cle266-0-0-1-branch:1.1.1.2.0.80 i865-agp-0-1-20030929:1.1.1.2 trunk-20030916:1.1.1.2 XFree86-4_3_99_12-merge:1.1.1.2 trunk-20030912:1.1.1.2 i865-agp-0-1-20030905:1.1.1.2 i865-agp-0-1-20030728:1.1.1.2 i865-agp-0-1-20030707:1.1.1.2 savage-1_0_0-branch:1.1.1.2.0.78 newdrm-0-0-1-branch:1.1.1.2.0.76 i865-agp-0-1-branch:1.1.1.2.0.74 config-0-0-1-branch:1.1.1.2.0.72 texmem-0-0-1-20030429-merge:1.1.1.2 texmem-0-0-1-20030429-premerge:1.1.1.2 texmem-0-0-1-20030407:1.1.1.2 trident-0-0-2-branch:1.1.1.2.0.70 mach64-0-0-6-20030330:1.1.1.2 mach64-0-0-6-20030329-freeze:1.1.1.2 texmem-0-0-1-20030328-freeze:1.1.1.2 X_4_3_0-20030324-merge:1.1.1.2 X_4_3_0-20020324-preimport:1.1.1.2 drm-filp-0-1-branch:1.1.1.2.0.68 mesa-4-0-4-20030222:1.1.1.2 bsd-4-0-0-20030221-merge:1.1.1.2 bsd-4-0-0-20030220:1.1.1.2 bsd-4-0-0-20030220-freeze:1.1.1.2 mesa-4-0-4-20030216:1.1.1.2 mach64-0-0-6-branch:1.1.1.2.0.66 mesa-4-0-4-20030208:1.1.1.2 texmem-0-0-1-20030204-trunk-merge:1.1.1.2 texmem-0-0-1-20030204-trunk-premerge:1.1.1.2 mesa-4-0-4-20030203:1.1.1.2 mesa-4-0-4-20030129:1.1.1.2 texmem-0-0-1-20030125-trunk-merge:1.1.1.2 texmem-0-0-1-20030123-trunk-premerge:1.1.1.2 mesa-4-0-4-20030114:1.1.1.2 agpgart_2_0_branch:1.1.1.2.0.64 mesa-4-0-4-20021220:1.1.1.2 mesa-4-0-4-20021216:1.1.1.2 mesa-4-0-4-20021215:1.1.1.2 mesa-4-0-4-20021214:1.1.1.2 mesa-4-0-4-branch:1.1.1.2.0.62 dmx-1-0-20021129-final:1.1.1.2 texmem-0-0-1-20021127-mesa-4-1-merge:1.1.1.2 trunk-20021125:1.1.1.2 dmx-1-0-20021115-beta:1.1.1.2 bsd-4-0-0-branch:1.1.1.2.0.60 nv-0-0-1-branch:1.1.1.2.0.58 savage-0-0-1-branch:1.1.1.2.0.56 stable-1-0-branch:1.1.1.2.0.54 r200-stable-1-0-20021028:1.1.1.2 dmx-1-0-20021025-alpha:1.1.1.2 X_4_2_99_2-20021023-merge:1.1.1.2 X_4_2_99_2:1.1.1.2 trunk-20021022:1.1.1.2 r200-stable-1-0-branch:1.1.1.2.0.52 mesa-4-1-branch:1.1.1.2.0.50 texmem-0-0-1:1.1.1.2.0.48 trunk-20021002:1.1.1.2 dmx-1-0-20020926-final:1.1.1.2 dmx-1-0-20020830-beta:1.1.1.2 r200-0-2-branch:1.1.1.2.0.46 r200-0-1-20020822-merge:1.1.1.2 r200-0-1-20020822:1.1.1.2 r200-0-1-20020826-freeze:1.1.1.2 xv845g-0-1-branch:1.1.1.2.0.44 xv845g-0-1-bp:1.1.1.2 GEODE-BASE-DRIVER:1.1.1.2 geode-0-0-1-branch:1.1.1.2.0.42 tdlabs-0-0-1-branch:1.1.1.2.0.40 reinit-0-0-1-branch:1.1.1.2.0.38 dmx-1-0-20020719-alpha:1.1.1.2 r200-0-1-20020715:1.1.1.2 r200-0-1-20020714-freeze:1.1.1.2 bsd-3-0-0-20020705-merge:1.1.1.2 bsd-3-0-0-freeze:1.1.1.2 trunk-20020705:1.1.1.2 bsd-3-0-0-20020705:1.1.1.2 trunk-20020703:1.1.1.2 mach64-0-0-5-branch:1.1.1.2.0.34 trunk-20020626:1.1.1.2 trunk-20020617:1.1.1.2 tcl-0-0-20020612-merge:1.1.1.2 tcl-0-0-20020612:1.1.1.2 tcl-0-0-20020612-freeze:1.1.1.2 r200-0-1-branch:1.1.1.2.0.36 dmx-1-0-20020604-phase1:1.1.1.2 dmx-1-0-20020603-base:1.1.1.2 dmx-1-0-branch:1.1.1.2.0.32 dmx-0-1-20020531-final:1.1.1.2 mach64-0-0-4-dma-branch:1.1.1.2.0.30 dmx-0-1-20020419-beta:1.1.1.2 mach64-0-0-4-branch:1.1.1.2.0.28 drmcommand-0-0-1-20020409-merge:1.1.1.2 drmcommand-0-0-1-20020409:1.1.1.2 drmcommand-0-0-1-20020409-freeze:1.1.1.2 trunk-20020328:1.1.1.2 s3virge-0-0-1-branch:1.1.1.2.0.26 drmcommand-0-0-1-branch:1.1.1.2.0.24 trident-0-0-1-branch:1.1.1.2.0.22 mach64-0-0-3-dma-branch:1.1.1.2.0.20 bsd-3-0-0-branch:1.1.1.2.0.18 dmx-0-1-20020228-alpha:1.1.1.2 mach64-0-0-3-branch:1.1.1.2.0.16 trunk-20020221:1.1.1.2 tcl-0-0-branch:1.1.1.2.0.14 mesa-4-0-20020214-merge:1.1.1.2 mesa-4-0-20020214:1.1.1.2 mesa-4-0-20020213:1.1.1.2 mesa-4-0-20020211-freeze:1.1.1.2 X_4_2_0-20020128-merge:1.1.1.2 X_4_2_0:1.1.1.2 X_4_2_0-20020127-preimport:1.1.1.2 X_4_2_0-20020123-preimport:1.1.1.2 dmx-0-1-20020112:1.1.1.2 dmx-0-1-20011128-snapshot:1.1.1.2 dmx-0-1-20011115:1.1.1.2 dmx-0-1-branch:1.1.1.2.0.12 mach64-0-0-2-branch:1.1.1.2.0.10 mesa-4-0-branch:1.1.1.2.0.8 X_4_1_99_1-20010822-merge:1.1.1.2 X_4_1_99_1:1.1.1.2 X_4_1_99_1-20010822-preimport:1.1.1.2 multihead-1-0-0-20010730:1.1.1.2 multihead-1-0-0-20010730-merge:1.1.1.2 multihead-1-0-0-20010727-freeze:1.1.1.2 X_4_1_0-20010615-merge:1.1.1.2 mesa-3-5-20010621-freeze:1.1.1.1.86.1 X_4_1_0:1.1.1.2 X_4_1_0-20010614-preimport:1.1.1.2 multihead-1-0-0-branch:1.1.1.2.0.6 X_4_0_99_3-20010502-merge:1.1.1.2 X_4_0_99_3:1.1.1.2 X_4_0_99_3-20010501-preimport:1.1.1.2 bsd-2-0-0-branch:1.1.1.2.0.4 X_4_0_99_2-20010410-merge:1.1.1.2 X_4_0_99_2:1.1.1.2 X_4_0_99_2-20010409-preimport:1.1.1.2 ati-pcigart-1-0-0-20010405-merge:1.1.1.2 ati-pcigart-1-0-0-20010405:1.1.1.2 ati-pcigart-1-0-0-20010405-freeze:1.1.1.2 ati-pcigart-1-0-0-branch:1.1.1.2.0.2 mesa-3-5-20010323-freeze:1.1.1.1 X_4_0_99_1-20010321-merge:1.1.1.2 X_4_0_99_1:1.1.1.2 X_4_0_99_1-20010319-preimport:1.1.1.1 full-1-0-0-20010315-head:1.1.1.1 sarea-1-0-0-20010314-merge:1.1.1.1 sarea-1-0-0-20010314:1.1.1.1 full-1-0-0-branch:1.1.1.1 sarea-1-0-0-20010307:1.1.1.1 sarea-1-0-0-20010307-freeze:1.1.1.1 tdfx-3-1-0-20010306-merge:1.1.1.1 tdfx-3-1-0-20010306-freeze:1.1.1.1 tdfx-3-1-0-20010306:1.1.1.1 tdfx-3-1-0-20010305-merge:1.1.1.1 tdfx-3-1-0-20010305-freeze2:1.1.1.1 tdfx-3-1-0-20010305-freeze:1.1.1.1 tdfx-3-1-0-20010301-freeze:1.1.1.1 ati-pcigart-0-0-1-branch-02282001-freeze:1.1.1.1 ati-5-0-1-20010220-head:1.1.1.1 ati-5-0-1-branch:1.1.1.1.0.94 sarea-1-0-0-branch:1.1.1.1.0.92 mga-1-0-0-20010215-merge:1.1.1.1 mga-1-0-0-20010215-freeze:1.1.1.1 tdfx-3-1-0-branch:1.1.1.1.0.90 tdfx-3-0-1-branch:1.1.1.1 ati-pcigart-0-0-1-branch:1.1.1.1.0.88 mesa-3-5-branch:1.1.1.1.0.86 tdfx-3-0-0-20010109-merge:1.1.1.1 tdfx-3-0-0-20010108:1.1.1.1 ati-5-0-0-20010105-merge:1.1.1.1 ati-5-0-0-20010105:1.1.1.1 ati-5-0-0-20000104-freeze:1.1.1.1 tdfx-3-0-0-20010104-freeze:1.1.1.1 ati-5-0-0-20001223-merge:1.1.1.1 ati-5-0-0-20001223-freeze:1.1.1.1 X_4_0_2-20001221-merge:1.1.1.1 X_4_0_2:1.1.1.1 mga-1-0-0-branch:1.1.1.1.0.84 X_4_0_1h-20001207-merge:1.1.1.1 X_4_0_1h-20001205-merge:1.1.1.1 X_4_0_1h:1.1.1.1 ati-4-1-1-20001202-merge-trunk:1.1.1.1 sse-1-0-1-branch:1.1.1.1.0.82 ati-4-1-1-20001202-merge:1.1.1.1 tdfx-3-0-0-20001201:1.1.1.1 ati-4-1-1-20001201-freeze:1.1.1.1 tdfx-3-0-0-20001201-freeze:1.1.1.1 X_4_0_1g-20001130-merge:1.1.1.1 X_4_0_1g:1.1.1.1 X_4_0_1f-20001130-merge:1.1.1.1 X_4_0_1f:1.1.1.1 ati-4-1-1-20001125-freeze:1.1.1.1 mach64-0-0-1-branch:1.1.1.1.0.80 ati-5-0-0-branch:1.1.1.1.0.78 X_4_0_1e-20001107-merge:1.1.1.1 X_4_0_1e:1.1.1.1 X_4_0_1d-20001107-merge:1.1.1.1 X_4_0_1d:1.1.1.1 ppc-1-0-1-branch:1.1.1.1.0.76 radeon-1-0-0-20001017:1.1.1.1 full-0-0-2-branch:1.1.1.1.0.74 full-0-0-1-branch:1.1.1.1.0.72 ati-4-1-1-20001009-freeze:1.1.1.1 mga-readpix-0-0-1-branch:1.1.1.1.0.70 tdfx-3-0-0-branch:1.1.1.1.0.68 X_4_0_1d-pre:1.1.1.1 ati-4-1-1-20000919-stable:1.1.1.1 radeon-1-0-0-branch:1.1.1.1.0.66 ppc-1-0-0-20000912:1.1.1.1 mga-lock-debug-0-2-0-branch:1.1.1.1.0.64 sse-1-0-0-branch:1.1.1.1.0.62 mga-lock-debug-0-0-1-branch:1.1.1.1.0.60 gamma-2-0-0-branch:1.1.1.1.0.58 tdfx-2-1-20000907-merge:1.1.1.1 tdfx-2-1-20000906:1.1.1.1 tdfx-2-1-20000905-freeze:1.1.1.1 ppc-1-0-0-2000-09-01-freeze:1.1.1.1 m3-0-0-1-branch:1.1.1.1.0.56 mach64-0-0-0-branch:1.1.1.1.0.54 ati-4-1-1-branch:1.1.1.1.0.52 X_4_0_1b-20000816-merge:1.1.1.1 X_4_0_1b:1.1.1.1 ati-4-0-2-branch:1.1.1.1.0.50 ppc-1-0-0-branch:1.1.1.1.0.48 tdfx-2-1-20000711:1.1.1.1 tdfx-2-1-20000711-freeze:1.1.1.1 X_4_0_1:1.1.1.1 tdfx-2-1-branch:1.1.1.1.0.46 pre401-20000613-freeze:1.1.1.1 bsd-1-0-1-20000613-merge:1.1.1.1 bsd-1-0-1-20000613:1.1.1.1 bsd-1-0-1-20000612-freeze:1.1.1.1 tdfx-2-0-20000612-merge:1.1.1.1 ati-4-1-0-20000613-merge:1.1.1.1 ati-4-1-0-20000613:1.1.1.1 tdfx-2-0-20000608-merge:1.1.1.1 tdfx-2-0-20000608-freeze:1.1.1.1 ati-4-1-0-branch:1.1.1.1.0.44 glxmisc-3-0-0-20000608-merge:1.1.1.1 glxmisc-3-0-0-20000607:1.1.1.1 glxmisc-3-0-0-20000606-freeze:1.1.1.1 bsd-1-0-1-branch:1.1.1.1.0.42 bsd-1-0-0-20000531-merge:1.1.1.1 bsd-1-0-0-20000530-merge:1.1.1.1 bsd-1-0-0-20000530-freeze:1.1.1.1 tdfx-2-0-20000222-merge:1.1.1.1 tdfx-2-0-20000222-freeze:1.1.1.1 ati-4-0-1-20000518-merge:1.1.1.1 ati-4-0-1-20000518:1.1.1.1 video-1-0-0-branch:1.1.1.1.0.40 gamma-1-0-0-branch:1.1.1.1.0.38 mgadh-0-0-3-branch:1.1.1.1.0.36 glxmisc-3-0-0-branch:1.1.1.1.0.34 glxmisc-2-0-0-20000503-merge:1.1.1.1 bsd-1-0-0-branch:1.1.1.1.0.32 glxmisc-2-0-0-20000503:1.1.1.1 glxmisc-2-0-0-branch:1.1.1.1.0.30 tdfx-2-0-branch:1.1.1.1.0.28 tdfx-2-0-trunk:1.1.1.1 glxmisc-1-0-0-20000420-merge:1.1.1.1 glxmisc-1-0-0-20000420:1.1.1.1 ati-4-0-1-beta:1.1.1.1 glxmisc-1-0-0-branch:1.1.1.1.0.26 mga-0-0-3-branch:1.1.1.1.0.24 mga-0-0-2-20000404-merge:1.1.1.1 ati-4-0-1-alpha:1.1.1.1 ati-4-0-1-20000319-base:1.1.1.1 ati-4-0-1-branch:1.1.1.1.0.22 ati-4-0-0-20000319:1.1.1.1 X_4_0-20000315-merge:1.1.1.1 X_4_0:1.1.1.1 freeze-20000226:1.1.1.1 dispatch-0-0-3-20000225-merge:1.1.1.1 dispatch-0-0-3-20000225:1.1.1.1 mga-0-0-1-20000225-merge:1.1.1.1 mga-0-0-2-branch:1.1.1.1.0.20 smt-0-0-2-branch:1.1.1.1.0.18 smt-0-0-1-20000222-freeze:1.1.1.1 X_3_9_18-20000222-merge:1.1.1.1 X_3_9_18:1.1.1.1 smt-0-0-1-stage2c:1.1.1.1 smt-0-0-1-stage2b:1.1.1.1.0.16 dispatch-0-0-3-branch:1.1.1.1.0.14 i810-20000214-beta2:1.1.1.1 dispatch-0-0-2-20000212:1.1.1.1 dispatch-0-0-2-branch:1.1.1.1.0.12 i810-20000201-beta1:1.1.1.1 dispatch-0-0-1-20000129-merge:1.1.1.1 dispatch-0-0-1-20000128:1.1.1.1 smt-0-0-1-20000112-base:1.1.1.1 smt-0-0-1-branch:1.1.1.1.0.6 dispatch-0-0-1-branch:1.1.1.1.0.10 tdfx-1-1:1.1.1.1.0.4 X_3_9_17:1.1.1.1 ati-4-0-0-branch:1.1.1.1.0.8 mga-0-0-1-branch:1.1.1.1.0.2 X_3_9_16:1.1.1.1 XFree:1.1.1; locks; strict; comment @ * @; 1.1 date 99.12.05.01.04.13; author daryll; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 99.12.05.01.04.13; author daryll; state Exp; branches 1.1.1.1.86.1; next 1.1.1.2; 1.1.1.2 date 2001.03.19.17.45.24; author dawes; state Exp; branches; next ; 1.1.1.1.86.1 date 2001.03.27.20.03.20; author gareth; state Exp; branches; next ; desc @@ 1.1 log @Initial revision @ text @/* $TOG: infutil.h /main/4 1998/02/04 14:34:13 kaleb $ */ /* infutil.h -- types and macros common to blocks and codes * Copyright (C) 1995-1998 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* WARNING: this file should *not* be used by applications. It is part of the implementation of the compression library and is subject to change. Applications should only use zlib.h. */ #ifndef _INFUTIL_H #define _INFUTIL_H typedef enum { TYPE, /* get type bits (3, including end bit) */ LENS, /* get lengths for stored */ STORED, /* processing stored block */ TABLE, /* get table lengths */ BTREE, /* get bit lengths tree for a dynamic block */ DTREE, /* get length, distance trees for a dynamic block */ CODES, /* processing fixed or dynamic block */ DRY, /* output remaining window bytes */ DONE, /* finished last block, done */ BAD} /* got a data error--stuck here */ inflate_block_mode; /* inflate blocks semi-private state */ struct inflate_blocks_state { /* mode */ inflate_block_mode mode; /* current inflate_block mode */ /* mode dependent information */ union { uInt left; /* if STORED, bytes left to copy */ struct { uInt table; /* table lengths (14 bits) */ uInt index; /* index into blens (or border) */ uIntf *blens; /* bit lengths of codes */ uInt bb; /* bit length tree depth */ inflate_huft *tb; /* bit length decoding tree */ } trees; /* if DTREE, decoding info for trees */ struct { inflate_huft *tl; inflate_huft *td; /* trees to free */ inflate_codes_statef *codes; } decode; /* if CODES, current state */ } sub; /* submode */ uInt last; /* true if this block is the last block */ /* mode independent information */ uInt bitk; /* bits in bit buffer */ uLong bitb; /* bit buffer */ Bytef *window; /* sliding window */ Bytef *end; /* one byte after sliding window */ Bytef *read; /* window read pointer */ Bytef *write; /* window write pointer */ check_func checkfn; /* check function */ uLong check; /* check on output */ }; /* defines for inflate input/output */ /* update pointers and return */ #define UPDBITS {s->bitb=b;s->bitk=k;} #define UPDIN {z->avail_in=n;z->total_in+=p-z->next_in;z->next_in=p;} #define UPDOUT {s->write=q;} #define UPDATE {UPDBITS UPDIN UPDOUT} #define LEAVE {UPDATE return inflate_flush(s,z,r);} /* get bytes and bits */ #define LOADIN {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;} #define NEEDBYTE {if(n)r=Z_OK;else LEAVE} #define NEXTBYTE (n--,*p++) #define NEEDBITS(j) {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<>=(j);k-=(j);} /* output bytes */ #define WAVAIL (uInt)(qread?s->read-q-1:s->end-q) #define LOADOUT {q=s->write;m=(uInt)WAVAIL;} #define WRAP {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}} #define FLUSH {UPDOUT r=inflate_flush(s,z,r); LOADOUT} #define NEEDOUT {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;} #define OUTBYTE(a) {*q++=(Byte)(a);m--;} /* load local pointers */ #define LOAD {LOADIN LOADOUT} /* masks for lower bits (size given to avoid silly warnings with Visual C++) */ extern uInt inflate_mask[17]; /* copy as much as possible from the sliding window to the output area */ extern int inflate_flush OF(( inflate_blocks_statef *, z_streamp , int)); struct internal_state {int dummy;}; /* for buggy compilers */ #endif @ 1.1.1.1 log @Import XFree 3.9.16 @ text @@ 1.1.1.1.86.1 log @Initial merge of trunk onto branch. @ text @d1 1 a1 1 /* $Xorg: infutil.h,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ @ 1.1.1.2 log @Import of XFree86 4.0.99.1 @ text @d1 1 a1 1 /* $Xorg: infutil.h,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */ @