source: MondoRescue/trunk/mondo/mondo/include/mr_conf.h@ 783

Last change on this file since 783 was 783, checked in by Bruno Cornec, 18 years ago
  • Massive rewrite continues for memory management.
  • main structure should now have all parameters allocated dynamically
  • new lib libmr.a + dir + build process reviewed to support it.
  • new include subdir to host external definitions of the new lib
  • code now compiles. Still one remaining link issues for mondorestore. This should allow for some tests soon.

(goal is to separate completely reviewed code and functions and provide clean interfaces)

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 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*/
33extern int mr_conf_open(const char *filename);
34extern void mr_conf_close();
35
36/*read integer number after string str in the current file*/
37extern int mr_conf_iread(const char *field_name);
38
39/*read double/float number after string str in the current file*/
40extern double 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*/
46extern char *mr_conf_sread(const char *field_name);
47
48#endif /* MR_CONF_H */
Note: See TracBrowser for help on using the repository browser.