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 |
– |
|
19 |
– |
#include <math.h> |
20 |
– |
|
15 |
|
#include <signal.h> |
16 |
|
|
17 |
|
#include "color.h" |
20 |
|
|
21 |
|
#include "paths.h" |
22 |
|
|
29 |
– |
extern char *malloc(); |
23 |
|
extern float *matchlamp(); |
24 |
|
|
25 |
|
#define FEQ(a,b) ((a) >= .98*(b) && (a) <= 1.02*(b)) |
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] == '-') |
329 |
|
} |
330 |
|
for (i = 0; i < yres; i++) { |
331 |
|
if (freadscan(scan, xres, in) < 0) { |
332 |
< |
nrows = nrows * i / yres; /* adjust frame */ |
332 |
> |
nrows = (long)nrows * i / yres; /* adjust frame */ |
333 |
|
if (nrows <= 0) { |
334 |
|
fprintf(stderr, "%s: empty frame\n", progname); |
335 |
|
quit(1); |
336 |
|
} |
337 |
|
fprintf(stderr, "%s: warning - partial frame (%d%%)\n", |
338 |
< |
progname, 100*i/yres); |
338 |
> |
progname, (int)(100L*i/yres)); |
339 |
|
yres = i; |
340 |
|
y_r = (double)nrows/yres; |
341 |
|
break; |