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

Created iniSectionExists().

parent f92b03e1
Branches
Tags
No related merge requests found
......@@ -217,6 +217,17 @@ static size_t find_value_index(str_list_t list, const char* section, const char*
return(i);
}
BOOL iniSectionExists(str_list_t* list, const char* section)
{
size_t i;
if(section==ROOT_SECTION)
return(TRUE);
i=find_section_index(*list,section);
return((*list)[i]!=NULL);
}
BOOL iniKeyExists(str_list_t* list, const char* section, const char* key)
{
char val[INI_MAX_VALUE_LEN];
......
......@@ -121,6 +121,7 @@ char* iniSetBitField(str_list_t*, const char* section, const char* key, ini_bit
char* iniSetStringList(str_list_t*, const char* section, const char* key
,const char* sep, str_list_t value, ini_style_t*);
BOOL iniSectionExists(str_list_t*, const char* section);
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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment