1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-11-12 21:58:50 +01:00

* strgutil.c (pop_strlist): New function to pop the head off of a strlist.

This commit is contained in:
David Shaw 2002-06-14 19:34:19 +00:00
parent 08d65bc8ca
commit 7226fdf27a
2 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-06-14 David Shaw <dshaw@jabberwocky.com>
* strgutil.c (pop_strlist): New function to pop the head off of a
strlist.
2002-06-05 Timo Schulz <ts@winpt.org>
* fileutil.c (is_file_compressed): Corrected the magic values

View File

@ -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