1 |
– |
/* Copyright (c) 1996 Regents of the University of California */ |
2 |
– |
|
1 |
|
#ifndef lint |
2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
6 |
– |
|
4 |
|
/* |
5 |
|
* pfilt.c - program to post-process picture file. |
6 |
|
* |
8 |
|
* 6/23/93 Added additional buffers for value spreading |
9 |
|
*/ |
10 |
|
|
14 |
– |
#include "standard.h" |
15 |
– |
|
11 |
|
#include <signal.h> |
12 |
|
|
13 |
+ |
#include "standard.h" |
14 |
|
#include "color.h" |
19 |
– |
|
15 |
|
#include "view.h" |
21 |
– |
|
22 |
– |
#include "resolu.h" |
23 |
– |
|
16 |
|
#include "paths.h" |
17 |
|
|
18 |
|
extern float *matchlamp(); |
19 |
|
|
20 |
|
#define FEQ(a,b) ((a) >= .98*(b) && (a) <= 1.02*(b)) |
21 |
|
|
22 |
< |
double CHECKRAD = 1.5; /* radius to check for filtering */ |
22 |
> |
double CHECKRAD = 2.0; /* radius to check for filtering */ |
23 |
|
|
24 |
|
#define THRESHRAD 5.0 /* maximum sample spread in output */ |
25 |
|
|
84 |
|
int argc; |
85 |
|
char **argv; |
86 |
|
{ |
87 |
< |
extern long ftell(); |
96 |
< |
extern int quit(), headline(); |
87 |
> |
extern int headline(); |
88 |
|
FILE *fin; |
89 |
|
float *lampcolor; |
90 |
|
char *lamptype = NULL; |
92 |
|
double outaspect = 0.0; |
93 |
|
double d; |
94 |
|
int i, j; |
95 |
< |
#ifdef MSDOS |
96 |
< |
extern int _fmode; |
97 |
< |
_fmode = O_BINARY; |
107 |
< |
setmode(fileno(stdin), O_BINARY); |
108 |
< |
setmode(fileno(stdout), O_BINARY); |
109 |
< |
#endif |
95 |
> |
SET_DEFAULT_BINARY(); |
96 |
> |
SET_FILE_BINARY(stdin); |
97 |
> |
SET_FILE_BINARY(stdout); |
98 |
|
if (signal(SIGINT, quit) == SIG_IGN) |
99 |
|
signal(SIGINT, SIG_IGN); |
100 |
|
if (signal(SIGHUP, quit) == SIG_IGN) |
193 |
|
case 'm': |
194 |
|
thresh = atof(argv[++i]); |
195 |
|
if (rad <= FTINY) |
196 |
< |
rad = 1.0; |
196 |
> |
rad = 0.6; |
197 |
|
break; |
198 |
|
case 'b': |
199 |
|
rad = thresh = 0.0; |
389 |
|
} |
390 |
|
pass1scan(scan, i); |
391 |
|
} |
392 |
< |
free((char *)scan); |
392 |
> |
free((void *)scan); |
393 |
|
} |
394 |
|
|
395 |
|
|
561 |
|
} |
562 |
|
|
563 |
|
|
564 |
+ |
void |
565 |
|
quit(code) /* remove temporary file and exit */ |
566 |
|
int code; |
567 |
|
{ |