annotate admin/unidata/bidimirror.awk @ 110855:bec49af30c2f

Merge changes from emacs-23 branch.
author Juanma Barranquero <lekktu@gmail.com>
date Fri, 08 Oct 2010 12:14:47 +0200
parents 7e588bac2220
children 6378d1b57038
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
108983
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
1 # Generate data for bidi_mirroring_table, see src/bidi.c:bidi_initialize.
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
2
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
3 # Copyright (C) 2010, Free Software Foundation, Inc.
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
4
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
5 # This file is part of GNU Emacs.
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
6
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
7 # GNU Emacs is free software: you can redistribute it and/or modify
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
8 # it under the terms of the GNU General Public License as published by
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
9 # the Free Software Foundation, either version 3 of the License, or
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
10 # (at your option) any later version.
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
11
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
12 # GNU Emacs is distributed in the hope that it will be useful,
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
15 # GNU General Public License for more details.
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
16
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
17 # You should have received a copy of the GNU General Public License
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
18 # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
19
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
20 # Written by Eli Zaretskii <eliz@gnu.org>
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
21
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
22 BEGIN {
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
23 printf " struct {\n int from, to;\n } bidi_mirror[] = {\n";
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
24 first = 1;
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
25 }
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
26
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
27 $1 !~ /^#/ && NF >= 2 {
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
28 if (!first)
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
29 printf ",\n";
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
30 else
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
31 first = 0;
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
32 printf "\t{ 0x%s, 0x%s }", $1, $2;
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
33 }
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
34
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
35 END {
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
36 printf " };\n";
7e588bac2220 Use BidiMirroring.txt for mirroring characters in bidi context.
Eli Zaretskii <eliz@gnu.org>
parents:
diff changeset
37 }