From: ShadowFlare Date: Wed, 16 Jan 2013 23:27:13 +0000 (-0700) Subject: Provide definitions for the tchar macros when not compiling on Windows X-Git-Url: https://sfsrealm.hopto.org/projects/gitweb.cgi?a=commitdiff_plain;p=CwadLib.git Provide definitions for the tchar macros when not compiling on Windows --- diff --git a/CwadLib.cpp b/CwadLib.cpp index a62bc60..b06eea3 100644 --- a/CwadLib.cpp +++ b/CwadLib.cpp @@ -89,6 +89,12 @@ void CWadListFilesInternal(void *hCWAD); unsigned long CWadFindHeaderAndSize(FILE *hFile, unsigned long *pnCwadEnd); void CWadDecryptData(UInt8 *pBuffer, unsigned long nBufferLength); +#ifndef _WIN32 +#define _T(x) x +#define _tfopen fopen +#define _tcsdup strdup +#endif + void * CWadOpenArchive(const TCHAR *pszFileName) { if (!pszFileName) diff --git a/CwadLib.h b/CwadLib.h index 27c6f7b..9bb0f21 100644 --- a/CwadLib.h +++ b/CwadLib.h @@ -28,7 +28,12 @@ #ifndef CWADLIB_INCLUDED #define CWADLIB_INCLUDED +#ifdef _WIN32 #include +#else +#define TCHAR char +#endif +#include #define CWAD_INFO_NUM_FILES 0x03 //Number of files in CWAD #define CWAD_INFO_SIZE 0x05 //Size of CWAD or uncompressed file