ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/src/inifile_test.c
(Generate patch)

Comparing Daodan/src/inifile_test.c (file contents):
Revision 346 by rossy, Tue Jun 9 12:00:41 2009 UTC vs.
Revision 451 by rossy, Sun Jul 26 12:04:44 2009 UTC

# Line 1 | Line 1
1   #include <stdio.h>
2   #include <stdbool.h>
3 + #include <string.h>
4   #include "inifile.h"
5  
6   bool ini_callback(char* section, bool newsection, char* name, char* value)
# Line 7 | Line 8 | bool ini_callback(char* section, bool ne
8          if (newsection)
9                  puts("New Section!");
10          printf("Section: %s Name: %s Value: %s\n", section, name, value);
11 +        if (!stricmp(name, "cleantest"))
12 +                printf("  CleanTest: \"%s\" = \"%s\"\n", value, inifile_cleanstr(value));
13 +        if (!stricmp(name, "inttest"))
14 +                printf("  IntTest: %s = %u\n", value, (uint32_t)inifile_parseint(value, false));
15 +        if (!stricmp(name, "sinttest"))
16 +                printf("  IntTest: %s = %d\n", value, (int32_t)inifile_parseint(value, true));
17          return true;
18   }
19  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)