From 7adae09897c6f17a60de9468e9e11d166ff52278 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sun, 10 Mar 2019 16:41:01 +0100 Subject: Codechange: liblzma is called liblzma, how ever strange that might be It is the only library we use that calls itself with 'lib' in the name. This might be confusing, but with the arrival of cmake a lot of these things are automated. And detection will find 'liblzma', not 'lzma', like with 'lzo', 'zlib', .. --- src/crashlog.cpp | 4 ++-- src/saveload/saveload.cpp | 6 +++--- src/textfile_gui.cpp | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/crashlog.cpp b/src/crashlog.cpp index 5aa707eb5..8fbc4d3ce 100644 --- a/src/crashlog.cpp +++ b/src/crashlog.cpp @@ -55,7 +55,7 @@ #if defined(WITH_ICU_LAYOUT) || defined(WITH_ICU_SORT) # include #endif /* WITH_ICU_SORT || WITH_ICU_LAYOUT */ -#ifdef WITH_LZMA +#ifdef WITH_LIBLZMA # include #endif #ifdef WITH_LZO @@ -254,7 +254,7 @@ char *CrashLog::LogLibraries(char *buffer, const char *last) const #endif #endif /* WITH_ICU_SORT || WITH_ICU_LAYOUT */ -#ifdef WITH_LZMA +#ifdef WITH_LIBLZMA buffer += seprintf(buffer, last, " LZMA: %s\n", lzma_version_string()); #endif diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index bff85dfc6..cd30ed859 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -2153,7 +2153,7 @@ struct ZlibSaveFilter : SaveFilter { ********** START OF LZMA CODE ************** ********************************************/ -#if defined(WITH_LZMA) +#if defined(WITH_LIBLZMA) #include /** @@ -2266,7 +2266,7 @@ struct LZMASaveFilter : SaveFilter { } }; -#endif /* WITH_LZMA */ +#endif /* WITH_LIBLZMA */ /******************************************* ************* END OF CODE ***************** @@ -2303,7 +2303,7 @@ static const SaveLoadFormat _saveload_formats[] = { #else {"zlib", TO_BE32X('OTTZ'), NULL, NULL, 0, 0, 0}, #endif -#if defined(WITH_LZMA) +#if defined(WITH_LIBLZMA) /* Level 2 compression is speed wise as fast as zlib level 6 compression (old default), but results in ~10% smaller saves. * Higher compression levels are possible, and might improve savegame size by up to 25%, but are also up to 10 times slower. * The next significant reduction in file size is at level 4, but that is already 4 times slower. Level 3 is primarily 50% diff --git a/src/textfile_gui.cpp b/src/textfile_gui.cpp index ff5226c2b..3480a2aef 100644 --- a/src/textfile_gui.cpp +++ b/src/textfile_gui.cpp @@ -25,7 +25,7 @@ #include #endif -#if defined(WITH_LZMA) +#if defined(WITH_LIBLZMA) #include #endif @@ -257,7 +257,7 @@ static void Gunzip(byte **bufp, size_t *sizep) } #endif -#if defined(WITH_LZMA) +#if defined(WITH_LIBLZMA) /** * Do an in-memory xunzip operation. This works on a .xz or (legacy) @@ -332,7 +332,7 @@ static void Xunzip(byte **bufp, size_t *sizep) if (read != filesize) return; -#if defined(WITH_ZLIB) || defined(WITH_LZMA) +#if defined(WITH_ZLIB) || defined(WITH_LIBLZMA) const char *suffix = strrchr(textfile, '.'); if (suffix == NULL) return; #endif @@ -342,7 +342,7 @@ static void Xunzip(byte **bufp, size_t *sizep) if (strcmp(suffix, ".gz") == 0) Gunzip((byte**)&this->text, &filesize); #endif -#if defined(WITH_LZMA) +#if defined(WITH_LIBLZMA) /* In-place xunzip */ if (strcmp(suffix, ".xz") == 0) Xunzip((byte**)&this->text, &filesize); #endif @@ -407,7 +407,7 @@ const char *GetTextfile(TextfileType type, Subdirectory dir, const char *filenam #if defined(WITH_ZLIB) "txt.gz", #endif -#if defined(WITH_LZMA) +#if defined(WITH_LIBLZMA) "txt.xz", #endif }; -- cgit v1.2.3-54-g00ecf