Mercurial > hg > xemacs-beta
view lisp/mule/vietnamese.el @ 1315:70921960b980
[xemacs-hg @ 2003-02-20 08:19:28 by ben]
check in makefile fixes et al
Makefile.in.in: Major surgery. Move all stuff related to building anything in the
src/ directory into src/. Simplify the dependencies -- everything
in src/ is dependent on the single entry `src' in MAKE_SUBDIRS.
Remove weirdo targets like `all-elc[s]', dump-elc[s], etc.
mule/mule-msw-init.el: Removed.
Delete this file.
mule/mule-win32-init.el: New file, with stuff from mule-msw-init.el -- not just for MS Windows
native, boys and girls!
bytecomp.el: Change code inserted to catch trying to load a Mule-only .elc
file in a non-Mule XEmacs. Formerly you got the rather cryptic
"The required feature `mule' cannot be provided". Now you get
"Loading this file requires Mule support".
finder.el: Remove dependency on which directory this function is invoked
from.
update-elc.el: Don't mess around with ../src/BYTECOMPILE_CHANGE. Now that
Makefile.in.in and xemacs.mak are in sync, both of them use
NEEDTODUMP and the other one isn't used.
dumped-lisp.el: Rewrite in terms of `list' and `nconc' instead of assemble-list, so
we can have arbitrary forms, not just `when-feature'.
very-early-lisp.el: Nuke this file.
finder-inf.el, packages.el, update-elc.el, update-elc-2.el, loadup.el, make-docfile.el: Eliminate references to very-early-lisp.
msw-glyphs.el: Comment clarification.
xemacs.mak: Add macros DO_TEMACS, DO_XEMACS, and a few others; this macro
section is now completely in sync with src/Makefile.in.in. Copy
check-features, load-shadows, and rebuilding finder-inf.el from
src/Makefile.in.in. The main build/dump/recompile process is now
synchronized with src/Makefile.in.in. Change `WARNING' to `NOTE'
and `error checking' to `error-checking' TO avoid tripping
faux warnings and errors in the VC++ IDE.
Makefile.in.in: Major surgery. Move all stuff related to building anything in the
src/ directory from top-level Makefile.in.in to here. Simplify
the dependencies. Rearrange into logical subsections.
Synchronize the main compile/dump/build-elcs section with
xemacs.mak, which is already clean and in good working order.
Remove weirdo targets like `all-elc[s]', dump-elc[s], etc. Add
additional levels of macros \(e.g. DO_TEMACS, DO_XEMACS,
TEMACS_BATCH, XEMACS_BATCH, XEMACS_BATCH_PACKAGES) to factor out
duplicated stuff. Clean up handling of "HEAP_IN_DATA" (Cygwin) so
it doesn't need to ignore the return value from dumping. Add
.NO_PARALLEL since various aspects of building and dumping must be
serialized but do not always have dependencies between them
(this is impossible in some cases). Everything related to src/
now gets built in one pass in this directory by just running
`make' (except the Makefiles themselves and config.h, paths.h,
Emacs.ad.h, and other generated .h files).
console.c: Update list of possibly valid console types.
emacs.c: Rationalize the specifying and handling of the type of the first
frame. This was originally prompted by a workspace in which I got
GTK to compile under C++ and in the process fixed it so it could
coexist with X in the same build -- hence, a combined
TTY/X/MS-Windows/GTK build is now possible under Cygwin. (However,
you can't simultaneously *display* more than one kind of device
connection -- but getting that to work is not that difficult.
Perhaps a project for a bored grad student. I (ben) would do it
but don't see the use.) To make sense of this, I added new
switches that can be used to specifically indicate the window
system: -x [aka --use-x], -tty \[aka --use-tty], -msw [aka
--use-ms-windows], -gtk [aka --use-gtk], and -gnome [aka
--use-gnome, same as --use-gtk]. -nw continues as an alias for
-tty. When none have been given, XEmacs checks for other
parameters implying particular device types (-t -> tty, -display
-> x [or should it have same treatment as DISPLAY below?]), and
has ad-hoc logic afterwards: if env var DISPLAY is set, use x (or
gtk? perhaps should check whether gnome is running), else MS
Windows if it exsits, else TTY if it exists, else stream, and you
must be running in batch mode. This also fixes an existing bug
whereby compiling with no x, no mswin, no tty, when running non-
interactively (e.g. to dump) I get "sorry, must have TTY support".
emacs.c: Turn on Vstack_trace_on_error so that errors are debuggable even
when occurring extremely early in reinitialization.
emacs.c: Try to make sure that the user can see message output under
Windows (i.e. it doesn't just disappear right away) regardless of
when it occurs, e.g. in the middle of creating the first frame.
emacs.c: Define new function `emacs-run-status', indicating whether XEmacs
is noninteractive or interactive, whether raw,
post-dump/pdump-load or run-temacs, whether we are dumping,
whether pdump is in effect.
event-stream.c: It's "mommas are fat", not "momas are fat".
Fix other typo.
event-stream.c: Conditionalize in_menu_callback check on HAVE_MENUBARS,
because it won't exist on w/o menubar support,
lisp.h: More hackery on RETURN_NOT_REACHED. Cygwin v3.2 DOES complain here
if RETURN_NOT_REACHED() is blank, as it is for GCC 2.5+. So make it
blank only for GCC 2.5 through 2.999999999999999.
Declare Vstack_trace_on_error.
profile.c: Need to include "profile.h" to fix warnings.
sheap.c: Don't fatal() when need to rerun Make, just stderr_out() and exit(0).
That way we can distinguish between a dumping failing expectedly
(due to lack of stack space, triggering another dump) and unexpectedly,
in which case, we want to stop building. (or go on, if -K is given)
syntax.c, syntax.h: Use ints where they belong, and enum syntaxcode's where they belong,
and fix warnings thereby.
syntax.h: Fix crash caused by an edge condition in the syntax-cache macros.
text.h: Spacing fixes.
xmotif.h: New file, to get around shadowing warnings.
EmacsManager.c, event-Xt.c, glyphs-x.c, gui-x.c, input-method-motif.c, xmmanagerp.h, xmprimitivep.h: Include xmotif.h.
alloc.c: Conditionalize in_malloc on ERROR_CHECK_MALLOC.
config.h.in, file-coding.h, fileio.c, getloadavg.c, select-x.c, signal.c, sysdep.c, sysfile.h, systime.h, text.c, unicode.c: Eliminate HAVE_WIN32_CODING_SYSTEMS, use WIN32_ANY instead.
Replace defined (WIN32_NATIVE) || defined (CYGWIN) with WIN32_ANY.
lisp.h: More futile attempts to walk and chew gum at the same time when
dealing with subr's that don't return.
author | ben |
---|---|
date | Thu, 20 Feb 2003 08:19:44 +0000 |
parents | 026c5bf9c134 |
children | 98af8a976fc3 |
line wrap: on
line source
;;; vietnamese.el --- Support for Vietnamese -*- coding: iso-2022-7bit; -*- ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. ;; Copyright (C) 1997 MORIOKA Tomohiko ;; Copyright (C) 2002 Ben Wing. ;; Keywords: multilingual, Vietnamese ;; This file is part of XEmacs. ;; XEmacs 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 2, or (at your option) ;; any later version. ;; XEmacs 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 XEmacs; see the file COPYING. If not, write to the Free ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ;; 02111-1307, USA. ;;; Commentary: ;; For Vietnames, the character sets VISCII and VSCII are supported. ;;; Code: ;; Vietnamese VISCII. VISCII is 1-byte character set which contains ;; more than 96 characters. Since Emacs can't handle it as one ;; character set, it is divided into two: lower case letters and upper ;; case letters. (make-charset 'vietnamese-viscii-lower "VISCII1.1 lower-case" '(dimension 1 registry "VISCII1.1" chars 96 columns 1 direction l2r final ?1 graphic 1 short-name "VISCII lower" long-name "VISCII lower-case" )) (make-charset 'vietnamese-viscii-upper "VISCII1.1 upper-case" '(dimension 1 registry "VISCII1.1" chars 96 columns 1 direction l2r final ?2 graphic 1 short-name "VISCII upper" long-name "VISCII upper-case" )) (modify-syntax-entry 'vietnamese-viscii-lower "w") (modify-syntax-entry 'vietnamese-viscii-upper "w") (define-category ?v "Vietnamese character.") (modify-category-entry 'vietnamese-viscii-lower ?v) (modify-category-entry 'vietnamese-viscii-upper ?v) (eval-and-compile (defvar viet-viscii-decode-table [;; VISCII is a full 8-bit code. 0 1 ?,2F(B 3 4 ?,2G(B ?,2g(B 7 8 9 10 11 12 13 14 15 16 17 18 19 ?,2V(B 21 22 23 24 ?,2[(B 26 27 28 29 ?,2\(B 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 ?,2U(B ?,2!(B ?,2"(B ?,2#(B ?,2$(B ?,2%(B ?,2&(B ?,2'(B ?,2((B ?,2)(B ?,2*(B ?,2+(B ?,2,(B ?,2-(B ?,2.(B ?,2/(B ?,20(B ?,21(B ?,22(B ?,25(B ?,2~(B ?,2>(B ?,26(B ?,27(B ?,28(B ?,2v(B ?,2w(B ?,2o(B ?,2|(B ?,2{(B ?,2x(B ?,2O(B ?,2u(B ?,1!(B ?,1"(B ?,1#(B ?,1$(B ?,1%(B ?,1&(B ?,1'(B ?,1((B ?,1)(B ?,1*(B ?,1+(B ?,1,(B ?,1-(B ?,1.(B ?,1/(B ?,10(B ?,11(B ?,12(B ?,2^(B ?,2=(B ?,15(B ?,16(B ?,17(B ?,18(B ?,2q(B ?,2Q(B ?,2W(B ?,2X(B ?,1=(B ?,1>(B ?,2_(B ?,2`(B ?,2a(B ?,2b(B ?,2c(B ?,2d(B ?,2e(B ?,1F(B ?,1G(B ?,2h(B ?,2i(B ?,2j(B ?,2k(B ?,2l(B ?,2m(B ?,2n(B ?,1O(B ?,2p(B ?,1Q(B ?,2r(B ?,2s(B ?,2t(B ?,1U(B ?,1V(B ?,1W(B ?,1X(B ?,2y(B ?,2z(B ?,1[(B ?,1\(B ?,2}(B ?,1^(B ?,1_(B ?,1`(B ?,1a(B ?,1b(B ?,1c(B ?,1d(B ?,1e(B ?,1f(B ?,1g(B ?,1h(B ?,1i(B ?,1j(B ?,1k(B ?,1l(B ?,1m(B ?,1n(B ?,1o(B ?,1p(B ?,1q(B ?,1r(B ?,1s(B ?,1t(B ?,1u(B ?,1v(B ?,1w(B ?,1x(B ?,1y(B ?,1z(B ?,1{(B ?,1|(B ?,1}(B ?,1~(B ?,2f(B ] "Vietnamese VISCII decoding table.") (defvar viet-viscii-encode-table (let ((table-lower (make-vector 128 0)) (table-upper (make-vector 128 0)) (i 0) char-component) (while (< i 256) (setq char-component (split-char (aref viet-viscii-decode-table i))) (cond ((eq (car char-component) 'vietnamese-viscii-lower) (aset table-lower (nth 1 char-component) i)) ((eq (car char-component) 'vietnamese-viscii-upper) (aset table-upper (nth 1 char-component) i))) (setq i (1+ i))) (cons table-lower table-upper)) "Vietnamese VISCII encoding table. Cons of tables for encoding lower-case chars and upper-case characters. Both tables are indexed by the position code of Vietnamese characters.") (defvar viet-vscii-decode-table [;; VSCII is a full 8-bit code. 0 ?,2z(B ?,2x(B 3 ?,2W(B ?,2X(B ?,2f(B 7 8 9 10 11 12 13 14 15 16 ?,2Q(B ?,2_(B ?,2O(B ?,2V(B ?,2[(B ?,2}(B ?,2\(B 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 ?,2`(B ?,2d(B ?,2c(B ?,2a(B ?,2U(B ?,2#(B ?,2'(B ?,2h(B ?,2k(B ?,2((B ?,2i(B ?,2)(B ?,2.(B ?,2l(B ?,2o(B ?,2n(B ?,2m(B ?,28(B ?,2r(B ?,2v(B ?,2u(B ?,2s(B ?,2w(B ?,25(B ?,26(B ?,27(B ?,2^(B ?,2>(B ?,2~(B ?,2y(B ?,2|(B ?,2{(B 160 ?,2e(B ?,2b(B ?,2j(B ?,2t(B ?,2=(B ?,2_(B ?,2p(B ?,1e(B ?,1b(B ?,1j(B ?,1t(B ?,1>(B ?,1y(B ?,1p(B ?,2"(B 192 193 194 195 196 ?,1`(B ?,1d(B ?,1c(B ?,1a(B ?,1U(B ?,2F(B ?,1"(B ?,1F(B ?,1G(B ?,1!(B ?,2G(B ?,2!(B ?,2%(B ?,2&(B ?,2g(B ?,2%(B ?,2+(B ?,1#(B ?,1%(B ?,1&(B ?,1g(B ?,1$(B ?,1'(B ?,1h(B ?,2,(B ?,1k(B ?,1((B ?,1i(B ?,1)(B ?,1+(B ?,1,(B ?,1-(B ?,1*(B ?,1.(B ?,1l(B ?,1o(B ?,2-(B ?,2*(B ?,20(B ?,1n(B ?,1m(B ?,18(B ?,1r(B ?,21(B ?,1v(B ?,1u(B ?,1s(B ?,1w(B ?,10(B ?,11(B ?,12(B ?,1/(B ?,15(B ?,16(B ?,17(B ?,1^(B ?,1>(B ?,1~(B ?,1y(B ?,22(B ?,1|(B ?,1{(B ?,1z(B ?,1x(B ?,1W(B ?,1X(B ?,1f(B ?,1Q(B ?,1q(B ?,1O(B ?,1V(B ?,1[(B ?,1}(B ?,1\(B ?,2/(B] "Vietnamese VSCII decoding table.") (defvar viet-vscii-encode-table (let ((table-lower (make-vector 128 0)) (table-upper (make-vector 128 0)) (i 0) char-component) (while (< i 256) (setq char-component (split-char (aref viet-vscii-decode-table i))) (cond ((eq (car char-component) 'vietnamese-viscii-lower) (aset table-lower (nth 1 char-component) i)) ((eq (car char-component) 'vietnamese-viscii-upper) (aset table-upper (nth 1 char-component) i))) (setq i (1+ i))) (cons table-lower table-upper)) "Vietnamese VSCII encoding table. Cons of tables for encoding lower-case chars and upper-case characters. Both tables are indexed by the position code of Vietnamese characters.") ) (define-ccl-program ccl-decode-viscii `(3 ((read r0) (loop (write-read-repeat r0 ,viet-viscii-decode-table)) )) "CCL program to decode VISCII 1.1") ;; Multibyte form of a Vietnamese character is as follows (3-byte): ;; LEADING-CODE-PRIVATE-11 LEADING-CODE-EXTENDED-11 POSITION-CODE ;; where LEADING-CODE-EXTENDED-11 for Vietnamese is ;; `vietnamese-viscii-lower' or `vietnamese-viscii-upper'. (defvar leading-code-private-11 #x9E) (define-ccl-program ccl-encode-viscii `(1 ((read r0) (loop (if (r0 < 128) ;; ASCII (write-read-repeat r0) ;; not ASCII (if (r0 != ,leading-code-private-11) ;; not Vietnamese (write-read-repeat r0) ((read-if (r0 == ,(charset-id 'vietnamese-viscii-lower)) (;; Vietnamese lower (read r0) (r0 -= 128) (write-read-repeat r0 ,(car viet-viscii-encode-table))) (if (r0 == ,(charset-id 'vietnamese-viscii-upper)) (;; Vietnamese upper (read r0) (r0 -= 128) (write-read-repeat r0 ,(cdr viet-viscii-encode-table))) ;; not Vietnamese (write-read-repeat r0))))))))) "CCL program to encode VISCII 1.1") (define-ccl-program ccl-encode-viscii-font `(0 ;; In: R0:vietnamese-viscii-lower/vietnamese-viscii-upper ;; R1:position code ;; Out: R1:font code point (if (r0 == ,(charset-id 'vietnamese-viscii-lower)) (r1 = r1 ,(car viet-viscii-encode-table)) (r1 = r1 ,(cdr viet-viscii-encode-table))) ) "CCL program to encode Vietnamese chars to VISCII 1.1 font") (define-ccl-program ccl-decode-vscii `(3 ((read r0) (loop (write-read-repeat r0 ,viet-vscii-decode-table)) )) "CCL program to decode VSCII-1.") (define-ccl-program ccl-encode-vscii `(1 ((read r0) (loop (if (r0 < 128) ;; ASCII (write-read-repeat r0) ;; not ASCII (if (r0 != ,leading-code-private-11) ;; not Vietnamese (write-read-repeat r0) (read-if (r0 == ,(charset-id 'vietnamese-viscii-lower)) (;; Vietnamese lower (read r0) (r0 -= 128) (write-read-repeat r0 ,(car viet-vscii-encode-table))) (if (r0 == ,(charset-id 'vietnamese-viscii-upper)) (;; Vietnamese upper (read r0) (r0 -= 128) (write-read-repeat r0 ,(cdr viet-vscii-encode-table))) ;; not Vietnamese (write-read-repeat r0)))))))) "CCL program to encode VSCII-1.") (define-ccl-program ccl-encode-vscii-font `(0 ;; In: R0:vietnamese-viscii-lower/vietnamese-viscii-upper ;; R1:position code ;; Out: R1:font code point (if (r0 == ,(charset-id 'vietnamese-viscii-lower)) (r1 = r1 ,(car viet-vscii-encode-table)) (r1 = r1 ,(cdr viet-vscii-encode-table))) ) "CCL program to encode Vietnamese chars to VSCII-1 font.") (make-coding-system 'viscii 'ccl "VISCII 1.1 (Vietnamese)" `(mnemonic "VISCII" decode ccl-decode-viscii encode ccl-encode-viscii)) ;; it is not correct, but XEmacs doesn't have `ccl' category... (coding-system-put 'viscii 'category 'iso-8-1) ;; (make-coding-system ;; 'vietnamese-viscii 4 ?V ;; "8-bit encoding for Vietnamese VISCII 1.1 (MIME:VISCII)" ;; '(ccl-decode-viscii . ccl-encode-viscii) ;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper) ;; (mime-charset . viscii) ;; (valid-codes (0 . 255)))) ;; (define-coding-system-alias 'viscii 'vietnamese-viscii) (make-coding-system 'vscii 'ccl "VSCII 1.1 (Vietnamese)" `(mnemonic "VSCII" decode ccl-decode-vscii encode ccl-encode-vscii)) ;; (make-coding-system ;; 'vietnamese-vscii 4 ?v ;; "8-bit encoding for Vietnamese VSCII-1" ;; '(ccl-decode-vscii . ccl-encode-vscii) ;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper) ;; (valid-codes (0 . 255)))) ;; (define-coding-system-alias 'vscii 'vietnamese-vscii) (make-coding-system 'viqr 'no-conversion "VIQR (Vietnamese)" '(mnemonic "VIQR" eol-type lf post-read-conversion viqr-post-read-conversion pre-write-conversion viqr-pre-write-conversion)) ;; (make-coding-system ;; 'vietnamese-viqr 0 ?q ;; "Vietnamese latin transcription (VIQR)" ;; nil ;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper) ;; (post-read-conversion . viqr-post-read-conversion) ;; (pre-write-conversion . viqr-pre-write-conversion) ;; (charset-origin-alist ;; (vietnamese-viscii-lower "VISCII" viet-encode-viscii-char) ;; (vietnamese-viscii-upper "VISCII" viet-encode-viscii-char)))) ;; (define-coding-system-alias 'viqr 'vietnamese-viqr) ;; For VISCII users (set-charset-ccl-program 'vietnamese-viscii-lower 'ccl-encode-viscii-font) (set-charset-ccl-program 'vietnamese-viscii-upper 'ccl-encode-viscii-font) ;; For VSCII users (set-charset-ccl-program 'vietnamese-viscii-lower 'ccl-encode-vscii-font) (set-charset-ccl-program 'vietnamese-viscii-upper 'ccl-encode-vscii-font) ;; (setq font-ccl-encoder-alist ;; (cons (cons "viscii" ccl-encode-viscii-font) font-ccl-encoder-alist)) ;; (setq font-ccl-encoder-alist ;; (cons (cons "vscii" ccl-encode-vscii-font) font-ccl-encoder-alist)) (defvar viet-viscii-to-external-code-table (let ((table (make-char-table 'generic)) (i 0) (len (length viet-viscii-decode-table))) (while (< i len) (let ((ch (aref viet-viscii-decode-table i))) (if (characterp ch) (put-char-table ch i table))) (incf i))) "Table to convert from characters to their VISCII code.") (set-language-info-alist "Vietnamese" '((charset vietnamese-viscii-lower vietnamese-viscii-upper) (coding-system viscii vscii viqr) (coding-priority viscii) (locale "vietnamese" "vi") (input-method . "vietnamese-viqr") (features viet-util) (sample-text . "Vietnamese (Ti,1*(Bng Vi,1.(Bt) Ch,1`(Bo b,1U(Bn") (documentation . "\ For Vietnamese, Emacs uses special charsets internally. They can be decoded from and encoded to VISCC, VSCII, and VIQR. Current setting put higher priority to the coding system VISCII than VSCII. If you prefer VSCII, please do: (prefer-coding-system 'vietnamese-vscii)") )) ;;; vietnamese.el ends here