| 719 | } |
| 720 | |
| 721 | void CInifile::w_string(LPCSTR S, LPCSTR L, LPCSTR V) |
| 722 | { |
| 723 | R_ASSERT(!bReadOnly); |
| 724 | |
| 725 | // section |
| 726 | char sect[256]; |
| 727 | _parse(sect, S); |
| 728 | _strlwr(sect); |
| 729 | ASSERT_FMT(sect[0], "[%s]: wrong section name [%s]", __FUNCTION__, S); |
| 730 | |
| 731 | // parse line/value |
| 732 | char line[256]; |
| 733 | _parse(line, L); |
| 734 | ASSERT_FMT(line[0], "[%s]: wrong param name [%s]", __FUNCTION__, L); |
| 735 | char value[256]; |
| 736 | _parse(value, V); |
| 737 | |
| 738 | // duplicate & insert |
| 739 | Item I; |
| 740 | I.first = line; |
| 741 | I.second = value[0] ? value : 0; |
| 742 | |
| 743 | Sect* data = !section_exist(sect) ? &append_section(sect) : &r_section(sect); |
| 744 | insert_item(data, I); |
| 745 | |
| 746 | bWasChanged = true; |
| 747 | } |
| 748 | |
| 749 | void CInifile::w_u8(LPCSTR S, LPCSTR L, u8 V) |
| 750 | { |
no test coverage detected