23 |
|
|
24 |
|
#include <stdio.h> |
25 |
|
|
26 |
< |
extern void PrefsInit(void); |
26 |
> |
extern void PrefsInit(int argc, char **argv); |
27 |
|
extern void PrefsExit(void); |
28 |
|
|
29 |
|
extern void AddPrefsDefaults(void); |
39 |
|
// Public preferences access functions |
40 |
|
extern void PrefsAddString(const char *name, const char *s); |
41 |
|
extern void PrefsAddBool(const char *name, bool b); |
42 |
– |
extern void PrefsAddInt16(const char *name, int16 val); |
42 |
|
extern void PrefsAddInt32(const char *name, int32 val); |
43 |
|
|
44 |
|
extern void PrefsReplaceString(const char *name, const char *s, int index = 0); |
45 |
|
extern void PrefsReplaceBool(const char *name, bool b); |
47 |
– |
extern void PrefsReplaceInt16(const char *name, int16 val); |
46 |
|
extern void PrefsReplaceInt32(const char *name, int32 val); |
47 |
|
|
48 |
|
extern const char *PrefsFindString(const char *name, int index = 0); |
49 |
|
extern bool PrefsFindBool(const char *name); |
52 |
– |
extern int16 PrefsFindInt16(const char *name); |
50 |
|
extern int32 PrefsFindInt32(const char *name); |
51 |
|
|
52 |
|
extern void PrefsRemoveItem(const char *name, int index = 0); |
60 |
|
enum prefs_type { |
61 |
|
TYPE_STRING, // char[] |
62 |
|
TYPE_BOOLEAN, // bool |
66 |
– |
TYPE_INT16, // int16 |
63 |
|
TYPE_INT32, // int32 |
64 |
|
TYPE_ANY, // Wildcard for find_node |
65 |
|
TYPE_END = TYPE_ANY // Terminator for prefs_desc list |