mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-06 19:14:56 -06:00
9.18
This commit is contained in:
committed by
Kornel Lesiński
parent
2eb60a0598
commit
c65230d858
@@ -1,16 +1,15 @@
|
||||
/* 7zMain.c - Test application for 7z Decoder
|
||||
2010-09-20 : Igor Pavlov : Public domain */
|
||||
2010-10-28 : Igor Pavlov : Public domain */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../../7z.h"
|
||||
#include "../../7zAlloc.h"
|
||||
#include "../../7zCrc.h"
|
||||
#include "../../7zFile.h"
|
||||
#include "../../7zVersion.h"
|
||||
|
||||
#include "7zAlloc.h"
|
||||
|
||||
#ifndef USE_WINDOWS_FILE
|
||||
/* for mkdir */
|
||||
#ifdef _WIN32
|
||||
@@ -21,12 +20,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define CHAR_PATH_SEPARATOR '\\'
|
||||
#else
|
||||
#define CHAR_PATH_SEPARATOR '/'
|
||||
#endif
|
||||
|
||||
static ISzAlloc g_Alloc = { SzAlloc, SzFree };
|
||||
|
||||
static int Buf_EnsureSize(CBuf *dest, size_t size)
|
||||
@@ -117,7 +110,14 @@ static SRes Utf16_To_Char(CBuf *buf, const UInt16 *s, int fileMode)
|
||||
{
|
||||
char defaultChar = '_';
|
||||
BOOL defUsed;
|
||||
int numChars = WideCharToMultiByte(fileMode ? (AreFileApisANSI() ? CP_ACP : CP_OEMCP) : CP_OEMCP,
|
||||
int numChars = WideCharToMultiByte(fileMode ?
|
||||
(
|
||||
#ifdef UNDER_CE
|
||||
CP_ACP
|
||||
#else
|
||||
AreFileApisANSI() ? CP_ACP : CP_OEMCP
|
||||
#endif
|
||||
) : CP_OEMCP,
|
||||
0, s, len, (char *)buf->data, size, &defaultChar, &defUsed);
|
||||
if (numChars == 0 || numChars >= size)
|
||||
return SZ_ERROR_FAIL;
|
||||
|
||||
Reference in New Issue
Block a user