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 |
|
* Compute Glare Index given by program name or -t option: |
6 |
|
* |
19 |
|
* 19 April 1993 R. Compagnon EPFL (added dgi, brs_gi, ugr) |
20 |
|
*/ |
21 |
|
|
22 |
+ |
#include <string.h> |
23 |
+ |
|
24 |
|
#include "standard.h" |
25 |
|
#include "view.h" |
26 |
|
|
28 |
– |
extern double erfc(); |
27 |
|
|
28 |
|
double posindex(); |
29 |
|
|
74 |
|
int argc; |
75 |
|
char *argv[]; |
76 |
|
{ |
79 |
– |
extern char *rindex(); |
77 |
|
struct named_func *funp; |
78 |
|
char *progtail; |
79 |
|
int i; |
80 |
|
/* get program name */ |
81 |
|
progname = argv[0]; |
82 |
< |
progtail = rindex(progname, '/'); /* final component */ |
82 |
> |
progtail = strrchr(progname, '/'); /* final component */ |
83 |
|
if (progtail == NULL) |
84 |
|
progtail = progname; |
85 |
|
else |
125 |
|
} |
126 |
|
|
127 |
|
|
128 |
+ |
int |
129 |
|
headline(s) /* get line from header */ |
130 |
|
char *s; |
131 |
|
{ |
139 |
|
formatval(fmt, s); |
140 |
|
wrongformat = strcmp(fmt, "ascii"); |
141 |
|
} |
142 |
+ |
return(0); |
143 |
|
} |
144 |
|
|
145 |
|
|
406 |
|
} |
407 |
|
|
408 |
|
|
410 |
– |
extern double erf(), erfc(); |
411 |
– |
|
409 |
|
#ifndef M_SQRT2 |
410 |
|
#define M_SQRT2 1.41421356237309504880 |
411 |
|
#endif |
417 |
|
guth_vcp(gd) /* compute Guth visual comfort probability */ |
418 |
|
struct glare_dir *gd; |
419 |
|
{ |
420 |
+ |
extern double erfc(); |
421 |
|
double dgr; |
422 |
|
|
423 |
|
dgr = guth_dgr(gd); |