-rw-r--r-- | gammu/emb/common/misc/cfg.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gammu/emb/common/misc/cfg.h b/gammu/emb/common/misc/cfg.h new file mode 100644 index 0000000..edb9b09 --- a/dev/null +++ b/gammu/emb/common/misc/cfg.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* (c) 2003 by Marcin Wiacek */ | ||
2 | |||
3 | #ifndef _cfg_h | ||
4 | #define _cfg_h | ||
5 | |||
6 | #include "misc.h" | ||
7 | |||
8 | /* -------------------------------- structures ----------------------------- */ | ||
9 | |||
10 | typedef struct _INI_Entry INI_Entry; | ||
11 | |||
12 | /* | ||
13 | * Structure used to save value for single key in INI style file | ||
14 | */ | ||
15 | struct _INI_Entry { | ||
16 | INI_Entry *Next, *Prev; | ||
17 | unsigned char *EntryName; | ||
18 | unsigned char *EntryValue; | ||
19 | }; | ||
20 | |||
21 | typedef struct _INI_Section INI_Section; | ||
22 | |||
23 | /* | ||
24 | * Structure used to save section in INI style file | ||
25 | */ | ||
26 | struct _INI_Section { | ||
27 | INI_Section *Next, *Prev; | ||
28 | INI_Entry *SubEntries; | ||
29 | unsigned char *SectionName; | ||
30 | }; | ||
31 | |||
32 | /* ------------------------- function prototypes --------------------------- */ | ||
33 | |||
34 | INI_Section *INI_ReadFile (char *FileName, bool Unicode); | ||
35 | INI_Entry *INI_FindLastSectionEntry (INI_Section *file_info, unsigned char *section, bool Unicode); | ||
36 | unsigned char *INI_GetValue (INI_Section *cfg, unsigned char *section, unsigned char *key, bool Unicode); | ||
37 | |||
38 | #endif | ||
39 | |||
40 | /* How should editor hadle tabs in this file? Add editor commands here. | ||
41 | * vim: noexpandtab sw=8 ts=8 sts=8: | ||
42 | */ | ||