| 4 |
|
/* |
| 5 |
|
* Find and open a Radiance library file. |
| 6 |
|
* |
| 7 |
< |
* External symbols declared in standard.h |
| 7 |
> |
* External symbols declared in paths.h |
| 8 |
|
*/ |
| 9 |
|
|
| 10 |
|
#include "copyright.h" |
| 15 |
|
|
| 16 |
|
|
| 17 |
|
FILE * |
| 18 |
< |
frlibopen(fname) /* find file and open for reading */ |
| 19 |
< |
register char *fname; |
| 18 |
> |
frlibopen( /* find file and open for reading */ |
| 19 |
> |
char *fname |
| 20 |
> |
) |
| 21 |
|
{ |
| 21 |
– |
extern char *getrlibpath(); |
| 22 |
|
FILE *fp; |
| 23 |
|
char pname[PATH_MAX]; |
| 24 |
< |
register char *sp, *cp; |
| 24 |
> |
char *sp, *cp; |
| 25 |
|
|
| 26 |
|
if (fname == NULL) |
| 27 |
|
return(NULL); |
| 28 |
|
|
| 29 |
< |
if (ISDIRSEP(fname[0]) || fname[0] == '.') /* absolute path */ |
| 29 |
> |
if (ISABS(fname) || fname[0] == '.') /* absolute path */ |
| 30 |
|
return(fopen(fname, "r")); |
| 31 |
|
/* check search path */ |
| 32 |
|
sp = getrlibpath(); |