@@ -1690,46 +1690,55 @@ INI_ReadFile_cont:
1690
1690
1691
1691
static stock INI_HandleEntry (const key[], const value[]) < y_ini: y_ini_reading_yyyy, y_ini: y_ini_reading_nyyy>
1692
1692
{
1693
+ Debug_Print5 (" INI_HandleEntry<y_ini:y_ini_reading_yyy> called: %s , %s " , key, value);
1693
1694
@.YSI_g_sCB_issss (YSI_g_sExtra, YSI_g_sFile, YSI_g_sTag, key, value);
1694
1695
}
1695
1696
1696
1697
static stock INI_HandleEntry (const key[], const value[]) < y_ini: y_ini_reading_yyyn, y_ini: y_ini_reading_nyyn>
1697
1698
{
1699
+ Debug_Print5 (" INI_HandleEntry<y_ini:y_ini_reading_yyn> called: %s , %s " , key, value);
1698
1700
@.YSI_g_sCB_isss (YSI_g_sExtra, YSI_g_sTag, key, value);
1699
1701
}
1700
1702
1701
1703
static stock INI_HandleEntry (const key[], const value[]) < y_ini: y_ini_reading_yyny, y_ini: y_ini_reading_nyny>
1702
1704
{
1705
+ Debug_Print5 (" INI_HandleEntry<y_ini:y_ini_reading_yny> called: %s , %s " , key, value);
1703
1706
@.YSI_g_sCB_isss (YSI_g_sExtra, YSI_g_sFile, key, value);
1704
1707
}
1705
1708
1706
1709
static stock INI_HandleEntry (const key[], const value[]) < y_ini: y_ini_reading_yynn, y_ini: y_ini_reading_nynn>
1707
1710
{
1711
+ Debug_Print5 (" INI_HandleEntry<y_ini:y_ini_reading_ynn> called: %s , %s " , key, value);
1708
1712
@.YSI_g_sCB_iss (YSI_g_sExtra, key, value);
1709
1713
}
1710
1714
1711
1715
static stock INI_HandleEntry (const key[], const value[]) < y_ini: y_ini_reading_ynyy, y_ini: y_ini_reading_nnyy>
1712
1716
{
1717
+ Debug_Print5 (" INI_HandleEntry<y_ini:y_ini_reading_nyy> called: %s , %s " , key, value);
1713
1718
@.YSI_g_sCB_ssss (YSI_g_sFile, YSI_g_sTag, key, value);
1714
1719
}
1715
1720
1716
1721
static stock INI_HandleEntry (const key[], const value[]) < y_ini: y_ini_reading_ynyn, y_ini: y_ini_reading_nnyn>
1717
1722
{
1723
+ Debug_Print5 (" INI_HandleEntry<y_ini:y_ini_reading_nyn> called: %s , %s " , key, value);
1718
1724
@.YSI_g_sCB_sss (YSI_g_sTag, key, value);
1719
1725
}
1720
1726
1721
1727
static stock INI_HandleEntry (const key[], const value[]) < y_ini: y_ini_reading_ynny, y_ini: y_ini_reading_nnny>
1722
1728
{
1729
+ Debug_Print5 (" INI_HandleEntry<y_ini:y_ini_reading_nny> called: %s , %s " , key, value);
1723
1730
@.YSI_g_sCB_sss (YSI_g_sFile, key, value);
1724
1731
}
1725
1732
1726
1733
static stock INI_HandleEntry (const key[], const value[]) < y_ini: y_ini_reading_ynnn, y_ini: y_ini_reading_nnnn>
1727
1734
{
1735
+ Debug_Print5 (" INI_HandleEntry<y_ini:y_ini_reading_nnn> called: %s , %s " , key, value);
1728
1736
@.YSI_g_sCB_ss (key, value);
1729
1737
}
1730
1738
1731
1739
static stock INI_HandleEntry (const key[], const value[]) < y_ini: y_ini_writing_slow>
1732
1740
{
1741
+ Debug_Print5 (" INI_HandleEntry<y_ini:y_ini_writing_slow> called: %s , %s " , key, value);
1733
1742
// Used when reading. Checks if the key is being overwritten, and if not
1734
1743
// writes it out to the new file.
1735
1744
INI_WriteTag (YSI_g_sCurrentFile, YSI_g_sTag, YSI_g_sFormat);
@@ -1746,15 +1755,21 @@ static stock INI_HandleEntry(const key[], const value[]) <y_ini:y_ini_writing_sl
1746
1755
// Not deleted.
1747
1756
if (INI_KeyListGetValue (mem))
1748
1757
{
1758
+ Debug_Print6 (" INI_HandleEntry<y_ini:y_ini_writing_slow> updated" );
1749
1759
INI_KeyListRemove (prev, mem),
1750
1760
INI_KeyListMakeWritable (mem),
1751
1761
fwrite (YSI_g_sCurrentFile, INI_KeyListGetKey (mem)),
1752
1762
// Remove this from the list.
1753
1763
free (mem);
1754
1764
}
1765
+ else
1766
+ {
1767
+ Debug_Print6 (" INI_HandleEntry<y_ini:y_ini_writing_slow> deleted" );
1768
+ }
1755
1769
}
1756
1770
else
1757
1771
{
1772
+ Debug_Print6 (" INI_HandleEntry<y_ini:y_ini_writing_slow> unchanged" );
1758
1773
// Write the entry.
1759
1774
fwrite (YSI_g_sCurrentFile, key),
1760
1775
fwrite (YSI_g_sCurrentFile, " =" ),
@@ -1765,6 +1780,7 @@ static stock INI_HandleEntry(const key[], const value[]) <y_ini:y_ini_writing_sl
1765
1780
1766
1781
static stock INI_HandleEntry (const key[], const value[]) < y_ini: y_ini_writing_fast>
1767
1782
{
1783
+ Debug_Print5 (" INI_HandleEntry<y_ini:y_ini_writing_fast> called: %s , %s " , key, value);
1768
1784
// Nothing in the current tag is being overwritten, just dump this
1769
1785
// key/value pair straight to disk with no extra checks.
1770
1786
INI_WriteTag (YSI_g_sCurrentFile, YSI_g_sTag, YSI_g_sFormat);
@@ -2079,12 +2095,14 @@ static stock INI_Flush_(INI:file)
2079
2095
// You can't delete the no-tag tag.
2080
2096
if (INI_TagListGetEntries (YSI_g_sCurrentTag))
2081
2097
{
2098
+ Debug_Print5 (" INI_Flush_: Writing slow" );
2082
2099
// Slightly slower, as for every key we need to check if there is a
2083
2100
// new value being written.
2084
2101
state y_ini: y_ini_writing_slow;
2085
2102
}
2086
2103
else
2087
2104
{
2105
+ Debug_Print5 (" INI_Flush_: Writing fast" );
2088
2106
// Nothing to write, just copy all the existing data.
2089
2107
YSI_g_sCurrentTag = NO_ALLOC;
2090
2108
}
0 commit comments