1994-02-05 00:41:32 +03:00
|
|
|
/*
|
1994-02-05 02:17:50 +03:00
|
|
|
** $Id: config.c,v 1.2 1994/02/04 23:17:50 cgd Exp $
|
|
|
|
**
|
1994-02-05 00:41:32 +03:00
|
|
|
** config.c This file handles the config file
|
|
|
|
**
|
|
|
|
** This program is in the public domain and may be used freely by anyone
|
|
|
|
** who wants to.
|
|
|
|
**
|
|
|
|
** Last update: 6 Dec 1992
|
|
|
|
**
|
|
|
|
** Please send bug fixes/bug reports to: Peter Eriksson <pen@lysator.liu.se>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <errno.h>
|
|
|
|
|
|
|
|
#include "error.h"
|
|
|
|
#include "identd.h"
|
|
|
|
#include "paths.h"
|
|
|
|
|
|
|
|
|
|
|
|
int parse_config(path, silent_flag)
|
|
|
|
char *path;
|
|
|
|
int silent_flag;
|
|
|
|
{
|
|
|
|
FILE *fp;
|
|
|
|
|
|
|
|
if (!path)
|
|
|
|
path = PATH_CONFIG;
|
|
|
|
|
|
|
|
fp = fopen(path, "r");
|
|
|
|
if (!fp)
|
|
|
|
{
|
|
|
|
if (silent_flag)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
ERROR1("error opening %s", path);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
** Code should go here to parse the config file data.
|
|
|
|
** For now we just ignore the contents...
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
fclose(fp);
|
|
|
|
return 0;
|
|
|
|
}
|