|
|
| version 1.3, 2003/11/26 14:55:01 | version 1.4, 2003/11/28 16:29:57 |
|---|---|
| Line 315 iwss_extend: | Line 315 iwss_extend: |
| static BOOL read_iniread_flag(const INITBL *p); | static BOOL read_iniread_flag(const INITBL *p); |
| void | void |
| ini_write(const char *path, const char *title, const INITBL *tbl, UINT count) | ini_write(const char *path, const char *title, const INITBL *tbl, UINT count, BOOL create) |
| { | { |
| char work[512]; | char work[512]; |
| const INITBL *p; | const INITBL *p; |
| Line 323 ini_write(const char *path, const char * | Line 323 ini_write(const char *path, const char * |
| FILEH fh; | FILEH fh; |
| BOOL set; | BOOL set; |
| fh = file_create(path); | fh = FILEH_INVALID; |
| if (fh == FILEH_INVALID) | if (!create) { |
| return; | fh = file_open(path); |
| if (fh != FILEH_INVALID) | |
| file_seek(fh, 0L, FSEEK_END); | |
| } | |
| if (fh == FILEH_INVALID) { | |
| fh = file_create(path); | |
| if (fh == FILEH_INVALID) | |
| return; | |
| } | |
| milstr_ncpy(work, "[", sizeof(work)); | milstr_ncpy(work, "[", sizeof(work)); |
| milstr_ncat(work, title, sizeof(work)); | milstr_ncat(work, title, sizeof(work)); |
| Line 599 initsave(void) | Line 607 initsave(void) |
| char path[MAX_PATH]; | char path[MAX_PATH]; |
| milstr_ncpy(path, modulefile, sizeof(path)); | milstr_ncpy(path, modulefile, sizeof(path)); |
| ini_write(path, ini_title, iniitem, INIITEMS); | ini_write(path, ini_title, iniitem, INIITEMS, TRUE); |
| } | } |