1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
|
INI File
~~~~~~~~
1/ ACA internal structs:
=====================
aca_INI
~~~~~~~
|
+--- filename
|
+--- *INI_Sections
~~~~~~~~~~~~~
|
+----- Section 1
|
+----- Section 2
.
.
+----- Section (N)
|
+----- name
|
+----- flag (need SAVE / need LOAD / LOADED)
|
+----- *INI_SectionData
~~~~~~~~~~~~~~~
|
+----- INI_SectionData 1
|
+----- INI_SectionData (N)
|
+----- value
|
+----- content
2/ INI file format
===============
--------file begin>
ACAlib's message
\n
\n
[First Section Name]
value1=data data data...
value1=data data data...
.
.
valueN=data data data...
\n
\n
[Second Section Name]
value1=data
value2=data
\n
\n
<--------file end
3/ INI for terminal keys
=====================
(for more see documentation files 'init', 'keys')
Keys definition (if you want it) is independent and in libACA
defined INI_Section.
Values:
'keyname=sequence'
definition in you program: (see ini_test.c example)
INI_section your_sects[] = {
{ "1 YourSectionName", your_flag, your_SectionData },
{ "2 YourSectionName", your_flag, your_SectionData },
TERMINAL_KEYS_SECTION, /* <------- !!! */
{ chN, FALSE, NULL } /* end */
}
aca_INI INI = { "your.ini", your_sects };
/* init ACA */
init_aca(TRUE);
init_keys_ini(&ini_sec[2]); /* <------- !!! */
/* load data */
INI_load(&INI);
/* init keys */
init_keys(&INI);
More informations is in examples: 'ini_test.c', 'dlgs.c'
|