8c2952457
김태훈
응용 프로그램 추가
|
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
|
#ifndef __TINI_FILE__
#define __TINI_FILE__
#define INIERR_NONE 0
#define INIERR_OUT_OF_MEMORY 1
#define INIERR_FILENAME_FAIL 2
#define INIERR_NO_DATA 3
#define INIERR_NO_FILE 4
#define INIERR_ACCESS_FAIL 5
#define INIERR_CREATE_SECTION_FAIL 6
#define INIERR_CREATE_IDENTIFY_FAIL 7
#define INIERR_READ_IDENTIFY_FAIL 8
#define INIERR_NULL_POINTER 9
#define INI_TRUE 1
#define INI_FALSE 0
typedef struct
{
char *filename;
int is_changed;
tstrlist *lst_sections;
} inifile_t;
extern int ini_error_code;
extern char *ini_error_string( void);
extern int ini_print_error( char *remark);
extern inifile_t *ini_create( char *filename);
extern int ini_flush( inifile_t *inifile);
extern void ini_free( inifile_t *inifile);
extern int ini_save_to_file ( inifile_t *inifile, char *filename);
extern tstrlist *ini_read_sections ( inifile_t *inifile);
extern tstrlist *ini_read_section ( inifile_t *inifile, char *str_section);
extern char * ini_read_string ( inifile_t *inifile, char *str_section, char *str_identify, char *default_value);
extern int ini_read_integer ( inifile_t *inifile, char *str_section, char *str_identify, int default_value);
extern double ini_read_real ( inifile_t *inifile, char *str_section, char *str_identify, double default_value);
extern int ini_read_bool ( inifile_t *inifile, char *str_section, char *str_identify, int default_value);
extern int ini_write_string ( inifile_t *inifile, char *str_section, char *str_identify, char *value);
extern int ini_write_integer ( inifile_t *inifile, char *str_section, char *str_identify, int value);
extern int ini_write_real ( inifile_t *inifile, char *str_section, char *str_identify, double value);
extern int ini_write_bool ( inifile_t *inifile, char *str_section, char *str_identify, int value);
extern void ini_remove_section( inifile_t *inifile, char *str_section);
extern char ini_read_char ( inifile_t *inifile, char *str_section, char *str_identify, char default_value);
extern int ini_write_char ( inifile_t *inifile, char *str_section, char *str_identify, char value);
#endif
|