--- ray/src/util/scanner.c 1991/03/12 13:05:12 1.1 +++ ray/src/util/scanner.c 2003/06/26 00:58:11 1.4 @@ -1,21 +1,20 @@ -/* Copyright (c) 1991 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: scanner.c,v 1.4 2003/06/26 00:58:11 schorsch Exp $"; #endif - /* * scanner.c - program to simulate bi-directional scanner. * * 6/10/86 */ -#include "stdio.h" +#include -#include "ctype.h" +#include -#include "signal.h" +#include +#include + #include "random.h" @@ -42,21 +41,24 @@ double targeth = 3.0; /* target height (inches) */ int xres = 16; /* x sample resolution */ int yres = 16; /* y sample resolution */ +static void quit(int code); main(argc, argv) int argc; char *argv[]; { - double atof(); char *strcat(), *mktemp(); - int quit(); int i; +#ifdef SIGHUP signal(SIGHUP, quit); +#endif signal(SIGINT, quit); signal(SIGTERM, quit); +#ifdef SIGXCPU signal(SIGXCPU, SIG_IGN); signal(SIGXFSZ, SIG_IGN); +#endif for (i = 1; i < argc && argv[i][0] == '-'; i++) switch (argv[i][1]) { @@ -150,6 +152,7 @@ badopt: } +void quit(code) /* unlink temp files and exit */ int code; {