Commit 74815125 authored by rswindell's avatar rswindell
Browse files

Added iniSetValue() which, like iniGetValue(), does not support string

literals (e.g. won't detect and escape them automatically). If you set
a key value with carriage-returns and line-feeds, those will end up in the
.ini file as-is, so use with caution.
parent 843d8b11
...@@ -572,6 +572,12 @@ char* DLLCALL iniSetStringLiteral(str_list_t* list, const char* section, const c ...@@ -572,6 +572,12 @@ char* DLLCALL iniSetStringLiteral(str_list_t* list, const char* section, const c
return ini_set_string(list, section, key, value, /* literal: */TRUE, style); return ini_set_string(list, section, key, value, /* literal: */TRUE, style);
} }
char* DLLCALL iniSetValue(str_list_t* list, const char* section, const char* key, const char* value
,ini_style_t* style)
{
return ini_set_string(list, section, key, value, /* literal: */FALSE, style);
}
char* DLLCALL iniSetInteger(str_list_t* list, const char* section, const char* key, long value char* DLLCALL iniSetInteger(str_list_t* list, const char* section, const char* key, long value
,ini_style_t* style) ,ini_style_t* style)
{ {
......
...@@ -211,6 +211,8 @@ DLLEXPORT char* DLLCALL iniSetString(str_list_t*, const char* section, const ch ...@@ -211,6 +211,8 @@ DLLEXPORT char* DLLCALL iniSetString(str_list_t*, const char* section, const ch
,ini_style_t*); ,ini_style_t*);
DLLEXPORT char* DLLCALL iniSetStringLiteral(str_list_t*, const char* section, const char* key, const char* value DLLEXPORT char* DLLCALL iniSetStringLiteral(str_list_t*, const char* section, const char* key, const char* value
,ini_style_t*); ,ini_style_t*);
DLLEXPORT char* DLLCALL iniSetValue(str_list_t*, const char* section, const char* key, const char* value
,ini_style_t*);
DLLEXPORT char* DLLCALL iniSetInteger(str_list_t*, const char* section, const char* key, long value DLLEXPORT char* DLLCALL iniSetInteger(str_list_t*, const char* section, const char* key, long value
,ini_style_t*); ,ini_style_t*);
DLLEXPORT char* DLLCALL iniSetShortInt(str_list_t*, const char* section, const char* key, ushort value DLLEXPORT char* DLLCALL iniSetShortInt(str_list_t*, const char* section, const char* key, ushort value
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment