/* * $Header: /usr/people/tcl/src/uutar/RCS/codes.h,v 1.1.1.2 1993/09/11 18:41:46 tcl Exp $ * Tom Lawrence * tcl@sgi.com */ /* number of printable characters in output character set */ extern int numchars; /* encoding/decoding table. inuse indicates whether or not the character * whose ascii code is the offset into this array is part of the output * printable character set. * * When encoding, the next 8 bits (not necessarily byte aligned) in the * input binary bitstream are used to index into this array. The code * field then indicates the printable output character to append to the * output, and the len field indicates how many of the input 8 bits * should be comsumed by this operation, i.e. the input bitstream is * advanced by len bits. * * When decoding, the input printable ascii character is used to index * into this array. The variable length (8 bits or less) bitfield stored * in code and whose length is len, is appended to the output binary * bitstream. */ extern struct code { char inuse; char code; char len; } codes[256]; void init_codes(); void parse_charval_list(); void print_charval_list(); #define ENCODE 0 #define DECODE 1