Lines Matching defs:code

111 #define	INIT_BITS 9			/* initial number of bits/code */
133 static int n_bits; /* number of bits/code */
134 static int maxbits = BITS; /* user settable max # bits/code */
135 static code_int maxcode; /* maximum code, given n_bits */
136 /* should NEVER generate this code */
190 * lie within the contiguous general code space.
193 #define CLEAR 256 /* table clear output code */
296 * -b: Parameter limits the max number of bits/code.
318 * substrings and replaces them with a variable size code. This is
955 * prefix code / next character combination. We do a variant of Knuth's
959 * an adaptive reset, whereby the code table is cleared when the compression
961 * codes are re-sized at this point, and a special CLEAR code is generated
1016 hshift = 8 - hshift; /* set hash code range bound */
1073 /* code -> hashtable */
1091 * Put out the final code.
1119 "\tLargest code (of last block) was %d"
1139 * Output the given code.
1141 * code: A n_bits-bit integer. If == -1, then EOF. This assumes
1144 * Outputs code to the file.
1150 * code in turn. When the buffer fills up empty it and start over.
1154 output(code_int code)
1165 (void) fprintf(stderr, "%5d%c", code,
1168 if (code >= 0) {
1171 * by the following code
1179 * Since code is always >= 8 bits, only need to mask the first
1182 *bp = (*bp & rmask[r_off]) | (code << r_off) & lmask[r_off];
1185 code >>= 8 - r_off;
1191 *bp++ = code;
1192 code >>= 8;
1197 *bp = code;
1214 * If the next entry is going to be too big for the code size,
1283 code_int code, oldcode, incode;
1290 for (code = 255; code >= 0; code--) {
1291 tab_prefixof(code) = 0;
1292 tab_suffixof(code) = (char_type)code;
1299 /* first code must be 8 bits = char */
1307 while ((code = getcode()) > -1) {
1309 if ((code == CLEAR) && block_compress) {
1310 for (code = 255; code >= 0; code--)
1311 tab_prefixof(code) = 0;
1314 if ((code = getcode()) == -1) /* O, untimely death! */
1317 incode = code;
1321 if (code >= free_ent) {
1324 code = oldcode;
1334 while (code >= 256) {
1336 *stackp++ = tab_suffixof(code);
1337 code = tab_prefixof(code);
1343 *stackp++ = finchar = tab_suffixof(code);
1359 if ((code = free_ent) < maxmaxcode) {
1360 tab_prefixof(code) = (unsigned short) oldcode;
1361 tab_suffixof(code) = (char_type) finchar;
1362 free_ent = code+1;
1365 * Remember previous code.
1378 * Read one code from the standard input. If EOF, return -1.
1382 * code or -1 is returned.
1387 code_int code;
1395 * If the next entry will be too big for the current code
1434 code = (*bp++ >> r_off);
1436 r_off = 8 - r_off; /* now, offset into code word */
1439 code |= *bp++ << r_off;
1444 code |= (*bp & rmask[bits]) << r_off;
1447 return (code);
1457 code_int code;
1463 while ((code = getcode()) >= 0) {
1464 if ((code == CLEAR) && block_compress) {
1475 code, (col += 6) >= 74 ? (col = 0, '\n') : ' ');
1780 cl_hash(count_int hsize) /* reset code table */