Git init
[external/pango1.0.git] / pango / mini-fribidi / fribidi_types.c
1 /* FriBidi - Library of BiDi algorithm
2  * Copyright (C) 2001,2002 Behdad Esfahbod. 
3  * 
4  * This library is free software; you can redistribute it and/or 
5  * modify it under the terms of the GNU Lesser General Public 
6  * License as published by the Free Software Foundation; either 
7  * version 2.1 of the License, or (at your option) any later version. 
8  * 
9  * This library is distributed in the hope that it will be useful, 
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of 
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12  * Lesser General Public License for more details. 
13  * 
14  * You should have received a copy of the GNU Lesser General Public License 
15  * along with this library, in a file named COPYING; if not, write to the 
16  * Free Software Foundation, Inc., 59 Temple Place, Suite 330, 
17  * Boston, MA 02111-1307, USA  
18  * 
19  * For licensing issues, contact <fwpg@sharif.edu>. 
20  */
21
22 #include "config.h"
23 #include "fribidi.h"
24
25 #ifdef DEBUG
26
27 char
28 fribidi_char_from_type (FriBidiCharType c)
29 {
30   switch (c)
31     {
32     case FRIBIDI_TYPE_LTR:
33       return 'L';
34     case FRIBIDI_TYPE_RTL:
35       return 'R';
36     case FRIBIDI_TYPE_AL:
37       return 'A';
38
39     case FRIBIDI_TYPE_EN:
40       return '1';
41     case FRIBIDI_TYPE_AN:
42       return '9';
43     case FRIBIDI_TYPE_ES:
44       return 'w';
45     case FRIBIDI_TYPE_ET:
46       return 'w';
47     case FRIBIDI_TYPE_CS:
48       return 'w';
49     case FRIBIDI_TYPE_NSM:
50       return '`';
51     case FRIBIDI_TYPE_BN:
52       return 'b';
53
54     case FRIBIDI_TYPE_BS:
55       return 'B';
56     case FRIBIDI_TYPE_SS:
57       return 'S';
58     case FRIBIDI_TYPE_WS:
59       return '_';
60     case FRIBIDI_TYPE_ON:
61       return 'n';
62
63     case FRIBIDI_TYPE_LRE:
64       return '+';
65     case FRIBIDI_TYPE_RLE:
66       return '+';
67     case FRIBIDI_TYPE_LRO:
68       return '+';
69     case FRIBIDI_TYPE_RLO:
70       return '+';
71     case FRIBIDI_TYPE_PDF:
72       return '-';
73
74     default:
75       return '?';
76     }
77 };
78
79 #endif
80
81 /* Map fribidi_prop_types to fribidi_types. */
82 const FriBidiCharType fribidi_prop_to_type[] = {
83 #define _FRIBIDI_ADD_TYPE(TYPE) FRIBIDI_TYPE_##TYPE,
84 #include "fribidi_types.i"
85 #undef _FRIBIDI_ADD_TYPE
86 };