diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-09-28 02:40:42 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2023-09-28 02:40:42 +0000 |
commit | 34546ecb9b586f34e04f6e133a247ffe1f50046e (patch) | |
tree | 55c0c6c76c55bfe99a9f3c7dec416604a1c6dbd9 /generator/ppmcie.c | |
parent | d484f36f7c690d0a88476127afd9bdf90233699d (diff) | |
download | netpbm-mirror-34546ecb9b586f34e04f6e133a247ffe1f50046e.tar.gz netpbm-mirror-34546ecb9b586f34e04f6e133a247ffe1f50046e.tar.xz netpbm-mirror-34546ecb9b586f34e04f6e133a247ffe1f50046e.zip |
Release 1.04.00
git-svn-id: http://svn.code.sf.net/p/netpbm/code/advanced@4700 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'generator/ppmcie.c')
-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, |