]> git.saurik.com Git - apple/network_cmds.git/blob - identd.tproj/config.c
19eec4cfe37bd1c3328cefcd5befc8e8a511f625
[apple/network_cmds.git] / identd.tproj / config.c
1 /*
2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * "Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.0 (the 'License'). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
12 * this file.
13 *
14 * The Original Code and all software distributed under the License are
15 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
20 * under the License."
21 *
22 * @APPLE_LICENSE_HEADER_END@
23 */
24 /*
25 ** $Id: config.c,v 1.1.1.1 1999/05/02 03:57:41 wsanchez Exp $
26 **
27 ** config.c This file handles the config file
28 **
29 ** This program is in the public domain and may be used freely by anyone
30 ** who wants to.
31 **
32 ** Last update: 6 Dec 1992
33 **
34 ** Please send bug fixes/bug reports to: Peter Eriksson <pen@lysator.liu.se>
35 */
36
37 #include <stdio.h>
38 #include <errno.h>
39
40 #include "error.h"
41 #include "identd.h"
42 #include "xpaths.h"
43
44
45 int parse_config(path, silent_flag)
46 char *path;
47 int silent_flag;
48 {
49 FILE *fp;
50
51 if (!path)
52 path = PATH_CONFIG;
53
54 fp = fopen(path, "r");
55 if (!fp)
56 {
57 if (silent_flag)
58 return 0;
59
60 ERROR1("error opening %s", path);
61 }
62
63 /*
64 ** Code should go here to parse the config file data.
65 ** For now we just ignore the contents...
66 */
67
68
69 fclose(fp);
70 return 0;
71 }