#pragma prototyped
/*
* lzd decoder snarfed from the public domain booz -- Rahul Dhesi 1991/07/07
*/
#include <codex.h>
typedef struct Table_s
{
unsigned int next;
char z_ch;
} Table_t;
typedef struct State_s
{
unsigned char* ip;
unsigned char* ie;
unsigned long bitbuf;
unsigned short bitcount;
unsigned short bitmask;
unsigned int old_code;
unsigned int suf_code;
unsigned int max_code;
unsigned int free_code;
unsigned int in_code;
unsigned int fin_char;
unsigned int nbits;
unsigned int cpy;
unsigned int bad;
unsigned int eof;
unsigned int sp;
} State_t;
static int
{
ssize_t r;
return 0;
{
return 0;
}
}
static int
{
unsigned short x;
{
}
}
static void
{
}
static void
{
}
static void
{
{
}
}
static int
{
{
return -1;
}
return 0;
}
static int
{
return 0;
}
static ssize_t
{
register char* s = (char*)buf;
register char* e = s + n;
register int c;
{
{
if (s >= e)
{
return s - (char*)buf;
}
}
}
{
if (c == CLEAR)
{
if (s >= e)
return s - (char*)buf;
}
else
{
{
}
while (c > 255)
{
}
{
if (s >= e)
{
return s - (char*)buf;
}
}
}
}
return s - (char*)buf;
}
{
"lzd",
"\bzoo\b(1) archive lzd compression.",
"[+(version)?codex-lzd 1991-07-07]"
"[+(author)?Rahul Dhesi]",
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
};