1 # Generate data for filling bidi_type_table, see src/bidi.c:bidi_initialize.
3 # Copyright (C) 2010-2011 Free Software Foundation, Inc.
5 # This file is part of GNU Emacs.
7 # GNU Emacs is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
12 # GNU Emacs is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
20 # Written by Eli Zaretskii <eliz@gnu.org>
24 # Types are listed in the order of decresing use in UnicodeData.txt:
27 else if (type ==
"NSM")
29 else if (type ==
"AL")
33 else if (type ==
"BN")
35 else if (type ==
"EN")
37 else if (type ==
"ET")
39 else if (type ==
"AN")
41 else if (type ==
"WS")
43 else if (type ==
"CS")
45 else if (type ==
"ES")
51 else if (type ==
"LRE" || type ==
"RLE" || type ==
"LRO" || type ==
"RLO" || type ==
"PDF")
57 printf "Unknown type: %s\n", type
> "/dev/stderr";
66 printf " struct {\n int from, to;\n bidi_type_t type;\n } bidi_type[] = {\n";
74 # Don't output data for L, as that's the default value, see bidi.c.
75 if (otype
!= "L" && startcode
!= "")
81 printf "\t{ 0x%s, 0x%s, %s }", startcode
, endcode
, trtype
(otype
);