| OLD | NEW |
| 1 //------------------------------------------------------------------------------
--- | 1 //------------------------------------------------------------------------------
--- |
| 2 // | 2 // |
| 3 // Little Color Management System | 3 // Little Color Management System |
| 4 // Copyright (c) 1998-2010 Marti Maria Saguer | 4 // Copyright (c) 1998-2010 Marti Maria Saguer |
| 5 // | 5 // |
| 6 // Permission is hereby granted, free of charge, to any person obtaining | 6 // Permission is hereby granted, free of charge, to any person obtaining |
| 7 // a copy of this software and associated documentation files (the "Software"), | 7 // a copy of this software and associated documentation files (the "Software"), |
| 8 // to deal in the Software without restriction, including without limitation | 8 // to deal in the Software without restriction, including without limitation |
| 9 // the rights to use, copy, modify, merge, publish, distribute, sublicense, | 9 // the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 10 // and/or sell copies of the Software, and to permit persons to whom the Softwar
e | 10 // and/or sell copies of the Software, and to permit persons to whom the Softwar
e |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 | 172 |
| 173 _cmsAssert(io != NULL); | 173 _cmsAssert(io != NULL); |
| 174 | 174 |
| 175 if (io -> Read(io, &tmp, sizeof(cmsFloat32Number), 1) != 1) | 175 if (io -> Read(io, &tmp, sizeof(cmsFloat32Number), 1) != 1) |
| 176 return FALSE; | 176 return FALSE; |
| 177 | 177 |
| 178 if (n != NULL) { | 178 if (n != NULL) { |
| 179 | 179 |
| 180 tmp = _cmsAdjustEndianess32(tmp); | 180 tmp = _cmsAdjustEndianess32(tmp); |
| 181 *n = *(cmsFloat32Number*) &tmp; | 181 *n = *(cmsFloat32Number*) &tmp; |
| 182 if (isnan(*n)) |
| 183 return FALSE; |
| 182 } | 184 } |
| 183 return TRUE; | 185 return TRUE; |
| 184 } | 186 } |
| 185 | 187 |
| 186 | 188 |
| 187 cmsBool CMSEXPORT _cmsReadUInt64Number(cmsIOHANDLER* io, cmsUInt64Number* n) | 189 cmsBool CMSEXPORT _cmsReadUInt64Number(cmsIOHANDLER* io, cmsUInt64Number* n) |
| 188 { | 190 { |
| 189 cmsUInt64Number tmp; | 191 cmsUInt64Number tmp; |
| 190 | 192 |
| 191 _cmsAssert(io != NULL); | 193 _cmsAssert(io != NULL); |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 946 // free the memory block itself | 948 // free the memory block itself |
| 947 _cmsFree(&fakeContext, ctx); | 949 _cmsFree(&fakeContext, ctx); |
| 948 } | 950 } |
| 949 } | 951 } |
| 950 | 952 |
| 951 // Returns the user data associated to the given ContextID, or NULL if no user d
ata was attached on context creation | 953 // Returns the user data associated to the given ContextID, or NULL if no user d
ata was attached on context creation |
| 952 void* CMSEXPORT cmsGetContextUserData(cmsContext ContextID) | 954 void* CMSEXPORT cmsGetContextUserData(cmsContext ContextID) |
| 953 { | 955 { |
| 954 return _cmsContextGetClientChunk(ContextID, UserPtr); | 956 return _cmsContextGetClientChunk(ContextID, UserPtr); |
| 955 } | 957 } |
| OLD | NEW |