00001 00002 /*--------------------------------------------------------------------------- 00003 00004 File name : iniparser.h 00005 Author : N. Devillard 00006 Created on : March 2000 00007 Language : ANSI C 00008 Description : Parser for ini files 00009 00010 *--------------------------------------------------------------------------*/ 00011 00012 /* 00013 00014 $Id: iniparser.h,v 1.2 2005/04/08 13:37:49 amodigli Exp $ 00015 $Author: amodigli $ 00016 $Date: 2005/04/08 13:37:49 $ 00017 $Revision: 1.2 $ 00018 00019 */ 00020 00021 #ifndef _INIPARSER_H_ 00022 #define _INIPARSER_H_ 00023 00024 /*--------------------------------------------------------------------------- 00025 Includes 00026 ---------------------------------------------------------------------------*/ 00027 00028 #include <stdio.h> 00029 #include <stdlib.h> 00030 #include <string.h> 00031 #include <unistd.h> 00032 00033 #include "dictionary.h" 00034 00035 00036 /*-------------------------------------------------------------------------*/ 00050 /*--------------------------------------------------------------------------*/ 00051 void iniparser_dump(dictionary * d, FILE * f); 00052 00053 00054 /*-------------------------------------------------------------------------*/ 00068 /*--------------------------------------------------------------------------*/ 00069 00070 char * iniparser_getstr(dictionary * d, const char * key); 00071 00072 00073 /*-------------------------------------------------------------------------*/ 00087 /*--------------------------------------------------------------------------*/ 00088 00089 int iniparser_getint(dictionary * d, const char * key, int notfound); 00090 00091 00092 /*-------------------------------------------------------------------------*/ 00106 /*--------------------------------------------------------------------------*/ 00107 00108 double iniparser_getdouble(dictionary * d, const char * key, double notfound); 00109 00110 00111 /*-------------------------------------------------------------------------*/ 00147 /*--------------------------------------------------------------------------*/ 00148 00149 int iniparser_getboolean(dictionary * d, const char * key, int notfound); 00150 00151 00152 /*-------------------------------------------------------------------------*/ 00165 /*--------------------------------------------------------------------------*/ 00166 00167 int iniparser_setstr( 00168 dictionary * ini, 00169 char * entry, 00170 char * val 00171 ) ; 00172 00173 00174 /*-------------------------------------------------------------------------*/ 00187 /*--------------------------------------------------------------------------*/ 00188 00189 int iniparser_find_entry( 00190 dictionary * ini, 00191 char * entry 00192 ) ; 00193 00194 /*-------------------------------------------------------------------------*/ 00209 /*--------------------------------------------------------------------------*/ 00210 00211 00212 dictionary * iniparser_load(char * ininame); 00213 00214 00215 /*-------------------------------------------------------------------------*/ 00227 /*--------------------------------------------------------------------------*/ 00228 00229 void iniparser_freedict(dictionary * d); 00230 00231 #endif
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001