Hi Marti,
If I have create a Lab profile with cmsCreateLabprofile(NULL) and the save it to memory with _cmsSaveProfileToMem, it failed in AIX, because malloc in AIX can not allocate 0 byte. The function SaveWordsTable in this case failed with nTabSize == 0.
static BOOL SaveWordsTable(FILE* OutStream, int nEntries, LPWORD Tab, LPLCMSICCPROFILE Icc)
{
size_t nTabSize = sizeof(WORD) * nEntries;
LPWORD PtrW = (LPWORD) malloc(nTabSize); -->nTabSize == 0 -->PtrW == NULL
if (!PtrW) return FALSE; --> fail
CopyMemory(PtrW, Tab, nTabSize);
AdjustEndianessArray16(PtrW, nEntries);
Icc ->Write(OutStream, nTabSize, PtrW);
free(PtrW);
return TRUE;
}
Any idea to support AIX? Our Test in HP-UX, Solaris, Linux, Windows is very good.
Thank you very much for your super code.
Wei Wang
----------------------------------------------------
Compart Systemhaus GmbH
Otto-Lilienthal-Stra�e 38
D-71034 B�blingen
fon: +49 (0)7031/6205-57
fax: +49 (0)7031/6205-55
http://www.compart.net
[EMAIL PROTECTED]
- Re: [Lcms-user] Problem in AIX Wei . Wang
- Re: [Lcms-user] Problem in AIX Marti Maria
