--- ray/src/px/pfilt.c 1992/10/02 16:24:06 2.5 +++ ray/src/px/pfilt.c 1993/06/18 16:20:16 2.8 @@ -10,14 +10,8 @@ static char SCCSid[] = "$SunId$ LBL"; * 9/26/85 */ -#include +#include "standard.h" -#ifdef MSDOS -#include -#endif - -#include - #include #include "color.h" @@ -26,7 +20,6 @@ static char SCCSid[] = "$SunId$ LBL"; #include "paths.h" -extern char *malloc(); extern float *matchlamp(); #define FEQ(a,b) ((a) >= .98*(b) && (a) <= 1.02*(b)) @@ -47,7 +40,7 @@ int singlepass = 0; /* true means skip first pass */ int avghot = 0; /* true means average in bright spots */ -double hotlvl = 1000.0; /* level considered "hot" */ +double hotlvl = 100.0; /* level considered "hot" */ int npts = 0; /* (half) number of points for stars */ @@ -104,7 +97,7 @@ char **argv; signal(SIGXFSZ, quit); #endif - progname = argv[0]; + progname = argv[0] = fixargv0(argv[0]); for (i = 1; i < argc; i++) if (argv[i][0] == '-') @@ -299,6 +292,8 @@ char *s; fputs(s, stdout); /* copy to output */ if (isaspect(s)) /* get aspect ratio */ inpaspect *= aspectval(s); + else if (isexpos(s)) + hotlvl *= exposval(s); else if (isformat(s)) { formatval(fmt, s); wrongformat = strcmp(fmt, COLRFMT); @@ -336,13 +331,13 @@ FILE *in; } for (i = 0; i < yres; i++) { if (freadscan(scan, xres, in) < 0) { - nrows = nrows * i / yres; /* adjust frame */ + nrows = (long)nrows * i / yres; /* adjust frame */ if (nrows <= 0) { fprintf(stderr, "%s: empty frame\n", progname); quit(1); } fprintf(stderr, "%s: warning - partial frame (%d%%)\n", - progname, 100*i/yres); + progname, (int)(100L*i/yres)); yres = i; y_r = (double)nrows/yres; break;