Esempio n. 1
0
File: main.c Progetto: d5h/gah
static void
readin(const char *filename)
{
  FILE *fp;

  fp = fopen(filename, "rb");
  if (! fp)
    exit(1);

  readfp(fp);
  fclose(fp);
}
Esempio n. 2
0
/*
 * Read the configuration file (conf) and replace
 * the existing path list with the new version.
 * If the file is not readable, then no changes take place
 */
void conf_read(qelem *q, char *conf)
{
	FILE *fp = fopen(conf, "r");
	if (fp) {
		conf_file = conf;		/* XXX */
		readfp(q, fp);
		conf_file = 0;		/* XXX */
		(void) fclose(fp);
	} else {
		syslog(LOG_ERR, "open config file \"%s\": %s", conf, strerror(errno));
	}
}