diff options
Diffstat (limited to 'util/strgutil.c')
-rw-r--r-- | util/strgutil.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/util/strgutil.c b/util/strgutil.c index 6ad434006..ff1ff5126 100644 --- a/util/strgutil.c +++ b/util/strgutil.c @@ -168,7 +168,23 @@ strlist_last( STRLIST node ) return node; } +char * +pop_strlist( STRLIST *list ) +{ + char *str=NULL; + STRLIST sl=*list; + + if(sl) + { + str=m_alloc(strlen(sl->d)+1); + strcpy(str,sl->d); + *list=sl->next; + m_free(sl); + } + + return str; +} /**************** * look for the substring SUB in buffer and return a pointer to that |