LMMS
Loading...
Searching...
No Matches
inflate.c File Reference
#include "inflate.h"

Macros

#define PKZIP_BUG_WORKAROUND   /* PKZIP 1.93a problem--live with it */
#define __INFLATE_C   /* identifies this source module */
#define INFMOD   /* tell inflate.h to include code to be compiled */
#define INVALID_CODE   99
#define IS_INVALID_CODE(c)
#define UINT_D64   unsigned
#define wsize   WSIZE /* wsize is a constant */
#define MAXLITLENS   288
#define MAXDISTS   32
#define CHECK_EOF   /* default as of 5.13/5.2 */
#define NEEDBITS(n)
#define DUMPBITS(n)
#define BMAX   16 /* maximum bit length of any code (16 for explode) */
#define N_MAX   288 /* maximum number of codes in any set */

Functions

int inflate_codes OF ((__GPRO__ struct huft *tl, struct huft *td, unsigned bl, unsigned bd))
static int inflate_stored OF ((__GPRO))
static int inflate_block OF ((__GPRO__ int *e))
int inflate_codes (__G__ tl, td, bl, bd) __GDEF struct huft *tl
 while (1)
static int inflate_stored (__G)
static int inflate_fixed (__G)
static int inflate_dynamic (__G)
static int inflate_block (__G__ e) __GDEF int *e
 if (t==2)
int inflate_free (__G)
int huft_build (__G__ b, n, s, d, e, t, m) __GDEF ZCONST unsigned *b
 memzero ((char *) c, sizeof(c))
 while (--i)
 if (c[0]==n)
 for (k=j=1;j<=BMAX;j++)
 memzero ((char *) v, sizeof(v))
 while (++i< n)
 for (;k<=g;k++)
int huft_free (struct huft *t)

Variables

static ZCONST unsigned border []
static ZCONST ush cplens64 []
static ZCONST ush cplens32 []
static ZCONST uch cplext64 []
static ZCONST uch cplext32 []
static ZCONST ush cpdist []
static ZCONST uch cpdext64 []
static ZCONST uch cpdext32 []
static ZCONST unsigned lbits = 9
static ZCONST unsigned dbits = 6
inttd
unsigned bl
unsigned bd
unsigned d
UINT_D64 n = x[g]
UINT_D64 w = G.wp
struct huftt = (unsigned)b & 3
unsigned ml = mask_bits[bl]
unsigned md = mask_bits[bd]
register ulg b = G.bb
register unsigned k = G.bk
int retval = 0
cleanup_decode __pad0__
G bb = b
G bk = k
cleanup_and_exit __pad1__
e = (int)b & 1
unsigned s
unsigned * m = l[0]
unsigned c [BMAX+1]
unsigned el = n > 256 ? b[256] : BMAX
unsigned f
int g
int h = -1
register unsigned i = n
register unsigned j
int lx [BMAX+1]
intl = lx+1
register unsigned * p = (unsigned *)b
register struct huftq = (struct huft *)NULL
struct huft r
struct huftu [BMAX] = (struct huft *)NULL
unsigned v [N_MAX]
unsigned x [BMAX+1] = i = 0
unsigned * xp
int y = 0 && g != 1
unsigned z = 0
 do

Macro Definition Documentation

◆ __INFLATE_C

#define __INFLATE_C   /* identifies this source module */

◆ BMAX

#define BMAX   16 /* maximum bit length of any code (16 for explode) */

◆ CHECK_EOF

#define CHECK_EOF   /* default as of 5.13/5.2 */

◆ DUMPBITS

#define DUMPBITS ( n)
Value:
{b>>=(n);k-=(n);}
register unsigned k
Definition inflate.c:946
int n
Definition crypt.c:458
b
Definition crypt.c:628

◆ INFMOD

#define INFMOD   /* tell inflate.h to include code to be compiled */

◆ INVALID_CODE

#define INVALID_CODE   99

◆ IS_INVALID_CODE

#define IS_INVALID_CODE ( c)
Value:
#define INVALID_CODE
Definition inflate.c:278
return c
Definition crypt.c:175

◆ MAXDISTS

#define MAXDISTS   32

◆ MAXLITLENS

#define MAXLITLENS   288

◆ N_MAX

#define N_MAX   288 /* maximum number of codes in any set */

◆ NEEDBITS

#define NEEDBITS ( n)
Value:
{while((int)k<(int)(n)){int c=NEXTBYTE;\
if(c==EOF){if((int)k>=0)break;retval=1;goto cleanup_and_exit;}\
b|=((ulg)c)<<k;k+=8;}}
int retval
Definition inflate.c:947
unsigned long ulg
Definition unzip.h:403
#define NEXTBYTE
Definition unzpriv.h:2782

