*/
#ifndef lint
-static char rcsid[] = "$Id: options.c,v 1.1 1993/11/11 03:54:25 paulus Exp $";
+static char rcsid[] = "$Id: options.c,v 1.2 1993/11/23 23:40:53 paulus Exp $";
#endif
#include <stdio.h>
* and interpret them.
*/
int
-options_from_file(filename)
+options_from_file(filename, must_exist)
char *filename;
+ int must_exist;
{
FILE *f;
int i, newline;
char cmd[MAXWORDLEN];
if ((f = fopen(filename, "r")) == NULL) {
- if (errno == ENOENT)
+ if (!must_exist && errno == ENOENT)
return 1;
perror(filename);
exit(1);
novm("init file name");
strcpy(path, user);
strcat(path, file);
- ret = options_from_file(path);
+ ret = options_from_file(path, 0);
free(path);
return ret;
}
readfile(argv)
char **argv;
{
- return options_from_file(*argv);
+ return options_from_file(*argv, 1);
}
/*