aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorGlenn Morris2015-06-16 23:43:03 -0700
committerGlenn Morris2015-06-16 23:43:03 -0700
commitd67d49ceb31777cb731a56b9518bf1a1f2a94d25 (patch)
tree37aea7063e35326b069c12d9f4c16e5cf172d57f /admin
parentc9e2003b44b446a2f994039d9fc73d387cf6a1df (diff)
downloademacs-d67d49ceb31777cb731a56b9518bf1a1f2a94d25.tar.gz
emacs-d67d49ceb31777cb731a56b9518bf1a1f2a94d25.zip
Generate char-script-table from Unicode source. (Bug#20789)
* admin/unidata/Makefile.in (AWK): New, set by configure. (all): Add charscript.el. (blocks): New variable. (charscript.el, ${unidir}/charscript.el): New targets. (extraclean): Also remove generated charscript.el. * admin/unidata/blocks.awk: New script. * admin/unidata/Blocks.txt: New data file, from unicode.org. * lisp/international/characters.el: Load charscript. * src/Makefile.in (charscript): New variable. (${charscript}): New target. (${lispintdir}/characters.elc): Depend on charscript.elc. (temacs$(EXEEXT)): Depend on charscript. ; * admin/unidata/README: Mention Blocks.txt. ; * .gitignore: Add lisp/international/charscript.el.
Diffstat (limited to 'admin')
-rw-r--r--admin/unidata/Blocks.txt298
-rw-r--r--admin/unidata/Makefile.in16
-rw-r--r--admin/unidata/README4
-rwxr-xr-xadmin/unidata/blocks.awk225
4 files changed, 541 insertions, 2 deletions
diff --git a/admin/unidata/Blocks.txt b/admin/unidata/Blocks.txt
new file mode 100644
index 00000000000..0a4a5807635
--- /dev/null
+++ b/admin/unidata/Blocks.txt
@@ -0,0 +1,298 @@
1# Blocks-8.0.0.txt
2# Date: 2014-11-10, 23:04:00 GMT [KW]
3#
4# Unicode Character Database
5# Copyright (c) 1991-2014 Unicode, Inc.
6# For terms of use, see http://www.unicode.org/terms_of_use.html
7# For documentation, see http://www.unicode.org/reports/tr44/
8#
9# Format:
10# Start Code..End Code; Block Name
11
12# ================================================
13
14# Note: When comparing block names, casing, whitespace, hyphens,
15# and underbars are ignored.
16# For example, "Latin Extended-A" and "latin extended a" are equivalent.
17# For more information on the comparison of property values,
18# see UAX #44: http://www.unicode.org/reports/tr44/
19#
20# All block ranges start with a value where (cp MOD 16) = 0,
21# and end with a value where (cp MOD 16) = 15. In other words,
22# the last hexadecimal digit of the start of range is ...0
23# and the last hexadecimal digit of the end of range is ...F.
24# This constraint on block ranges guarantees that allocations
25# are done in terms of whole columns, and that code chart display
26# never involves splitting columns in the charts.
27#
28# All code points not explicitly listed for Block
29# have the value No_Block.
30
31# Property: Block
32#
33# @missing: 0000..10FFFF; No_Block
34
350000..007F; Basic Latin
360080..00FF; Latin-1 Supplement
370100..017F; Latin Extended-A
380180..024F; Latin Extended-B
390250..02AF; IPA Extensions
4002B0..02FF; Spacing Modifier Letters
410300..036F; Combining Diacritical Marks
420370..03FF; Greek and Coptic
430400..04FF; Cyrillic
440500..052F; Cyrillic Supplement
450530..058F; Armenian
460590..05FF; Hebrew
470600..06FF; Arabic
480700..074F; Syriac
490750..077F; Arabic Supplement
500780..07BF; Thaana
5107C0..07FF; NKo
520800..083F; Samaritan
530840..085F; Mandaic
5408A0..08FF; Arabic Extended-A
550900..097F; Devanagari
560980..09FF; Bengali
570A00..0A7F; Gurmukhi
580A80..0AFF; Gujarati
590B00..0B7F; Oriya
600B80..0BFF; Tamil
610C00..0C7F; Telugu
620C80..0CFF; Kannada
630D00..0D7F; Malayalam
640D80..0DFF; Sinhala
650E00..0E7F; Thai
660E80..0EFF; Lao
670F00..0FFF; Tibetan
681000..109F; Myanmar
6910A0..10FF; Georgian
701100..11FF; Hangul Jamo
711200..137F; Ethiopic
721380..139F; Ethiopic Supplement
7313A0..13FF; Cherokee
741400..167F; Unified Canadian Aboriginal Syllabics
751680..169F; Ogham
7616A0..16FF; Runic
771700..171F; Tagalog
781720..173F; Hanunoo
791740..175F; Buhid
801760..177F; Tagbanwa
811780..17FF; Khmer
821800..18AF; Mongolian
8318B0..18FF; Unified Canadian Aboriginal Syllabics Extended
841900..194F; Limbu
851950..197F; Tai Le
861980..19DF; New Tai Lue
8719E0..19FF; Khmer Symbols
881A00..1A1F; Buginese
891A20..1AAF; Tai Tham
901AB0..1AFF; Combining Diacritical Marks Extended
911B00..1B7F; Balinese
921B80..1BBF; Sundanese
931BC0..1BFF; Batak
941C00..1C4F; Lepcha
951C50..1C7F; Ol Chiki
961CC0..1CCF; Sundanese Supplement
971CD0..1CFF; Vedic Extensions
981D00..1D7F; Phonetic Extensions
991D80..1DBF; Phonetic Extensions Supplement
1001DC0..1DFF; Combining Diacritical Marks Supplement
1011E00..1EFF; Latin Extended Additional
1021F00..1FFF; Greek Extended
1032000..206F; General Punctuation
1042070..209F; Superscripts and Subscripts
10520A0..20CF; Currency Symbols
10620D0..20FF; Combining Diacritical Marks for Symbols
1072100..214F; Letterlike Symbols
1082150..218F; Number Forms
1092190..21FF; Arrows
1102200..22FF; Mathematical Operators
1112300..23FF; Miscellaneous Technical
1122400..243F; Control Pictures
1132440..245F; Optical Character Recognition
1142460..24FF; Enclosed Alphanumerics
1152500..257F; Box Drawing
1162580..259F; Block Elements
11725A0..25FF; Geometric Shapes
1182600..26FF; Miscellaneous Symbols
1192700..27BF; Dingbats
12027C0..27EF; Miscellaneous Mathematical Symbols-A
12127F0..27FF; Supplemental Arrows-A
1222800..28FF; Braille Patterns
1232900..297F; Supplemental Arrows-B
1242980..29FF; Miscellaneous Mathematical Symbols-B
1252A00..2AFF; Supplemental Mathematical Operators
1262B00..2BFF; Miscellaneous Symbols and Arrows
1272C00..2C5F; Glagolitic
1282C60..2C7F; Latin Extended-C
1292C80..2CFF; Coptic
1302D00..2D2F; Georgian Supplement
1312D30..2D7F; Tifinagh
1322D80..2DDF; Ethiopic Extended
1332DE0..2DFF; Cyrillic Extended-A
1342E00..2E7F; Supplemental Punctuation
1352E80..2EFF; CJK Radicals Supplement
1362F00..2FDF; Kangxi Radicals
1372FF0..2FFF; Ideographic Description Characters
1383000..303F; CJK Symbols and Punctuation
1393040..309F; Hiragana
14030A0..30FF; Katakana
1413100..312F; Bopomofo
1423130..318F; Hangul Compatibility Jamo
1433190..319F; Kanbun
14431A0..31BF; Bopomofo Extended
14531C0..31EF; CJK Strokes
14631F0..31FF; Katakana Phonetic Extensions
1473200..32FF; Enclosed CJK Letters and Months
1483300..33FF; CJK Compatibility
1493400..4DBF; CJK Unified Ideographs Extension A
1504DC0..4DFF; Yijing Hexagram Symbols
1514E00..9FFF; CJK Unified Ideographs
152A000..A48F; Yi Syllables
153A490..A4CF; Yi Radicals
154A4D0..A4FF; Lisu
155A500..A63F; Vai
156A640..A69F; Cyrillic Extended-B
157A6A0..A6FF; Bamum
158A700..A71F; Modifier Tone Letters
159A720..A7FF; Latin Extended-D
160A800..A82F; Syloti Nagri
161A830..A83F; Common Indic Number Forms
162A840..A87F; Phags-pa
163A880..A8DF; Saurashtra
164A8E0..A8FF; Devanagari Extended
165A900..A92F; Kayah Li
166A930..A95F; Rejang
167A960..A97F; Hangul Jamo Extended-A
168A980..A9DF; Javanese
169A9E0..A9FF; Myanmar Extended-B
170AA00..AA5F; Cham
171AA60..AA7F; Myanmar Extended-A
172AA80..AADF; Tai Viet
173AAE0..AAFF; Meetei Mayek Extensions
174AB00..AB2F; Ethiopic Extended-A
175AB30..AB6F; Latin Extended-E
176AB70..ABBF; Cherokee Supplement
177ABC0..ABFF; Meetei Mayek
178AC00..D7AF; Hangul Syllables
179D7B0..D7FF; Hangul Jamo Extended-B
180D800..DB7F; High Surrogates
181DB80..DBFF; High Private Use Surrogates
182DC00..DFFF; Low Surrogates
183E000..F8FF; Private Use Area
184F900..FAFF; CJK Compatibility Ideographs
185FB00..FB4F; Alphabetic Presentation Forms
186FB50..FDFF; Arabic Presentation Forms-A
187FE00..FE0F; Variation Selectors
188FE10..FE1F; Vertical Forms
189FE20..FE2F; Combining Half Marks
190FE30..FE4F; CJK Compatibility Forms
191FE50..FE6F; Small Form Variants
192FE70..FEFF; Arabic Presentation Forms-B
193FF00..FFEF; Halfwidth and Fullwidth Forms
194FFF0..FFFF; Specials
19510000..1007F; Linear B Syllabary
19610080..100FF; Linear B Ideograms
19710100..1013F; Aegean Numbers
19810140..1018F; Ancient Greek Numbers
19910190..101CF; Ancient Symbols
200101D0..101FF; Phaistos Disc
20110280..1029F; Lycian
202102A0..102DF; Carian
203102E0..102FF; Coptic Epact Numbers
20410300..1032F; Old Italic
20510330..1034F; Gothic
20610350..1037F; Old Permic
20710380..1039F; Ugaritic
208103A0..103DF; Old Persian
20910400..1044F; Deseret
21010450..1047F; Shavian
21110480..104AF; Osmanya
21210500..1052F; Elbasan
21310530..1056F; Caucasian Albanian
21410600..1077F; Linear A
21510800..1083F; Cypriot Syllabary
21610840..1085F; Imperial Aramaic
21710860..1087F; Palmyrene
21810880..108AF; Nabataean
219108E0..108FF; Hatran
22010900..1091F; Phoenician
22110920..1093F; Lydian
22210980..1099F; Meroitic Hieroglyphs
223109A0..109FF; Meroitic Cursive
22410A00..10A5F; Kharoshthi
22510A60..10A7F; Old South Arabian
22610A80..10A9F; Old North Arabian
22710AC0..10AFF; Manichaean
22810B00..10B3F; Avestan
22910B40..10B5F; Inscriptional Parthian
23010B60..10B7F; Inscriptional Pahlavi
23110B80..10BAF; Psalter Pahlavi
23210C00..10C4F; Old Turkic
23310C80..10CFF; Old Hungarian
23410E60..10E7F; Rumi Numeral Symbols
23511000..1107F; Brahmi
23611080..110CF; Kaithi
237110D0..110FF; Sora Sompeng
23811100..1114F; Chakma
23911150..1117F; Mahajani
24011180..111DF; Sharada
241111E0..111FF; Sinhala Archaic Numbers
24211200..1124F; Khojki
24311280..112AF; Multani
244112B0..112FF; Khudawadi
24511300..1137F; Grantha
24611480..114DF; Tirhuta
24711580..115FF; Siddham
24811600..1165F; Modi
24911680..116CF; Takri
25011700..1173F; Ahom
251118A0..118FF; Warang Citi
25211AC0..11AFF; Pau Cin Hau
25312000..123FF; Cuneiform
25412400..1247F; Cuneiform Numbers and Punctuation
25512480..1254F; Early Dynastic Cuneiform
25613000..1342F; Egyptian Hieroglyphs
25714400..1467F; Anatolian Hieroglyphs
25816800..16A3F; Bamum Supplement
25916A40..16A6F; Mro
26016AD0..16AFF; Bassa Vah
26116B00..16B8F; Pahawh Hmong
26216F00..16F9F; Miao
2631B000..1B0FF; Kana Supplement
2641BC00..1BC9F; Duployan
2651BCA0..1BCAF; Shorthand Format Controls
2661D000..1D0FF; Byzantine Musical Symbols
2671D100..1D1FF; Musical Symbols
2681D200..1D24F; Ancient Greek Musical Notation
2691D300..1D35F; Tai Xuan Jing Symbols
2701D360..1D37F; Counting Rod Numerals
2711D400..1D7FF; Mathematical Alphanumeric Symbols
2721D800..1DAAF; Sutton SignWriting
2731E800..1E8DF; Mende Kikakui
2741EE00..1EEFF; Arabic Mathematical Alphabetic Symbols
2751F000..1F02F; Mahjong Tiles
2761F030..1F09F; Domino Tiles
2771F0A0..1F0FF; Playing Cards
2781F100..1F1FF; Enclosed Alphanumeric Supplement
2791F200..1F2FF; Enclosed Ideographic Supplement
2801F300..1F5FF; Miscellaneous Symbols and Pictographs
2811F600..1F64F; Emoticons
2821F650..1F67F; Ornamental Dingbats
2831F680..1F6FF; Transport and Map Symbols
2841F700..1F77F; Alchemical Symbols
2851F780..1F7FF; Geometric Shapes Extended
2861F800..1F8FF; Supplemental Arrows-C
2871F900..1F9FF; Supplemental Symbols and Pictographs
28820000..2A6DF; CJK Unified Ideographs Extension B
2892A700..2B73F; CJK Unified Ideographs Extension C
2902B740..2B81F; CJK Unified Ideographs Extension D
2912B820..2CEAF; CJK Unified Ideographs Extension E
2922F800..2FA1F; CJK Compatibility Ideographs Supplement
293E0000..E007F; Tags
294E0100..E01EF; Variation Selectors Supplement
295F0000..FFFFF; Supplementary Private Use Area-A
296100000..10FFFF; Supplementary Private Use Area-B
297
298# EOF
diff --git a/admin/unidata/Makefile.in b/admin/unidata/Makefile.in
index 6c81d32484a..954e9faacae 100644
--- a/admin/unidata/Makefile.in
+++ b/admin/unidata/Makefile.in
@@ -23,6 +23,8 @@
23 23
24SHELL = @SHELL@ 24SHELL = @SHELL@
25 25
26AWK = @AWK@
27
26srcdir = @srcdir@ 28srcdir = @srcdir@
27top_srcdir = @top_srcdir@ 29top_srcdir = @top_srcdir@
28top_builddir = @top_builddir@ 30top_builddir = @top_builddir@
@@ -51,7 +53,7 @@ am__v_at_1 =
51 53
52.PHONY: all unifiles 54.PHONY: all unifiles
53 55
54all: ${top_srcdir}/src/macuvs.h unifiles 56all: ${top_srcdir}/src/macuvs.h unifiles ${unidir}/charscript.el
55 57
56## Specify .elc as an order-only prereq so as to not needlessly rebuild 58## Specify .elc as an order-only prereq so as to not needlessly rebuild
57## target just because the .elc is missing. 59## target just because the .elc is missing.
@@ -94,6 +96,16 @@ unifiles: ${unidir}/charprop.el
94 [ -f $(unidir)/$$f ] || exec $(MAKE) PHONY_EXTRAS=$< $<; \ 96 [ -f $(unidir)/$$f ] || exec $(MAKE) PHONY_EXTRAS=$< $<; \
95 done 97 done
96 98
99
100.PHONY: charscript.el
101charscript.el: ${unidir}/charscript.el
102
103blocks = ${srcdir}/blocks.awk
104
105${unidir}/charscript.el: ${srcdir}/Blocks.txt ${blocks}
106 $(AM_V_GEN)$(AWK) -f ${blocks} < $< > $@
107
108
97.PHONY: clean bootstrap-clean distclean maintainer-clean extraclean 109.PHONY: clean bootstrap-clean distclean maintainer-clean extraclean
98 110
99clean: 111clean:
@@ -110,7 +122,7 @@ maintainer-clean: distclean
110## change and it slows down bootstrap (a tiny bit). 122## change and it slows down bootstrap (a tiny bit).
111## Cf leim/ja-dic (which is much slower). 123## Cf leim/ja-dic (which is much slower).
112extraclean: 124extraclean:
113 rm -f ${top_srcdir}/src/macuvs.h 125 rm -f ${top_srcdir}/src/macuvs.h ${unidir}/charscript.el*
114 ifneq (,$(wildcard $(unidir)/charprop.el)) 126 ifneq (,$(wildcard $(unidir)/charprop.el))
115 cd $(unidir) && \ 127 cd $(unidir) && \
116 rm -f `sed -n 's/^;; FILE: //p' < charprop.el` charprop.el 128 rm -f `sed -n 's/^;; FILE: //p' < charprop.el` charprop.el
diff --git a/admin/unidata/README b/admin/unidata/README
index e0d0e00417f..8ad0a12d728 100644
--- a/admin/unidata/README
+++ b/admin/unidata/README
@@ -16,3 +16,7 @@ http://www.unicode.org/ivd/data/2014-05-16/IVD_Sequences.txt
16UnicodeData.txt 16UnicodeData.txt
17http://www.unicode.org/Public/UNIDATA/UnicodeData.txt 17http://www.unicode.org/Public/UNIDATA/UnicodeData.txt
182014-03-10 182014-03-10
19
20Blocks.txt
21http://www.unicode.org/Public/8.0.0/ucd/Blocks.txt
222014-11-10
diff --git a/admin/unidata/blocks.awk b/admin/unidata/blocks.awk
new file mode 100755
index 00000000000..892ac58c927
--- /dev/null
+++ b/admin/unidata/blocks.awk
@@ -0,0 +1,225 @@
1#!/usr/bin/awk -f
2
3## Copyright (C) 2015 Free Software Foundation, Inc.
4
5## Author: Glenn Morris <rgm@gnu.org>
6
7## This file is part of GNU Emacs.
8
9## GNU Emacs is free software: you can redistribute it and/or modify
10## it under the terms of the GNU General Public License as published by
11## the Free Software Foundation, either version 3 of the License, or
12## (at your option) any later version.
13
14## GNU Emacs is distributed in the hope that it will be useful,
15## but WITHOUT ANY WARRANTY; without even the implied warranty of
16## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17## GNU General Public License for more details.
18
19## You should have received a copy of the GNU General Public License
20## along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
21
22### Commentary:
23
24## This script takes as input Unicode's Blocks.txt
25## (http://www.unicode.org/Public/UNIDATA/Blocks.txt)
26## and produces output for Emacs's lisp/international/charscript.el.
27
28## It lumps together all the blocks belonging to the same language.
29## E.g., "Basic Latin", "Latin-1 Supplement", "Latin Extended-A",
30## etc. are all lumped together under "latin".
31
32## The Unicode blocks actually extend past some of these ranges with
33## undefined codepoints.
34
35## For additional details, see <http://debbugs.gnu.org/20789#11>.
36
37## Things to do after installing a new version of Blocks.txt:
38## Check the output against the old output.
39## Adjust the alias array, and the name2alias function for any new
40## entries, if necessary.
41## Check fix_start (and fix_end) to see if entries need adding/removing.
42## Review the hard-coded splits at the end of the main body.
43
44### Code:
45
46BEGIN {
47 ## Hard-coded names. See name2alias for the rest.
48 alias["ipa extensions"] = "phonetic"
49 alias["letterlike symbols"] = "symbol"
50 alias["number forms"] = "symbol"
51 alias["miscellaneous technical"] = "symbol"
52 alias["control pictures"] = "symbol"
53 alias["optical character recognition"] = "symbol"
54 alias["enclosed alphanumerics"] = "symbol"
55 alias["box drawing"] = "symbol"
56 alias["block elements"] = "symbol"
57 alias["miscellaneous symbols"] = "symbol"
58 alias["cjk strokes"] = "cjk-misc"
59 alias["cjk symbols and punctuation"] = "cjk-misc"
60 alias["halfwidth and fullwidth forms"] = "cjk-misc"
61 alias["common indic number forms"] = "north-indic-number"
62
63 tohex["a"] = 10
64 tohex["b"] = 11
65 tohex["c"] = 12
66 tohex["d"] = 13
67 tohex["e"] = 14
68 tohex["f"] = 15
69
70 fix_start["0080"] = "00A0"
71 ## Define fix_end here if you need it.
72}
73
74## From admin/charsets/.
75## With gawk's --non-decimal-data switch we wouldn't need this.
76function decode_hex(str , n, len, i, c) {
77 n = 0
78 len = length(str)
79 for (i = 1; i <= len; i++)
80 {
81 c = substr (str, i, 1)
82 if (c >= "0" && c <= "9")
83 n = n * 16 + (c - "0")
84 else
85 n = n * 16 + tohex[tolower(c)]
86 }
87 return n
88}
89
90function name2alias(name , w, w2) {
91 name = tolower(name)
92 if (alias[name]) return alias[name]
93 else if (name ~ /for symbols/) return "symbol"
94 else if (name ~ /latin|combining .* marks|spacing modifier|tone letters|alphabetic presentation/) return "latin"
95 else if (name ~ /cjk|yijing|enclosed ideograph|kangxi/) return "han"
96 else if (name ~ /arabic/) return "arabic"
97 else if (name ~ /^greek/) return "greek"
98 else if (name ~ /^coptic/) return "coptic"
99 else if (name ~ /cuneiform number/) return "cuneiform-numbers-and-punctuation"
100 else if (name ~ /cuneiform/) return "cuneiform"
101 else if (name ~ /mathematical alphanumeric symbol/) return "mathematical"
102 else if (name ~ /punctuation|mathematical|arrows|currency|superscript|small form variants|geometric|dingbats|enclosed|alchemical|pictograph|emoticon|transport/) return "symbol"
103 else if (name ~ /canadian aboriginal/) return "canadian-aboriginal"
104 else if (name ~ /katakana|hiragana/) return "kana"
105 else if (name ~ /myanmar/) return "burmese"
106 else if (name ~ /hangul/) return "hangul"
107 else if (name ~ /khmer/) return "khmer"
108 else if (name ~ /braille/) return "braille"
109 else if (name ~ /^yi /) return "yi"
110 else if (name ~ /surrogates|private use|variation selectors/) return 0
111 else if (name ~/^(specials|tags)$/) return 0
112 else if (name ~ /linear b/) return "linear-b"
113 else if (name ~ /aramaic/) return "aramaic"
114 else if (name ~ /rumi num/) return "rumi-number"
115 else if (name ~ /duployan|shorthand/) return "duployan-shorthand"
116 else if (name ~ /sutton signwriting/) return "sutton-sign-writing"
117
118 sub(/ (extended|extensions|supplement).*/, "", name)
119 sub(/numbers/, "number", name)
120 sub(/numerals/, "numeral", name)
121 sub(/symbols/, "symbol", name)
122 sub(/forms$/, "form", name)
123 sub(/tiles$/, "tile", name)
124 sub(/^new /, "", name)
125 sub(/ (characters|hieroglyphs|cursive)$/, "", name)
126 gsub(/ /, "-", name)
127
128 return name
129}
130
131/^[0-9A-F]/ {
132 sep = index($1, "..")
133 len = length($1)
134 s = substr($1,1,sep-1)
135 e = substr($1,sep+2,len-sep-2)
136 $1 = ""
137 sub(/^ */, "", $0)
138 i++
139 start[i] = fix_start[s] ? fix_start[s] : s
140 end[i] = fix_end[e] ? fix_end[e]: e
141 name[i] = $0
142
143 alt[i] = name2alias(name[i])
144
145 if (!alt[i])
146 {
147 i--
148 next
149 }
150
151 ## Combine adjacent ranges with the same name.
152 if (alt[i] == alt[i-1] && decode_hex(start[i]) == 1 + decode_hex(end[i-1]))
153 {
154 end[i-1] = end[i]
155 name[i-1] = (name[i-1] ", " name[i])
156 i--
157 }
158
159 ## Some hard-coded splits.
160 if (start[i] == "0370")
161 {
162 end[i] = "03E1"
163 i++
164 start[i] = "03E2"
165 end[i] = "03EF"
166 alt[i] = "coptic"
167 i++
168 start[i] = "03F0"
169 end[i] = "03FF"
170 alt[i] = "greek"
171 }
172 else if (start[i] == "FB00")
173 {
174 end[i] = "FB06"
175 i++
176 start[i] = "FB13"
177 end[i] = "FB17"
178 alt[i] = "armenian"
179 i++
180 start[i] = "FB1D"
181 end[i] = "FB4F"
182 alt[i] = "hebrew"
183 }
184 else if (start[i] == "FF00")
185 {
186 end[i] = "FF60"
187 i++
188 start[i] = "FF61"
189 end[i] = "FF9F"
190 alt[i] = "kana"
191 i++
192 start[i] = "FFA0"
193 end[i] = "FFDF"
194 alt[i] = "hangul"
195 i++
196 start[i] = "FFE0"
197 end[i] = "FFEF"
198 alt[i] = "cjk-misc"
199 }
200}
201
202END {
203 print ";;; charscript.el --- character script table"
204 print ";;; Automatically generated from admin/unidata/Blocks.txt"
205 print "(let (script-list)"
206 print " (dolist (elt '("
207
208 for (j=1;j<=i;j++)
209 {
210 printf(" (#x%s #x%s %s)", start[j], end[j], alt[j])
211 ## Fuzz to decide whether worth printing original name as a comment.
212 if (name[j] && alt[j] != tolower(name[j]) && alt[j] !~ /-/)
213 printf(" ; %s", name[j])
214 printf("\n")
215 }
216
217 print " ))"
218 print " (set-char-table-range char-script-table"
219 print " (cons (car elt) (nth 1 elt)) (nth 2 elt))"
220 print " (or (memq (nth 2 elt) script-list)"
221 print " (setq script-list (cons (nth 2 elt) script-list))))"
222 print " (set-char-table-extra-slot char-script-table 0 (nreverse script-list)))"
223 print ""
224 print "(provide 'charscript)"
225}