mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Merged with gpg 1.4.3 code.
The gpg part does not yet build.
This commit is contained in:
parent
751a3aeea7
commit
29b23dea97
90 changed files with 18002 additions and 10564 deletions
|
@ -1,5 +1,5 @@
|
|||
/* strlist.c - string helpers
|
||||
* Copyright (C) 1998, 2000, 2001 Free Software Foundation, Inc.
|
||||
* Copyright (C) 1998, 2000, 2001, 2006 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
|
@ -26,7 +26,9 @@
|
|||
|
||||
#include "libjnlib-config.h"
|
||||
#include "strlist.h"
|
||||
|
||||
#ifdef JNLIB_NEED_UTF8CONV
|
||||
#include "utf8conv.h"
|
||||
#endif
|
||||
|
||||
void
|
||||
free_strlist( strlist_t sl )
|
||||
|
@ -53,26 +55,26 @@ add_to_strlist( strlist_t *list, const char *string )
|
|||
return sl;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/****************
|
||||
* same as add_to_strlist() but if is_utf8 is *not* set a conversion
|
||||
* to UTF8 is done
|
||||
*/
|
||||
|
||||
/* Same as add_to_strlist() but if is_utf8 is *not* set, a conversion
|
||||
to UTF-8 is done. */
|
||||
#ifdef JNLIB_NEED_UTF8CONV
|
||||
strlist_t
|
||||
add_to_strlist2( strlist_t *list, const char *string, int is_utf8 )
|
||||
{
|
||||
strlist_t sl;
|
||||
|
||||
if( is_utf8 )
|
||||
sl = add_to_strlist( list, string );
|
||||
else {
|
||||
char *p = native_to_utf8( string );
|
||||
sl = add_to_strlist( list, p );
|
||||
m_free( p );
|
||||
strlist_t sl;
|
||||
|
||||
if (is_utf8)
|
||||
sl = add_to_strlist( list, string );
|
||||
else
|
||||
{
|
||||
char *p = native_to_utf8( string );
|
||||
sl = add_to_strlist( list, p );
|
||||
jnlib_free ( p );
|
||||
}
|
||||
return sl;
|
||||
return sl;
|
||||
}
|
||||
#endif
|
||||
#endif /* JNLIB_NEED_UTF8CONV*/
|
||||
|
||||
strlist_t
|
||||
append_to_strlist( strlist_t *list, const char *string )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue