diff options
| author | Werner Koch <[email protected]> | 2003-06-18 19:56:13 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2003-06-18 19:56:13 +0000 |
| commit | c0c2c58054923d506f61ce9a71d509b48a381211 (patch) | |
| tree | a8f82bffb44eb68eb726ff6db41fa715bcd29193 /jnlib/strlist.c | |
| parent | A small step for GnuPG but a huge leap for error codes. (diff) | |
| download | gnupg-c0c2c58054923d506f61ce9a71d509b48a381211.tar.gz gnupg-c0c2c58054923d506f61ce9a71d509b48a381211.zip | |
Finished the bulk of changes for gnupg 1.9. This included switching
to libgcrypt functions, using shared error codes from libgpg-error,
replacing the old functions we used to have in ../util by those in
../jnlib and ../common, renaming the malloc functions and a couple of
types. Note, that not all changes are listed below becuause they are
too similar and done at far too many places. As of today the code
builds using the current libgcrypt from CVS but it is very unlikely
that it actually works.
Diffstat (limited to 'jnlib/strlist.c')
| -rw-r--r-- | jnlib/strlist.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/jnlib/strlist.c b/jnlib/strlist.c index 7cbaf5e02..063c89c7e 100644 --- a/jnlib/strlist.c +++ b/jnlib/strlist.c @@ -56,7 +56,7 @@ add_to_strlist( STRLIST *list, const char *string ) #if 0 /**************** * same as add_to_strlist() but if is_utf8 is *not* set a conversion - * to UTF8 is done + * to UTF8 is done */ STRLIST add_to_strlist2( STRLIST *list, const char *string, int is_utf8 ) @@ -130,4 +130,22 @@ strlist_last( STRLIST node ) } +char * +strlist_pop (STRLIST *list) +{ + char *str=NULL; + STRLIST sl=*list; + + if(sl) + { + str=jnlib_xmalloc(strlen(sl->d)+1); + strcpy(str,sl->d); + + *list=sl->next; + jnlib_free(sl); + } + + return str; +} + |
