diff options
author | Eli Zaretskii <eliz@gnu.org> | 2011-08-15 20:47:25 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2011-08-15 20:47:25 +0300 |
commit | 474a84653b4aa5a10b49af751c3008a4c582422c (patch) | |
tree | 352c73a638573275b43ddd941bad2c6e6c7e9d9b /admin/unidata | |
parent | 934eacb93d0b8340a3a8b478deaa6110a3de083f (diff) |
Use uniprop tables instead of biditype.h and bidimirror.h.
src/bidi.c (bidi_initialize): Use uniprop_table instead of including
biditype.h and bidimirror.h.
src/biditype.h: File removed.
src/bidimirror.h: File removed.
src/deps.mk (bidi.o): Remove biditype.h and
bidimirror.h.
src/makefile.w32-in ($(BLD)/bidi.$(O)): Remove biditype.h and
bidimirror.h.
src/dispextern.h: Fix a typo in the comment to bidi_type_t.
src/chartab.c: Improve commentary for the uniprop_table API.
admin/unidata/bidimirror.awk: File removed.
admin/unidata/biditype.awk: File removed.
admin/unidata/makefile.w32-in (all): Remove src/biditype.h and
src/bidimirror.h.
(../../src/biditype.h, ../../src/bidimirror.h): Deleted.
admin/unidata/Makefile.in (all): Remove src/biditype.h and
src/bidimirror.h.
(../../src/biditype.h, ../../src/bidimirror.h): Deleted.
Diffstat (limited to 'admin/unidata')
-rw-r--r-- | admin/unidata/Makefile.in | 8 | ||||
-rw-r--r-- | admin/unidata/bidimirror.awk | 37 | ||||
-rw-r--r-- | admin/unidata/biditype.awk | 93 | ||||
-rw-r--r-- | admin/unidata/makefile.w32-in | 12 |
4 files changed, 2 insertions, 148 deletions
diff --git a/admin/unidata/Makefile.in b/admin/unidata/Makefile.in index e1fe247631..c890dad890 100644 --- a/admin/unidata/Makefile.in +++ b/admin/unidata/Makefile.in @@ -23,7 +23,7 @@ EMACS = ../../src/emacs DSTDIR = ../../lisp/international RUNEMACS = ${EMACS} -Q -batch -all: ${DSTDIR}/charprop.el ../../src/biditype.h ../../src/bidimirror.h +all: ${DSTDIR}/charprop.el .el.elc: ${RUNEMACS} -batch -f batch-byte-compile $< @@ -38,12 +38,6 @@ ${DSTDIR}/charprop.el: unidata-gen.elc unidata.txt cd ${DSTDIR}; \ ${RUNEMACS} -batch --load $${ELC} -f unidata-gen-files $${DATADIR} $${DATA} -../../src/biditype.h: UnicodeData.txt - gawk -F";" -f biditype.awk $< > $@ - -../../src/bidimirror.h: BidiMirroring.txt - gawk -F"[; ]+" -f bidimirror.awk $< > $@ - install: charprop.el cp charprop.el ${DSTDIR} cp `sed -n 's/^;; FILE: //p' < charprop.el` ${DSTDIR} diff --git a/admin/unidata/bidimirror.awk b/admin/unidata/bidimirror.awk deleted file mode 100644 index fc3e8afaac..0000000000 --- a/admin/unidata/bidimirror.awk +++ /dev/null @@ -1,37 +0,0 @@ -# Generate data for bidi_mirroring_table, see src/bidi.c:bidi_initialize. - -# Copyright (C) 2010-2011 Free Software Foundation, Inc. - -# This file is part of GNU Emacs. - -# GNU Emacs is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# GNU Emacs is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. - -# Written by Eli Zaretskii <eliz@gnu.org> - -BEGIN { - printf " struct {\n int from, to;\n } bidi_mirror[] = {\n"; - first = 1; - } - -$1 !~ /^#/ && NF >= 2 { - if (!first) - printf ",\n"; - else - first = 0; - printf "\t{ 0x%s, 0x%s }", $1, $2; - } - -END { - printf " };\n"; - } diff --git a/admin/unidata/biditype.awk b/admin/unidata/biditype.awk deleted file mode 100644 index bb1aaad197..0000000000 --- a/admin/unidata/biditype.awk +++ /dev/null @@ -1,93 +0,0 @@ -# Generate data for filling bidi_type_table, see src/bidi.c:bidi_initialize. - -# Copyright (C) 2010-2011 Free Software Foundation, Inc. - -# This file is part of GNU Emacs. - -# GNU Emacs is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# GNU Emacs is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. - -# Written by Eli Zaretskii <eliz@gnu.org> - -function trtype(type) -{ - # Types are listed in the order of decresing use in UnicodeData.txt: - if (type == "ON") - return "NEUTRAL_ON"; - else if (type == "NSM") - return "WEAK_NSM"; - else if (type == "AL") - return "STRONG_AL"; - else if (type == "R") - return "STRONG_R"; - else if (type == "BN") - return "WEAK_BN"; - else if (type == "EN") - return "WEAK_EN"; - else if (type == "ET") - return "WEAK_ET"; - else if (type == "AN") - return "WEAK_AN"; - else if (type == "WS") - return "NEUTRAL_WS"; - else if (type == "CS") - return "WEAK_CS"; - else if (type == "ES") - return "WEAK_ES"; - else if (type == "B") - return "NEUTRAL_B"; - else if (type == "S") - return "NEUTRAL_S"; - else if (type == "LRE" || type == "RLE" || type == "LRO" || type == "RLO" || type == "PDF") - return type; - else if (type == "L") - return "STRONG_L"; - else - { - printf "Unknown type: %s\n", type > "/dev/stderr"; - exit 1; - } -} - -BEGIN { - otype = ""; - startcode = ""; - endcode = ""; - printf " struct {\n int from, to;\n bidi_type_t type;\n } bidi_type[] = {\n"; - first = 1; - } - - { code = $1; - ntype = $5; - if (ntype != otype) - { - # Don't output data for L, as that's the default value, see bidi.c. - if (otype != "L" && startcode != "") - { - if (!first) - printf ",\n"; - else - first = 0; - printf "\t{ 0x%s, 0x%s, %s }", startcode, endcode, trtype(otype); - } - otype = ntype; - startcode = code; - endcode = code; - } - else - endcode = code; - } - -END { - printf " };\n"; - } diff --git a/admin/unidata/makefile.w32-in b/admin/unidata/makefile.w32-in index 6a877e0c1d..96a1f5b86f 100644 --- a/admin/unidata/makefile.w32-in +++ b/admin/unidata/makefile.w32-in @@ -29,7 +29,7 @@ EMACSLOADPATH = $(lisp);$(lisp)/international;$(lisp)/emacs-lisp # Quote EMACS so it could be a file name with embedded whitespace RUNEMACS = "$(EMACS)" -Q -batch -all: $(DSTDIR)/charprop.el ../../src/biditype.h ../../src/bidimirror.h +all: $(DSTDIR)/charprop.el .el.elc: $(RUNEMACS) -f batch-byte-compile $< @@ -51,16 +51,6 @@ charprop-CMD: unidata-gen.elc unidata.txt ${DSTDIR}/charprop.el: charprop-$(SHELLTYPE) -../../src/biditype.h: UnicodeData.txt - gawk -F";" -f biditype.awk -v BINMODE=2 $< > biditype.h - $(CP) biditype.h $@ - $(DEL) biditype.h - -../../src/bidimirror.h: BidiMirroring.txt - gawk -F"[; ]+" -f bidimirror.awk -v BINMODE=2 $< > bidimirror.h - $(CP) bidimirror.h $@ - $(DEL) bidimirror.h - clean: - $(DEL) unidata-gen.elc unidata.txt biditype.h bidimirror.h |