OSDN Git Service

replace MKSTEMP with HAVE_MKSTEMP.
authorarai <arai@6a8cc165-1e22-0410-a132-eb4e3f353aba>
Mon, 29 Jan 2001 20:31:46 +0000 (20:31 +0000)
committerarai <arai@6a8cc165-1e22-0410-a132-eb4e3f353aba>
Mon, 29 Jan 2001 20:31:46 +0000 (20:31 +0000)
substitute DEFAULT_LZHUFF_METHOD for the `compress_method' variable (it's default value).

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/lha/lha/trunk@32 6a8cc165-1e22-0410-a132-eb4e3f353aba

src/lharc.c

index b9fd28b..adae506 100644 (file)
@@ -94,6 +94,8 @@ init_variable()               /* Added N.Watazaki */
        compress_method = LZHUFF7_METHOD_NUM;
 #endif
 
        compress_method = LZHUFF7_METHOD_NUM;
 #endif
 
+       compress_method = DEFAULT_LZHUFF_METHOD;
+
        header_level    = HEADER_LEVEL1;
        quiet_mode              = 0;
 
        header_level    = HEADER_LEVEL1;
        quiet_mode              = 0;
 
@@ -905,7 +907,7 @@ build_temporary_name()
        else {
                sprintf(temporary_name, "%s/lhXXXXXX", extract_directory);
        }
        else {
                sprintf(temporary_name, "%s/lhXXXXXX", extract_directory);
        }
-#ifdef MKSTEMP
+#ifdef HAVE_MKSTEMP
        mkstemp(temporary_name);
 #else
        mktemp(temporary_name);
        mkstemp(temporary_name);
 #else
        mktemp(temporary_name);
@@ -918,7 +920,7 @@ build_temporary_name()
                if (*p == '/')
                        s = p;
        strcpy((s ? s + 1 : temporary_name), "lhXXXXXX");
                if (*p == '/')
                        s = p;
        strcpy((s ? s + 1 : temporary_name), "lhXXXXXX");
-#ifdef MKSTEMP
+#ifdef HAVE_MKSTEMP
        mkstemp(temporary_name);
 #else
        mktemp(temporary_name);
        mkstemp(temporary_name);
 #else
        mktemp(temporary_name);