--- ray/src/util/glarendx.c 1994/03/24 11:06:59 2.4 +++ ray/src/util/glarendx.c 2003/06/30 14:59:13 2.8 @@ -1,9 +1,6 @@ -/* Copyright (c) 1991 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: glarendx.c,v 2.8 2003/06/30 14:59:13 schorsch Exp $"; #endif - /* * Compute Glare Index given by program name or -t option: * @@ -22,10 +19,11 @@ static char SCCSid[] = "$SunId$ LBL"; * 19 April 1993 R. Compagnon EPFL (added dgi, brs_gi, ugr) */ +#include + #include "standard.h" #include "view.h" -extern double erfc(); double posindex(); @@ -76,13 +74,12 @@ main(argc, argv) int argc; char *argv[]; { - extern char *rindex(); struct named_func *funp; char *progtail; int i; /* get program name */ progname = argv[0]; - progtail = rindex(progname, '/'); /* final component */ + progtail = strrchr(progname, '/'); /* final component */ if (progtail == NULL) progtail = progname; else @@ -128,6 +125,7 @@ userr: } +int headline(s) /* get line from header */ char *s; { @@ -141,6 +139,7 @@ char *s; formatval(fmt, s); wrongformat = strcmp(fmt, "ascii"); } + return(0); } @@ -407,8 +406,6 @@ struct glare_dir *gd; } -extern double erf(), erfc(); - #ifndef M_SQRT2 #define M_SQRT2 1.41421356237309504880 #endif @@ -420,6 +417,7 @@ double guth_vcp(gd) /* compute Guth visual comfort probability */ struct glare_dir *gd; { + extern double erfc(); double dgr; dgr = guth_dgr(gd);