pr29.h

Go to the documentation of this file.
00001 /* pr29.h --- Detect strings which are non-idempotent under NFKC.
00002  * Copyright (C) 2004  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 the GNU Lesser General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2.1 of the License, or (at your option) any later version.
00010  *
00011  * GNU Libidn is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with GNU Libidn; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
00019  *
00020  */
00021 
00022 #ifndef PR29_H
00023 # define PR29_H
00024 
00025 # ifdef __cplusplus
00026 extern "C"
00027 {
00028 # endif
00029 
00030   /* Get size_t. */
00031 # include <stdlib.h>
00032 
00033   /* Get uint32_t. */
00034 # include <idn-int.h>
00035 
00036   /* Error codes. */
00037   typedef enum
00038   {
00039     PR29_SUCCESS = 0,
00040     PR29_PROBLEM = 1,           /* String is a problem sequence. */
00041     PR29_STRINGPREP_ERROR = 2   /* Charset conversion failed (p29_8*). */
00042   } Pr29_rc;
00043 
00044   extern const char *pr29_strerror (Pr29_rc rc);
00045 
00046   extern int pr29_4 (const uint32_t * in, size_t len);
00047   extern int pr29_4z (const uint32_t * in);
00048   extern int pr29_8z (const char *in);
00049 
00050 # ifdef __cplusplus
00051 }
00052 # endif
00053 #endif                          /* PR29_H */

Generated on Wed Sep 13 10:20:31 2006 for libidn by  doxygen 1.4.7