|
libidn
1.25
|
00001 /* pr29.h --- Detect strings which are non-idempotent under NFKC. 00002 Copyright (C) 2004-2012 Simon Josefsson 00003 00004 This file is part of GNU Libidn. 00005 00006 GNU Libidn is free software: you can redistribute it and/or 00007 modify it under the terms of either: 00008 00009 * the GNU Lesser General Public License as published by the Free 00010 Software Foundation; either version 3 of the License, or (at 00011 your option) any later version. 00012 00013 or 00014 00015 * the GNU General Public License as published by the Free 00016 Software Foundation; either version 2 of the License, or (at 00017 your option) any later version. 00018 00019 or both in parallel, as here. 00020 00021 GNU Libidn is distributed in the hope that it will be useful, 00022 but WITHOUT ANY WARRANTY; without even the implied warranty of 00023 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00024 General Public License for more details. 00025 00026 You should have received copies of the GNU General Public License and 00027 the GNU Lesser General Public License along with this program. If 00028 not, see <http://www.gnu.org/licenses/>. */ 00029 00030 #ifndef PR29_H 00031 # define PR29_H 00032 00033 # ifndef IDNAPI 00034 # if defined LIBIDN_BUILDING && defined HAVE_VISIBILITY && HAVE_VISIBILITY 00035 # define IDNAPI __attribute__((__visibility__("default"))) 00036 # elif defined LIBIDN_BUILDING && defined _MSC_VER && ! defined LIBIDN_STATIC 00037 # define IDNAPI __declspec(dllexport) 00038 # elif defined _MSC_VER && ! defined LIBIDN_STATIC 00039 # define IDNAPI __declspec(dllimport) 00040 # else 00041 # define IDNAPI 00042 # endif 00043 # endif 00044 00045 # ifdef __cplusplus 00046 extern "C" 00047 { 00048 # endif 00049 00050 /* Get size_t. */ 00051 # include <stdlib.h> 00052 00053 /* Get uint32_t. */ 00054 # include <idn-int.h> 00055 00056 /* Error codes. */ 00057 typedef enum 00058 { 00059 PR29_SUCCESS = 0, 00060 PR29_PROBLEM = 1, /* String is a problem sequence. */ 00061 PR29_STRINGPREP_ERROR = 2 /* Charset conversion failed (p29_8*). */ 00062 } Pr29_rc; 00063 00064 extern IDNAPI const char *pr29_strerror (Pr29_rc rc); 00065 00066 extern IDNAPI int pr29_4 (const uint32_t * in, size_t len); 00067 extern IDNAPI int pr29_4z (const uint32_t * in); 00068 extern IDNAPI int pr29_8z (const char *in); 00069 00070 # ifdef __cplusplus 00071 } 00072 # endif 00073 #endif /* PR29_H */
1.7.6.1