--- a/src/MACLib/APEDecompress.cpp 2004-05-12 07:56:49.000000000 +0200 +++ b/src/MACLib/APEDecompress.cpp 2026-10-19 16:51:01.198530668 +0200 @@ -23,7 +23,7 @@ CAPEDecompress::CAPEDecompress(int * pEr } // get format information - GetInfo(APE_INFO_WAVEFORMATEX, (int) &m_wfeInput); + GetInfo(APE_INFO_WAVEFORMATEX, (intptr_t) &m_wfeInput); m_nBlockAlign = GetInfo(APE_INFO_BLOCK_ALIGN); // initialize other stuff @@ -367,9 +367,9 @@ int CAPEDecompress::SeekToFrame(int nFra /***************************************************************************************** Get information from the decompressor *****************************************************************************************/ -int CAPEDecompress::GetInfo(APE_DECOMPRESS_FIELDS Field, int nParam1, int nParam2) +intptr_t CAPEDecompress::GetInfo(APE_DECOMPRESS_FIELDS Field, intptr_t nParam1, intptr_t nParam2) { - int nRetVal = 0; + intptr_t nRetVal = 0; BOOL bHandled = TRUE; switch (Field) @@ -452,7 +452,7 @@ int CAPEDecompress::GetInfo(APE_DECOMPRE } else { - WAVEFORMATEX wfeFormat; GetInfo(APE_INFO_WAVEFORMATEX, (int) &wfeFormat, 0); + WAVEFORMATEX wfeFormat; GetInfo(APE_INFO_WAVEFORMATEX, (intptr_t) &wfeFormat, 0); WAVE_HEADER WAVHeader; FillWaveHeader(&WAVHeader, (m_nFinishBlock - m_nStartBlock) * GetInfo(APE_INFO_BLOCK_ALIGN), &wfeFormat, 0); --- a/src/MACLib/APEDecompress.h 2004-05-12 06:35:56.000000000 +0200 +++ b/src/MACLib/APEDecompress.h 2026-10-19 16:50:45.192915433 +0200 @@ -22,7 +22,7 @@ public: int GetData(char * pBuffer, int nBlocks, int * pBlocksRetrieved); int Seek(int nBlockOffset); - int GetInfo(APE_DECOMPRESS_FIELDS Field, int nParam1 = 0, int nParam2 = 0); + intptr_t GetInfo(APE_DECOMPRESS_FIELDS Field, intptr_t nParam1 = 0, intptr_t nParam2 = 0); protected: --- a/src/MACLib/APEInfo.cpp 2004-05-12 08:07:13.000000000 +0200 +++ b/src/MACLib/APEInfo.cpp 2026-10-19 16:51:01.200471281 +0200 @@ -129,9 +129,9 @@ int CAPEInfo::GetFileInformation(BOOL bG /***************************************************************************************** Primary query function *****************************************************************************************/ -int CAPEInfo::GetInfo(APE_DECOMPRESS_FIELDS Field, int nParam1, int nParam2) +intptr_t CAPEInfo::GetInfo(APE_DECOMPRESS_FIELDS Field, intptr_t nParam1, intptr_t nParam2) { - int nRetVal = -1; + intptr_t nRetVal = -1; switch (Field) { @@ -254,7 +254,7 @@ int CAPEInfo::GetInfo(APE_DECOMPRESS_FIE } else { - WAVEFORMATEX wfeFormat; GetInfo(APE_INFO_WAVEFORMATEX, (int) &wfeFormat, 0); + WAVEFORMATEX wfeFormat; GetInfo(APE_INFO_WAVEFORMATEX, (intptr_t) &wfeFormat, 0); WAVE_HEADER WAVHeader; FillWaveHeader(&WAVHeader, m_APEFileInfo.nWAVDataBytes, &wfeFormat, m_APEFileInfo.nWAVTerminatingBytes); memcpy(pBuffer, &WAVHeader, sizeof(WAVE_HEADER)); @@ -311,7 +311,7 @@ int CAPEInfo::GetInfo(APE_DECOMPRESS_FIE break; } case APE_INFO_IO_SOURCE: - nRetVal = (int) m_spIO.GetPtr(); + nRetVal = (intptr_t) m_spIO.GetPtr(); break; case APE_INFO_FRAME_BYTES: { @@ -350,10 +350,10 @@ int CAPEInfo::GetInfo(APE_DECOMPRESS_FIE break; } case APE_INFO_TAG: - nRetVal = (int) m_spAPETag.GetPtr(); + nRetVal = (intptr_t) m_spAPETag.GetPtr(); break; case APE_INTERNAL_INFO: - nRetVal = (int) &m_APEFileInfo; + nRetVal = (intptr_t) &m_APEFileInfo; break; default: break; --- a/src/MACLib/APEInfo.h 2004-05-12 06:35:56.000000000 +0200 +++ b/src/MACLib/APEInfo.h 2026-10-19 16:50:45.193159671 +0200 @@ -82,7 +82,7 @@ public: virtual ~CAPEInfo(); // query for information - int GetInfo(APE_DECOMPRESS_FIELDS Field, int nParam1 = 0, int nParam2 = 0); + intptr_t GetInfo(APE_DECOMPRESS_FIELDS Field, intptr_t nParam1 = 0, intptr_t nParam2 = 0); private: --- a/src/MACLib/APELink.cpp 2004-05-13 05:33:20.000000000 +0200 +++ b/src/MACLib/APELink.cpp 2026-10-19 16:52:31.762003054 +0200 @@ -63,10 +63,10 @@ void CAPELink::ParseData(const char * pD if (pData != NULL) { // parse out the information - char * pHeader = strstr(pData, APE_LINK_HEADER); - char * pImageFile = strstr(pData, APE_LINK_IMAGE_FILE_TAG); - char * pStartBlock = strstr(pData, APE_LINK_START_BLOCK_TAG); - char * pFinishBlock = strstr(pData, APE_LINK_FINISH_BLOCK_TAG); + const char * pHeader = strstr(pData, APE_LINK_HEADER); + const char * pImageFile = strstr(pData, APE_LINK_IMAGE_FILE_TAG); + const char * pStartBlock = strstr(pData, APE_LINK_START_BLOCK_TAG); + const char * pFinishBlock = strstr(pData, APE_LINK_FINISH_BLOCK_TAG); if (pHeader && pImageFile && pStartBlock && pFinishBlock) { @@ -81,7 +81,7 @@ void CAPELink::ParseData(const char * pD // get the path char cImageFile[MAX_PATH + 1]; int nIndex = 0; - char * pImageCharacter = &pImageFile[strlen(APE_LINK_IMAGE_FILE_TAG)]; + const char * pImageCharacter = &pImageFile[strlen(APE_LINK_IMAGE_FILE_TAG)]; while ((*pImageCharacter != 0) && (*pImageCharacter != '\r') && (*pImageCharacter != '\n')) cImageFile[nIndex++] = *pImageCharacter++; cImageFile[nIndex] = 0; --- a/src/MACLib/APESimple.cpp 2004-05-12 11:39:09.000000000 +0200 +++ b/src/MACLib/APESimple.cpp 2026-10-19 16:51:47.358966547 +0200 @@ -291,14 +291,14 @@ int DecompressCore(const str_utf16 * pIn if (spAPEDecompress == NULL || nFunctionRetVal != ERROR_SUCCESS) throw(nFunctionRetVal); // get the input format - THROW_ON_ERROR(spAPEDecompress->GetInfo(APE_INFO_WAVEFORMATEX, (int) &wfeInput)) + THROW_ON_ERROR(spAPEDecompress->GetInfo(APE_INFO_WAVEFORMATEX, (intptr_t) &wfeInput)) // allocate space for the header spTempBuffer.Assign(new unsigned char [spAPEDecompress->GetInfo(APE_INFO_WAV_HEADER_BYTES)], TRUE); if (spTempBuffer == NULL) throw(ERROR_INSUFFICIENT_MEMORY); // get the header - THROW_ON_ERROR(spAPEDecompress->GetInfo(APE_INFO_WAV_HEADER_DATA, (int) spTempBuffer.GetPtr(), spAPEDecompress->GetInfo(APE_INFO_WAV_HEADER_BYTES))); + THROW_ON_ERROR(spAPEDecompress->GetInfo(APE_INFO_WAV_HEADER_DATA, (intptr_t) spTempBuffer.GetPtr(), spAPEDecompress->GetInfo(APE_INFO_WAV_HEADER_BYTES))); // initialize the output if (nOutputMode == UNMAC_DECODER_OUTPUT_WAV) @@ -370,7 +370,7 @@ int DecompressCore(const str_utf16 * pIn { spTempBuffer.Assign(new unsigned char[spAPEDecompress->GetInfo(APE_INFO_WAV_TERMINATING_BYTES)], TRUE); if (spTempBuffer == NULL) throw(ERROR_INSUFFICIENT_MEMORY); - THROW_ON_ERROR(spAPEDecompress->GetInfo(APE_INFO_WAV_TERMINATING_DATA, (int) spTempBuffer.GetPtr(), spAPEDecompress->GetInfo(APE_INFO_WAV_TERMINATING_BYTES))) + THROW_ON_ERROR(spAPEDecompress->GetInfo(APE_INFO_WAV_TERMINATING_DATA, (intptr_t) spTempBuffer.GetPtr(), spAPEDecompress->GetInfo(APE_INFO_WAV_TERMINATING_BYTES))) unsigned int nBytesToWrite = spAPEDecompress->GetInfo(APE_INFO_WAV_TERMINATING_BYTES); unsigned int nBytesWritten = 0; @@ -392,7 +392,7 @@ int DecompressCore(const str_utf16 * pIn spTempBuffer.Assign(new unsigned char[nTerminatingBytes], TRUE); if (spTempBuffer == NULL) throw(ERROR_INSUFFICIENT_MEMORY); - THROW_ON_ERROR(spAPEDecompress->GetInfo(APE_INFO_WAV_TERMINATING_DATA, (int) spTempBuffer.GetPtr(), nTerminatingBytes)) + THROW_ON_ERROR(spAPEDecompress->GetInfo(APE_INFO_WAV_TERMINATING_DATA, (intptr_t) spTempBuffer.GetPtr(), nTerminatingBytes)) if (bHasTag) { --- a/src/MACLib/MACLib.h 2004-05-12 07:16:50.000000000 +0200 +++ b/src/MACLib/MACLib.h 2026-10-19 16:50:45.193262240 +0200 @@ -259,7 +259,7 @@ public: // int nParam2 // generic parameter... usage is listed in APE_DECOMPRESS_FIELDS ////////////////////////////////////////////////////////////////////////////////////////////// - virtual int GetInfo(APE_DECOMPRESS_FIELDS Field, int nParam1 = 0, int nParam2 = 0) = 0; + virtual intptr_t GetInfo(APE_DECOMPRESS_FIELDS Field, intptr_t nParam1 = 0, intptr_t nParam2 = 0) = 0; }; /************************************************************************************************* --- a/src/MACLib/MD5.cpp 2004-05-12 08:54:51.000000000 +0200 +++ b/src/MACLib/MD5.cpp 2026-10-19 16:51:47.360621552 +0200 @@ -100,7 +100,7 @@ __MD5Transform ( uint32_t state [ CopyToLittleEndian (tempBuffer, in, 16); x = tempBuffer; #else - if ( (unsigned int)in & 3 ) { + if ( (uintptr_t)in & 3 ) { memcpy ( tempBuffer, in, 64 ); x = tempBuffer; } --- a/src/MACLib/Old/APEDecompressOld.cpp 2004-05-12 07:24:06.000000000 +0200 +++ b/src/MACLib/Old/APEDecompressOld.cpp 2026-10-19 16:51:01.196051801 +0200 @@ -165,9 +165,9 @@ int CAPEDecompressOld::Seek(int nBlockOf return ERROR_SUCCESS; } -int CAPEDecompressOld::GetInfo(APE_DECOMPRESS_FIELDS Field, int nParam1, int nParam2) +intptr_t CAPEDecompressOld::GetInfo(APE_DECOMPRESS_FIELDS Field, intptr_t nParam1, intptr_t nParam2) { - int nRetVal = 0; + intptr_t nRetVal = 0; BOOL bHandled = TRUE; switch (Field) @@ -250,7 +250,7 @@ int CAPEDecompressOld::GetInfo(APE_DECOM } else { - WAVEFORMATEX wfeFormat; GetInfo(APE_INFO_WAVEFORMATEX, (int) &wfeFormat, 0); + WAVEFORMATEX wfeFormat; GetInfo(APE_INFO_WAVEFORMATEX, (intptr_t) &wfeFormat, 0); WAVE_HEADER WAVHeader; FillWaveHeader(&WAVHeader, (m_nFinishBlock - m_nStartBlock) * GetInfo(APE_INFO_BLOCK_ALIGN), &wfeFormat, 0); --- a/src/MACLib/Old/APEDecompressOld.h 2004-05-12 06:35:57.000000000 +0200 +++ b/src/MACLib/Old/APEDecompressOld.h 2026-10-19 16:50:45.193735065 +0200 @@ -13,7 +13,7 @@ public: int GetData(char * pBuffer, int nBlocks, int * pBlocksRetrieved); int Seek(int nBlockOffset); - int GetInfo(APE_DECOMPRESS_FIELDS Field, int nParam1 = 0, int nParam2 = 0); + intptr_t GetInfo(APE_DECOMPRESS_FIELDS Field, intptr_t nParam1 = 0, intptr_t nParam2 = 0); protected: --- a/src/MACLib/Old/UnMAC.cpp 2004-05-12 06:35:57.000000000 +0200 +++ b/src/MACLib/Old/UnMAC.cpp 2026-10-19 16:50:45.194050173 +0200 @@ -78,7 +78,7 @@ int CUnMAC::Initialize(IAPEDecompress *p // set the initialized flag to TRUE m_bInitialized = TRUE; - m_pAPEDecompress->GetInfo(APE_INFO_WAVEFORMATEX, (int) &m_wfeInput); + m_pAPEDecompress->GetInfo(APE_INFO_WAVEFORMATEX, (intptr_t) &m_wfeInput); // return a successful value return ERROR_SUCCESS; @@ -197,7 +197,7 @@ int CUnMAC::DecompressFrameOld(unsigned { m_pAPEDecompressCore->GenerateDecodedArrays(nBlocks, nSpecialCodes, FrameIndex, CPULoadBalancingFactor); - WAVEFORMATEX WaveFormatEx; m_pAPEDecompress->GetInfo(APE_INFO_WAVEFORMATEX, (int) &WaveFormatEx); + WAVEFORMATEX WaveFormatEx; m_pAPEDecompress->GetInfo(APE_INFO_WAVEFORMATEX, (intptr_t) &WaveFormatEx); m_pPrepare->UnprepareOld(m_pAPEDecompressCore->GetDataX(), m_pAPEDecompressCore->GetDataY(), nBlocks, &WaveFormatEx, pOutputData, (unsigned int *) &CRC, (int *) &nSpecialCodes, m_pAPEDecompress->GetInfo(APE_INFO_FILE_VERSION)); } @@ -205,7 +205,7 @@ int CUnMAC::DecompressFrameOld(unsigned { m_pAPEDecompressCore->GenerateDecodedArrays(nBlocks, nSpecialCodes, FrameIndex, CPULoadBalancingFactor); - WAVEFORMATEX WaveFormatEx; m_pAPEDecompress->GetInfo(APE_INFO_WAVEFORMATEX, (int) &WaveFormatEx); + WAVEFORMATEX WaveFormatEx; m_pAPEDecompress->GetInfo(APE_INFO_WAVEFORMATEX, (intptr_t) &WaveFormatEx); m_pPrepare->UnprepareOld(m_pAPEDecompressCore->GetDataX(), NULL, nBlocks, &WaveFormatEx, pOutputData, (unsigned int *) &CRC, (int *) &nSpecialCodes, m_pAPEDecompress->GetInfo(APE_INFO_FILE_VERSION)); } --- a/src/Shared/All.h 2004-05-12 07:11:31.000000000 +0200 +++ b/src/Shared/All.h 2026-10-19 16:51:07.850300976 +0200 @@ -33,14 +33,19 @@ Global includes #include #include #include - #include "NoWindows.h" #endif +#include #include #include #include #include #include + +// after the system headers, libstdc++ c++config.h undefines min and max +#ifndef _WIN32 + #include "NoWindows.h" +#endif #include "SmartPtr.h" /*****************************************************************************************