◆ PKZIP_BUG_WORKAROUND

#define PKZIP_BUG_WORKAROUND   /* PKZIP 1.93a problem--live with it */

◆ UINT_D64

#define UINT_D64   unsigned

◆ wsize

#define wsize   WSIZE /* wsize is a constant */

Function Documentation

◆ for() [1/2]

for ( ;k<=g;k++ )

◆ for() [2/2]

for ( k = j = 1; j <= BMAXj++)

◆ huft_build()

int huft_build ( __G__ b,
n ,
s ,
d ,
e ,
t ,
m  )

◆ huft_free()

int huft_free ( struct huft * t)

◆ if() [1/2]

if ( c [0] = n)

◆ if() [2/2]

if ( t = = 2)

◆ inflate_block()

int inflate_block ( __G__ e)
static

◆ inflate_codes()

int inflate_codes ( __G__ tl,
td ,
bl ,
bd  )

◆ inflate_dynamic()

int inflate_dynamic ( __G )
static

◆ inflate_fixed()

int inflate_fixed ( __G )
static

◆ inflate_free()

int inflate_free ( __G )

◆ inflate_stored()

int inflate_stored ( __G )
static

◆ memzero() [1/2]

memzero ( (char *) c,
sizeof(c)  )

◆ memzero() [2/2]

memzero ( (char *) v,
sizeof(v)  )

◆ OF() [1/3]

int inflate_stored OF ( (__GPRO) )
static

◆ OF() [2/3]

int inflate_block OF ( (__GPRO__ int *e) )
static

◆ OF() [3/3]

int inflate_codes OF ( (__GPRO__ struct huft *tl, struct huft *td, unsigned bl, unsigned bd) )

◆ while() [1/3]

while ( )

◆ while() [2/3]

while ( -- i)

◆ while() [3/3]

while ( 1 )

Variable Documentation

◆ __pad0__

cleanup_decode __pad0__

◆ __pad1__

cleanup_and_exit __pad1__

◆ b

b = G.bb

◆ bb

G bb = b

◆ bd

unsigned bd

◆ bk

G bk = k

◆ bl

unsigned bl

◆ border

ZCONST unsigned border[]
static
Initial value:
= {
16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}

◆ c

unsigned c[BMAX+1]
Initial value:
{
unsigned a
uint8_t a
Definition Spc_Cpu.h:141

◆ cpdext32

ZCONST uch cpdext32[]
static
Initial value:
= {
0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
12, 12, 13, 13, INVALID_CODE, INVALID_CODE}

◆ cpdext64

ZCONST uch cpdext64[]
static
Initial value:
= {
0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
12, 12, 13, 13, 14, 14}

◆ cpdist

ZCONST ush cpdist[]
static
Initial value:
= {
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
8193, 12289, 16385, 24577, 32769, 49153}

◆ cplens32

ZCONST ush cplens32[]
static
Initial value:
= {
3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}

◆ cplens64

ZCONST ush cplens64[]
static
Initial value:
= {
3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 3, 0, 0}

◆ cplext32

ZCONST uch cplext32[]
static
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, INVALID_CODE, INVALID_CODE}

◆ cplext64

ZCONST uch cplext64[]
static
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 16, INVALID_CODE, INVALID_CODE}

◆ d

ZCONST ush * d
Initial value:
{
register unsigned e
* e
Definition inflate.c:1404

◆ dbits

ZCONST unsigned dbits = 6
static

◆ do

do
Initial value:
{
c[*p]++
uch * p
Definition crypt.c:594

◆ e

ZCONST uch * e = (int)b & 1

◆ el

el = n > 256 ? b[256] : BMAX

◆ f

unsigned f

◆ g

int g

◆ h

h = -1

◆ i

i = n

◆ j

register unsigned j

◆ k

register int k = G.bk

◆ l

int* l = lx+1

◆ lbits

ZCONST unsigned lbits = 9
static

◆ lx

int lx[BMAX+1]

◆ m

* m = l[0]

◆ md

md = mask_bits[bd]

◆ ml

ml = mask_bits[bl]

◆ n

n = x[g]

◆ p

p = (unsigned *)b

◆ q

q = (struct huft *)NULL

◆ r

struct huft r

◆ retval

int retval = 0

◆ s

unsigned s

◆ t

struct huft ** t = (unsigned)b & 3

◆ td

int * td

◆ u

u[0] = (struct huft *)NULL

◆ v

unsigned v[N_MAX]

◆ w

register int w = G.wp

◆ x

m cpu_regs x = i = 0

◆ xp

unsigned* xp

◆ y

m cpu_regs y = 0 && g != 1

◆ z

z = 0