OSDN Git Service

Avoid compile error on libapplefile
[lha/lha.git] / src / shuf.c
index 90585f1..a8cb54b 100644 (file)
@@ -29,13 +29,7 @@ decode_start_st0( /*void*/ )
     maxmatch = MAXMATCH;
     init_getbits();
     init_code_cache();
-#ifdef SUPPORT_LH7
-    np = 1 << (MAX_DICBIT - 7);
-#endif
-#ifndef SUPPORT_LH7
-    np = 1 << (MAX_DICBIT - 6);
-#endif
-
+    np = 1 << (LZHUFF3_DICBIT - 6);
 }
 
 /* ------------------------------------------------------------------------ */
@@ -168,7 +162,7 @@ decode_c_st0(/*void*/)
         make_table(NP, pt_len, 8, pt_table);
     }
     blocksize--;
-    j = c_table[bitbuf >> 4];
+    j = c_table[peekbits(12)];
     if (j < N1)
         fillbuf(c_len[j]);
     else {
@@ -195,7 +189,7 @@ decode_p_st0(/*void*/)
 {
     int             i, j;
 
-    j = pt_table[bitbuf >> 8];
+    j = pt_table[peekbits(8)];
     if (j < np) {
         fillbuf(pt_len[j]);
     }