Add unassigned code point handling, and self test.
[libidn.git] / profiles.c
blob25ee05c63f98166609218c9d44932d53ed0950bb
1 /* profiles.c definitions of stringprep profiles shipped with libstringprep
2 * Copyright (C) 2002 Simon Josefsson
4 * This file is part of libstringprep.
6 * Libstringprep is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * Libstringprep is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with libstringprep; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #include "stringprep_generic.h"
23 #include "stringprep_nameprep.h"
24 #include "stringprep_kerberos5.h"
26 struct stringprep_table stringprep_generic[] = {
27 {STRINGPREP_UNASSIGNED_MASK, stringprep_generic_A_1},
28 {0, stringprep_generic_B_1},
29 {~STRINGPREP_NO_NFKC, stringprep_generic_B_2},
30 {STRINGPREP_NO_NFKC, stringprep_generic_B_3},
31 {~STRINGPREP_NO_NFKC},
32 {0, stringprep_generic_C_1_1},
33 {0, stringprep_generic_C_1_2},
34 {0, stringprep_generic_C_2_1},
35 {0, stringprep_generic_C_2_2},
36 {0, stringprep_generic_C_3},
37 {0, stringprep_generic_C_4},
38 {0, stringprep_generic_C_5},
39 {0, stringprep_generic_C_6},
40 {0, stringprep_generic_C_7},
41 {STRINGPREP_BIDI_PROHIBITED_MASK, stringprep_generic_C_8},
42 {0, stringprep_generic_C_9},
43 {STRINGPREP_BIDI_RAL_MASK, stringprep_generic_D_1},
44 {STRINGPREP_BIDI_L_MASK, stringprep_generic_D_2},
45 {0}
48 struct stringprep_table stringprep_nameprep[] = {
49 {STRINGPREP_UNASSIGNED_MASK, stringprep_generic_A_1},
50 {0, stringprep_generic_B_1},
51 {~STRINGPREP_NO_NFKC, stringprep_generic_B_2},
52 {~STRINGPREP_NO_NFKC},
53 {0, stringprep_generic_C_1_2},
54 {0, stringprep_generic_C_2_2},
55 {0, stringprep_generic_C_3},
56 {0, stringprep_generic_C_4},
57 {0, stringprep_generic_C_5},
58 {0, stringprep_generic_C_6},
59 {0, stringprep_generic_C_7},
60 {STRINGPREP_BIDI_PROHIBITED_MASK, stringprep_generic_C_8},
61 {0, stringprep_generic_C_9},
62 {STRINGPREP_BIDI_RAL_MASK, stringprep_generic_D_1},
63 {STRINGPREP_BIDI_L_MASK, stringprep_generic_D_2},
64 {0}
67 struct stringprep_table stringprep_kerberos5[] = {
68 {0, stringprep_generic_B_1},
69 {~STRINGPREP_NO_NFKC, stringprep_generic_B_2},
70 {~STRINGPREP_NO_NFKC},
71 {0, stringprep_generic_C_1_2},
72 {0, stringprep_generic_C_2_2},
73 {0, stringprep_generic_C_3},
74 {0, stringprep_generic_C_4},
75 {0, stringprep_generic_C_5},
76 {0, stringprep_generic_C_6},
77 {0, stringprep_generic_C_7},
78 {0, stringprep_generic_C_9},
79 {0}