From c07d0c2d2f6f7b0eb6e92cc6204bf05037957e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 1 Sep 2014 15:43:52 +0200 Subject: Imported Upstream version 1.6.3 --- xicc/ccss.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'xicc/ccss.c') 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 */ -- cgit v1.2.3