| 10 |
|
* 9/26/85 |
| 11 |
|
*/ |
| 12 |
|
|
| 13 |
< |
#include <stdio.h> |
| 13 |
> |
#include "standard.h" |
| 14 |
|
|
| 15 |
– |
#ifdef MSDOS |
| 16 |
– |
#include <fcntl.h> |
| 17 |
– |
#endif |
| 18 |
– |
|
| 15 |
|
#include <signal.h> |
| 16 |
|
|
| 17 |
|
#include "color.h" |
| 20 |
|
|
| 21 |
|
#include "paths.h" |
| 22 |
|
|
| 27 |
– |
extern char *malloc(); |
| 23 |
|
extern float *matchlamp(); |
| 24 |
|
|
| 25 |
|
#define FEQ(a,b) ((a) >= .98*(b) && (a) <= 1.02*(b)) |
| 40 |
|
|
| 41 |
|
int avghot = 0; /* true means average in bright spots */ |
| 42 |
|
|
| 43 |
< |
double hotlvl = 1000.0; /* level considered "hot" */ |
| 43 |
> |
double hotlvl = 100.0; /* level considered "hot" */ |
| 44 |
|
|
| 45 |
|
int npts = 0; /* (half) number of points for stars */ |
| 46 |
|
|
| 71 |
|
int argc; |
| 72 |
|
char **argv; |
| 73 |
|
{ |
| 79 |
– |
extern double pow(); |
| 74 |
|
extern long ftell(); |
| 75 |
|
extern int quit(), headline(); |
| 76 |
|
FILE *fin; |
| 97 |
|
signal(SIGXFSZ, quit); |
| 98 |
|
#endif |
| 99 |
|
|
| 100 |
< |
progname = argv[0]; |
| 100 |
> |
progname = argv[0] = fixargv0(argv[0]); |
| 101 |
|
|
| 102 |
|
for (i = 1; i < argc; i++) |
| 103 |
|
if (argv[i][0] == '-') |
| 292 |
|
fputs(s, stdout); /* copy to output */ |
| 293 |
|
if (isaspect(s)) /* get aspect ratio */ |
| 294 |
|
inpaspect *= aspectval(s); |
| 295 |
+ |
else if (isexpos(s)) |
| 296 |
+ |
hotlvl *= exposval(s); |
| 297 |
|
else if (isformat(s)) { |
| 298 |
|
formatval(fmt, s); |
| 299 |
|
wrongformat = strcmp(fmt, COLRFMT); |
| 331 |
|
} |
| 332 |
|
for (i = 0; i < yres; i++) { |
| 333 |
|
if (freadscan(scan, xres, in) < 0) { |
| 334 |
< |
nrows = nrows * i / yres; /* adjust frame */ |
| 334 |
> |
nrows = (long)nrows * i / yres; /* adjust frame */ |
| 335 |
|
if (nrows <= 0) { |
| 336 |
|
fprintf(stderr, "%s: empty frame\n", progname); |
| 337 |
|
quit(1); |
| 338 |
|
} |
| 339 |
|
fprintf(stderr, "%s: warning - partial frame (%d%%)\n", |
| 340 |
< |
progname, 100*i/yres); |
| 340 |
> |
progname, (int)(100L*i/yres)); |
| 341 |
|
yres = i; |
| 342 |
|
y_r = (double)nrows/yres; |
| 343 |
|
break; |