diff options
Diffstat (limited to 'xicc/ccss.c')
-rw-r--r-- | xicc/ccss.c | 14 |
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 */ |