Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
graphics/libmng: upgrade from 1.0.10 to 2.0.3
Despite the seemingly large version jump, the sole change is the compatibility with lcms-2.x. I'm now also adding fixes for some compiler-warnings raised by the modern clang. These suggest, certain parts of the code aren't even really excercised. Neither API nor ABI are changing, so no shared library version-bump.
- Loading branch information
Mikhail Teterin
authored and
Mikhail Teterin
committed
Jan 12, 2024
1 parent
7212522
commit daa103d
Showing
8 changed files
with
160 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
SHA256 (libmng-1.0.10.tar.gz) = 03a79dac9b9316d37227057614a248a946f997c4d1a3437fb569e9a63897f911 | ||
SIZE (libmng-1.0.10.tar.gz) = 1093337 | ||
TIMESTAMP = 1704254831 | ||
SHA256 (libmng-2.0.3.tar.xz) = 4a462fdd48d4bc82c1d7a21106c8a18b62f8cc0042454323058e6da0dbb57dd3 | ||
SIZE (libmng-2.0.3.tar.xz) = 951808 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- libmng_chunk_descr.c 2012-07-29 15:26:34.000000000 -0400 | ||
+++ libmng_chunk_descr.c 2024-01-08 14:32:15.916979000 -0500 | ||
@@ -2751,5 +2751,5 @@ | ||
mng_get_chunkheader (MNG_UINT_sRGB, &chunk_srgb); | ||
/* pretend it's an sRGB chunk then ! */ | ||
- iRetcode = mng_read_general (pData, &chunk_srgb, 1, (mng_ptr)"0", &pDummy); | ||
+ iRetcode = mng_read_general (pData, &chunk_srgb, 1, (mng_ptr)"0", (void **)&pDummy); | ||
if (iRetcode) /* on error bail out */ | ||
return iRetcode; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- libmng_filter.c 2012-07-29 15:26:34.000000000 -0400 | ||
+++ libmng_filter.c 2024-01-08 14:25:01.379756000 -0500 | ||
@@ -207,7 +207,7 @@ | ||
iC = (mng_uint32)*pPriorx_prev; | ||
iP = iA + iB - iC; | ||
- iPa = abs (iP - iA); | ||
- iPb = abs (iP - iB); | ||
- iPc = abs (iP - iC); | ||
+ iPa = iP > iA ? iP - iA : iA - iP; | ||
+ iPb = iP > iB ? iP - iB : iB - iP; | ||
+ iPc = iP > iC ? iP - iC : iC - iP; | ||
|
||
if ((iPa <= iPb) && (iPa <= iPc)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
This changes the behaviour to what appears to be the original intent... | ||
|
||
-mi | ||
|
||
--- libmng_pixels.c 2012-07-29 15:26:34.000000000 -0400 | ||
+++ libmng_pixels.c 2024-01-08 14:21:18.664893000 -0500 | ||
@@ -14669,5 +14669,5 @@ | ||
|
||
*pDstline = (mng_uint8)(iW >> 8); | ||
- *(pDstline+1) = (mng_uint8)(iW && 0xFF); | ||
+ *(pDstline+1) = (mng_uint8)(iW & 0xFF); | ||
|
||
pSrcline++; | ||
@@ -14787,5 +14787,5 @@ | ||
|
||
*pDstline = (mng_uint8)(iW >> 8); | ||
- *(pDstline+1) = (mng_uint8)(iW && 0xFF); | ||
+ *(pDstline+1) = (mng_uint8)(iW & 0xFF); | ||
|
||
pSrcline++; | ||
@@ -14908,5 +14908,5 @@ | ||
*(pDstline+2) = iB; | ||
*(pDstline+4) = iB; | ||
- iB = (mng_uint8)(iW && 0xFF); | ||
+ iB = (mng_uint8)(iW & 0xFF); | ||
*(pDstline+1) = iB; | ||
*(pDstline+3) = iB; | ||
@@ -15042,5 +15042,5 @@ | ||
*(pDstline+2) = iB; | ||
*(pDstline+4) = iB; | ||
- iB = (mng_uint8)(iW && 0xFF); | ||
+ iB = (mng_uint8)(iW & 0xFF); | ||
*(pDstline+1) = iB; | ||
*(pDstline+3) = iB; | ||
@@ -15126,7 +15126,7 @@ | ||
|
||
*pDstline = (mng_uint8)(iW >> 8); | ||
- *(pDstline+1) = (mng_uint8)(iW && 0xFF); | ||
+ *(pDstline+1) = (mng_uint8)(iW & 0xFF); | ||
*(pDstline+2) = (mng_uint8)(iA >> 8); | ||
- *(pDstline+3) = (mng_uint8)(iA && 0xFF); | ||
+ *(pDstline+3) = (mng_uint8)(iA & 0xFF); | ||
|
||
pSrcline += 2; | ||
@@ -15210,10 +15210,10 @@ | ||
*(pDstline+2) = iB; | ||
*(pDstline+4) = iB; | ||
- iB = (mng_uint8)(iW && 0xFF); | ||
+ iB = (mng_uint8)(iW & 0xFF); | ||
*(pDstline+1) = iB; | ||
*(pDstline+3) = iB; | ||
*(pDstline+5) = iB; | ||
*(pDstline+6) = (mng_uint8)(iA >> 8); | ||
- *(pDstline+7) = (mng_uint8)(iA && 0xFF); | ||
+ *(pDstline+7) = (mng_uint8)(iA & 0xFF); | ||
|
||
pSrcline += 2; | ||
@@ -15297,9 +15297,9 @@ | ||
|
||
*pDstline = (mng_uint8)(iR >> 8); | ||
- *(pDstline+1) = (mng_uint8)(iR && 0xFF); | ||
+ *(pDstline+1) = (mng_uint8)(iR & 0xFF); | ||
*(pDstline+2) = (mng_uint8)(iG >> 8); | ||
- *(pDstline+3) = (mng_uint8)(iG && 0xFF); | ||
+ *(pDstline+3) = (mng_uint8)(iG & 0xFF); | ||
*(pDstline+4) = (mng_uint8)(iB >> 8); | ||
- *(pDstline+5) = (mng_uint8)(iB && 0xFF); | ||
+ *(pDstline+5) = (mng_uint8)(iB & 0xFF); | ||
|
||
pSrcline += 3; | ||
@@ -15402,9 +15402,9 @@ | ||
|
||
*pDstline = (mng_uint8)(iRw >> 8); | ||
- *(pDstline+1) = (mng_uint8)(iRw && 0xFF); | ||
+ *(pDstline+1) = (mng_uint8)(iRw & 0xFF); | ||
*(pDstline+2) = (mng_uint8)(iGw >> 8); | ||
- *(pDstline+3) = (mng_uint8)(iGw && 0xFF); | ||
+ *(pDstline+3) = (mng_uint8)(iGw & 0xFF); | ||
*(pDstline+4) = (mng_uint8)(iBw >> 8); | ||
- *(pDstline+5) = (mng_uint8)(iBw && 0xFF); | ||
+ *(pDstline+5) = (mng_uint8)(iBw & 0xFF); | ||
|
||
pSrcline += 3; | ||
@@ -15539,9 +15539,9 @@ | ||
iB = ((mng_bitdepth_16)pData->fPromBitdepth) (pBuf->aPLTEentries [iN].iBlue); | ||
*pDstline = (mng_uint8)(iR >> 8); | ||
- *(pDstline+1) = (mng_uint8)(iR && 0xFF); | ||
+ *(pDstline+1) = (mng_uint8)(iR & 0xFF); | ||
*(pDstline+2) = (mng_uint8)(iG >> 8); | ||
- *(pDstline+3) = (mng_uint8)(iG && 0xFF); | ||
+ *(pDstline+3) = (mng_uint8)(iG & 0xFF); | ||
*(pDstline+4) = (mng_uint8)(iB >> 8); | ||
- *(pDstline+5) = (mng_uint8)(iB && 0xFF); | ||
+ *(pDstline+5) = (mng_uint8)(iB & 0xFF); | ||
} | ||
|
||
@@ -15642,11 +15642,11 @@ | ||
|
||
*pDstline = (mng_uint8)(iR >> 8); | ||
- *(pDstline+1) = (mng_uint8)(iR && 0xFF); | ||
+ *(pDstline+1) = (mng_uint8)(iR & 0xFF); | ||
*(pDstline+2) = (mng_uint8)(iG >> 8); | ||
- *(pDstline+3) = (mng_uint8)(iG && 0xFF); | ||
+ *(pDstline+3) = (mng_uint8)(iG & 0xFF); | ||
*(pDstline+4) = (mng_uint8)(iB >> 8); | ||
- *(pDstline+5) = (mng_uint8)(iB && 0xFF); | ||
+ *(pDstline+5) = (mng_uint8)(iB & 0xFF); | ||
*(pDstline+6) = (mng_uint8)(iA >> 8); | ||
- *(pDstline+7) = (mng_uint8)(iA && 0xFF); | ||
+ *(pDstline+7) = (mng_uint8)(iA & 0xFF); | ||
} | ||
|
||
@@ -15690,11 +15690,11 @@ | ||
|
||
*pDstline = (mng_uint8)(iR >> 8); | ||
- *(pDstline+1) = (mng_uint8)(iR && 0xFF); | ||
+ *(pDstline+1) = (mng_uint8)(iR & 0xFF); | ||
*(pDstline+2) = (mng_uint8)(iG >> 8); | ||
- *(pDstline+3) = (mng_uint8)(iG && 0xFF); | ||
+ *(pDstline+3) = (mng_uint8)(iG & 0xFF); | ||
*(pDstline+4) = (mng_uint8)(iB >> 8); | ||
- *(pDstline+5) = (mng_uint8)(iB && 0xFF); | ||
+ *(pDstline+5) = (mng_uint8)(iB & 0xFF); | ||
*(pDstline+6) = (mng_uint8)(iA >> 8); | ||
- *(pDstline+7) = (mng_uint8)(iA && 0xFF); | ||
+ *(pDstline+7) = (mng_uint8)(iA & 0xFF); | ||
|
||
pSrcline += 4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters