decomp16.c File Reference

#include <sys/types.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>

Include dependency graph for decomp16.c:

Go to the source code of this file.

Defines

#define BUFSZ   1024
#define BUFSZ_2   (BUFSZ/2)
#define DICTSZ   (unsigned)13056
#define EOF_INDEX   (unsigned short)0xFFFF
#define FALSE   0
#define TRUE   ~FALSE

Functions

 _PROTOTYPE (int main,(int argc, char **argv))
 _PROTOTYPE (void ffork,(void))
 _PROTOTYPE (void die,(char *s))
 _PROTOTYPE (void myputc,(unsigned c))
 _PROTOTYPE (unsigned mygetc,(void))
 _PROTOTYPE (void putpipe,(unsigned u, int flag))
int main (int argc, char **argv)
void ffork ()
void die (char *s)
void myputc (unsigned c)
unsigned mygetc ()
void getbits ()
void getpipe ()
void putpipe (unsigned u, int flag)

Variables

int fdin
int fdout
int fderr
int ibufstart
int obufind
int ibufend
int ipbufind = BUFSZ_2
int opbufind = 0
int pnum = -1
unsigned short ipbuf [BUFSZ_2]
unsigned short opbuf [BUFSZ_2]
unsigned char * ibuf = (unsigned char *) ipbuf
unsigned char * obuf = (unsigned char *) opbuf
unsigned short dindex [DICTSZ]
unsigned short dchar [DICTSZ]
unsigned iindex
unsigned tindex
unsigned tindex2
unsigned base
unsigned tbase
unsigned locend
unsigned curend = 256
unsigned maxend
int dcharp
int curbits
int maxbits
int clearflg
int inmod


Define Documentation

#define BUFSZ   1024
 

Definition at line 82 of file decomp16.c.

Referenced by getpipe(), mygetc(), myputc(), and putpipe().

#define BUFSZ_2   (BUFSZ/2)
 

Definition at line 83 of file decomp16.c.

Referenced by getpipe(), and putpipe().

#define DICTSZ   (unsigned)13056
 

Definition at line 84 of file decomp16.c.

#define EOF_INDEX   (unsigned short)0xFFFF
 

Definition at line 85 of file decomp16.c.

Referenced by die(), and getpipe().

#define FALSE   0
 

Definition at line 86 of file decomp16.c.

#define TRUE   ~FALSE
 

Definition at line 87 of file decomp16.c.


Function Documentation

_PROTOTYPE void  putpipe,
(unsigned u, int flag
 

_PROTOTYPE unsigned  mygetc,
(void) 
 

_PROTOTYPE void  myputc,
(unsigned c
 

_PROTOTYPE void  die,
(char *s
 

_PROTOTYPE void  ffork,
(void) 
 

_PROTOTYPE int  main,
(int argc, char **argv) 
 

void die char *  s  ) 
 

Definition at line 298 of file decomp16.c.

References EOF_INDEX, exit(), fderr, fdout, NULL, obuf, obufind, opbufind, putpipe(), and write.

void ffork  ) 
 

Definition at line 275 of file decomp16.c.

References close, die, dup, fork, j, and pipe.

void getbits  ) 
 

Definition at line 359 of file decomp16.c.

References curbits, iindex, inmod, left(), and mygetc().

void getpipe  ) 
 

Definition at line 382 of file decomp16.c.

References base, BUFSZ, BUFSZ_2, curend, die, dindex, EOF_INDEX, fdin, flags, iindex, ipbuf, ipbufind, n, NULL, putpipe(), read, and TRUE.

int main int  argc,
char **  argv
 

Definition at line 122 of file decomp16.c.

References c, cp, exit(), int(), j, k, pnum, and write.

unsigned mygetc  ) 
 

Definition at line 340 of file decomp16.c.

References BUFSZ, die, fdin, ibuf, ibufend, ibufstart, NULL, and read.

Referenced by getbits().

void myputc unsigned  c  ) 
 

Definition at line 324 of file decomp16.c.

References BUFSZ, die, fdout, obuf, obufind, and write.

Referenced by putpipe().

void putpipe unsigned  u,
int  flag
 

Definition at line 417 of file decomp16.c.

References BUFSZ, BUFSZ_2, die, fdout, flags, myputc(), n, opbuf, opbufind, and write.

Referenced by die(), and getpipe().


Variable Documentation

unsigned base
 

Definition at line 102 of file decomp16.c.

int clearflg
 

Definition at line 110 of file decomp16.c.

int curbits
 

Definition at line 108 of file decomp16.c.

Referenced by getbits().

unsigned curend = 256
 

Definition at line 105 of file decomp16.c.

Referenced by getpipe().

unsigned short dchar[DICTSZ]
 

Definition at line 100 of file decomp16.c.

int dcharp
 

Definition at line 107 of file decomp16.c.

unsigned short dindex[DICTSZ]
 

Definition at line 99 of file decomp16.c.

Referenced by getpipe().

int fderr
 

Definition at line 89 of file decomp16.c.

Referenced by die().

int fdin
 

Definition at line 89 of file decomp16.c.

Referenced by getpipe(), main(), and mygetc().

int fdout
 

Definition at line 89 of file decomp16.c.

Referenced by die(), main(), myputc(), and putpipe().

unsigned char* ibuf = (unsigned char *) ipbuf
 

Definition at line 96 of file decomp16.c.

int ibufend
 

Definition at line 90 of file decomp16.c.

Referenced by mygetc().

int ibufstart
 

Definition at line 90 of file decomp16.c.

Referenced by mygetc().

unsigned iindex
 

Definition at line 101 of file decomp16.c.

Referenced by getbits(), and getpipe().

int inmod
 

Definition at line 111 of file decomp16.c.

Referenced by getbits().

unsigned short ipbuf[BUFSZ_2]
 

Definition at line 94 of file decomp16.c.

Referenced by getpipe().

int ipbufind = BUFSZ_2
 

Definition at line 91 of file decomp16.c.

Referenced by getpipe().

unsigned locend
 

Definition at line 104 of file decomp16.c.

int maxbits
 

Definition at line 109 of file decomp16.c.

unsigned maxend
 

Definition at line 106 of file decomp16.c.

unsigned char* obuf = (unsigned char *) opbuf
 

Definition at line 97 of file decomp16.c.

int obufind
 

Definition at line 90 of file decomp16.c.

Referenced by die(), and myputc().

unsigned short opbuf[BUFSZ_2]
 

Definition at line 95 of file decomp16.c.

Referenced by putpipe().

int opbufind = 0
 

Definition at line 92 of file decomp16.c.

Referenced by die(), and putpipe().

int pnum = -1
 

Definition at line 93 of file decomp16.c.

Referenced by main().

unsigned tbase
 

Definition at line 103 of file decomp16.c.

unsigned tindex
 

Definition at line 101 of file decomp16.c.

unsigned tindex2
 

Definition at line 101 of file decomp16.c.


Generated on Fri Apr 14 23:06:24 2006 for minix by  doxygen 1.4.6