Revision: | 346 |
Committed: | Tue Jun 9 12:00:41 2009 UTC (16 years, 4 months ago) by rossy |
Content type: | text/x-csrc |
File size: | 380 byte(s) |
Log Message: | parses daodan.ini to add language patches |
# | Content |
---|---|
1 | #include <stdio.h> |
2 | #include <stdbool.h> |
3 | #include "inifile.h" |
4 | |
5 | bool ini_callback(char* section, bool newsection, char* name, char* value) |
6 | { |
7 | if (newsection) |
8 | puts("New Section!"); |
9 | printf("Section: %s Name: %s Value: %s\n", section, name, value); |
10 | return true; |
11 | } |
12 | |
13 | int main() |
14 | { |
15 | if (!inifile_read("testini.ini", ini_callback)) |
16 | puts("Read error!"); |
17 | return 0; |
18 | } |