From: Koji Arai Date: Mon, 4 Aug 2008 14:41:41 +0000 (+0900) Subject: * src/larc.c (decode_start_lz5): should use the dtext[] instead of the text[]. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e6435ca3bf3479d90ede9f4faaccf4e1bb109e5d;p=lha%2Flha.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 592b2ce..092c434 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-08-04 Koji Arai + + * 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 * src/header.c (convert_filename): Fixed a bug: diff --git a/configure.ac b/configure.ac index ad703bb..5612809 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/larc.c b/src/larc.c index 42509c7..c6f8f1c 100644 --- a/src/larc.c +++ b/src/larc.c @@ -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); } diff --git a/src/lha.h b/src/lha.h index 2fdad9e..5fa157c 100644 --- 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 */ diff --git a/src/slide.c b/src/slide.c index b6c27d6..6cf0379 100644 --- a/src/slide.c +++ b/src/slide.c @@ -386,7 +386,6 @@ decode(interface) { unsigned int i, c; unsigned int dicsiz1, adjust; - unsigned char *dtext; unsigned int crc; #ifdef DEBUG