summaryrefslogtreecommitdiff
path: root/xicc/ccss.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-01 15:43:52 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-01 15:43:52 +0200
commitc07d0c2d2f6f7b0eb6e92cc6204bf05037957e82 (patch)
tree41791cbe367cf023b98043fee56f9346b2592b49 /xicc/ccss.c
parentd7f89e6fe63b8697fab5a901cfce457b375638b3 (diff)
Imported Upstream version 1.6.3upstream/1.6.3
Diffstat (limited to 'xicc/ccss.c')
-rw-r--r--xicc/ccss.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/xicc/ccss.c b/xicc/ccss.c
index cd9b4e4..6b5ebeb 100644
--- a/xicc/ccss.c
+++ b/xicc/ccss.c
@@ -4,7 +4,7 @@
* Colorimeter Correction Matrix
*
* Author: Graeme W. Gill
- * Date: 1r9/8/2010
+ * Date: 9/8/2010
*
* Copyright 2010 Graeme W. Gill
* All rights reserved.
@@ -112,7 +112,11 @@ cgats **pocg /* return CGATS structure */
ocg->add_kword(ocg, 0, "SPECTRAL_NORM",buf, NULL);
/* Fields we want */
- ocg->add_field(ocg, 0, "SAMPLE_ID", nqcs_t);
+ if (ocg->add_field(ocg, 0, "SAMPLE_ID", nqcs_t) < 0) {
+ sprintf(p->err, "cgats add_field SAMPLE_ID failed with '%s'!",ocg->err);
+ ocg->del(ocg); /* Clean up */
+ return 2;
+ }
nsetel += 1; /* For id */
/* Generate fields for spectral values */
@@ -124,7 +128,11 @@ cgats **pocg /* return CGATS structure */
* (p->samples[0].spec_wl_long - p->samples[0].spec_wl_short) + 0.5);
sprintf(buf,"SPEC_%03d",nm);
- ocg->add_field(ocg, 0, buf, r_t);
+ if (ocg->add_field(ocg, 0, buf, r_t) < 0) {
+ sprintf(p->err, "cgats add_field %s failed with '%s'",buf,ocg->err);
+ ocg->del(ocg); /* Clean up */
+ return 2;
+ }
}
nsetel += p->samples[0].spec_n; /* Spectral values */