From a1cccc0ad7cfa2d95af5f61f15278631d5f0fda6 Mon Sep 17 00:00:00 2001 From: Thierry Leconte Date: Sat, 15 Nov 2003 08:12:28 +0000 Subject: [PATCH] pretty output --- main.c | 20 +++++++++++--------- version.h | 2 ++ 2 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 version.h diff --git a/main.c b/main.c index 769a789..cbf6234 100644 --- a/main.c +++ b/main.c @@ -30,6 +30,8 @@ #include #include +#include "version.h" + extern getpixelrow(float *pixelv); #define CHA_OFFSET 86 @@ -66,9 +68,8 @@ int getsample(float *sample,int nb) return(sf_read_float(inwav,sample,nb)); } -char signature[]="atpdec 1.3 (c) Thierry Leconte 2003"; png_text text_ptr[]={ -{ PNG_TEXT_COMPRESSION_NONE, "Software", signature ,sizeof(signature) }, +{ PNG_TEXT_COMPRESSION_NONE, "Software", version ,sizeof(version) }, { PNG_TEXT_COMPRESSION_NONE, "Channel", NULL ,0 }, { PNG_TEXT_COMPRESSION_NONE, "Description", "NOAA POES satellite Image" ,25 } }; @@ -102,7 +103,7 @@ text_ptr[1].text_length=strlen(chid); png_set_text(png_ptr, info_ptr, text_ptr, 3); png_set_pHYs(png_ptr, info_ptr, 4000,4000,PNG_RESOLUTION_METER); -printf("Writing %s ... ",filename); +printf("Writing %s ... ",filename);fflush(stdout); pngfile=fopen(filename,"w"); if (pngfile==NULL) { fprintf(stderr,"could not open %s\n",filename); @@ -171,7 +172,7 @@ text_ptr[1].text_length=strlen(text_ptr[1].text); png_set_text(png_ptr, info_ptr, text_ptr, 3); png_set_pHYs(png_ptr, info_ptr, 4000,4000,PNG_RESOLUTION_METER); -printf("Writing %s ...",filename); +printf("Writing %s ...",filename);fflush(stdout); pngfile=fopen(filename,"w"); if (pngfile==NULL) { fprintf(stderr,"could not open %s\n",filename); @@ -233,7 +234,7 @@ for(n=0;n