mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-05 10:14:04 +00:00
[client] overlay: add modal message dialog support
This commit is contained in:
@@ -31,5 +31,6 @@ int stringlist_push (StringList sl, char * str);
|
||||
void stringlist_remove(StringList sl, unsigned int index);
|
||||
unsigned int stringlist_count (StringList sl);
|
||||
char * stringlist_at (StringList sl, unsigned int index);
|
||||
void stringlist_clear (StringList sl);
|
||||
|
||||
#endif
|
||||
|
@@ -44,12 +44,7 @@ StringList stringlist_new(bool owns_strings)
|
||||
|
||||
void stringlist_free(StringList * sl)
|
||||
{
|
||||
if ((*sl)->owns_strings)
|
||||
{
|
||||
char * ptr;
|
||||
vector_forEach(ptr, &(*sl)->vector)
|
||||
free(ptr);
|
||||
}
|
||||
stringlist_clear(*sl);
|
||||
|
||||
vector_destroy(&(*sl)->vector);
|
||||
free((*sl));
|
||||
@@ -82,3 +77,15 @@ char * stringlist_at(StringList sl, unsigned int index)
|
||||
vector_at(&sl->vector, index, &ptr);
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void stringlist_clear(StringList sl)
|
||||
{
|
||||
if (sl->owns_strings)
|
||||
{
|
||||
char * ptr;
|
||||
vector_forEach(ptr, &sl->vector)
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
vector_clear(&sl->vector);
|
||||
}
|
||||
|
Reference in New Issue
Block a user