[arch-commits] Commit in mac/repos/community-x86_64 (4 files)

Jakob Gruber schuay at archlinux.org
Mon May 13 19:28:33 UTC 2019


    Date: Monday, May 13, 2019 @ 19:28:33
  Author: schuay
Revision: 467167

archrelease: copy trunk to community-x86_64

Added:
  mac/repos/community-x86_64/PKGBUILD
    (from rev 467166, mac/trunk/PKGBUILD)
  mac/repos/community-x86_64/mac-gcc6.patch
    (from rev 467166, mac/trunk/mac-gcc6.patch)
Deleted:
  mac/repos/community-x86_64/PKGBUILD
  mac/repos/community-x86_64/mac-gcc6.patch

----------------+
 PKGBUILD       |   69 ++++-----
 mac-gcc6.patch |  380 +++++++++++++++++++++++++++----------------------------
 2 files changed, 223 insertions(+), 226 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2019-05-13 19:28:23 UTC (rev 467166)
+++ PKGBUILD	2019-05-13 19:28:33 UTC (rev 467167)
@@ -1,36 +0,0 @@
-# Maintainer: schuay <jakob.gruber at gmail.com>
-# Contributor: stonecrest <stonecrest[at]gmail[dot]com>
-
-pkgname=mac
-pkgver='3.99u4b5'
-_pkgver='3.99-u4-b5-s7'
-pkgrel=9
-pkgdesc='APE codec and decompressor'
-arch=('x86_64')
-url='http://etree.org/shnutils/shntool/'
-license=('custom')
-depends=('gcc-libs')
-makedepends=('yasm')
-_baseurl='http://etree.org/shnutils/shntool/support/formats/ape/unix'
-source=("${_baseurl}/${_pkgver}/${pkgname}-${_pkgver}.tar.gz" mac-gcc6.patch)
-md5sums=('74df3c96476636387ddd12255b03bebe'
-         'd3e9814f519b523a5dd86f8f86e3a69c')
-
-prepare() {
-  cd $pkgname-$_pkgver
-  patch -p1 -i ../mac-gcc6.patch # Fix build with GCC 6 (Gentoo)
-}
-
-build() {
-  cd "${srcdir}"/${pkgname}-${_pkgver}
-
-  CXXFLAGS="-DSHNTOOL" ./configure --prefix=/usr --enable-assembly=yes 
-  CXXFLAGS="-DSHNTOOL" make
-}
-package() {
-  cd "${srcdir}"/${pkgname}-${_pkgver}
-
-  make DESTDIR="${pkgdir}" install
-  install -Dm644 src/License.htm \
-      "${pkgdir}"/usr/share/licenses/${pkgname}/license.htm
-}

