7 A Linux/Unix toolset and driver for Nokia mobile phones.
9 Copyright (C) 1999, 2000 Hugh Blemings & Pavel JanÃk ml.
11 Released under the terms of the GNU GPL, see file COPYING for more details.
13 Header file for config file reader.
16 Revision 1.1.1.1.8.1 2001/11/25 23:10:58 short
17 * ... - new cfgreader.c/CFG_GetForeach()
18 some "const" keywords written - they are missing almost everywhere in Gnokii!
19 "CFG_info" is now global public symbol
20 * Global symbols became IMO obsolete: {model,port,initlength,connection,bindir}
21 stdout/stderr are de-buffered (cfgreading is upon startup)
22 * I know that it doesn't belong here but currently there is now generic
23 application init function anywhere.
24 * stdout/stderr de-buffering is already donw at various weird places all
27 Revision 1.1.1.1 2001/11/25 21:59:19 short
28 :pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Sun Nov 25 22:56 CET 2001
30 Revision 1.4 2000/12/19 16:18:19 pkot
31 configure script updates and added shared function for configfile reading
41 /* Structure definitions */
43 /* A linked list of key/value pairs */
46 struct CFG_Entry *next, *prev;
52 struct CFG_Header *next, *prev;
53 struct CFG_Entry *entries;
57 /* Global variables */
59 extern struct CFG_Header *CFG_Info;
61 /* Function prototypes */
63 struct CFG_Header *CFG_ReadFile(char *filename);
64 char *CFG_Get(struct CFG_Header *cfg, const char *section, const char *key);
65 typedef void (*CFG_GetForeach_func)(const char *section,const char *key,const char *value);
66 void CFG_GetForeach(struct CFG_Header *cfg, const char *section, CFG_GetForeach_func func);
67 char *CFG_Set(struct CFG_Header *cfg, char *section, char *key,
69 int CFG_WriteFile(struct CFG_Header *cfg, char *filename);
70 int readconfig(char **model, char **port, char **initlength, char **connection, char **bindir);
72 #endif /* _CFGREADER_H */