summaryrefslogtreecommitdiff
path: root/xicc/ccss.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-07 13:29:54 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2014-09-07 13:29:54 +0200
commita879b4e708b3e46c9697ba6581687eeb5b02a320 (patch)
treef85acc5cb1a7c0b03a050c879c20cab3deb9f40e /xicc/ccss.c
parent556dffcdad42b938bc196819aa463247de709765 (diff)
parentc07d0c2d2f6f7b0eb6e92cc6204bf05037957e82 (diff)
state from 2014-09-07 13:30 MESZ
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 */