Some minor fixes and cleanups.
This commit is contained in:
parent
c527092aed
commit
1c3d7dcc7c
|
@ -543,7 +543,7 @@ static fvoid *LZMA_openRead(dvoid *opaque, const char *name, int *fileExists)
|
|||
if ((folder->NumPackStreams != 1) || (folder->NumCoders != 1))
|
||||
{
|
||||
LZMA_fileClose(entry);
|
||||
BAIL_MACRO(ERR_LZMA_NOTIMPL, NULL);
|
||||
BAIL_MACRO(ERR_NOT_IMPLEMENTED, NULL);
|
||||
} /* if */
|
||||
|
||||
if (lzma_err(LzmaDecodeProperties(&entry->state.Properties, coder->Properties.Items, coder->Properties.Capacity)) != LZMA_RESULT_OK)
|
||||
|
|
|
@ -154,12 +154,12 @@ static const char *zlib_error_string(int rc)
|
|||
#ifndef _WIN32_WCE
|
||||
case Z_ERRNO: return(strerror(errno));
|
||||
#endif
|
||||
case Z_NEED_DICT: return(ERR_ZLIB_NEED_DICT);
|
||||
case Z_DATA_ERROR: return(ERR_ZLIB_DATA_ERROR);
|
||||
case Z_MEM_ERROR: return(ERR_ZLIB_MEMORY_ERROR);
|
||||
case Z_BUF_ERROR: return(ERR_ZLIB_BUFFER_ERROR);
|
||||
case Z_VERSION_ERROR: return(ERR_ZLIB_VERSION_ERROR);
|
||||
default: return(ERR_ZLIB_UNKNOWN_ERROR);
|
||||
case Z_NEED_DICT: return(ERR_NEED_DICT);
|
||||
case Z_DATA_ERROR: return(ERR_DATA_ERROR);
|
||||
case Z_MEM_ERROR: return(ERR_MEMORY_ERROR);
|
||||
case Z_BUF_ERROR: return(ERR_BUFFER_ERROR);
|
||||
case Z_VERSION_ERROR: return(ERR_VERSION_ERROR);
|
||||
default: return(ERR_UNKNOWN_ERROR);
|
||||
} /* switch */
|
||||
|
||||
return(NULL);
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
/* 7zAlloc.h */
|
||||
|
||||
#ifndef __7Z_ALLOC_H
|
||||
#define __7Z_ALLOC_H
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
typedef struct _ISzAlloc
|
||||
{
|
||||
void *(*Alloc)(size_t size);
|
||||
void (*Free)(void *address); /* address can be 0 */
|
||||
} ISzAlloc;
|
||||
|
||||
void *SzAlloc(size_t size);
|
||||
void SzFree(void *address);
|
||||
|
||||
void *SzAllocTemp(size_t size);
|
||||
void SzFreeTemp(void *address);
|
||||
|
||||
#endif
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
/* 7zDecode.c */
|
||||
|
||||
#include "7zDecode.h"
|
||||
#include "LzmaStateDecode.h" // NOTE : Modified to use LzmaStateDecode(.c,.h) instead of LzmaDecode(.c,.h) and hardcoded _SZ_ONE_DIRECTORY behaviour
|
||||
#include "LzmaStateDecode.h" /* NOTE : Modified to use LzmaStateDecode(.c,.h) instead of LzmaDecode(.c,.h) and hardcoded _SZ_ONE_DIRECTORY behaviour */
|
||||
|
||||
CMethodID k_Copy = { { 0x0 }, 1 };
|
||||
CMethodID k_LZMA = { { 0x3, 0x1, 0x1 }, 3 };
|
||||
|
@ -131,7 +131,7 @@ SZ_RESULT SzDecode(const CFileSize *packSizes, const CFolder *folder,
|
|||
inBuffer, (size_t)inSize, &inProcessed,
|
||||
#endif
|
||||
outBuffer, (size_t)outSize, &outSizeProcessedLoc,
|
||||
1); // NOTE : Added by Dennis Schridde to make SzDecode be compatible with LzmaStateDecode(.c,.h)
|
||||
1); /* NOTE : Added by Dennis Schridde to make SzDecode be compatible with LzmaStateDecode(.c,.h) */
|
||||
*outSizeProcessed = (size_t)outSizeProcessedLoc;
|
||||
allocMain->Free(state.Probs);
|
||||
#ifdef _LZMA_OUT_READ
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
// NOTE : Hardcoded _LZMA_SYSTEM_SIZE_T behaviour by Dennis Schridde
|
||||
/* NOTE : Hardcoded _LZMA_SYSTEM_SIZE_T behaviour by Dennis Schridde */
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef _LZMA_PROB32
|
||||
|
|
|
@ -56,8 +56,8 @@ extern "C" {
|
|||
#define MVL_ARCHIVE_DESCRIPTION "Descent II Movielib format"
|
||||
#define QPAK_ARCHIVE_DESCRIPTION "Quake I/II format"
|
||||
#define ZIP_ARCHIVE_DESCRIPTION "PkZip/WinZip/Info-Zip compatible"
|
||||
#define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format"
|
||||
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format"
|
||||
#define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format"
|
||||
|
||||
#define ERR_IS_INITIALIZED "Already initialized"
|
||||
#define ERR_NOT_INITIALIZED "Not initialized"
|
||||
|
@ -155,7 +155,8 @@ extern "C" {
|
|||
#define MVL_ARCHIVE_DESCRIPTION "Descent II Movielib format"
|
||||
#define QPAK_ARCHIVE_DESCRIPTION "Quake I/II format"
|
||||
#define ZIP_ARCHIVE_DESCRIPTION "PkZip/WinZip/Info-Zip kompatibel"
|
||||
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format"
|
||||
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format" /* !!! FIXME: translate this line if needed */
|
||||
#define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
|
||||
|
||||
#define ERR_IS_INITIALIZED "Bereits initialisiert"
|
||||
#define ERR_NOT_INITIALIZED "Nicht initialisiert"
|
||||
|
@ -252,7 +253,8 @@ extern "C" {
|
|||
#define HOG_ARCHIVE_DESCRIPTION "Descent I/II HOG file format"
|
||||
#define MVL_ARCHIVE_DESCRIPTION "Descent II Movielib format"
|
||||
#define ZIP_ARCHIVE_DESCRIPTION "PkZip/WinZip/Info-Zip ÓÏ×ÍÅÓÔÉÍÙÊ"
|
||||
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format" // !!! FIXME: translate this line if needed
|
||||
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format" /* !!! FIXME: translate this line if needed */
|
||||
#define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
|
||||
|
||||
#define ERR_IS_INITIALIZED "õÖÅ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÎ"
|
||||
#define ERR_NOT_INITIALIZED "îÅ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÎ"
|
||||
|
@ -349,7 +351,8 @@ extern "C" {
|
|||
#define HOG_ARCHIVE_DESCRIPTION "Descent I/II HOG file format"
|
||||
#define MVL_ARCHIVE_DESCRIPTION "Descent II Movielib format"
|
||||
#define ZIP_ARCHIVE_DESCRIPTION "PkZip/WinZip/Info-Zip ñîâìåñòèìûé"
|
||||
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format" // FIXME: translate this line if needed
|
||||
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format" /* !!! FIXME: translate this line if needed */
|
||||
#define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
|
||||
|
||||
#define ERR_IS_INITIALIZED "Óæå èíèöèàëèçèðîâàí"
|
||||
#define ERR_NOT_INITIALIZED "Íå èíèöèàëèçèðîâàí"
|
||||
|
@ -446,7 +449,8 @@ extern "C" {
|
|||
#define HOG_ARCHIVE_DESCRIPTION "Descent I/II HOG file format"
|
||||
#define MVL_ARCHIVE_DESCRIPTION "Descent II Movielib format"
|
||||
#define ZIP_ARCHIVE_DESCRIPTION "PkZip/WinZip/Info-Zip ᮢ¬¥á⨬ë©"
|
||||
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format" // FIXME: Translate this line if needed
|
||||
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format" /* !!! FIXME: translate this line if needed */
|
||||
#define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
|
||||
|
||||
#define ERR_IS_INITIALIZED "“¦¥ ¨¨æ¨ «¨§¨à®¢ "
|
||||
#define ERR_NOT_INITIALIZED "<22>¥ ¨¨æ¨ «¨§¨à®¢ "
|
||||
|
@ -543,7 +547,8 @@ extern "C" {
|
|||
#define HOG_ARCHIVE_DESCRIPTION "Descent I/II HOG file format"
|
||||
#define MVL_ARCHIVE_DESCRIPTION "Descent II Movielib format"
|
||||
#define ZIP_ARCHIVE_DESCRIPTION "PkZip/WinZip/Info-Zip áÞÒÜÕáâØÜëÙ"
|
||||
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format" // FIXME: translate this line if needed
|
||||
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format" /* !!! FIXME: translate this line if needed */
|
||||
#define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
|
||||
|
||||
#define ERR_IS_INITIALIZED "ÃÖÕ ØÝØæØÐÛØ×ØàÞÒÐÝ"
|
||||
#define ERR_NOT_INITIALIZED "½Õ ØÝØæØÐÛØ×ØàÞÒÐÝ"
|
||||
|
@ -643,6 +648,7 @@ extern "C" {
|
|||
#define QPAK_ARCHIVE_DESCRIPTION "Quake I/II format"
|
||||
#define ZIP_ARCHIVE_DESCRIPTION "Compatible PkZip/WinZip/Info-Zip"
|
||||
#define WAD_ARCHIVE_DESCRIPTION "Format WAD du moteur DOOM"
|
||||
#define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
|
||||
|
||||
#define ERR_IS_INITIALIZED "Déjà initialisé"
|
||||
#define ERR_NOT_INITIALIZED "Non initialisé"
|
||||
|
@ -741,6 +747,8 @@ extern "C" {
|
|||
#define QPAK_ARCHIVE_DESCRIPTION "Formato Quake I/II"
|
||||
#define ZIP_ARCHIVE_DESCRIPTION "Formato compatível PkZip/WinZip/Info-Zip"
|
||||
#define WAD_ARCHIVE_DESCRIPTION "Formato WAD do engine DOOM"
|
||||
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format" /* !!! FIXME: translate this line if needed */
|
||||
#define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
|
||||
|
||||
#define ERR_IS_INITIALIZED "Já inicializado"
|
||||
#define ERR_NOT_INITIALIZED "Não inicializado"
|
||||
|
@ -838,6 +846,8 @@ extern "C" {
|
|||
#define MVL_ARCHIVE_DESCRIPTION "Formato Descent II Movielib"
|
||||
#define QPAK_ARCHIVE_DESCRIPTION "Formato Quake I/II"
|
||||
#define ZIP_ARCHIVE_DESCRIPTION "Compatible con PkZip/WinZip/Info-Zip"
|
||||
#define WAD_ARCHIVE_DESCRIPTION "DOOM engine format" /* !!! FIXME: translate this line if needed */
|
||||
#define LZMA_ARCHIVE_DESCRIPTION "LZMA (7zip) format" /* !!! FIXME: translate this line if needed */
|
||||
|
||||
#define ERR_IS_INITIALIZED "Ya estaba inicializado"
|
||||
#define ERR_NOT_INITIALIZED "No está inicializado"
|
||||
|
|
Loading…
Reference in New Issue