Lines Matching refs:code

14        NOTE:  This code may or may not infringe on the so-called "Welch
19 whatever license(s) may be required for legal use of this code.
25 Shrinking is basically a dynamic LZW algorithm with allowed code sizes of
27 leaf nodes. PKWARE uses the special code 256 (decimal) to indicate a
28 change in code size or a partial clear of the code tree: 256,1 for the
40 IEEE _Computer_; no existing source code, including any in Nelson's book,
44 than the original Sam Smith code. This is still larger than any of the
88 #define FREE_CODE HSIZE /* 0x2000 (code is unused or was cleared) */
89 #define HAS_CHILD (HSIZE << 1) /* 0x4000 (code has a child--do not clear) */
107 shrint code, oldcode, freecode, curcode;
137 for (code = 0; code < BOGUSCODE; ++code) {
138 Value[code] = (uch)code;
139 parent[code] = BOGUSCODE;
141 for (code = BOGUSCODE+1; code < HSIZE; ++code)
142 parent[code] = FREE_CODE;
162 Get and output first code, then loop over remaining ones.
173 READBITS(codesize, code)
176 if (code == BOGUSCODE) { /* possible to have consecutive escapes? */
177 READBITS(codesize, code)
178 if (code == 1) {
181 } else if (code == 2) {
182 Trace((stderr, " (partial clear code)\n"));
191 Translate code: traverse tree from leaf back to root.
195 curcode = code;
200 Trace((stderr, " (found a KwKwK code %d; oldcode = %d)\n", code,
220 Trace((stderr, "code %4d; oldcode %4d; char %3d (%c); string [", code,
257 oldcode = code;
289 register shrint code;
294 for (code = BOGUSCODE+1; code < HSIZE; ++code) {
295 register shrint cparent = (shrint)(parent[code] & CODE_MASK);
302 for (code = BOGUSCODE+1; code < HSIZE; ++code) {
303 if (FLAG_BITS[code] & HAS_CHILD) /* just clear child-bit */
304 FLAG_BITS[code] &= ~HAS_CHILD;
306 Trace((stderr, "%d\n", code));
307 parent[code] = FREE_CODE;