OSDN Git Service

* src/larc.c (decode_start_lz5): should use the dtext[] instead of the text[].
authorKoji Arai <jca02266@gmail.com>
Mon, 4 Aug 2008 14:41:41 +0000 (23:41 +0900)
committerKoji Arai <jca02266@gmail.com>
Mon, 4 Aug 2008 14:41:41 +0000 (23:41 +0900)
* src/lha.h (dtext): defined as global variable.

* src/slide.c (decode): ditto.

ChangeLog
configure.ac
src/larc.c
src/lha.h
src/slide.c

index 592b2ce..092c434 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-08-04  Koji Arai  <arai@users.sourceforge.jp>
+
+       * src/larc.c (decode_start_lz5): should use the dtext[] instead of the text[].
+
+       * src/lha.h (dtext): defined as global variable.
+
+       * src/slide.c (decode): ditto.
+
 2008-08-03  Koji Arai  <arai@users.sourceforge.jp>
 
        * src/header.c (convert_filename): Fixed a bug:
index ad703bb..5612809 100644 (file)
@@ -1,5 +1,5 @@
 # Process this file with autoconf to produce a configure script.
-AC_INIT([LHa for UNIX], 1.14i-ac20080802, arai@users.sourceforge.jp, lha)
+AC_INIT([LHa for UNIX], 1.14i-ac20080804, arai@users.sourceforge.jp, lha)
 AC_DEFINE_UNQUOTED(LHA_CONFIGURE_OPTIONS, "$ac_configure_args",
            [specified options for the configure script.])
 AC_CANONICAL_HOST
index 42509c7..c6f8f1c 100644 (file)
@@ -82,11 +82,11 @@ decode_start_lz5( /*void*/ )
 
     flagcnt = 0;
     for (i = 0; i < 256; i++)
-        memset(&text[i * 13 + 18], i, 13);
+        memset(&dtext[i * 13 + 18], i, 13);
     for (i = 0; i < 256; i++)
-        text[256 * 13 + 18 + i] = i;
+        dtext[256 * 13 + 18 + i] = i;
     for (i = 0; i < 256; i++)
-        text[256 * 13 + 256 + 18 + i] = 255 - i;
-    memset(&text[256 * 13 + 512 + 18], 0, 128);
-    memset(&text[256 * 13 + 512 + 128 + 18], ' ', 128 - 18);
+        dtext[256 * 13 + 256 + 18 + i] = 255 - i;
+    memset(&dtext[256 * 13 + 512 + 18], 0, 128);
+    memset(&dtext[256 * 13 + 512 + 128 + 18], ' ', 128 - 18);
 }
index 2fdad9e..5fa157c 100644 (file)
--- a/src/lha.h
+++ b/src/lha.h
@@ -363,7 +363,8 @@ EXTERN unsigned short dicbit;
 EXTERN unsigned short maxmatch;
 EXTERN off_t decode_count;
 EXTERN unsigned long loc;           /* short -> long .. Changed N.Watazaki */
-EXTERN unsigned char *text;
+EXTERN unsigned char *text;         /* encoding buffer */
+EXTERN unsigned char *dtext;        /* decoding buffer */
 
 /* huf.c */
 #ifndef LHA_MAIN_SRC  /* t.okamoto 96/2/20 */
index b6c27d6..6cf0379 100644 (file)
@@ -386,7 +386,6 @@ decode(interface)
 {
     unsigned int i, c;
     unsigned int dicsiz1, adjust;
-    unsigned char *dtext;
     unsigned int crc;
 
 #ifdef DEBUG