00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef PR29_H
00023 # define PR29_H
00024
00025 # ifndef IDNAPI
00026 # if defined LIBIDN_BUILDING && defined HAVE_VISIBILITY && HAVE_VISIBILITY
00027 # define IDNAPI __attribute__((__visibility__("default")))
00028 # elif defined LIBIDN_BUILDING && defined _MSC_VER && ! defined LIBIDN_STATIC
00029 # define IDNAPI __declspec(dllexport)
00030 # elif defined _MSC_VER && ! defined LIBIDN_STATIC
00031 # define IDNAPI __declspec(dllimport)
00032 # else
00033 # define IDNAPI
00034 # endif
00035 # endif
00036
00037 # ifdef __cplusplus
00038 extern "C"
00039 {
00040 # endif
00041
00042
00043 # include <stdlib.h>
00044
00045
00046 # include <idn-int.h>
00047
00048
00049 typedef enum
00050 {
00051 PR29_SUCCESS = 0,
00052 PR29_PROBLEM = 1,
00053 PR29_STRINGPREP_ERROR = 2
00054 } Pr29_rc;
00055
00056 extern IDNAPI const char *pr29_strerror (Pr29_rc rc);
00057
00058 extern IDNAPI int pr29_4 (const uint32_t * in, size_t len);
00059 extern IDNAPI int pr29_4z (const uint32_t * in);
00060 extern IDNAPI int pr29_8z (const char *in);
00061
00062 # ifdef __cplusplus
00063 }
00064 # endif
00065 #endif