version 1.88, 2001/08/30 16:04:35 |
version 1.89, 2001/09/03 20:58:33 |
|
|
/* |
/* |
* Reads the config file and modifies the options accordingly. Options |
* Reads the config file and modifies the options accordingly. Options |
* should already be initialized before this call. This never returns if |
* should already be initialized before this call. This never returns if |
* there is an error. If the file does not exist, this returns immediately. |
* there is an error. If the file does not exist, this returns 0. |
*/ |
*/ |
|
|
void |
int |
read_config_file(const char *filename, const char *host, Options *options) |
read_config_file(const char *filename, const char *host, Options *options) |
{ |
{ |
FILE *f; |
FILE *f; |
|
|
/* Open the file. */ |
/* Open the file. */ |
f = fopen(filename, "r"); |
f = fopen(filename, "r"); |
if (!f) |
if (!f) |
return; |
return 0; |
|
|
debug("Reading configuration data %.200s", filename); |
debug("Reading configuration data %.200s", filename); |
|
|
|
|
if (bad_options > 0) |
if (bad_options > 0) |
fatal("%s: terminating, %d bad configuration options", |
fatal("%s: terminating, %d bad configuration options", |
filename, bad_options); |
filename, bad_options); |
|
return 1; |
} |
} |
|
|
/* |
/* |