some more stack shrinking

This commit is contained in:
2018-01-13 21:33:19 +01:00
parent 8a28395102
commit 69443613fc
8 changed files with 59 additions and 46 deletions
+11 -1
View File
@@ -82,7 +82,7 @@ void iw_section(IniWriter *iw, const char *format, ...)
iw_string(iw, "]\r\n");
}
void iw_comment(IniWriter *iw, const char *format, ...)
void iw_commentf(IniWriter *iw, const char *format, ...)
{
if (iw->count == 0) return;
if (!SystemSettings.ini_comments) return;
@@ -92,6 +92,16 @@ void iw_comment(IniWriter *iw, const char *format, ...)
iw_newline(iw);
}
void iw_comment(IniWriter *iw, const char *text)
{
if (iw->count == 0) return;
if (!SystemSettings.ini_comments) return;
iw_string(iw, "# ");
iw_string(iw, text);
iw_newline(iw);
}
void iw_hdr_comment(IniWriter *iw, const char *format, ...)
{
if (iw->count == 0) return;
+8 -1
View File
@@ -85,13 +85,20 @@ void iw_sprintf(IniWriter *iw, const char *format, ...)
void iw_section(IniWriter *iw, const char *format, ...)
__attribute__((format(printf,2,3)));
/**
* Try to write a INI comment # blah\r\n
* @param iw - iniwriter handle
* @param text - format, like printf
*/
void iw_comment(IniWriter *iw, const char *text);
/**
* Try to write a INI comment # blah\r\n
* @param iw - iniwriter handle
* @param format - format, like printf
* @param ... - replacements
*/
void iw_comment(IniWriter *iw, const char *format, ...)
void iw_commentf(IniWriter *iw, const char *format, ...)
__attribute__((format(printf,2,3)));
/**