$OpenBSD$ --- source/Irrlicht/CZipReader.cpp.orig Sun Dec 26 20:30:20 2010 +++ source/Irrlicht/CZipReader.cpp Sun Dec 26 20:30:23 2010 @@ -522,7 +522,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index) //99 - AES encryption, WinZip 9 const SZipFileEntry &e = FileInfo[Files[index].ID]; - wchar_t buf[64]; + char buf[64]; s16 actualCompressionMethod=e.header.CompressionMethod; IReadFile* decrypted=0; u8* decryptedBuf=0; @@ -621,7 +621,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index) c8* pBuf = new c8[ uncompressedSize ]; if (!pBuf) { - swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); + snprintf ( buf, 64, (const char*)"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); os::Printer::log( buf, ELL_ERROR); if (decrypted) decrypted->drop(); @@ -634,7 +634,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index) pcData = new u8[decryptedSize]; if (!pcData) { - swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); + snprintf ( buf, 64, (const char*)"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); os::Printer::log( buf, ELL_ERROR); delete [] pBuf; return 0; @@ -675,7 +675,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index) if (err != Z_OK) { - swprintf ( buf, 64, L"Error decompressing %s", Files[index].FullName.c_str() ); + snprintf ( buf, 64, (const char *)"Error decompressing %s", Files[index].FullName.c_str() ); os::Printer::log( buf, ELL_ERROR); delete [] pBuf; return 0; @@ -695,7 +695,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index) c8* pBuf = new c8[ uncompressedSize ]; if (!pBuf) { - swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); + snprintf ( buf, 64, (const char *)"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); os::Printer::log( buf, ELL_ERROR); if (decrypted) decrypted->drop(); @@ -708,7 +708,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index) pcData = new u8[decryptedSize]; if (!pcData) { - swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); + snprintf ( buf, 64, (const char *)"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); os::Printer::log( buf, ELL_ERROR); delete [] pBuf; return 0; @@ -746,7 +746,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index) if (err != BZ_OK) { - swprintf ( buf, 64, L"Error decompressing %s", Files[index].FullName.c_str() ); + snprintf ( buf, 64, (const char *)"Error decompressing %s", Files[index].FullName.c_str() ); os::Printer::log( buf, ELL_ERROR); delete [] pBuf; return 0; @@ -767,7 +767,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index) c8* pBuf = new c8[ uncompressedSize ]; if (!pBuf) { - swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); + snprintf ( buf, 64, (const char *)"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); os::Printer::log( buf, ELL_ERROR); if (decrypted) decrypted->drop(); @@ -780,7 +780,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index) pcData = new u8[decryptedSize]; if (!pcData) { - swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); + snprintf ( buf, 64, (const char *)"Not enough memory for decompressing %s", Files[index].FullName.c_str() ); os::Printer::log( buf, ELL_ERROR); delete [] pBuf; return 0; @@ -807,7 +807,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index) if (err != SZ_OK) { - swprintf ( buf, 64, L"Error decompressing %s", Files[index].FullName.c_str() ); + snprintf ( buf, 64, (const char *)"Error decompressing %s", Files[index].FullName.c_str() ); os::Printer::log( buf, ELL_ERROR); delete [] pBuf; return 0; @@ -825,7 +825,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index) os::Printer::log("Decryption support not enabled. File cannot be read.", ELL_ERROR); return 0; default: - swprintf ( buf, 64, L"file has unsupported compression method. %s", Files[index].FullName.c_str() ); + snprintf ( buf, 64, (const char *)"file has unsupported compression method. %s", Files[index].FullName.c_str() ); os::Printer::log( buf, ELL_ERROR); return 0; };