diff options
Diffstat (limited to '3rdParty/LibIDN/src/toutf8.c')
-rw-r--r-- | 3rdParty/LibIDN/src/toutf8.c | 60 |
1 files changed, 33 insertions, 27 deletions
diff --git a/3rdParty/LibIDN/src/toutf8.c b/3rdParty/LibIDN/src/toutf8.c index 0d82717..b7126e2 100644 --- a/3rdParty/LibIDN/src/toutf8.c +++ b/3rdParty/LibIDN/src/toutf8.c @@ -1,23 +1,31 @@ /* toutf8.c --- Convert strings from system locale into UTF-8. - * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Simon Josefsson - * - * This file is part of GNU Libidn. - * - * GNU Libidn is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * GNU Libidn is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with GNU Libidn; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - * - */ + Copyright (C) 2002-2015 Simon Josefsson + + This file is part of GNU Libidn. + + GNU Libidn is free software: you can redistribute it and/or + modify it under the terms of either: + + * the GNU Lesser General Public License as published by the Free + Software Foundation; either version 3 of the License, or (at + your option) any later version. + + or + + * the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at + your option) any later version. + + or both in parallel, as here. + + GNU Libidn is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received copies of the GNU General Public License and + the GNU Lesser General Public License along with this program. If + not, see <http://www.gnu.org/licenses/>. */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -44,11 +52,9 @@ # define HAVE_LANGINFO_CODESET 1 #endif -#if HAVE_LOCALE_H -# include <locale.h> -#endif +#include <locale.h> -#if HAVE_LANGINFO_CODESET +#ifdef HAVE_LANGINFO_CODESET # include <langinfo.h> #endif @@ -56,7 +62,7 @@ # define stringprep_locale_charset() nl_langinfo (CODESET) #else /** - * stringprep_locale_charset - return charset used in current locale + * stringprep_locale_charset: * * Find out current locale charset. The function respect the CHARSET * environment variable, but typically uses nl_langinfo(CODESET) when @@ -95,7 +101,7 @@ stringprep_locale_charset (void) #endif /** - * stringprep_convert - encode string using new character set + * stringprep_convert: * @str: input zero-terminated string. * @to_codeset: name of destination character set. * @from_codeset: name of origin character set, as used by @str. @@ -124,7 +130,7 @@ stringprep_convert (const char *str, } /** - * stringprep_locale_to_utf8 - convert locale encoded string to UTF-8 + * stringprep_locale_to_utf8: * @str: input zero terminated string. * * Convert string encoded in the locale's character set into UTF-8 by @@ -140,7 +146,7 @@ stringprep_locale_to_utf8 (const char *str) } /** - * stringprep_utf8_to_locale - encode UTF-8 string to locale encoding + * stringprep_utf8_to_locale: * @str: input zero terminated string. * * Convert string encoded in UTF-8 into the locale's character set by |