(emp_config): The previous rev. broke the documented feature that

missing default econfig means default configuration.  Fix.
This commit is contained in:
Markus Armbruster 2005-03-10 19:19:46 +00:00
parent 7f000ce9cc
commit 21088661d6

View file

@ -69,7 +69,6 @@ struct keymatch configkeys[] = {
#undef EMP_CONFIG_C_OUTPUT #undef EMP_CONFIG_C_OUTPUT
}; };
static void fixup_files(void);
static struct keymatch *keylookup(s_char *key, struct keymatch tbl[]); static struct keymatch *keylookup(s_char *key, struct keymatch tbl[]);
static int set_option(const char *, int); static int set_option(const char *, int);
@ -90,7 +89,10 @@ emp_config(char *file)
if (!file) if (!file)
file = dflt_econfig; file = dflt_econfig;
errno = 0;
if ((fp = fopen(file, "r")) == NULL) { if ((fp = fopen(file, "r")) == NULL) {
if (file == dflt_econfig && errno == ENOENT)
return 0;
fprintf(stderr, "Can't open %s for reading (%s)\n", fprintf(stderr, "Can't open %s for reading (%s)\n",
file, strerror(errno)); file, strerror(errno));
return -1; return -1;