Merge /Users/jrmuizel/src/qcms-benoit/git/qcms into v4
diff --git a/iccread.c b/iccread.c
index 5968c0d..5662023 100644
--- a/iccread.c
+++ b/iccread.c
@@ -50,7 +50,6 @@
return ((v & 0xff) << 24) | ((v & 0xff00) << 8) | ((v & 0xff0000) >> 8) | ((v & 0xff000000) >> 24);
//return __builtin_bswap32(v);
#else
-sdfsdf;asdf;asdf;asdfdas
return v;
#endif
}
@@ -345,7 +344,8 @@
#define LUT_MBA_TYPE 0x6d424120 // 'mBA '
#define CHROMATIC_TYPE 0x73663332 // 'sf32'
-static struct matrix read_tag_s15Fixed16ArrayType(struct mem_source *src, struct tag_index index, uint32_t tag_id) {
+static struct matrix read_tag_s15Fixed16ArrayType(struct mem_source *src, struct tag_index index, uint32_t tag_id)
+{
struct tag *tag = find_tag(index, tag_id);
struct matrix matrix;
if (tag) {
@@ -860,8 +860,6 @@
static void qcms_profile_fini(qcms_profile *profile)
{
- // REVIEW: This is called when some of these values are NULL.
- // Is free()-ing NULL safe? I was told it was not safe on all platforms.
free(profile->redTRC);
free(profile->blueTRC);
free(profile->greenTRC);
diff --git a/transform_util.c b/transform_util.c
index 7ebf0a0..bcc1a3e 100644
--- a/transform_util.c
+++ b/transform_util.c
@@ -1,3 +1,5 @@
+#define _ISOC99_SOURCE /* for INFINITY */
+
#include <math.h>
#include <assert.h>
#include <string.h> //memcpy
@@ -5,8 +7,11 @@
#include "transform_util.h"
#include "matrix.h"
+#if !defined(INFINITY)
+#define INFINITY HUGE_VAL
+#endif
+
#define PARAMETRIC_CURVE_TYPE 0x70617261 //'para'
-#define QCMS_NEGATIVE_INFINITY (-1.f/0.f)
/* value must be a value between 0 and 1 */
//XXX: is the above a good restriction to have?
@@ -122,7 +127,7 @@
c = 0;
e = 0;
f = 0;
- interval = QCMS_NEGATIVE_INFINITY;
+ interval = -INFINITY;
} else if(count == 1) {
a = parameter[1];
b = parameter[2];