diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-08-27 22:58:39 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-08-27 22:58:39 +0000 |
commit | 0cc7ccdefa6f1fd3f8e23254c34f956156136a39 (patch) | |
tree | 8b56862abcdbd7778974c8e96eeefe9fbb2bb09e /generator | |
parent | 6748da2ec290df7a6430dcdc222b5d7e00808d4e (diff) | |
download | netpbm-mirror-0cc7ccdefa6f1fd3f8e23254c34f956156136a39.tar.gz netpbm-mirror-0cc7ccdefa6f1fd3f8e23254c34f956156136a39.tar.xz netpbm-mirror-0cc7ccdefa6f1fd3f8e23254c34f956156136a39.zip |
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4619 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'generator')
-rw-r--r-- | generator/ppmcie.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/generator/ppmcie.c b/generator/ppmcie.c index 86325ba6..26289c3c 100644 --- a/generator/ppmcie.c +++ b/generator/ppmcie.c @@ -26,8 +26,11 @@ Introduced option to plot 1976 u' v' chromaticities. */ +#define _C99_SOURCE /* Make sure snprintf() is in stdio.h */ + #include <assert.h> #include <math.h> +#include <stdio.h> #include "pm_c_util.h" #include "ppm.h" @@ -1114,15 +1117,15 @@ writeLabel(pixel ** const pixels, PPM_ASSIGN(rgbcolor, maxval, maxval, maxval); - pm_snprintf(sysdesc, sizeof(sysdesc), - "System: %s\n" - "Primary illuminants (X, Y)\n" - " Red: %0.4f, %0.4f\n" - " Green: %0.4f, %0.4f\n" - " Blue: %0.4f, %0.4f\n" - "White point (X, Y): %0.4f, %0.4f", - cs->name, cs->xRed, cs->yRed, cs->xGreen, cs->yGreen, - cs->xBlue, cs->yBlue, cs->xWhite, cs->yWhite); + snprintf(sysdesc, sizeof(sysdesc), + "System: %s\n" + "Primary illuminants (X, Y)\n" + " Red: %0.4f, %0.4f\n" + " Green: %0.4f, %0.4f\n" + " Blue: %0.4f, %0.4f\n" + "White point (X, Y): %0.4f, %0.4f", + cs->name, cs->xRed, cs->yRed, cs->xGreen, cs->yGreen, + cs->xBlue, cs->yBlue, cs->xWhite, cs->yWhite); sysdesc[sizeof(sysdesc)-1] = '\0'; /* for robustness */ ppmd_text(pixels, pixcols, pixrows, maxval, |