Some basic auto{conf,make} stuff..
[liboconfig.git] / src / oconfig.c
1 /**
2  * octo's object oriented config library.
3  * Copyright (C) 2006  Florian octo Forster <octo at verplant.org>
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License, version 2, as published
7  * by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
17  */
18
19 #include <stdlib.h>
20 #include <stdio.h>
21 #include <string.h>
22 #include <assert.h>
23
24 #include "oconfig.h"
25
26 oconfig_item_t *oconfig_parse_fh (FILE *fh);
27 oconfig_item_t *oconfig_parse_file (const char *file);
28
29 void oconfig_free (oconfig_item_t *ci)
30 {
31   int i;
32
33   if (ci->values != NULL)
34     free (ci->values);
35
36   for (i = 0; i < ci->children_num; i++)
37     oconfig_free (ci->children + i);
38 }
39
40 /*
41  * vim:shiftwidth=2:tabstop=8:softtabstop=2
42  */