1 |
– |
/* Copyright (c) 1991 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 |
|
* scanner.c - program to simulate bi-directional scanner. |
6 |
|
* |
7 |
|
* 6/10/86 |
8 |
|
*/ |
9 |
|
|
10 |
< |
#include "stdio.h" |
10 |
> |
#include <stdio.h> |
11 |
|
|
12 |
< |
#include "ctype.h" |
12 |
> |
#include <stdlib.h> |
13 |
|
|
14 |
< |
#include "signal.h" |
14 |
> |
#include <ctype.h> |
15 |
|
|
16 |
+ |
#include <signal.h> |
17 |
+ |
|
18 |
|
#include "random.h" |
19 |
|
|
20 |
|
|
41 |
|
int xres = 16; /* x sample resolution */ |
42 |
|
int yres = 16; /* y sample resolution */ |
43 |
|
|
44 |
+ |
static void quit(int code); |
45 |
|
|
46 |
|
main(argc, argv) |
47 |
|
int argc; |
48 |
|
char *argv[]; |
49 |
|
{ |
50 |
– |
double atof(); |
50 |
|
char *strcat(), *mktemp(); |
52 |
– |
int quit(); |
51 |
|
int i; |
52 |
|
|
53 |
+ |
#ifdef SIGHUP |
54 |
|
signal(SIGHUP, quit); |
55 |
+ |
#endif |
56 |
|
signal(SIGINT, quit); |
57 |
|
signal(SIGTERM, quit); |
58 |
+ |
#ifdef SIGXCPU |
59 |
|
signal(SIGXCPU, SIG_IGN); |
60 |
|
signal(SIGXFSZ, SIG_IGN); |
61 |
+ |
#endif |
62 |
|
|
63 |
|
for (i = 1; i < argc && argv[i][0] == '-'; i++) |
64 |
|
switch (argv[i][1]) { |
152 |
|
} |
153 |
|
|
154 |
|
|
155 |
+ |
void |
156 |
|
quit(code) /* unlink temp files and exit */ |
157 |
|
int code; |
158 |
|
{ |