1 |
|
#ifndef lint |
2 |
< |
static const char RCSid[] = "$Id$"; |
2 |
> |
static const char RCSid[] = "$Id$"; |
3 |
|
#endif |
4 |
|
/* |
5 |
|
* pfilt.c - program to post-process picture file. |
8 |
|
* 6/23/93 Added additional buffers for value spreading |
9 |
|
*/ |
10 |
|
|
11 |
– |
#include "standard.h" |
12 |
– |
|
11 |
|
#include <signal.h> |
12 |
|
|
13 |
+ |
#include "standard.h" |
14 |
+ |
#include "platform.h" |
15 |
|
#include "color.h" |
16 |
– |
|
16 |
|
#include "view.h" |
18 |
– |
|
17 |
|
#include "paths.h" |
18 |
|
|
19 |
|
extern float *matchlamp(); |
20 |
|
|
21 |
|
#define FEQ(a,b) ((a) >= .98*(b) && (a) <= 1.02*(b)) |
22 |
|
|
23 |
< |
double CHECKRAD = 1.5; /* radius to check for filtering */ |
23 |
> |
double CHECKRAD = 2.0; /* radius to check for filtering */ |
24 |
|
|
25 |
|
#define THRESHRAD 5.0 /* maximum sample spread in output */ |
26 |
|
|
93 |
|
double outaspect = 0.0; |
94 |
|
double d; |
95 |
|
int i, j; |
96 |
< |
#ifdef MSDOS |
97 |
< |
extern int _fmode; |
98 |
< |
_fmode = O_BINARY; |
101 |
< |
setmode(fileno(stdin), O_BINARY); |
102 |
< |
setmode(fileno(stdout), O_BINARY); |
103 |
< |
#endif |
96 |
> |
SET_DEFAULT_BINARY(); |
97 |
> |
SET_FILE_BINARY(stdin); |
98 |
> |
SET_FILE_BINARY(stdout); |
99 |
|
if (signal(SIGINT, quit) == SIG_IGN) |
100 |
|
signal(SIGINT, SIG_IGN); |
101 |
+ |
#ifdef SIGHUP |
102 |
|
if (signal(SIGHUP, quit) == SIG_IGN) |
103 |
|
signal(SIGHUP, SIG_IGN); |
104 |
+ |
#endif |
105 |
|
signal(SIGTERM, quit); |
106 |
+ |
#ifdef SIGPIPE |
107 |
|
signal(SIGPIPE, quit); |
108 |
+ |
#endif |
109 |
|
#ifdef SIGXCPU |
110 |
|
signal(SIGXCPU, quit); |
111 |
|
signal(SIGXFSZ, quit); |