2362N/A * or visit www.oracle.com if you need additional information or have any
2693N/A#include "lcms2_internal.h"
2693N/A// Grows a mempool table for a MLU. Each time this function is called, mempool size is multiplied times two.
6271N/A// Grows a entry table for a MLU. Each time this function is called, table size is multiplied times two.
2693N/A NewPtr = (_cmsMLUentry*)_cmsRealloc(mlu ->ContextID, mlu ->Entries, AllocatedEntries*sizeof(_cmsMLUentry));
2693N/A if (SearchMLUEntry(mlu, LanguageCode, CountryCode) >= 0) return FALSE; // Only one is allowed!
2693N/AcmsBool CMSEXPORT cmsMLUsetASCII(cmsMLU* mlu, const char LanguageCode[3], const char CountryCode[3], const char* ASCIIString)
2693N/A return (cmsUInt32Number)(p - s);
2693N/AcmsBool CMSEXPORT cmsMLUsetWide(cmsMLU* mlu, const char Language[3], const char Country[3], const wchar_t* WideString)
2693N/A// The algorithm first searches for an exact match of country and language, if not found it uses
2693N/A _cmsMLUentry* v;
2693N/A if (BufferSize <= 0) return 0;
2693N/A if (BufferSize <= 0) return 0;
2693N/A// Named color lists --------------------------------------------------------------------------------------------
2693N/A NewPtr = (_cmsNAMEDCOLOR*) _cmsRealloc(v ->ContextID, v ->List, size * sizeof(_cmsNAMEDCOLOR));
2693N/AcmsNAMEDCOLORLIST* CMSEXPORT cmsAllocNamedColorList(cmsContext ContextID, cmsUInt32Number n, cmsUInt32Number ColorantCount, const char* Prefix, const char* Suffix)
2693N/A cmsNAMEDCOLORLIST* v = (cmsNAMEDCOLORLIST*) _cmsMallocZero(ContextID, sizeof(cmsNAMEDCOLORLIST));
2693N/A NewNC= cmsAllocNamedColorList(v ->ContextID, v -> nColors, v ->ColorantCount, v ->Prefix, v ->Suffix);
2693N/A NamedColorList ->List[NamedColorList ->nColors].DeviceColorant[i] = Colorant == NULL? 0 : Colorant[i];
2693N/AcmsBool CMSEXPORT cmsNamedColorInfo(const cmsNAMEDCOLORLIST* NamedColorList, cmsUInt32Number nColor,
2693N/AcmsInt32Number CMSEXPORT cmsNamedColorIndex(const cmsNAMEDCOLORLIST* NamedColorList, const char* Name)
2693N/A// MPE support -----------------------------------------------------------------------------------------------------------------
6271N/Avoid EvalNamedColorPCS(const cmsFloat32Number In[], cmsFloat32Number Out[], const cmsStage *mpe)
6271N/A cmsSignalError(NamedColorList ->ContextID, cmsERROR_RANGE, "Color %d out of range; ignored", index);
2693N/Avoid EvalNamedColor(const cmsFloat32Number In[], cmsFloat32Number Out[], const cmsStage *mpe)
2693N/A cmsSignalError(NamedColorList ->ContextID, cmsERROR_RANGE, "Color %d out of range; ignored", index);
2693N/A// Profile sequence description routines -------------------------------------------------------------------------------------
2693N/AcmsSEQ* CMSEXPORT cmsAllocProfileSequenceDescription(cmsContext ContextID, cmsUInt32Number n)
2693N/A // in a devicelink. It makes not sense anyway and may be used for exploits, so let's close the door!
6271N/A// Dictionaries --------------------------------------------------------------------------------------------------------
6271N/AcmsBool CMSEXPORT cmsDictAddEntry(cmsHANDLE hDict, const wchar_t* Name, const wchar_t* Value, const cmsMLU *DisplayName, const cmsMLU *DisplayValue)
6271N/A if (!cmsDictAddEntry(hNew, entry ->Name, entry ->Value, entry ->DisplayName, entry ->DisplayValue)) {