Current News Archived News Search News Discussion Forum Old Forum Install Programs More Downloads... Troubleshooting Source Code Format Specs. Misc. Information Non-SF Stuff Links Small banner for links to this site: |
diff --git a/CwadLib.cpp b/CwadLib.cpp
--- a/CwadLib.cpp
+++ b/CwadLib.cpp
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
--- a/CwadLib.h
+++ b/CwadLib.h
#ifndef CWADLIB_INCLUDED
#define CWADLIB_INCLUDED
+#ifdef _WIN32
#include <tchar.h>
+#else
+#define TCHAR char
+#endif
+#include <stdio.h>
#define CWAD_INFO_NUM_FILES 0x03 //Number of files in CWAD
#define CWAD_INFO_SIZE 0x05 //Size of CWAD or uncompressed file
|