source: trunk/mondo/mondo/lib/mrconf.h @ 767

Last change on this file since 767 was 767, checked in by bruno, 13 years ago

Creating a new library common for all mondo binaries
This should become the only common library when we now which functions should go there

File size: 1.6 KB
Line 
1/* mr_conf.h
2 *
3 * $Id$
4 *
5 * based on parse_conf.h (c)2002-2004 Anton Kulchitsky  mailto:anton@kulchitsky.org
6 * Review for mondorescue (c) 2006 Bruno Cornec <bruno@mondorescue.org>
7 *   
8 *     Header file of libmondo-conf (mr_conf): a very small and simple
9 *     library for mondorescue configuration file reading
10 *
11 *  This library is free software; you can redistribute it and/or
12 *  modify it under the terms of the GNU Lesser General Public License
13 *  as published by the Free Software Foundation; either version 2.1
14 *  of the License, or (at your option) any later version.
15 *
16 *  This library is distributed in the hope that it will be useful,
17 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19 *  Lesser General Public License for more details.
20 *
21 *  You should have received a copy of the GNU Lesser General Public
22 *  License along with this library; if not, write to the Free
23 *  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
24 *  02111-1307 USA
25 */
26
27#ifndef MR_CONF_H
28#define MR_CONF_H
29
30/* functions (public methods) */
31
32/*initialization and closing*/
33int mr_conf_open(const char *filename);
34void mr_conf_close();
35
36/*read integer number after string str in the current file*/
37int mr_conf_iread(const char *field_name);
38
39/*read double/float number after string str in the current file*/
40double mr_conf_fread(const char *field_name);
41
42/*
43 * read string after string str in the current file.
44 * This function allocates the string which has to be freed later on
45*/
46char *mr_conf_sread(const char *field_name);
47
48#endif                          /* MR_CONF_H */
Note: See TracBrowser for help on using the repository browser.