Copied: mac/repos/community-x86_64/PKGBUILD (from rev 467166, mac/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2019-05-13 19:28:33 UTC (rev 467167)
@@ -0,0 +1,33 @@
+# Maintainer: schuay <jakob.gruber at gmail.com>
+# Contributor: stonecrest <stonecrest[at]gmail[dot]com>
+# Contributor: Chocobo1 <chocobo1 AT archlinux DOT net>
+
+pkgname=mac
+pkgver=4.71
+pkgrel=1
+pkgdesc='APE codec and decompressor'
+arch=('x86_64')
+url='https://www.monkeysaudio.com/index.html'
+license=('custom')
+depends=('gcc-libs')
+makedepends=('curl')
+source=("https://monkeysaudio.com/files/MAC_SDK_${pkgver//.}.zip")
+sha256sums=('557adc2ec6865bfb0ba6c26d461f4c6172f1d542f71b3cf47f0cef52f99ac664')
+
+prepare() {
+  cd "${srcdir}"
+  curl --remote-name "https://www.monkeysaudio.com/license.html"
+  ln -s "${srcdir}/Source/Projects/NonWindows/Makefile" "Makefile"
+}
+
+build() {
+  cd "${srcdir}"
+  make
+}
+
+package() {
+  cd "${srcdir}"
+  make DESTDIR="${pkgdir}" prefix="/usr" install
+  install -Dm644 license.html \
+      "${pkgdir}"/usr/share/licenses/${pkgname}/license.htm
+}

Deleted: mac-gcc6.patch
===================================================================
--- mac-gcc6.patch	2019-05-13 19:28:23 UTC (rev 467166)
+++ mac-gcc6.patch	2019-05-13 19:28:33 UTC (rev 467167)
@@ -1,190 +0,0 @@
-diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/APECompress.cpp monkeys-audio-4.11-u4-b5-s7/src/MACLib/APECompress.cpp
---- monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/APECompress.cpp	2017-03-04 17:07:21.952460418 +0100
-+++ monkeys-audio-4.11-u4-b5-s7/src/MACLib/APECompress.cpp	2017-03-04 17:11:58.607449387 +0100
-@@ -117,7 +117,7 @@
-             return ERROR_UNDEFINED;
-         
-         // calculate how many bytes to copy and add that much to the buffer
--        int nBytesToProcess = min(nBytesAvailable, nBytes - nBytesDone);
-+        int nBytesToProcess = min_macro(nBytesAvailable, nBytes - nBytesDone);
-         memcpy(pBuffer, &pData[nBytesDone], nBytesToProcess);
-                         
-         // unlock the buffer (fail if not successful)
-@@ -162,7 +162,7 @@
-         
-         while ((m_nBufferTail - m_nBufferHead) >= nThreshold)
-         {
--            int nFrameBytes = min(m_spAPECompressCreate->GetFullFrameBytes(), m_nBufferTail - m_nBufferHead);
-+            int nFrameBytes = min_macro(m_spAPECompressCreate->GetFullFrameBytes(), m_nBufferTail - m_nBufferHead);
-             
-             if (nFrameBytes == 0)
-                 break;
-diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/APEDecompress.cpp monkeys-audio-4.11-u4-b5-s7/src/MACLib/APEDecompress.cpp
---- monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/APEDecompress.cpp	2017-03-04 17:07:21.952460418 +0100
-+++ monkeys-audio-4.11-u4-b5-s7/src/MACLib/APEDecompress.cpp	2017-03-04 17:14:55.455442336 +0100
-@@ -35,8 +35,8 @@
-     m_bErrorDecodingCurrentFrame = FALSE;
- 
-     // set the "real" start and finish blocks
--    m_nStartBlock = (nStartBlock < 0) ? 0 : min(nStartBlock, GetInfo(APE_INFO_TOTAL_BLOCKS));
--    m_nFinishBlock = (nFinishBlock < 0) ? GetInfo(APE_INFO_TOTAL_BLOCKS) : min(nFinishBlock, GetInfo(APE_INFO_TOTAL_BLOCKS));
-+    m_nStartBlock = (nStartBlock < 0) ? 0 : min_macro(nStartBlock, GetInfo(APE_INFO_TOTAL_BLOCKS));
-+    m_nFinishBlock = (nFinishBlock < 0) ? GetInfo(APE_INFO_TOTAL_BLOCKS) : min_macro(nFinishBlock, GetInfo(APE_INFO_TOTAL_BLOCKS));
-     m_bIsRanged = (m_nStartBlock != 0) || (m_nFinishBlock != GetInfo(APE_INFO_TOTAL_BLOCKS));
- }
- 
-@@ -85,7 +85,7 @@
- 
-     // cap
-     int nBlocksUntilFinish = m_nFinishBlock - m_nCurrentBlock;
--    const int nBlocksToRetrieve = min(nBlocks, nBlocksUntilFinish);
-+    const int nBlocksToRetrieve = min_macro(nBlocks, nBlocksUntilFinish);
-     
-     // get the data
-     unsigned char * pOutputBuffer = (unsigned char *) pBuffer;
-@@ -99,7 +99,7 @@
- 
-         // analyze how much to remove from the buffer
-         const int nFrameBufferBlocks = m_nFrameBufferFinishedBlocks;
--        nBlocksThisPass = min(nBlocksLeft, nFrameBufferBlocks);
-+        nBlocksThisPass = min_macro(nBlocksLeft, nFrameBufferBlocks);
- 
-         // remove as much as possible
-         if (nBlocksThisPass > 0)
-@@ -182,7 +182,7 @@
- 
-         int nFrameOffsetBlocks = m_nCurrentFrameBufferBlock % GetInfo(APE_INFO_BLOCKS_PER_FRAME);
-         int nFrameBlocksLeft = nFrameBlocks - nFrameOffsetBlocks;
--        int nBlocksThisPass = min(nFrameBlocksLeft, nBlocksLeft);
-+        int nBlocksThisPass = min_macro(nFrameBlocksLeft, nBlocksLeft);
- 
-         // start the frame if we need to
-         if (nFrameOffsetBlocks == 0)
-diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/APESimple.cpp monkeys-audio-4.11-u4-b5-s7/src/MACLib/APESimple.cpp
---- monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/APESimple.cpp	2017-03-04 17:07:21.952460418 +0100
-+++ monkeys-audio-4.11-u4-b5-s7/src/MACLib/APESimple.cpp	2017-03-04 17:17:41.695435707 +0100
-@@ -193,7 +193,7 @@
-     nBytesRead = 1;
-     while ((nBytesLeft > 0) && (nBytesRead > 0))
-     {
--        int nBytesToRead = min(16384, nBytesLeft);
-+        int nBytesToRead = min_macro(16384, nBytesLeft);
-         if (pIO->Read(spBuffer, nBytesToRead, &nBytesRead) != ERROR_SUCCESS)
-             return ERROR_IO_READ;
- 
-diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/APETag.cpp monkeys-audio-4.11-u4-b5-s7/src/MACLib/APETag.cpp
---- monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/APETag.cpp	2017-03-04 17:07:21.952460418 +0100
-+++ monkeys-audio-4.11-u4-b5-s7/src/MACLib/APETag.cpp	2017-03-04 17:18:15.007434379 +0100
-@@ -16,7 +16,7 @@
-     memcpy(m_spFieldNameUTF16, pFieldName, (wcslen(pFieldName) + 1) * sizeof(str_utf16));
-     
-     // data (we'll always allocate two extra bytes and memset to 0 so we're safely NULL terminated)
--    m_nFieldValueBytes = max(nFieldBytes, 0);
-+    m_nFieldValueBytes = max_macro(nFieldBytes, 0);
-     m_spFieldValue.Assign(new char [m_nFieldValueBytes + 2], TRUE);
-     memset(m_spFieldValue, 0, m_nFieldValueBytes + 2);
-     if (m_nFieldValueBytes > 0)
-diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/BitArray.cpp monkeys-audio-4.11-u4-b5-s7/src/MACLib/BitArray.cpp
---- monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/BitArray.cpp	2017-03-04 17:07:21.952460418 +0100
-+++ monkeys-audio-4.11-u4-b5-s7/src/MACLib/BitArray.cpp	2017-03-04 17:19:12.647432081 +0100
-@@ -113,7 +113,7 @@
-         m_nCurrentBitIndex = (m_nCurrentBitIndex & 31);
-         
-         // zero the rest of the memory (may not need the +1 because of frame byte alignment)
--        memset(&m_pBitArray[1], 0, min(nBytesToWrite + 1, BIT_ARRAY_BYTES - 1));
-+        memset(&m_pBitArray[1], 0, min_macro(nBytesToWrite + 1, BIT_ARRAY_BYTES - 1));
-     }
-     
-     // return a success
-@@ -247,7 +247,7 @@
-         BitArrayState.k++;
-
-     // figure the pivot value
--    int nPivotValue = max(nOriginalKSum / 32, 1);
-+    int nPivotValue = max_macro(nOriginalKSum / 32, 1);
-     int nOverflow = nEncode / nPivotValue;
-     int nBase = nEncode - (nOverflow * nPivotValue);
- 
-diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/MACProgressHelper.cpp monkeys-audio-4.11-u4-b5-s7/src/MACLib/MACProgressHelper.cpp
---- monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/MACProgressHelper.cpp	2017-03-04 17:07:21.952460418 +0100
-+++ monkeys-audio-4.11-u4-b5-s7/src/MACLib/MACProgressHelper.cpp	2017-03-04 17:19:56.135430347 +0100
-@@ -35,7 +35,7 @@
-         m_nCurrentStep = nCurrentStep;
- 
-     // figure the percentage done
--    float fPercentageDone = float(m_nCurrentStep) / float(max(m_nTotalSteps, 1));
-+    float fPercentageDone = float(m_nCurrentStep) / float(max_macro(m_nTotalSteps, 1));
-     int nPercentageDone = (int) (fPercentageDone * 1000 * 100);
-     if (nPercentageDone > 100000) nPercentageDone = 100000;
- 
-diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/Prepare.cpp monkeys-audio-4.11-u4-b5-s7/src/MACLib/Prepare.cpp
---- monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/Prepare.cpp	2017-03-04 17:07:21.952460418 +0100
-+++ monkeys-audio-4.11-u4-b5-s7/src/MACLib/Prepare.cpp	2017-03-04 17:20:42.423428501 +0100
-@@ -177,9 +177,9 @@
- 
-             if (LPeak == 0) { *pSpecialCodes |= SPECIAL_FRAME_LEFT_SILENCE; }
-             if (RPeak == 0) { *pSpecialCodes |= SPECIAL_FRAME_RIGHT_SILENCE; }
--            if (max(LPeak, RPeak) > *pPeakLevel) 
-+            if (max_macro(LPeak, RPeak) > *pPeakLevel) 
-             {
--                *pPeakLevel = max(LPeak, RPeak);
-+                *pPeakLevel = max_macro(LPeak, RPeak);
-             }
- 
-             // check for pseudo-stereo files
-diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/UnBitArray.cpp monkeys-audio-4.11-u4-b5-s7/src/MACLib/UnBitArray.cpp
---- monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/UnBitArray.cpp	2017-03-04 17:07:21.952460418 +0100
-+++ monkeys-audio-4.11-u4-b5-s7/src/MACLib/UnBitArray.cpp	2017-03-04 17:21:09.935427404 +0100
-@@ -110,7 +110,7 @@
-     if (m_nVersion >= 3990)
-     {
-         // figure the pivot value
--        int nPivotValue = max(BitArrayState.nKSum / 32, 1);
-+        int nPivotValue = max_macro(BitArrayState.nKSum / 32, 1);
-         
-         // get the overflow
-         int nOverflow = 0;
-diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/Shared/CircleBuffer.cpp monkeys-audio-4.11-u4-b5-s7/src/Shared/CircleBuffer.cpp
---- monkeys-audio-4.11-u4-b5-s7_old/src/Shared/CircleBuffer.cpp	2017-03-04 17:07:21.951460418 +0100
-+++ monkeys-audio-4.11-u4-b5-s7/src/Shared/CircleBuffer.cpp	2017-03-04 17:10:47.775452211 +0100
-@@ -45,7 +45,7 @@
- 
-     if (pBuffer != NULL && nBytes > 0)
-     {
--        int nHeadBytes = min(m_nEndCap - m_nHead, nBytes);
-+        int nHeadBytes = min_macro(m_nEndCap - m_nHead, nBytes);
-         int nFrontBytes = nBytes - nHeadBytes;
- 
-         memcpy(&pBuffer[0], &m_pBuffer[m_nHead], nHeadBytes);
-@@ -72,7 +72,7 @@
- 
- int CCircleBuffer::RemoveHead(int nBytes)
- {
--    nBytes = min(MaxGet(), nBytes);
-+    nBytes = min_macro(MaxGet(), nBytes);
-     m_nHead += nBytes;
-     if (m_nHead >= m_nEndCap)
-         m_nHead -= m_nEndCap;
-@@ -81,7 +81,7 @@
- 
- int CCircleBuffer::RemoveTail(int nBytes)
- {
--    nBytes = min(MaxGet(), nBytes);
-+    nBytes = min_macro(MaxGet(), nBytes);
-     m_nTail -= nBytes;
-     if (m_nTail < 0)
-         m_nTail += m_nEndCap;
-diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/Shared/NoWindows.h monkeys-audio-4.11-u4-b5-s7/src/Shared/NoWindows.h
---- monkeys-audio-4.11-u4-b5-s7_old/src/Shared/NoWindows.h	2017-03-04 17:07:21.951460418 +0100
-+++ monkeys-audio-4.11-u4-b5-s7/src/Shared/NoWindows.h	2017-03-04 17:07:58.376458966 +0100
-@@ -39,8 +39,8 @@
- typedef const wchar_t *     LPCWSTR;
- 
- #define ZeroMemory(POINTER, BYTES) memset(POINTER, 0, BYTES);
--#define max(a,b)    (((a) > (b)) ? (a) : (b))
--#define min(a,b)    (((a) < (b)) ? (a) : (b))
-+#define max_macro(a,b)    (((a) > (b)) ? (a) : (b))
-+#define min_macro(a,b)    (((a) < (b)) ? (a) : (b))
- 
- #define __stdcall
- #define CALLBACK

Copied: mac/repos/community-x86_64/mac-gcc6.patch (from rev 467166, mac/trunk/mac-gcc6.patch)
===================================================================
--- mac-gcc6.patch	                        (rev 0)
+++ mac-gcc6.patch	2019-05-13 19:28:33 UTC (rev 467167)
@@ -0,0 +1,190 @@
+diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/APECompress.cpp monkeys-audio-4.11-u4-b5-s7/src/MACLib/APECompress.cpp
+--- monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/APECompress.cpp	2017-03-04 17:07:21.952460418 +0100
++++ monkeys-audio-4.11-u4-b5-s7/src/MACLib/APECompress.cpp	2017-03-04 17:11:58.607449387 +0100
+@@ -117,7 +117,7 @@
+             return ERROR_UNDEFINED;
+         
+         // calculate how many bytes to copy and add that much to the buffer
+-        int nBytesToProcess = min(nBytesAvailable, nBytes - nBytesDone);
++        int nBytesToProcess = min_macro(nBytesAvailable, nBytes - nBytesDone);
+         memcpy(pBuffer, &pData[nBytesDone], nBytesToProcess);
+                         
+         // unlock the buffer (fail if not successful)
+@@ -162,7 +162,7 @@
+         
+         while ((m_nBufferTail - m_nBufferHead) >= nThreshold)
+         {
+-            int nFrameBytes = min(m_spAPECompressCreate->GetFullFrameBytes(), m_nBufferTail - m_nBufferHead);
++            int nFrameBytes = min_macro(m_spAPECompressCreate->GetFullFrameBytes(), m_nBufferTail - m_nBufferHead);
+             
+             if (nFrameBytes == 0)
+                 break;
+diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/APEDecompress.cpp monkeys-audio-4.11-u4-b5-s7/src/MACLib/APEDecompress.cpp
+--- monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/APEDecompress.cpp	2017-03-04 17:07:21.952460418 +0100
++++ monkeys-audio-4.11-u4-b5-s7/src/MACLib/APEDecompress.cpp	2017-03-04 17:14:55.455442336 +0100
+@@ -35,8 +35,8 @@
+     m_bErrorDecodingCurrentFrame = FALSE;
+ 
+     // set the "real" start and finish blocks
+-    m_nStartBlock = (nStartBlock < 0) ? 0 : min(nStartBlock, GetInfo(APE_INFO_TOTAL_BLOCKS));
+-    m_nFinishBlock = (nFinishBlock < 0) ? GetInfo(APE_INFO_TOTAL_BLOCKS) : min(nFinishBlock, GetInfo(APE_INFO_TOTAL_BLOCKS));
++    m_nStartBlock = (nStartBlock < 0) ? 0 : min_macro(nStartBlock, GetInfo(APE_INFO_TOTAL_BLOCKS));
++    m_nFinishBlock = (nFinishBlock < 0) ? GetInfo(APE_INFO_TOTAL_BLOCKS) : min_macro(nFinishBlock, GetInfo(APE_INFO_TOTAL_BLOCKS));
+     m_bIsRanged = (m_nStartBlock != 0) || (m_nFinishBlock != GetInfo(APE_INFO_TOTAL_BLOCKS));
+ }
+ 
+@@ -85,7 +85,7 @@
+ 
+     // cap
+     int nBlocksUntilFinish = m_nFinishBlock - m_nCurrentBlock;
+-    const int nBlocksToRetrieve = min(nBlocks, nBlocksUntilFinish);
++    const int nBlocksToRetrieve = min_macro(nBlocks, nBlocksUntilFinish);
+     
+     // get the data
+     unsigned char * pOutputBuffer = (unsigned char *) pBuffer;
+@@ -99,7 +99,7 @@
+ 
+         // analyze how much to remove from the buffer
+         const int nFrameBufferBlocks = m_nFrameBufferFinishedBlocks;
+-        nBlocksThisPass = min(nBlocksLeft, nFrameBufferBlocks);
++        nBlocksThisPass = min_macro(nBlocksLeft, nFrameBufferBlocks);
+ 
+         // remove as much as possible
+         if (nBlocksThisPass > 0)
+@@ -182,7 +182,7 @@
+ 
+         int nFrameOffsetBlocks = m_nCurrentFrameBufferBlock % GetInfo(APE_INFO_BLOCKS_PER_FRAME);
+         int nFrameBlocksLeft = nFrameBlocks - nFrameOffsetBlocks;
+-        int nBlocksThisPass = min(nFrameBlocksLeft, nBlocksLeft);
++        int nBlocksThisPass = min_macro(nFrameBlocksLeft, nBlocksLeft);
+ 
+         // start the frame if we need to
+         if (nFrameOffsetBlocks == 0)
+diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/APESimple.cpp monkeys-audio-4.11-u4-b5-s7/src/MACLib/APESimple.cpp
+--- monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/APESimple.cpp	2017-03-04 17:07:21.952460418 +0100
++++ monkeys-audio-4.11-u4-b5-s7/src/MACLib/APESimple.cpp	2017-03-04 17:17:41.695435707 +0100
+@@ -193,7 +193,7 @@
+     nBytesRead = 1;
+     while ((nBytesLeft > 0) && (nBytesRead > 0))
+     {
+-        int nBytesToRead = min(16384, nBytesLeft);
++        int nBytesToRead = min_macro(16384, nBytesLeft);
+         if (pIO->Read(spBuffer, nBytesToRead, &nBytesRead) != ERROR_SUCCESS)
+             return ERROR_IO_READ;
+ 
+diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/APETag.cpp monkeys-audio-4.11-u4-b5-s7/src/MACLib/APETag.cpp
+--- monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/APETag.cpp	2017-03-04 17:07:21.952460418 +0100
++++ monkeys-audio-4.11-u4-b5-s7/src/MACLib/APETag.cpp	2017-03-04 17:18:15.007434379 +0100
+@@ -16,7 +16,7 @@
+     memcpy(m_spFieldNameUTF16, pFieldName, (wcslen(pFieldName) + 1) * sizeof(str_utf16));
+     
+     // data (we'll always allocate two extra bytes and memset to 0 so we're safely NULL terminated)
+-    m_nFieldValueBytes = max(nFieldBytes, 0);
++    m_nFieldValueBytes = max_macro(nFieldBytes, 0);
+     m_spFieldValue.Assign(new char [m_nFieldValueBytes + 2], TRUE);
+     memset(m_spFieldValue, 0, m_nFieldValueBytes + 2);
+     if (m_nFieldValueBytes > 0)
+diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/BitArray.cpp monkeys-audio-4.11-u4-b5-s7/src/MACLib/BitArray.cpp
+--- monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/BitArray.cpp	2017-03-04 17:07:21.952460418 +0100
++++ monkeys-audio-4.11-u4-b5-s7/src/MACLib/BitArray.cpp	2017-03-04 17:19:12.647432081 +0100
+@@ -113,7 +113,7 @@
+         m_nCurrentBitIndex = (m_nCurrentBitIndex & 31);
+         
+         // zero the rest of the memory (may not need the +1 because of frame byte alignment)
+-        memset(&m_pBitArray[1], 0, min(nBytesToWrite + 1, BIT_ARRAY_BYTES - 1));
++        memset(&m_pBitArray[1], 0, min_macro(nBytesToWrite + 1, BIT_ARRAY_BYTES - 1));
+     }
+     
+     // return a success
+@@ -247,7 +247,7 @@
+         BitArrayState.k++;
+
+     // figure the pivot value
+-    int nPivotValue = max(nOriginalKSum / 32, 1);
++    int nPivotValue = max_macro(nOriginalKSum / 32, 1);
+     int nOverflow = nEncode / nPivotValue;
+     int nBase = nEncode - (nOverflow * nPivotValue);
+ 
+diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/MACProgressHelper.cpp monkeys-audio-4.11-u4-b5-s7/src/MACLib/MACProgressHelper.cpp
+--- monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/MACProgressHelper.cpp	2017-03-04 17:07:21.952460418 +0100
++++ monkeys-audio-4.11-u4-b5-s7/src/MACLib/MACProgressHelper.cpp	2017-03-04 17:19:56.135430347 +0100
+@@ -35,7 +35,7 @@
+         m_nCurrentStep = nCurrentStep;
+ 
+     // figure the percentage done
+-    float fPercentageDone = float(m_nCurrentStep) / float(max(m_nTotalSteps, 1));
++    float fPercentageDone = float(m_nCurrentStep) / float(max_macro(m_nTotalSteps, 1));
+     int nPercentageDone = (int) (fPercentageDone * 1000 * 100);
+     if (nPercentageDone > 100000) nPercentageDone = 100000;
+ 
+diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/Prepare.cpp monkeys-audio-4.11-u4-b5-s7/src/MACLib/Prepare.cpp
+--- monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/Prepare.cpp	2017-03-04 17:07:21.952460418 +0100
++++ monkeys-audio-4.11-u4-b5-s7/src/MACLib/Prepare.cpp	2017-03-04 17:20:42.423428501 +0100
+@@ -177,9 +177,9 @@
+ 
+             if (LPeak == 0) { *pSpecialCodes |= SPECIAL_FRAME_LEFT_SILENCE; }
+             if (RPeak == 0) { *pSpecialCodes |= SPECIAL_FRAME_RIGHT_SILENCE; }
+-            if (max(LPeak, RPeak) > *pPeakLevel) 
++            if (max_macro(LPeak, RPeak) > *pPeakLevel) 
+             {
+-                *pPeakLevel = max(LPeak, RPeak);
++                *pPeakLevel = max_macro(LPeak, RPeak);
+             }
+ 
+             // check for pseudo-stereo files
+diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/UnBitArray.cpp monkeys-audio-4.11-u4-b5-s7/src/MACLib/UnBitArray.cpp
+--- monkeys-audio-4.11-u4-b5-s7_old/src/MACLib/UnBitArray.cpp	2017-03-04 17:07:21.952460418 +0100
++++ monkeys-audio-4.11-u4-b5-s7/src/MACLib/UnBitArray.cpp	2017-03-04 17:21:09.935427404 +0100
+@@ -110,7 +110,7 @@
+     if (m_nVersion >= 3990)
+     {
+         // figure the pivot value
+-        int nPivotValue = max(BitArrayState.nKSum / 32, 1);
++        int nPivotValue = max_macro(BitArrayState.nKSum / 32, 1);
+         
+         // get the overflow
+         int nOverflow = 0;
+diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/Shared/CircleBuffer.cpp monkeys-audio-4.11-u4-b5-s7/src/Shared/CircleBuffer.cpp
+--- monkeys-audio-4.11-u4-b5-s7_old/src/Shared/CircleBuffer.cpp	2017-03-04 17:07:21.951460418 +0100
++++ monkeys-audio-4.11-u4-b5-s7/src/Shared/CircleBuffer.cpp	2017-03-04 17:10:47.775452211 +0100
+@@ -45,7 +45,7 @@
+ 
+     if (pBuffer != NULL && nBytes > 0)
+     {
+-        int nHeadBytes = min(m_nEndCap - m_nHead, nBytes);
++        int nHeadBytes = min_macro(m_nEndCap - m_nHead, nBytes);
+         int nFrontBytes = nBytes - nHeadBytes;
+ 
+         memcpy(&pBuffer[0], &m_pBuffer[m_nHead], nHeadBytes);
+@@ -72,7 +72,7 @@
+ 
+ int CCircleBuffer::RemoveHead(int nBytes)
+ {
+-    nBytes = min(MaxGet(), nBytes);
++    nBytes = min_macro(MaxGet(), nBytes);
+     m_nHead += nBytes;
+     if (m_nHead >= m_nEndCap)
+         m_nHead -= m_nEndCap;
+@@ -81,7 +81,7 @@
+ 
+ int CCircleBuffer::RemoveTail(int nBytes)
+ {
+-    nBytes = min(MaxGet(), nBytes);
++    nBytes = min_macro(MaxGet(), nBytes);
+     m_nTail -= nBytes;
+     if (m_nTail < 0)
+         m_nTail += m_nEndCap;
+diff -Naur monkeys-audio-4.11-u4-b5-s7_old/src/Shared/NoWindows.h monkeys-audio-4.11-u4-b5-s7/src/Shared/NoWindows.h
+--- monkeys-audio-4.11-u4-b5-s7_old/src/Shared/NoWindows.h	2017-03-04 17:07:21.951460418 +0100
++++ monkeys-audio-4.11-u4-b5-s7/src/Shared/NoWindows.h	2017-03-04 17:07:58.376458966 +0100
+@@ -39,8 +39,8 @@
+ typedef const wchar_t *     LPCWSTR;
+ 
+ #define ZeroMemory(POINTER, BYTES) memset(POINTER, 0, BYTES);
+-#define max(a,b)    (((a) > (b)) ? (a) : (b))
+-#define min(a,b)    (((a) < (b)) ? (a) : (b))
++#define max_macro(a,b)    (((a) > (b)) ? (a) : (b))
++#define min_macro(a,b)    (((a) < (b)) ? (a) : (b))
+ 
+ #define __stdcall
+ #define CALLBACK


More information about the arch-commits mailing list