diff options
Diffstat (limited to '')
-rw-r--r-- | util/strgutil.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/util/strgutil.c b/util/strgutil.c index ecdcb750c..cb80c57ab 100644 --- a/util/strgutil.c +++ b/util/strgutil.c @@ -37,6 +37,18 @@ free_strlist( STRLIST sl ) } } + +void +add_to_strlist( STRLIST *list, const char *string ) +{ + STRLIST sl; + + sl = m_alloc( sizeof *sl + strlen(string)); + strcpy(sl->d, string); + sl->next = *list; + *list = sl; +} + /**************** * look for the substring SUB in buffer and return a pointer to that * substring in BUF or NULL if not found. |