Skip to content
Snippets Groups Projects
Commit e74821f2 authored by rswindell's avatar rswindell
Browse files

Created iniRemoveSection().

parent 010b4fa3
No related branches found
No related tags found
No related merge requests found
......@@ -258,6 +258,20 @@ BOOL iniRemoveValue(str_list_t* list, const char* section, const char* key)
return(TRUE);
}
BOOL iniRemoveSection(str_list_t* list, const char* section)
{
size_t i;
i=find_section_index(*list,section);
if((*list)[i]==NULL) /* not found */
return(FALSE);
do {
strListDelete(list,i);
} while((*list)[i]!=NULL && *(*list)[i]!=INI_OPEN_SECTION_CHAR);
return(TRUE);
}
size_t iniAddSection(str_list_t* list, const char* section
,ini_style_t* style)
{
......
......@@ -125,6 +125,7 @@ BOOL iniKeyExists(str_list_t*, const char* section, const char* key);
BOOL iniValueExists(str_list_t*, const char* section, const char* key);
BOOL iniRemoveKey(str_list_t*, const char* section, const char* key);
BOOL iniRemoveValue(str_list_t*, const char* section, const char* key);
BOOL iniRemoveSection(str_list_t*, const char* section);
#if defined(__cplusplus)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment