1 #define SETTING_BOOL   0
2 #define SETTING_SELECT 1
3 #define SETTING_MULTI  2
4 #define SETTING_FREE   3
5 
6 #include <wchar.h>
7 
8 typedef struct {
9   int type;
10   char refLabel[16];
11   wchar_t textLabel[32];
12   int invert;
13   int intSetting;
14   char *charSetting;
15   int maxValue;
16 } settingIndex;
17 
18 typedef struct {
19   int index;
20   char refLabel[16];
21   char value[16];
22 } t1CharValues;
23 
24 typedef struct {
25   int index;
26   char refLabel[16];
27   char settingLabel[16];
28   int value;
29   int boolVal;
30 } t2BinValues;
31 
32 typedef struct {
33   int index;
34   char refLabel[16];
35   char settingLabel[16];
36 } t3TextValues;
37 
38 void addT1CharValue(t1CharValues **values, int *totalItems, int *maxItem, char *refLabel, char *value);
39 void addT2BinValue(t2BinValues **values, int *totalItems, int *maxItem, char *refLabel, char *settingLabel, int reset);
40 void populateBool(t2BinValues **values, char *refLabel, int setting, int maxValue);
41 void adjustBinSetting(settingIndex **settings, t2BinValues **values, char *refLabel, int *setting, int maxValue);
42 void importSetting(settingIndex **settings, int *items, char *refLabel, wchar_t *textLabel, int type, char *charSetting, int intSetting, int maxValue, int invert);
43 void updateSetting(settingIndex **settings, int index, int type, int intSetting);
44 int intSettingValue(int *setting, int newValue);
45 void printSetting(int line, int col, settingIndex **settings, t1CharValues **values, t2BinValues **bins, int index, int charIndex, int binIndex, int type, int invert);
46 int textValueLookup(t1CharValues **values, int *items, char *refLabel, char *value);
47