|
From: <le...@pr...> - 2005-01-21 16:05:36
|
Update of /cvsroot/meshdb/src/geo/alt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16626/alt Modified Files: Tag: leonard-dev main.c Log Message: fix alt; make image libs selectable (jpg is still buggy?) Index: main.c =================================================================== RCS file: /cvsroot/meshdb/src/geo/alt/main.c,v retrieving revision 1.3.2.2 retrieving revision 1.3.2.3 diff -u -d -r1.3.2.2 -r1.3.2.3 --- main.c 21 Jan 2005 14:12:37 -0000 1.3.2.2 +++ main.c 21 Jan 2005 16:05:25 -0000 1.3.2.3 @@ -25,12 +25,6 @@ #include "compat/compat.h" #include "compat/err.h" -/* -#define image_begin(w, h) printf("P6\n%u %u 255\n",w,h) -#define image_write_rgb(r) fwrite(r,3,1,stdout) -#define image_end() fflush(stdout) -*/ - #define CROSS 2 #define CROSS2 3 @@ -246,6 +240,7 @@ 1.0/scale, 1.0/scale); } else { /* generate PNG output */ + image_set_type(IMAGE_TYPE_JPG); image_begin(w, h); } @@ -299,7 +294,7 @@ if (-w2<(x) && (x)<w2 && -h2<(y) && (y)<h2) { \ float az, azprev, azmaxprev; \ az = (H(x,y) - lvalue) / d; \ - if (isinf(az)) az = ZENITH; \ + if (isnanf(az)) az = ZENITH; \ azprev = AZ(xp,yp)*(p/n) + \ AZ(xq,yq)*(1-p/n); \ azmaxprev = AZMAX(xp,yp)*(p/n) + \ @@ -415,10 +410,8 @@ printf("\n ]\n" " }\n" "}\n"); - else { + else image_end(); - fflush(stdout); - } exit(0); } |