--- ray/src/rt/duphead.c 1993/09/21 10:58:22 2.2 +++ ray/src/rt/duphead.c 2003/02/25 02:47:22 2.4 @@ -1,13 +1,14 @@ -/* Copyright (c) 1993 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: duphead.c,v 2.4 2003/02/25 02:47:22 greg Exp $"; #endif - /* * Duplicate header on stdout. + * + * Externals declared in ray.h */ +#include "copyright.h" + #include "standard.h" #include "paths.h" @@ -18,17 +19,19 @@ static char *headfname = NULL; /* temp file name */ static FILE *headfp = NULL; /* temp file pointer */ +void headclean() /* remove header temp file (if one) */ { - if (headfname != NULL) { - if (headfp != NULL) - fclose(headfp); - if (headismine) - unlink(headfname); - } + if (headfname == NULL) + return; + if (headfp != NULL) + fclose(headfp); + if (headismine) + unlink(headfname); } +void openheader() /* save standard output to header file */ { static char template[] = TEMPLATE; @@ -41,6 +44,7 @@ openheader() /* save standard output to header file } +void dupheader() /* repeat header on standard output */ { register int c;