< prev index next >

src/java.desktop/share/native/liblcms/cmscgats.c

Print this page

        

*** 28,38 **** // file: // //--------------------------------------------------------------------------------- // // Little Color Management System ! // Copyright (c) 1998-2012 Marti Maria Saguer // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense, --- 28,38 ---- // file: // //--------------------------------------------------------------------------------- // // Little Color Management System ! // Copyright (c) 1998-2016 Marti Maria Saguer // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the "Software"), // to deal in the Software without restriction, including without limitation // the rights to use, copy, modify, merge, publish, distribute, sublicense,
*** 623,633 **** it8 -> dnum = it8 -> dnum * xpow10(e); } } // Parses a float number ! // This can not call directly atof because it uses locale dependant // parsing, while CCMX files always use . as decimal separator static cmsFloat64Number ParseFloatNumber(const char *Buffer) { cmsFloat64Number dnum = 0.0; --- 623,633 ---- it8 -> dnum = it8 -> dnum * xpow10(e); } } // Parses a float number ! // This can not call directly atof because it uses locale dependent // parsing, while CCMX files always use . as decimal separator static cmsFloat64Number ParseFloatNumber(const char *Buffer) { cmsFloat64Number dnum = 0.0;
*** 828,842 **** if (isidchar(it8 ->ch)) { if (it8 ->sy == SINUM) { ! sprintf(it8->id, "%d", it8->inum); } else { ! sprintf(it8->id, it8 ->DoubleFormatter, it8->dnum); } k = (int) strlen(it8 ->id); idptr = it8 ->id + k; do { --- 828,842 ---- if (isidchar(it8 ->ch)) { if (it8 ->sy == SINUM) { ! snprintf(it8->id, 127, "%d", it8->inum); } else { ! snprintf(it8->id, 127, it8 ->DoubleFormatter, it8->dnum); } k = (int) strlen(it8 ->id); idptr = it8 ->id + k; do {
*** 1390,1410 **** cmsBool CMSEXPORT cmsIT8SetPropertyDbl(cmsHANDLE hIT8, const char* cProp, cmsFloat64Number Val) { cmsIT8* it8 = (cmsIT8*) hIT8; char Buffer[1024]; ! sprintf(Buffer, it8->DoubleFormatter, Val); return AddToList(it8, &GetTable(it8)->HeaderList, cProp, NULL, Buffer, WRITE_UNCOOKED) != NULL; } cmsBool CMSEXPORT cmsIT8SetPropertyHex(cmsHANDLE hIT8, const char* cProp, cmsUInt32Number Val) { cmsIT8* it8 = (cmsIT8*) hIT8; char Buffer[1024]; ! sprintf(Buffer, "%u", Val); return AddToList(it8, &GetTable(it8)->HeaderList, cProp, NULL, Buffer, WRITE_HEXADECIMAL) != NULL; } cmsBool CMSEXPORT cmsIT8SetPropertyUncooked(cmsHANDLE hIT8, const char* Key, const char* Buffer) --- 1390,1410 ---- cmsBool CMSEXPORT cmsIT8SetPropertyDbl(cmsHANDLE hIT8, const char* cProp, cmsFloat64Number Val) { cmsIT8* it8 = (cmsIT8*) hIT8; char Buffer[1024]; ! snprintf(Buffer, 1023, it8->DoubleFormatter, Val); return AddToList(it8, &GetTable(it8)->HeaderList, cProp, NULL, Buffer, WRITE_UNCOOKED) != NULL; } cmsBool CMSEXPORT cmsIT8SetPropertyHex(cmsHANDLE hIT8, const char* cProp, cmsUInt32Number Val) { cmsIT8* it8 = (cmsIT8*) hIT8; char Buffer[1024]; ! snprintf(Buffer, 1023, "%u", Val); return AddToList(it8, &GetTable(it8)->HeaderList, cProp, NULL, Buffer, WRITE_HEXADECIMAL) != NULL; } cmsBool CMSEXPORT cmsIT8SetPropertyUncooked(cmsHANDLE hIT8, const char* Key, const char* Buffer)
*** 1844,1854 **** return TRUE; } ! // -------------------------------------------------------------- Higer level parsing static cmsBool DataFormatSection(cmsIT8* it8) { int iField = 0; --- 1844,1854 ---- return TRUE; } ! // -------------------------------------------------------------- Higher level parsing static cmsBool DataFormatSection(cmsIT8* it8) { int iField = 0;
*** 2147,2157 **** return (it8 -> sy != SSYNERROR); } ! // Init usefull pointers static void CookPointers(cmsIT8* it8) { int idField, i; --- 2147,2157 ---- return (it8 -> sy != SSYNERROR); } ! // Init useful pointers static void CookPointers(cmsIT8* it8) { int idField, i;
*** 2604,2614 **** cmsIT8* it8 = (cmsIT8*) hIT8; char Buff[256]; _cmsAssert(hIT8 != NULL); ! sprintf(Buff, it8->DoubleFormatter, Val); return SetData(it8, row, col, Buff); } --- 2604,2614 ---- cmsIT8* it8 = (cmsIT8*) hIT8; char Buff[256]; _cmsAssert(hIT8 != NULL); ! snprintf(Buff, 255, it8->DoubleFormatter, Val); return SetData(it8, row, col, Buff); }
< prev index next >