From: tomo Date: Sat, 1 Nov 2003 15:10:04 +0000 (+0000) Subject: Merge r21-4-13-chise-0_21-pre1. X-Git-Tag: r21-4-14-chise-b1 X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git;a=commitdiff_plain;h=refs%2Fheads%2Fr21-4-14-chise Merge r21-4-13-chise-0_21-pre1. --- diff --git a/ChangeLog b/ChangeLog index 15489a2..c0b7b52 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,81 @@ +2003-10-12 MORIOKA Tomohiko + + * Makefile.in.in: Use chise-db/ instead of char-db/. + +2003-10-08 MORIOKA Tomohiko + + * Makefile.in.in: + - Use HAVE_CHISE instead of HAVE_CHISE_CLIENT. + - Setup chise-db-directory [make symbolic link for + ${archlibdir}/char-db]. + +2003-10-06 MORIOKA Tomohiko + + * configure.in: Delete HAVE_CHISE_CLIENT. + +2003-10-05 MORIOKA Tomohiko + + * configure.in: Use HAVE_LIBCHISE instead of CHISE; add HAVE_CHISE + if HAVE_LIBCHISE or HAVE_CHISE_CLIENT is defined. + +2003-03-12 MORIOKA Tomohiko + + * configure.in: + - Add new option `--with-chise'. + - define `CHISE' if --with-chise is specified and/or chise.h is + found. + - Disable Wnn support if UTF2000 is enables. + - Display "Multiscriptization / Multilingualization / + Internationalization:" instead of "Internationalization:". + +2002-03-11 MORIOKA Tomohiko + + * Makefile.in.in (COPYDIR): Add ${srcdir}/lib-src/char-db if + HAVE_CHISE_CLIENT is defined. + (COPYDESTS): Add ${archlibdir}/char-db if HAVE_CHISE_CLIENT is + defined. + + * configure.in: Define HAVE_CHISE_CLIENT when HAVE_DATABASE and + UTF2000 are defined. + +2001-12-09 MORIOKA Tomohiko + + * configure.in: Don't define `HAVE_GGC' in XEmacs UTF-2000. + +2001-08-14 MORIOKA Tomohiko + + * Makefile.in.in (all-elc all-elcs): Add lisp/utf-2000 as a target + to byte-compile if compiling with --utf-2000. + (lisp/auto-autoloads.el): Add setting for lisp/utf-2000 if + compiling with --utf-2000. + +2000-06-23 MORIOKA Tomohiko + + * configure.in: Define `HAVE_GGC' if with-utf-2000 is specified. + +1999-09-09 MORIOKA Tomohiko + + * configure.in: Add new option `--with-text-coding'; define + `TEXT_CODING' if it is specified. + +1999-08-30 MORIOKA Tomohiko + + * configure.in: + - Delete `--with-ucs4' option. + - Display message about UTF-2000 if "$with_utf_2000" = yes. + +1999-06-17 MORIOKA Tomohiko + + * configure.in: + - Add new option `--with-ucs4'; define `CHAR_IS_UCS4' if it is + specified. + - Define `CHAR_IS_UCS4' if `--with-utf-2000' is specified. + +1999-06-15 MORIOKA Tomohiko + + * configure.in: Add new option `--with-utf-2000'; define `UTF2000' + if it is specified. + 2003-09-03 Vin Shelton * XEmacs 21.4.14 is released @@ -915,7 +993,7 @@ * XEmacs 21.2.38 is released. -2000-11-26 Bjrn Torkelsson +2000-11-26 Björn Torkelsson * configure.in: Only show message about DnD API if compiling with DnD @@ -1752,6 +1830,10 @@ * etc/HELLO (Thai): Modify for new font. +1999-06-29 MORIOKA Tomohiko + + * etc/TUTORIAL.th: Change code to tis-620. + 1999-07-22 SL Baur * configure.in: add sco7 support @@ -2256,7 +2338,7 @@ * config.guess: Synched with latest FSF version. -1998-07-12 Bjrn Torkelsson +1998-07-12 Björn Torkelsson * Makefile.in: added LDFLAGS. diff --git a/Makefile.in.in b/Makefile.in.in index bf5656f..dfc5bc5 100644 --- a/Makefile.in.in +++ b/Makefile.in.in @@ -240,8 +240,13 @@ INSTALL_ARCH_DEP_SUBDIR = @INSTALL_ARCH_DEP_SUBDIR@ ## When installing the info files, we need to do special things to ## avoid nuking an existing dir file, so we don't do that here; ## instead, we have written out explicit code in the `install' targets. +#ifdef HAVE_CHISE +COPYDIR = ${srcdir}/etc ${srcdir}/lisp ${srcdir}/lib-src/chise-db +COPYDESTS = ${etcdir} ${lispdir} ${archlibdir}/chise-db +#else COPYDIR = ${srcdir}/etc ${srcdir}/lisp COPYDESTS = ${etcdir} ${lispdir} +#endif GENERATED_HEADERS = src/paths.h src/Emacs.ad.h src/config.h lwlib/config.h src/sheap-adjust.h GENERATED_LISP = lisp/finder-inf.el @@ -286,6 +291,10 @@ depend ${srcdir}/src/depend: all-elc all-elcs: autoloads dump-elcs ${blddir}/src/${PROGNAME} -batch -vanilla \ -l update-elc-2.el -f batch-update-elc-2 lisp +#ifdef UTF2000 + ${blddir}/src/${PROGNAME} -batch -vanilla \ + -l update-elc-2.el -f batch-update-elc-2 lisp/utf-2000 +#endif ## Sub-target for all-elc. dump-elc dump-elcs: ${GENERATED_HEADERS} FRC.dump-elcs @@ -301,6 +310,22 @@ lisp/auto-autoloads.el: FRC.lisp.auto.autoloads.el ${blddir}/src/${PROGNAME} -batch -vanilla \ -f batch-byte-compile lisp/auto-autoloads.el @$(RM) lisp/auto-autoloads.el~ +#ifdef MULE + $(RM) lisp/mule/auto-autoloads.el + ${blddir}/src/${PROGNAME} -batch -vanilla \ + -l autoload -f batch-update-directory lisp/mule + ${blddir}/src/${PROGNAME} -batch -vanilla \ + -f batch-byte-compile lisp/mule/auto-autoloads.el + @$(RM) lisp/mule/auto-autoloads.el~ +#endif +#ifdef UTF2000 + $(RM) lisp/utf-2000/auto-autoloads.el + ${blddir}/src/${PROGNAME} -batch -vanilla \ + -l autoload -f batch-update-directory lisp/utf-2000 + ${blddir}/src/${PROGNAME} -batch -vanilla \ + -f batch-byte-compile lisp/utf-2000/auto-autoloads.el + @$(RM) lisp/utf-2000/auto-autoloads.el~ +#endif FRC.lisp.custom.load.el: lisp/custom-load.el: FRC.lisp.custom.load.el lisp/auto-autoloads.el @@ -492,6 +517,15 @@ install-arch-indep: mkdir info ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${mandir}/$${page}${manext} ; \ chmod 0644 ${mandir}/$${page}${manext} ; \ done +#ifdef HAVE_LIBCHISE + ${LN_S} ${archlibdir}/chise-db `${blddir}/src/${PROGNAME} -batch -vanilla -eval "\ +(let ((path (expand-file-name \"db\" chise-db-directory)))\ + (if (file-exists-p chise-db-directory)\ + (if (file-exists-p path)\ + (delete-file path))\ + (make-directory chise-db-directory t))\ + (princ path))"` +#endif @echo "If you would like to save approximately 2M of disk space, do" @echo "make gzip-el" @echo "or you may run " diff --git a/configure b/configure index 5df785f..2af3f36 100755 --- a/configure +++ b/configure @@ -340,6 +340,9 @@ while test $# != 0; do with_xfs | \ with_i18n3 | \ with_mule | \ + with_utf_2000 | \ + with_chise | \ + with_text_coding| \ with_file_coding| \ with_canna | \ with_wnn | \ @@ -851,7 +854,7 @@ echo " Use \`$progname --help' to show usage.") >&2 && exit 1 fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:855: checking whether ln -s works" >&5 +echo "configure:858: checking whether ln -s works" >&5 rm -f conftestdata if ln -s X conftestdata 2>/dev/null @@ -1116,7 +1119,7 @@ EOF echo $ac_n "checking "host system type"""... $ac_c" 1>&6 -echo "configure:1120: checking "host system type"" >&5 +echo "configure:1123: checking "host system type"" >&5 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'` canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"` configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'` @@ -1649,7 +1652,7 @@ xe_save_CFLAGS="$CFLAGS" # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1653: checking for $ac_word" >&5 +echo "configure:1656: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1676,7 +1679,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1680: checking for $ac_word" >&5 +echo "configure:1683: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1724,7 +1727,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1728: checking for $ac_word" >&5 +echo "configure:1731: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1753,7 +1756,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1757: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1760: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' @@ -1766,12 +1769,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 1770 "configure" +#line 1773 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1799,19 +1802,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1803: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1806: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1808: checking whether we are using GNU C" >&5 +echo "configure:1811: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1829,7 +1832,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1833: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1836: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -1862,7 +1865,7 @@ if test "$with_gcc" = "no" -a "$GCC" = "yes"; then # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1866: checking for $ac_word" >&5 +echo "configure:1869: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1889,7 +1892,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1893: checking for $ac_word" >&5 +echo "configure:1896: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1937,7 +1940,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1941: checking for $ac_word" >&5 +echo "configure:1944: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1966,7 +1969,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1970: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1973: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' @@ -1979,12 +1982,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 1983 "configure" +#line 1986 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2012,19 +2015,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2016: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2019: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2021: checking whether we are using GNU C" >&5 +echo "configure:2024: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2042,7 +2045,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2046: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2049: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -2075,7 +2078,7 @@ elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2079: checking for $ac_word" >&5 +echo "configure:2082: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2102,7 +2105,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2106: checking for $ac_word" >&5 +echo "configure:2109: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2150,7 +2153,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:2154: checking for $ac_word" >&5 +echo "configure:2157: checking for $ac_word" >&5 if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2179,7 +2182,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:2183: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:2186: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS' @@ -2192,12 +2195,12 @@ cross_compiling=no cat > conftest.$ac_ext << EOF -#line 2196 "configure" +#line 2199 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -2225,19 +2228,19 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:2229: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:2232: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:2234: checking whether we are using GNU C" >&5 +echo "configure:2237: checking whether we are using GNU C" >&5 cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -2255,7 +2258,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:2259: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:2262: checking whether ${CC-cc} accepts -g" >&5 echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then @@ -2292,7 +2295,7 @@ test -n "$CPP" -a -d "$CPP" && CPP= test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP" echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:2296: checking how to run the C preprocessor" >&5 +echo "configure:2299: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -2305,13 +2308,13 @@ if test -z "$CPP"; then # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2322,13 +2325,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2339,13 +2342,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2349: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -2371,9 +2374,9 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for AIX""... $ac_c" 1>&6 -echo "configure:2375: checking for AIX" >&5 +echo "configure:2378: checking for AIX" >&5 cat > conftest.$ac_ext <&6 -echo "configure:2404: checking for GNU libc" >&5 +echo "configure:2407: checking for GNU libc" >&5 cat > conftest.$ac_ext < int main() { @@ -2414,7 +2417,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:2418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2421: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* have_glibc=yes else @@ -2491,7 +2494,7 @@ EOF esac cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -2739,17 +2742,17 @@ test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" && if test "$ext if test "$__USLC__" = yes; then echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6 -echo "configure:2743: checking for whether the -Kalloca compiler flag is needed" >&5 +echo "configure:2746: checking for whether the -Kalloca compiler flag is needed" >&5 need_kalloca=no cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* : else @@ -2760,14 +2763,14 @@ else xe_save_c_switch_system="$c_switch_system" c_switch_system="$c_switch_system -Kalloca" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* need_kalloca=yes else @@ -2808,7 +2811,7 @@ fi if test "$GCC" = "yes"; then echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6 -echo "configure:2812: checking for buggy gcc versions" >&5 +echo "configure:2815: checking for buggy gcc versions" >&5 GCC_VERSION=`$CC --version` case `uname -s`:`uname -m`:$GCC_VERSION in *:sun4*:2.8.1|*:sun4*:egcs-2.90.*) @@ -2866,7 +2869,7 @@ fi if test "$pdump" != "yes"; then echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6 -echo "configure:2870: checking for \"-z nocombreloc\" linker flag" >&5 +echo "configure:2873: checking for \"-z nocombreloc\" linker flag" >&5 case "`ld --help 2>&1`" in *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6 ld_switch_site="-z nocombreloc $ld_switch_site" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;; @@ -2955,7 +2958,7 @@ test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" && if test "$extra_v fi echo $ac_n "checking for dynodump""... $ac_c" 1>&6 -echo "configure:2959: checking for dynodump" >&5 +echo "configure:2962: checking for dynodump" >&5 if test "$unexec" != "unexsol2.o"; then echo "$ac_t""no" 1>&6 else @@ -2993,12 +2996,12 @@ if test "$unexec" = "unexaix.o"; then done echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6 -echo "configure:2997: checking for terminateAndUnload in -lC" >&5 +echo "configure:3000: checking for terminateAndUnload in -lC" >&5 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'` xe_check_libs=" -lC " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3117,7 +3120,7 @@ fi if test "$add_runtime_path" = "yes"; then echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6 -echo "configure:3121: checking "for runtime libraries flag"" >&5 +echo "configure:3124: checking "for runtime libraries flag"" >&5 case "$opsys" in sol2 ) dash_r="-R" ;; decosf* | linux* | irix*) dash_r="-rpath " ;; @@ -3139,14 +3142,14 @@ if test "$GCC" = "yes"; then done fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* dash_r="$try_dash_r" else @@ -3247,10 +3250,10 @@ else fi after_morecore_hook_exists=yes echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6 -echo "configure:3251: checking for malloc_set_state" >&5 +echo "configure:3254: checking for malloc_set_state" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_malloc_set_state=yes" else @@ -3293,16 +3296,16 @@ doug_lea_malloc=no fi echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6 -echo "configure:3297: checking whether __after_morecore_hook exists" >&5 +echo "configure:3300: checking whether __after_morecore_hook exists" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -3358,7 +3361,7 @@ fi # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3362: checking for $ac_word" >&5 +echo "configure:3365: checking for $ac_word" >&5 if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -3413,7 +3416,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:3417: checking for a BSD compatible install" >&5 +echo "configure:3420: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" @@ -3467,7 +3470,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:3471: checking for $ac_word" >&5 +echo "configure:3474: checking for $ac_word" >&5 if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. @@ -3499,15 +3502,15 @@ for ac_hdr in a.out.h elf.h cygwin/version.h fcntl.h inttypes.h libg do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3503: checking for $ac_hdr" >&5 +echo "configure:3506: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3537,10 +3540,10 @@ fi done echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:3541: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:3544: checking for sys/wait.h that is POSIX.1 compatible" >&5 cat > conftest.$ac_ext < #include @@ -3556,7 +3559,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:3560: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -3580,10 +3583,10 @@ EOF fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:3584: checking for ANSI C header files" >&5 +echo "configure:3587: checking for ANSI C header files" >&5 cat > conftest.$ac_ext < #include @@ -3591,7 +3594,7 @@ cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3608,7 +3611,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3626,7 +3629,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -3644,7 +3647,7 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -3655,7 +3658,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:3659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:3662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -3681,10 +3684,10 @@ EOF fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:3685: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:3688: checking whether time.h and sys/time.h may both be included" >&5 cat > conftest.$ac_ext < #include @@ -3693,7 +3696,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:3697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -3717,10 +3720,10 @@ EOF fi echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6 -echo "configure:3721: checking for sys_siglist declaration in signal.h or unistd.h" >&5 +echo "configure:3724: checking for sys_siglist declaration in signal.h or unistd.h" >&5 cat > conftest.$ac_ext < #include @@ -3732,7 +3735,7 @@ int main() { char *msg = *(sys_siglist + 1); ; return 0; } EOF -if { (eval echo configure:3736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3739: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_decl_sys_siglist=yes else @@ -3758,9 +3761,9 @@ fi echo $ac_n "checking for utime""... $ac_c" 1>&6 -echo "configure:3762: checking for utime" >&5 +echo "configure:3765: checking for utime" >&5 cat > conftest.$ac_ext < #include @@ -3768,7 +3771,7 @@ int main() { struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x); ; return 0; } EOF -if { (eval echo configure:3772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 { test "$extra_verbose" = "yes" && cat << \EOF @@ -3787,10 +3790,10 @@ else for ac_func in utimes do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3791: checking for $ac_func" >&5 +echo "configure:3794: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3845,10 +3848,10 @@ rm -f conftest* echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3849: checking return type of signal handlers" >&5 +echo "configure:3852: checking return type of signal handlers" >&5 cat > conftest.$ac_ext < #include @@ -3865,7 +3868,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3887,10 +3890,10 @@ EOF echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3891: checking for size_t" >&5 +echo "configure:3894: checking for size_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3921,10 +3924,10 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3925: checking for pid_t" >&5 +echo "configure:3928: checking for pid_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3955,10 +3958,10 @@ EOF fi echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3959: checking for uid_t in sys/types.h" >&5 +echo "configure:3962: checking for uid_t in sys/types.h" >&5 cat > conftest.$ac_ext < EOF @@ -3994,10 +3997,10 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3998: checking for mode_t" >&5 +echo "configure:4001: checking for mode_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4028,10 +4031,10 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:4032: checking for off_t" >&5 +echo "configure:4035: checking for off_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4062,10 +4065,10 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:4066: checking for ssize_t" >&5 +echo "configure:4069: checking for ssize_t" >&5 cat > conftest.$ac_ext < #if STDC_HEADERS @@ -4097,9 +4100,9 @@ fi echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:4101: checking for socklen_t" >&5 +echo "configure:4104: checking for socklen_t" >&5 cat > conftest.$ac_ext < #include @@ -4109,7 +4112,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -4118,7 +4121,7 @@ else rm -rf conftest* cat > conftest.$ac_ext < #include @@ -4128,7 +4131,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""size_t" 1>&6 @@ -4160,9 +4163,9 @@ fi rm -f conftest* echo $ac_n "checking for struct timeval""... $ac_c" 1>&6 -echo "configure:4164: checking for struct timeval" >&5 +echo "configure:4167: checking for struct timeval" >&5 cat > conftest.$ac_ext < @@ -4178,7 +4181,7 @@ int main() { static struct timeval x; x.tv_sec = x.tv_usec; ; return 0; } EOF -if { (eval echo configure:4182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 HAVE_TIMEVAL=yes @@ -4200,10 +4203,10 @@ fi rm -f conftest* echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6 -echo "configure:4204: checking whether struct tm is in sys/time.h or time.h" >&5 +echo "configure:4207: checking whether struct tm is in sys/time.h or time.h" >&5 cat > conftest.$ac_ext < #include @@ -4211,7 +4214,7 @@ int main() { struct tm *tp; tp->tm_sec; ; return 0; } EOF -if { (eval echo configure:4215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm=time.h else @@ -4235,10 +4238,10 @@ EOF fi echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6 -echo "configure:4239: checking for tm_zone in struct tm" >&5 +echo "configure:4242: checking for tm_zone in struct tm" >&5 cat > conftest.$ac_ext < #include <$ac_cv_struct_tm> @@ -4246,7 +4249,7 @@ int main() { struct tm tm; tm.tm_zone; ; return 0; } EOF -if { (eval echo configure:4250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_struct_tm_zone=yes else @@ -4269,10 +4272,10 @@ EOF else echo $ac_n "checking for tzname""... $ac_c" 1>&6 -echo "configure:4273: checking for tzname" >&5 +echo "configure:4276: checking for tzname" >&5 cat > conftest.$ac_ext < #ifndef tzname /* For SGI. */ @@ -4282,7 +4285,7 @@ int main() { atoi(*tzname); ; return 0; } EOF -if { (eval echo configure:4286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_var_tzname=yes else @@ -4308,10 +4311,10 @@ fi echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:4312: checking for working const" >&5 +echo "configure:4315: checking for working const" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -4385,7 +4388,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:4389: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:4392: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` cat > conftestmake <<\EOF @@ -4410,12 +4413,12 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:4414: checking whether byte ordering is bigendian" >&5 +echo "configure:4417: checking whether byte ordering is bigendian" >&5 ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -4426,11 +4429,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -4441,7 +4444,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:4445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -4458,7 +4461,7 @@ fi rm -f conftest* if test $ac_cv_c_bigendian = unknown; then cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_bigendian=no else @@ -4498,10 +4501,10 @@ fi echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:4502: checking size of short" >&5 +echo "configure:4505: checking size of short" >&5 cat > conftest.$ac_ext < main() @@ -4512,7 +4515,7 @@ main() exit(0); } EOF -if { (eval echo configure:4516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_short=`cat conftestval` else @@ -4540,10 +4543,10 @@ if test "$ac_cv_sizeof_short" = 0; then exit 1 fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:4544: checking size of int" >&5 +echo "configure:4547: checking size of int" >&5 cat > conftest.$ac_ext < main() @@ -4554,7 +4557,7 @@ main() exit(0); } EOF -if { (eval echo configure:4558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_int=`cat conftestval` else @@ -4576,10 +4579,10 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:4580: checking size of long" >&5 +echo "configure:4583: checking size of long" >&5 cat > conftest.$ac_ext < main() @@ -4590,7 +4593,7 @@ main() exit(0); } EOF -if { (eval echo configure:4594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_long=`cat conftestval` else @@ -4612,10 +4615,10 @@ EOF echo $ac_n "checking size of long long""... $ac_c" 1>&6 -echo "configure:4616: checking size of long long" >&5 +echo "configure:4619: checking size of long long" >&5 cat > conftest.$ac_ext < main() @@ -4626,7 +4629,7 @@ main() exit(0); } EOF -if { (eval echo configure:4630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_long_long=`cat conftestval` else @@ -4648,10 +4651,10 @@ EOF echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:4652: checking size of void *" >&5 +echo "configure:4655: checking size of void *" >&5 cat > conftest.$ac_ext < main() @@ -4662,7 +4665,7 @@ main() exit(0); } EOF -if { (eval echo configure:4666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:4669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_void_p=`cat conftestval` else @@ -4686,7 +4689,7 @@ EOF case $opsys in cygwin* ) cat > conftest.$ac_ext < EOF @@ -4711,7 +4714,7 @@ rm -f conftest* esac echo $ac_n "checking for long file names""... $ac_c" 1>&6 -echo "configure:4715: checking for long file names" >&5 +echo "configure:4718: checking for long file names" >&5 ac_cv_sys_long_file_names=yes # Test for long file names in all the places we know might matter: @@ -4757,10 +4760,10 @@ fi echo $ac_n "checking for sin""... $ac_c" 1>&6 -echo "configure:4761: checking for sin" >&5 +echo "configure:4764: checking for sin" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sin=yes" else @@ -4801,12 +4804,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 -echo "configure:4805: checking for sin in -lm" >&5 +echo "configure:4808: checking for sin in -lm" >&5 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` xe_check_libs=" -lm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4861,14 +4864,14 @@ EOF cat > conftest.$ac_ext < int main() { return atanh(1.0) + asinh(1.0) + acosh(1.0); ; return 0; } EOF -if { (eval echo configure:4872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_INVERSE_HYPERBOLIC @@ -4885,14 +4888,14 @@ fi rm -f conftest* echo "checking type of mail spool file locking" 1>&6 -echo "configure:4889: checking type of mail spool file locking" >&5 +echo "configure:4892: checking type of mail spool file locking" >&5 for ac_func in lockf flock do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4893: checking for $ac_func" >&5 +echo "configure:4896: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4997,12 +5000,12 @@ test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \ case "$opsys" in decosf*) echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6 -echo "configure:5001: checking for cma_open in -lpthreads" >&5 +echo "configure:5004: checking for cma_open in -lpthreads" >&5 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lpthreads " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5050,7 +5053,7 @@ esac echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6 -echo "configure:5054: checking whether the -xildoff compiler flag is required" >&5 +echo "configure:5057: checking whether the -xildoff compiler flag is required" >&5 if ${CC-cc} '-###' -xildon no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then echo "$ac_t""no" 1>&6; @@ -5062,7 +5065,7 @@ fi if test "$opsys" = "sol2"; then if test "$os_release" -ge 56; then echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6 -echo "configure:5066: checking for \"-z ignore\" linker flag" >&5 +echo "configure:5069: checking for \"-z ignore\" linker flag" >&5 case "`ld -h 2>&1`" in *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6 ld_switch_site="-z ignore $ld_switch_site" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-z ignore\" to \$ld_switch_site"; fi ;; @@ -5073,7 +5076,7 @@ fi echo "checking "for specified window system"" 1>&6 -echo "configure:5077: checking "for specified window system"" >&5 +echo "configure:5080: checking "for specified window system"" >&5 GNOME_CONFIG=no @@ -5081,7 +5084,7 @@ GTK_CONFIG=no if test "$with_gnome" != "no"; then echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6 -echo "configure:5085: checking for GNOME configuration script" >&5 +echo "configure:5088: checking for GNOME configuration script" >&5 for possible in gnome-config do possible_version=`${possible} --version 2> /dev/null` @@ -5112,7 +5115,7 @@ fi if test "$with_gtk" != "no";then echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6 -echo "configure:5116: checking for GTK configuration script" >&5 +echo "configure:5119: checking for GTK configuration script" >&5 for possible in gtk12-config gtk14-config gtk-config do possible_version=`${possible} --version 2> /dev/null` @@ -5134,18 +5137,18 @@ fi if test "${GTK_CONFIG}" != "no"; then echo $ac_n "checking gtk version""... $ac_c" 1>&6 -echo "configure:5138: checking gtk version" >&5 +echo "configure:5141: checking gtk version" >&5 GTK_VERSION=`${GTK_CONFIG} --version` echo "$ac_t""${GTK_VERSION}" 1>&6 echo $ac_n "checking gtk libs""... $ac_c" 1>&6 -echo "configure:5143: checking gtk libs" >&5 +echo "configure:5146: checking gtk libs" >&5 GTK_LIBS=`${GTK_CONFIG} --libs` libs_gtk="$libs_gtk ${GTK_LIBS}" && if test "$extra_verbose" = "yes"; then echo " Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi echo "$ac_t""${GTK_LIBS}" 1>&6 echo $ac_n "checking gtk cflags""... $ac_c" 1>&6 -echo "configure:5149: checking gtk cflags" >&5 +echo "configure:5152: checking gtk cflags" >&5 GTK_CFLAGS=`${GTK_CONFIG} --cflags` if test "$GCC" = "yes"; then GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow" @@ -5155,19 +5158,19 @@ echo "configure:5149: checking gtk cflags" >&5 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6 -echo "configure:5159: checking for main in -lgdk_imlib" >&5 +echo "configure:5162: checking for main in -lgdk_imlib" >&5 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdk_imlib " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5189,12 +5192,12 @@ fi echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6 -echo "configure:5193: checking for Imlib_init in -lImlib" >&5 +echo "configure:5196: checking for Imlib_init in -lImlib" >&5 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'` xe_check_libs=" -lImlib " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5228,10 +5231,10 @@ fi for ac_func in gdk_imlib_init do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5232: checking for $ac_func" >&5 +echo "configure:5235: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5333,15 +5336,15 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:5337: checking for $ac_hdr" >&5 +echo "configure:5340: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5372,19 +5375,19 @@ done echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6 -echo "configure:5376: checking for main in -lxml" >&5 +echo "configure:5379: checking for main in -lxml" >&5 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lxml " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5406,19 +5409,19 @@ fi echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6 -echo "configure:5410: checking for main in -lglade" >&5 +echo "configure:5413: checking for main in -lglade" >&5 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lglade " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5440,19 +5443,19 @@ fi echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6 -echo "configure:5444: checking for main in -lglade-gnome" >&5 +echo "configure:5447: checking for main in -lglade-gnome" >&5 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lglade-gnome " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5473,7 +5476,7 @@ fi cat > conftest.$ac_ext < EOF @@ -5532,7 +5535,7 @@ if test "$with_x11" != "no"; then # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:5536: checking for X" >&5 +echo "configure:5539: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -5592,12 +5595,12 @@ if test "$ac_x_includes" = NO; then # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:5601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:5604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -5666,14 +5669,14 @@ if test "$ac_x_libraries" = NO; then ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -5782,17 +5785,17 @@ else case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:5786: checking whether -R must be followed by a space" >&5 +echo "configure:5789: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -5808,14 +5811,14 @@ rm -f conftest* else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -5851,12 +5854,12 @@ ac_cv_lib_dnet_dnet_ntoa=no else echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:5855: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:5858: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` xe_check_libs=" -ldnet " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5891,12 +5894,12 @@ fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:5895: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:5898: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` xe_check_libs=" -ldnet_stub " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -5936,10 +5939,10 @@ fi # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:5940: checking for gethostbyname" >&5 +echo "configure:5943: checking for gethostbyname" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -5983,12 +5986,12 @@ fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:5987: checking for gethostbyname in -lnsl" >&5 +echo "configure:5990: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` xe_check_libs=" -lnsl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6029,10 +6032,10 @@ fi # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:6033: checking for connect" >&5 +echo "configure:6036: checking for connect" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -6078,12 +6081,12 @@ fi xe_msg_checking="for connect in -lsocket" test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6082: checking "$xe_msg_checking"" >&5 +echo "configure:6085: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` xe_check_libs=" -lsocket $X_EXTRA_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6118,10 +6121,10 @@ fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:6122: checking for remove" >&5 +echo "configure:6125: checking for remove" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -6165,12 +6168,12 @@ fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:6169: checking for remove in -lposix" >&5 +echo "configure:6172: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` xe_check_libs=" -lposix " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6205,10 +6208,10 @@ fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:6209: checking for shmat" >&5 +echo "configure:6212: checking for shmat" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -6252,12 +6255,12 @@ fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:6256: checking for shmat in -lipc" >&5 +echo "configure:6259: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` xe_check_libs=" -lipc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6304,12 +6307,12 @@ fi xe_msg_checking="for IceConnectionNumber in -lICE" test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6308: checking "$xe_msg_checking"" >&5 +echo "configure:6311: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` xe_check_libs=" -lICE $X_EXTRA_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6366,15 +6369,15 @@ EOF ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:6370: checking for Xm/Xm.h" >&5 +echo "configure:6373: checking for Xm/Xm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6378: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6391,12 +6394,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6 -echo "configure:6395: checking for XmStringFree in -lXm" >&5 +echo "configure:6398: checking for XmStringFree in -lXm" >&5 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6559,7 +6562,7 @@ EOF echo "checking for X defines extracted by xmkmf" 1>&6 -echo "configure:6563: checking for X defines extracted by xmkmf" >&5 +echo "configure:6566: checking for X defines extracted by xmkmf" >&5 rm -fr conftestdir if mkdir conftestdir; then cd conftestdir @@ -6608,15 +6611,15 @@ EOF ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6 -echo "configure:6612: checking for X11/Intrinsic.h" >&5 +echo "configure:6615: checking for X11/Intrinsic.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6640,12 +6643,12 @@ fi echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6 -echo "configure:6644: checking for XOpenDisplay in -lX11" >&5 +echo "configure:6647: checking for XOpenDisplay in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6681,12 +6684,12 @@ fi xe_msg_checking="for XGetFontProperty in -lX11" test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:6685: checking "$xe_msg_checking"" >&5 +echo "configure:6688: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 -b i486-linuxaout" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6724,12 +6727,12 @@ fi echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6 -echo "configure:6728: checking for XShapeSelectInput in -lXext" >&5 +echo "configure:6731: checking for XShapeSelectInput in -lXext" >&5 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'` xe_check_libs=" -lXext " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6763,12 +6766,12 @@ fi echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6 -echo "configure:6767: checking for XtOpenDisplay in -lXt" >&5 +echo "configure:6770: checking for XtOpenDisplay in -lXt" >&5 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'` xe_check_libs=" -lXt " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6802,14 +6805,14 @@ fi echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6 -echo "configure:6806: checking the version of X11 being used" >&5 +echo "configure:6809: checking the version of X11 being used" >&5 cat > conftest.$ac_ext < int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; } EOF -if { (eval echo configure:6813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:6816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest foobar; x11_release=$? else @@ -6840,10 +6843,10 @@ EOF for ac_func in XConvertCase do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6844: checking for $ac_func" >&5 +echo "configure:6847: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6898,15 +6901,15 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:6902: checking for $ac_hdr" >&5 +echo "configure:6905: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:6910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:6913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -6939,10 +6942,10 @@ done for ac_func in XRegisterIMInstantiateCallback do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6943: checking for $ac_func" >&5 +echo "configure:6946: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6993,9 +6996,9 @@ fi done echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6 -echo "configure:6997: checking for standard XRegisterIMInstantiateCallback prototype" >&5 +echo "configure:7000: checking for standard XRegisterIMInstantiateCallback prototype" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:7014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -7028,12 +7031,12 @@ rm -f conftest* test -z "$with_xmu" && { echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6 -echo "configure:7032: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 +echo "configure:7035: checking for XmuReadBitmapDataFromFile in -lXmu" >&5 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'` xe_check_libs=" -lXmu " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7083,19 +7086,19 @@ EOF echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6 -echo "configure:7087: checking for main in -lXbsd" >&5 +echo "configure:7090: checking for main in -lXbsd" >&5 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lXbsd " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7119,7 +7122,7 @@ fi if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then if test "$GCC" = "yes"; then echo $ac_n "checking for name of AIX gcc threads option""... $ac_c" 1>&6 -echo "configure:7123: checking for name of AIX gcc threads option" >&5 +echo "configure:7126: checking for name of AIX gcc threads option" >&5 case `$CC -v --help 2>&1` in *-mthreads*) aix_threads=-mthreads ;; *) aix_threads=-pthread ;; @@ -7133,10 +7136,10 @@ echo "configure:7123: checking for name of AIX gcc threads option" >&5 xe_save_CC="$CC" CC="${CC}_r" echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:7137: checking size of short" >&5 +echo "configure:7140: checking size of short" >&5 cat > conftest.$ac_ext < main() @@ -7147,7 +7150,7 @@ main() exit(0); } EOF -if { (eval echo configure:7151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:7154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_sizeof_short=`cat conftestval` else @@ -7176,22 +7179,22 @@ EOF fi if test "$with_msw" != "no"; then echo "checking for MS-Windows" 1>&6 -echo "configure:7180: checking for MS-Windows" >&5 +echo "configure:7183: checking for MS-Windows" >&5 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6 -echo "configure:7183: checking for main in -lgdi32" >&5 +echo "configure:7186: checking for main in -lgdi32" >&5 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdi32 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7264,12 +7267,12 @@ EOF fi fi cat > conftest.$ac_ext < int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; } EOF -if { (eval echo configure:7273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:7276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_MSG_SELECT @@ -7333,15 +7336,15 @@ fi if test "$with_x11" = "yes"; then ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6 -echo "configure:7337: checking for X11/extensions/shape.h" >&5 +echo "configure:7340: checking for X11/extensions/shape.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7393,7 +7396,7 @@ case "$x_libraries" in *X11R4* ) esac echo "checking for WM_COMMAND option" 1>&6 -echo "configure:7397: checking for WM_COMMAND option" >&5; +echo "configure:7400: checking for WM_COMMAND option" >&5; if test "$with_wmcommand" != "no"; then { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_WMCOMMAND @@ -7408,15 +7411,15 @@ fi test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6 -echo "configure:7412: checking for X11/Xauth.h" >&5 +echo "configure:7415: checking for X11/Xauth.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7423: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7439,12 +7442,12 @@ fi } test -z "$with_xauth" && { echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6 -echo "configure:7443: checking for XauGetAuthByAddr in -lXau" >&5 +echo "configure:7446: checking for XauGetAuthByAddr in -lXau" >&5 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'` xe_check_libs=" -lXau " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7500,15 +7503,15 @@ if test "$with_tooltalk" != "no" ; then for dir in "" "Tt/" "desktop/" ; do ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6 -echo "configure:7504: checking for ${dir}tt_c.h" >&5 +echo "configure:7507: checking for ${dir}tt_c.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7544,12 +7547,12 @@ if test "$with_tooltalk" != "no" ; then xe_msg_checking="for tt_message_create in -ltt" test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:7548: checking "$xe_msg_checking"" >&5 +echo "configure:7551: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'` xe_check_libs=" -ltt $extra_libs" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7617,15 +7620,15 @@ fi test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6 -echo "configure:7621: checking for Dt/Dt.h" >&5 +echo "configure:7624: checking for Dt/Dt.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7648,12 +7651,12 @@ fi } test -z "$with_cde" && { echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6 -echo "configure:7652: checking for DtDndDragStart in -lDtSvc" >&5 +echo "configure:7655: checking for DtDndDragStart in -lDtSvc" >&5 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'` xe_check_libs=" -lDtSvc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7737,7 +7740,7 @@ fi if test "$with_dragndrop" != "no" ; then echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6 -echo "configure:7741: checking if drag and drop API is needed" >&5 +echo "configure:7744: checking if drag and drop API is needed" >&5 if test -n "$dragndrop_proto" ; then with_dragndrop=yes echo "$ac_t""yes (${dragndrop_proto} )" 1>&6 @@ -7757,18 +7760,18 @@ EOF fi echo "checking for LDAP" 1>&6 -echo "configure:7761: checking for LDAP" >&5 +echo "configure:7764: checking for LDAP" >&5 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ldap.h""... $ac_c" 1>&6 -echo "configure:7764: checking for ldap.h" >&5 +echo "configure:7767: checking for ldap.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7791,15 +7794,15 @@ fi } test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for lber.h""... $ac_c" 1>&6 -echo "configure:7795: checking for lber.h" >&5 +echo "configure:7798: checking for lber.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:7803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:7806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -7823,12 +7826,12 @@ fi if test "$with_ldap" != "no"; then echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6 -echo "configure:7827: checking for ldap_search in -lldap" >&5 +echo "configure:7830: checking for ldap_search in -lldap" >&5 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7864,12 +7867,12 @@ fi xe_msg_checking="for ldap_open in -lldap" test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:7868: checking "$xe_msg_checking"" >&5 +echo "configure:7871: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7905,12 +7908,12 @@ fi xe_msg_checking="for ldap_open in -lldap" test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:7909: checking "$xe_msg_checking"" >&5 +echo "configure:7912: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber -lkrb" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7946,12 +7949,12 @@ fi xe_msg_checking="for ldap_open in -lldap" test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes" echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6 -echo "configure:7950: checking "$xe_msg_checking"" >&5 +echo "configure:7953: checking "$xe_msg_checking"" >&5 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lldap -llber -lkrb -ldes" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8013,10 +8016,10 @@ EOF for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:8017: checking for $ac_func" >&5 +echo "configure:8020: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -8070,20 +8073,20 @@ fi if test "$with_postgresql" != "no"; then echo "checking for PostgreSQL" 1>&6 -echo "configure:8074: checking for PostgreSQL" >&5 +echo "configure:8077: checking for PostgreSQL" >&5 for header_dir in "" "pgsql/" "postgresql/"; do ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6 -echo "configure:8079: checking for ${header_dir}libpq-fe.h" >&5 +echo "configure:8082: checking for ${header_dir}libpq-fe.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8107,12 +8110,12 @@ fi test -n "$libpq_fe_h_file" && { echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6 -echo "configure:8111: checking for PQconnectdb in -lpq" >&5 +echo "configure:8114: checking for PQconnectdb in -lpq" >&5 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'` xe_check_libs=" -lpq " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8156,12 +8159,12 @@ EOF echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6 -echo "configure:8160: checking for PQconnectStart in -lpq" >&5 +echo "configure:8163: checking for PQconnectStart in -lpq" >&5 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'` xe_check_libs=" -lpq " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8220,7 +8223,7 @@ fi if test "$window_system" != "none"; then echo "checking for graphics libraries" 1>&6 -echo "configure:8224: checking for graphics libraries" >&5 +echo "configure:8227: checking for graphics libraries" >&5 libpath_xpm= incpath_xpm= @@ -8246,10 +8249,10 @@ echo "configure:8224: checking for graphics libraries" >&5 CFLAGS=""$incpath_xpm" $CFLAGS" && if test "$extra_verbose" = "yes"; then echo " Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi LDFLAGS=""$libpath_xpm" $LDFLAGS" && if test "$extra_verbose" = "yes"; then echo " Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6 -echo "configure:8250: checking for Xpm - no older than 3.4f" >&5 +echo "configure:8253: checking for Xpm - no older than 3.4f" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext < @@ -8258,7 +8261,7 @@ echo "configure:8250: checking for Xpm - no older than 3.4f" >&5 XpmIncludeVersion != XpmLibraryVersion() ? 1 : XpmIncludeVersion < 30406 ? 2 : 0 ;} EOF -if { (eval echo configure:8262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:8265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest dummy_arg; xpm_status=$?; if test "$xpm_status" = "0"; then @@ -8302,17 +8305,17 @@ EOF libs_x="-lXpm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXpm\" to \$libs_x"; fi CFLAGS=""$incpath_xpm" $CFLAGS" && if test "$extra_verbose" = "yes"; then echo " Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6 -echo "configure:8306: checking for \"FOR_MSW\" xpm" >&5 +echo "configure:8309: checking for \"FOR_MSW\" xpm" >&5 xe_check_libs=-lXpm cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* xpm_for_msw=no else @@ -8338,15 +8341,15 @@ EOF test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for compface.h""... $ac_c" 1>&6 -echo "configure:8342: checking for compface.h" >&5 +echo "configure:8345: checking for compface.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8369,12 +8372,12 @@ fi } test -z "$with_xface" && { echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6 -echo "configure:8373: checking for UnGenFace in -lcompface" >&5 +echo "configure:8376: checking for UnGenFace in -lcompface" >&5 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'` xe_check_libs=" -lcompface " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8437,12 +8440,12 @@ EOF if test "$with_png $with_tiff" != "no no"; then echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6 -echo "configure:8441: checking for inflate in -lc" >&5 +echo "configure:8444: checking for inflate in -lc" >&5 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8472,12 +8475,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6 -echo "configure:8476: checking for inflate in -lz" >&5 +echo "configure:8479: checking for inflate in -lz" >&5 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lz " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8507,12 +8510,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6 -echo "configure:8511: checking for inflate in -lgz" >&5 +echo "configure:8514: checking for inflate in -lgz" >&5 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'` xe_check_libs=" -lgz " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8553,15 +8556,15 @@ fi test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6 -echo "configure:8557: checking for jpeglib.h" >&5 +echo "configure:8560: checking for jpeglib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8584,12 +8587,12 @@ fi } test -z "$with_jpeg" && { echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6 -echo "configure:8588: checking for jpeg_destroy_decompress in -ljpeg" >&5 +echo "configure:8591: checking for jpeg_destroy_decompress in -ljpeg" >&5 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'` xe_check_libs=" -ljpeg " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8636,10 +8639,10 @@ EOF png_problem="" test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6 -echo "configure:8640: checking for pow" >&5 +echo "configure:8643: checking for pow" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_pow=yes" else @@ -8683,15 +8686,15 @@ fi } test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for png.h""... $ac_c" 1>&6 -echo "configure:8687: checking for png.h" >&5 +echo "configure:8690: checking for png.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8714,12 +8717,12 @@ fi } test -z "$with_png" && { echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6 -echo "configure:8718: checking for png_read_image in -lpng" >&5 +echo "configure:8721: checking for png_read_image in -lpng" >&5 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'` xe_check_libs=" -lpng " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8753,10 +8756,10 @@ fi } if test -z "$with_png"; then echo $ac_n "checking for workable png version information""... $ac_c" 1>&6 -echo "configure:8757: checking for workable png version information" >&5 +echo "configure:8760: checking for workable png version information" >&5 xe_check_libs="-lpng -lz" cat > conftest.$ac_ext < int main(int c, char **v) { @@ -8764,7 +8767,7 @@ echo "configure:8757: checking for workable png version information" >&5 if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1; return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;} EOF -if { (eval echo configure:8768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:8771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ./conftest dummy_arg; png_status=$?; if test "$png_status" = "0"; then @@ -8807,15 +8810,15 @@ EOF test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6 -echo "configure:8811: checking for tiffio.h" >&5 +echo "configure:8814: checking for tiffio.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8838,12 +8841,12 @@ fi } test -z "$with_tiff" && { echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6 -echo "configure:8842: checking for TIFFClientOpen in -ltiff" >&5 +echo "configure:8845: checking for TIFFClientOpen in -ltiff" >&5 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'` xe_check_libs=" -ltiff " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8893,15 +8896,15 @@ fi if test "$with_gtk" = "yes"; then test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for compface.h""... $ac_c" 1>&6 -echo "configure:8897: checking for compface.h" >&5 +echo "configure:8900: checking for compface.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:8905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:8908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -8924,12 +8927,12 @@ fi } test -z "$with_xface" && { echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6 -echo "configure:8928: checking for UnGenFace in -lcompface" >&5 +echo "configure:8931: checking for UnGenFace in -lcompface" >&5 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'` xe_check_libs=" -lcompface " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -8979,12 +8982,12 @@ fi if test "$with_x11" = "yes"; then echo "checking for X11 graphics libraries" 1>&6 -echo "configure:8983: checking for X11 graphics libraries" >&5 +echo "configure:8986: checking for X11 graphics libraries" >&5 fi if test "$with_x11" = "yes"; then echo "checking for the Athena widgets" 1>&6 -echo "configure:8988: checking for the Athena widgets" >&5 +echo "configure:8991: checking for the Athena widgets" >&5 case "$with_athena" in "xaw" | "") athena_variant=Xaw athena_3d=no ;; @@ -9000,12 +9003,12 @@ echo "configure:8988: checking for the Athena widgets" >&5 if test "$athena_3d" = "no"; then echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6 -echo "configure:9004: checking for XawScrollbarSetThumb in -l$athena_variant" >&5 +echo "configure:9007: checking for XawScrollbarSetThumb in -l$athena_variant" >&5 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'` xe_check_libs=" -l$athena_variant " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9032,12 +9035,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6 -echo "configure:9036: checking for $athena_3d_function in -l$athena_variant" >&5 +echo "configure:9039: checking for $athena_3d_function in -l$athena_variant" >&5 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'` xe_check_libs=" -l$athena_variant " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9079,12 +9082,12 @@ fi else echo $ac_n "checking for $athena_3d_function in -l$athena_variant""... $ac_c" 1>&6 -echo "configure:9083: checking for $athena_3d_function in -l$athena_variant" >&5 +echo "configure:9086: checking for $athena_3d_function in -l$athena_variant" >&5 ac_lib_var=`echo $athena_variant'_'$athena_3d_function | sed 'y%./+-%__p_%'` xe_check_libs=" -l$athena_variant " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9113,12 +9116,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for $athena_3d_function in -lXaw""... $ac_c" 1>&6 -echo "configure:9117: checking for $athena_3d_function in -lXaw" >&5 +echo "configure:9120: checking for $athena_3d_function in -lXaw" >&5 ac_lib_var=`echo Xaw'_'$athena_3d_function | sed 'y%./+-%__p_%'` xe_check_libs=" -lXaw " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9160,15 +9163,15 @@ fi if test "$athena_3d" = "no"; then ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6 -echo "configure:9164: checking for X11/Xaw/ThreeD.h" >&5 +echo "configure:9167: checking for X11/Xaw/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9188,15 +9191,15 @@ else echo "$ac_t""no" 1>&6 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6 -echo "configure:9192: checking for X11/Xaw/XawInit.h" >&5 +echo "configure:9195: checking for X11/Xaw/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9222,15 +9225,15 @@ fi else ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6 -echo "configure:9226: checking for X11/$athena_variant/XawInit.h" >&5 +echo "configure:9229: checking for X11/$athena_variant/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9247,15 +9250,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6 -echo "configure:9251: checking for X11/$athena_variant/ThreeD.h" >&5 +echo "configure:9254: checking for X11/$athena_variant/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9283,15 +9286,15 @@ fi if test -z "$athena_h_path"; then ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6 -echo "configure:9287: checking for $athena_variant/XawInit.h" >&5 +echo "configure:9290: checking for $athena_variant/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9308,15 +9311,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6 -echo "configure:9312: checking for $athena_variant/ThreeD.h" >&5 +echo "configure:9315: checking for $athena_variant/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9345,15 +9348,15 @@ fi if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6 -echo "configure:9349: checking for X11/Xaw3d/XawInit.h" >&5 +echo "configure:9352: checking for X11/Xaw3d/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9370,15 +9373,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6 -echo "configure:9374: checking for X11/Xaw3d/ThreeD.h" >&5 +echo "configure:9377: checking for X11/Xaw3d/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9410,15 +9413,15 @@ fi if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6 -echo "configure:9414: checking for Xaw3d/XawInit.h" >&5 +echo "configure:9417: checking for Xaw3d/XawInit.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9435,15 +9438,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6 -echo "configure:9439: checking for Xaw3d/ThreeD.h" >&5 +echo "configure:9442: checking for Xaw3d/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9475,15 +9478,15 @@ fi if test -z "$athena_h_path"; then ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6 -echo "configure:9479: checking for X11/Xaw/ThreeD.h" >&5 +echo "configure:9482: checking for X11/Xaw/ThreeD.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9522,15 +9525,15 @@ fi if test "$with_x11" = "yes"; then ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6 -echo "configure:9526: checking for Xm/Xm.h" >&5 +echo "configure:9529: checking for Xm/Xm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:9537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9547,12 +9550,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6 -echo "configure:9551: checking for XmStringFree in -lXm" >&5 +echo "configure:9554: checking for XmStringFree in -lXm" >&5 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:9570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9592,9 +9595,9 @@ fi if test "$have_motif" = "yes"; then echo $ac_n "checking for Lesstif""... $ac_c" 1>&6 -echo "configure:9596: checking for Lesstif" >&5 +echo "configure:9599: checking for Lesstif" >&5 cat > conftest.$ac_ext < #ifdef LESSTIF_VERSION @@ -10019,9 +10022,16 @@ EOF fi fi +test -z "$with_chise" && with_chise=yes +if test "$with_chise" = "yes"; then + with_mule=yes + with_utf_2000=yes + with_text_coding=yes +fi + if test "$with_mule" = "yes" ; then echo "checking for Mule-related features" 1>&6 -echo "configure:10025: checking for Mule-related features" >&5 +echo "configure:10035: checking for Mule-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining MULE EOF @@ -10030,6 +10040,102 @@ cat >> confdefs.h <<\EOF EOF } + + chise_includes_found=no + if test "$with_chise" != "no"; then + ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for chise.h""... $ac_c" 1>&6 +echo "configure:10049: checking for chise.h" >&5 + +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:10057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +with_chise=no +fi + + fi + if test "$chise_includes_found" = "no" -a "$with_chise" != "no" -a \ + -d "/usr/local/chise/include"; then + save_c_switch_site="$c_switch_site" + c_switch_site="$c_switch_site -I/usr/local/chise/include" + ac_safe=`echo "chise.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for chise.h""... $ac_c" 1>&6 +echo "configure:10085: checking for chise.h" >&5 + +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:10093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + chise_includes_found=yes +else + echo "$ac_t""no" 1>&6 +fi + + if test "$chise_includes_found" != "yes"; then + c_switch_site="$save_c_switch_site" + with_chise="no" + fi + fi + + test -z "$with_chise" && with_chise=yes + if test "$with_chise" = "yes"; then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_CHISE +EOF +cat >> confdefs.h <<\EOF +#define HAVE_CHISE 1 +EOF +} + + { test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_LIBCHISE +EOF +cat >> confdefs.h <<\EOF +#define HAVE_LIBCHISE 1 +EOF +} + + libs_x="-lchise $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lchise\" to \$libs_x"; fi + fi + { test "$extra_verbose" = "yes" && cat << \EOF Defining FILE_CODING EOF @@ -10038,23 +10144,39 @@ cat >> confdefs.h <<\EOF EOF } - extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" && if test "$extra_verbose" = "yes"; then - echo " xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\"" + extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" && if test "$extra_verbose" = "yes"; then + echo " xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\"" fi + if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining TEXT_CODING +EOF +cat >> confdefs.h <<\EOF +#define TEXT_CODING 1 +EOF +} + extra_objs="$extra_objs text-coding.o" && if test "$extra_verbose" = "yes"; then + echo " xemacs will be linked with \"text-coding.o\"" + fi + else + extra_objs="$extra_objs file-coding.o" && if test "$extra_verbose" = "yes"; then + echo " xemacs will be linked with \"file-coding.o\"" + fi + fi for ac_hdr in libintl.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:10050: checking for $ac_hdr" >&5 +echo "configure:10172: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10085,12 +10207,12 @@ done echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6 -echo "configure:10089: checking for strerror in -lintl" >&5 +echo "configure:10211: checking for strerror in -lintl" >&5 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'` xe_check_libs=" -lintl " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10133,19 +10255,40 @@ fi + if test "$with_utf_2000" = "yes" ; then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining CHAR_IS_UCS4 +EOF +cat >> confdefs.h <<\EOF +#define CHAR_IS_UCS4 1 +EOF +} + + { test "$extra_verbose" = "yes" && cat << \EOF + Defining UTF2000 +EOF +cat >> confdefs.h <<\EOF +#define UTF2000 1 +EOF +} + + with_wnn=no + with_wnn6=no + fi + echo "checking for Mule input methods" 1>&6 -echo "configure:10138: checking for Mule input methods" >&5 +echo "configure:10281: checking for Mule input methods" >&5 case "$with_xim" in "" | "yes" ) echo "checking for XIM" 1>&6 -echo "configure:10141: checking for XIM" >&5 +echo "configure:10284: checking for XIM" >&5 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6 -echo "configure:10144: checking for XOpenIM in -lX11" >&5 +echo "configure:10287: checking for XOpenIM in -lX11" >&5 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10180,12 +10323,12 @@ fi if test "$have_motif $have_lesstif" = "yes no"; then echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6 -echo "configure:10184: checking for XmImMbLookupString in -lXm" >&5 +echo "configure:10327: checking for XmImMbLookupString in -lXm" >&5 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'` xe_check_libs=" -lXm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10261,15 +10404,15 @@ EOF if test "$with_xfs" = "yes" ; then echo "checking for XFontSet" 1>&6 -echo "configure:10265: checking for XFontSet" >&5 +echo "configure:10408: checking for XFontSet" >&5 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6 -echo "configure:10268: checking for XmbDrawString in -lX11" >&5 +echo "configure:10411: checking for XmbDrawString in -lX11" >&5 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'` xe_check_libs=" -lX11 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10320,15 +10463,15 @@ EOF test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6 -echo "configure:10324: checking for wnn/jllib.h" >&5 +echo "configure:10467: checking for wnn/jllib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10475: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10351,15 +10494,15 @@ fi } test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6 -echo "configure:10355: checking for wnn/commonhd.h" >&5 +echo "configure:10498: checking for wnn/commonhd.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10384,10 +10527,10 @@ fi for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:10388: checking for $ac_func" >&5 +echo "configure:10531: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -10439,12 +10582,12 @@ done test "$ac_cv_func_crypt" != "yes" && { echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:10443: checking for crypt in -lcrypt" >&5 +echo "configure:10586: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` xe_check_libs=" -lcrypt " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10490,12 +10633,12 @@ fi if test -z "$with_wnn" -o "$with_wnn" = "yes"; then echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6 -echo "configure:10494: checking for jl_dic_list_e in -lwnn" >&5 +echo "configure:10637: checking for jl_dic_list_e in -lwnn" >&5 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10524,12 +10667,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6 -echo "configure:10528: checking for jl_dic_list_e in -lwnn4" >&5 +echo "configure:10671: checking for jl_dic_list_e in -lwnn4" >&5 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn4 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10558,12 +10701,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6 -echo "configure:10562: checking for jl_dic_list_e in -lwnn6" >&5 +echo "configure:10705: checking for jl_dic_list_e in -lwnn6" >&5 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn6 " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10592,12 +10735,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6 -echo "configure:10596: checking for dic_list_e in -lwnn6_fromsrc" >&5 +echo "configure:10739: checking for dic_list_e in -lwnn6_fromsrc" >&5 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'` xe_check_libs=" -lwnn6_fromsrc " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10656,12 +10799,12 @@ EOF if test "$with_wnn6" != "no"; then echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6 -echo "configure:10660: checking for jl_fi_dic_list in -l$libwnn" >&5 +echo "configure:10803: checking for jl_fi_dic_list in -l$libwnn" >&5 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'` xe_check_libs=" -l$libwnn " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10707,15 +10850,15 @@ EOF if test "$with_canna" != "no"; then ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:10711: checking for canna/jrkanji.h" >&5 +echo "configure:10854: checking for canna/jrkanji.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10742,15 +10885,15 @@ fi c_switch_site="$c_switch_site -I/usr/local/canna/include" ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6 -echo "configure:10746: checking for canna/jrkanji.h" >&5 +echo "configure:10889: checking for canna/jrkanji.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10778,15 +10921,15 @@ fi test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6 -echo "configure:10782: checking for canna/RK.h" >&5 +echo "configure:10925: checking for canna/RK.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:10790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -10809,12 +10952,12 @@ fi } test -z "$with_canna" && { echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6 -echo "configure:10813: checking for RkBgnBun in -lRKC" >&5 +echo "configure:10956: checking for RkBgnBun in -lRKC" >&5 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'` xe_check_libs=" -lRKC " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10848,12 +10991,12 @@ fi } test -z "$with_canna" && { echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6 -echo "configure:10852: checking for jrKanjiControl in -lcanna" >&5 +echo "configure:10995: checking for jrKanjiControl in -lcanna" >&5 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'` xe_check_libs=" -lcanna " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -10913,12 +11056,12 @@ if test "$need_motif" = "yes" ; then libs_x="-lXm $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-lXm\" to \$libs_x"; fi echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6 -echo "configure:10917: checking for layout_object_getvalue in -li18n" >&5 +echo "configure:11060: checking for layout_object_getvalue in -li18n" >&5 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'` xe_check_libs=" -li18n " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11016,10 +11159,10 @@ fi for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strerror tzset ulimit usleep waitpid vsnprintf fsync ftruncate umask do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11020: checking for $ac_func" >&5 +echo "configure:11163: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11083,10 +11226,10 @@ fi for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11087: checking for $ac_func" >&5 +echo "configure:11230: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11138,10 +11281,10 @@ done echo $ac_n "checking for openpty""... $ac_c" 1>&6 -echo "configure:11142: checking for openpty" >&5 +echo "configure:11285: checking for openpty" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_openpty=yes" else @@ -11183,12 +11326,12 @@ else echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6 -echo "configure:11187: checking for openpty in -lutil" >&5 +echo "configure:11330: checking for openpty in -lutil" >&5 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'` xe_check_libs=" -lutil " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11234,15 +11377,15 @@ EOF do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11238: checking for $ac_hdr" >&5 +echo "configure:11381: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11278,15 +11421,15 @@ for ac_hdr in stropts.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11282: checking for $ac_hdr" >&5 +echo "configure:11425: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11433: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11319,10 +11462,10 @@ if test "$ac_cv_header_stropts_h" = "yes"; then for ac_func in isastream do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11323: checking for $ac_func" >&5 +echo "configure:11466: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11376,15 +11519,15 @@ done do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11380: checking for $ac_hdr" >&5 +echo "configure:11523: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11531: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11421,10 +11564,10 @@ extra_objs="$extra_objs realpath.o" && if test "$extra_verbose" = "yes"; then for ac_func in getloadavg do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:11425: checking for $ac_func" >&5 +echo "configure:11568: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -11480,15 +11623,15 @@ if test "$ac_cv_func_getloadavg" = "yes"; then do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11484: checking for $ac_hdr" >&5 +echo "configure:11627: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11524,12 +11667,12 @@ else echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6 -echo "configure:11528: checking for kstat_open in -lkstat" >&5 +echo "configure:11671: checking for kstat_open in -lkstat" >&5 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lkstat " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11575,15 +11718,15 @@ fi do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:11579: checking for $ac_hdr" >&5 +echo "configure:11722: checking for $ac_hdr" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:11587: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:11730: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -11615,12 +11758,12 @@ done echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6 -echo "configure:11619: checking for kvm_read in -lkvm" >&5 +echo "configure:11762: checking for kvm_read in -lkvm" >&5 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'` xe_check_libs=" -lkvm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -11665,16 +11808,16 @@ fi fi echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6 -echo "configure:11669: checking whether netdb declares h_errno" >&5 +echo "configure:11812: checking whether netdb declares h_errno" >&5 cat > conftest.$ac_ext < int main() { return h_errno; ; return 0; } EOF -if { (eval echo configure:11678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 { test "$extra_verbose" = "yes" && cat << \EOF @@ -11694,16 +11837,16 @@ fi rm -f conftest* echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6 -echo "configure:11698: checking for sigsetjmp" >&5 +echo "configure:11841: checking for sigsetjmp" >&5 cat > conftest.$ac_ext < int main() { sigjmp_buf bar; sigsetjmp (bar, 0); ; return 0; } EOF -if { (eval echo configure:11707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 { test "$extra_verbose" = "yes" && cat << \EOF @@ -11723,11 +11866,11 @@ fi rm -f conftest* echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6 -echo "configure:11727: checking whether localtime caches TZ" >&5 +echo "configure:11870: checking whether localtime caches TZ" >&5 if test "$ac_cv_func_tzset" = "yes"; then cat > conftest.$ac_ext < #if STDC_HEADERS @@ -11762,7 +11905,7 @@ main() exit (0); } EOF -if { (eval echo configure:11766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:11909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then emacs_cv_localtime_cache=no else @@ -11792,9 +11935,9 @@ fi if test "$HAVE_TIMEVAL" = "yes"; then echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6 -echo "configure:11796: checking whether gettimeofday accepts one or two arguments" >&5 +echo "configure:11939: checking whether gettimeofday accepts one or two arguments" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""two" 1>&6 else @@ -11837,19 +11980,19 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:11841: checking for inline" >&5 +echo "configure:11984: checking for inline" >&5 ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:11996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -11890,17 +12033,17 @@ if test "$__DECC" != "yes"; then # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:11894: checking for working alloca.h" >&5 +echo "configure:12037: checking for working alloca.h" >&5 cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:11904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -11924,10 +12067,10 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:11928: checking for alloca" >&5 +echo "configure:12071: checking for alloca" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -11994,10 +12137,10 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:11998: checking whether alloca needs Cray hooks" >&5 +echo "configure:12141: checking whether alloca needs Cray hooks" >&5 cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12025: checking for $ac_func" >&5 +echo "configure:12168: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12077,10 +12220,10 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:12081: checking stack direction for C alloca" >&5 +echo "configure:12224: checking stack direction for C alloca" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:12246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_c_stack_direction=1 else @@ -12129,15 +12272,15 @@ fi ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for vfork.h""... $ac_c" 1>&6 -echo "configure:12133: checking for vfork.h" >&5 +echo "configure:12276: checking for vfork.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12165,10 +12308,10 @@ else fi echo $ac_n "checking for working vfork""... $ac_c" 1>&6 -echo "configure:12169: checking for working vfork" >&5 +echo "configure:12312: checking for working vfork" >&5 cat > conftest.$ac_ext < @@ -12263,7 +12406,7 @@ main() { } } EOF -if { (eval echo configure:12267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:12410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_vfork_works=yes else @@ -12289,10 +12432,10 @@ fi echo $ac_n "checking for working strcoll""... $ac_c" 1>&6 -echo "configure:12293: checking for working strcoll" >&5 +echo "configure:12436: checking for working strcoll" >&5 cat > conftest.$ac_ext < main () @@ -12302,7 +12445,7 @@ main () strcoll ("123", "456") >= 0); } EOF -if { (eval echo configure:12306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:12449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_strcoll_works=yes else @@ -12330,10 +12473,10 @@ fi for ac_func in getpgrp do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:12334: checking for $ac_func" >&5 +echo "configure:12477: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -12384,10 +12527,10 @@ fi done echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6 -echo "configure:12388: checking whether getpgrp takes no argument" >&5 +echo "configure:12531: checking whether getpgrp takes no argument" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:12589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then ac_cv_func_getpgrp_void=yes else @@ -12469,10 +12612,10 @@ fi echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:12473: checking for working mmap" >&5 +echo "configure:12616: checking for working mmap" >&5 case "$opsys" in ultrix* ) have_mmap=no ;; *) cat > conftest.$ac_ext < #include @@ -12505,7 +12648,7 @@ int main (int argc, char *argv[]) return 1; } EOF -if { (eval echo configure:12509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:12652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then have_mmap=yes else @@ -12534,9 +12677,9 @@ test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no if test "$rel_alloc $have_mmap" = "default yes"; then if test "$doug_lea_malloc" = "yes"; then echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6 -echo "configure:12538: checking for M_MMAP_THRESHOLD" >&5 +echo "configure:12681: checking for M_MMAP_THRESHOLD" >&5 cat > conftest.$ac_ext < int main() { @@ -12548,7 +12691,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:12552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:12695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* rel_alloc=no; echo "$ac_t""yes" 1>&6; else @@ -12573,15 +12716,15 @@ EOF ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termios.h""... $ac_c" 1>&6 -echo "configure:12577: checking for termios.h" >&5 +echo "configure:12720: checking for termios.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12624,15 +12767,15 @@ else echo "$ac_t""no" 1>&6 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for termio.h""... $ac_c" 1>&6 -echo "configure:12628: checking for termio.h" >&5 +echo "configure:12771: checking for termio.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12664,10 +12807,10 @@ fi echo $ac_n "checking for socket""... $ac_c" 1>&6 -echo "configure:12668: checking for socket" >&5 +echo "configure:12811: checking for socket" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else @@ -12705,15 +12848,15 @@ if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6 -echo "configure:12709: checking for netinet/in.h" >&5 +echo "configure:12852: checking for netinet/in.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12730,15 +12873,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6 -echo "configure:12734: checking for arpa/inet.h" >&5 +echo "configure:12877: checking for arpa/inet.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:12885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12763,9 +12906,9 @@ EOF } echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6 -echo "configure:12767: checking "for sun_len member in struct sockaddr_un"" >&5 +echo "configure:12910: checking "for sun_len member in struct sockaddr_un"" >&5 cat > conftest.$ac_ext < @@ -12776,7 +12919,7 @@ int main() { static struct sockaddr_un x; x.sun_len = 1; ; return 0; } EOF -if { (eval echo configure:12780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_SOCKADDR_SUN_LEN @@ -12794,9 +12937,9 @@ else fi rm -f conftest* echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6 -echo "configure:12798: checking "for ip_mreq struct in netinet/in.h"" >&5 +echo "configure:12941: checking "for ip_mreq struct in netinet/in.h"" >&5 cat > conftest.$ac_ext < @@ -12806,7 +12949,7 @@ int main() { static struct ip_mreq x; ; return 0; } EOF -if { (eval echo configure:12810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:12953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_MULTICAST @@ -12837,10 +12980,10 @@ fi echo $ac_n "checking for msgget""... $ac_c" 1>&6 -echo "configure:12841: checking for msgget" >&5 +echo "configure:12984: checking for msgget" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_msgget=yes" else @@ -12878,15 +13021,15 @@ if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6 -echo "configure:12882: checking for sys/ipc.h" >&5 +echo "configure:13025: checking for sys/ipc.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12903,15 +13046,15 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6 -echo "configure:12907: checking for sys/msg.h" >&5 +echo "configure:13050: checking for sys/msg.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12949,15 +13092,15 @@ fi ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dirent.h""... $ac_c" 1>&6 -echo "configure:12953: checking for dirent.h" >&5 +echo "configure:13096: checking for dirent.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13104: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -12984,15 +13127,15 @@ else echo "$ac_t""no" 1>&6 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6 -echo "configure:12988: checking for sys/dir.h" >&5 +echo "configure:13131: checking for sys/dir.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:12996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13025,15 +13168,15 @@ fi ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for nlist.h""... $ac_c" 1>&6 -echo "configure:13029: checking for nlist.h" >&5 +echo "configure:13172: checking for nlist.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13063,22 +13206,22 @@ fi echo "checking "for sound support"" 1>&6 -echo "configure:13067: checking "for sound support"" >&5 +echo "configure:13210: checking "for sound support"" >&5 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes if test "$with_native_sound" != "no"; then if test -n "$native_sound_lib"; then ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6 -echo "configure:13074: checking for multimedia/audio_device.h" >&5 +echo "configure:13217: checking for multimedia/audio_device.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13126,12 +13269,12 @@ fi if test -z "$native_sound_lib"; then echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6 -echo "configure:13130: checking for ALopenport in -laudio" >&5 +echo "configure:13273: checking for ALopenport in -laudio" >&5 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'` xe_check_libs=" -laudio " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13173,12 +13316,12 @@ fi if test -z "$native_sound_lib"; then echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6 -echo "configure:13177: checking for AOpenAudio in -lAlib" >&5 +echo "configure:13320: checking for AOpenAudio in -lAlib" >&5 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'` xe_check_libs=" -lAlib " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13234,15 +13377,15 @@ fi for dir in "machine" "sys" "linux"; do ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6 -echo "configure:13238: checking for ${dir}/soundcard.h" >&5 +echo "configure:13381: checking for ${dir}/soundcard.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13246: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13296,15 +13439,15 @@ fi if test "$with_nas_sound" != "no"; then ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6 -echo "configure:13300: checking for audio/audiolib.h" >&5 +echo "configure:13443: checking for audio/audiolib.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13322,12 +13465,12 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6 -echo "configure:13326: checking for AuOpenServer in -laudio" >&5 +echo "configure:13469: checking for AuOpenServer in -laudio" >&5 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'` xe_check_libs=" -laudio " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13377,7 +13520,7 @@ EOF fi libs_x="-laudio $libs_x" && if test "$extra_verbose" = "yes"; then echo " Prepending \"-laudio\" to \$libs_x"; fi cat > conftest.$ac_ext < EOF @@ -13408,7 +13551,7 @@ if test "$with_esd_sound" != "no"; then # Extract the first word of "esd-config", so it can be a program name with args. set dummy esd-config; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:13412: checking for $ac_word" >&5 +echo "configure:13555: checking for $ac_word" >&5 if test -n "$have_esd_config"; then ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test. @@ -13437,10 +13580,10 @@ fi c_switch_site="$c_switch_site `esd-config --cflags`" && if test "$extra_verbose" = "yes"; then echo " Appending \"`esd-config --cflags`\" to \$c_switch_site"; fi LIBS="`esd-config --libs` $LIBS" && if test "$extra_verbose" = "yes"; then echo " Prepending \"`esd-config --libs`\" to \$LIBS"; fi echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6 -echo "configure:13441: checking for esd_play_stream" >&5 +echo "configure:13584: checking for esd_play_stream" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_esd_play_stream=yes" else @@ -13514,7 +13657,7 @@ test -z "$with_tty" && with_tty=yes if test "$with_tty" = "yes" ; then echo "checking for TTY-related features" 1>&6 -echo "configure:13518: checking for TTY-related features" >&5 +echo "configure:13661: checking for TTY-related features" >&5 { test "$extra_verbose" = "yes" && cat << \EOF Defining HAVE_TTY EOF @@ -13530,12 +13673,12 @@ EOF if test -z "$with_ncurses"; then echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6 -echo "configure:13534: checking for tgetent in -lncurses" >&5 +echo "configure:13677: checking for tgetent in -lncurses" >&5 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lncurses " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13579,15 +13722,15 @@ EOF ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:13583: checking for ncurses/curses.h" >&5 +echo "configure:13726: checking for ncurses/curses.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13609,15 +13752,15 @@ fi ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6 -echo "configure:13613: checking for ncurses/term.h" >&5 +echo "configure:13756: checking for ncurses/term.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13621: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13764: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13647,15 +13790,15 @@ fi c_switch_site="$c_switch_site -I/usr/include/ncurses" ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6 -echo "configure:13651: checking for ncurses/curses.h" >&5 +echo "configure:13794: checking for ncurses/curses.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:13802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13690,12 +13833,12 @@ fi for lib in curses termlib termcap; do echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6 -echo "configure:13694: checking for tgetent in -l$lib" >&5 +echo "configure:13837: checking for tgetent in -l$lib" >&5 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -l$lib " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13731,12 +13874,12 @@ fi else if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6 -echo "configure:13735: checking for tgoto in -ltermcap" >&5 +echo "configure:13878: checking for tgoto in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'` xe_check_libs=" -ltermcap " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13792,12 +13935,12 @@ fi else echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6 -echo "configure:13796: checking for tgetent in -lcurses" >&5 +echo "configure:13939: checking for tgetent in -lcurses" >&5 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -lcurses " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13826,12 +13969,12 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then else echo "$ac_t""no" 1>&6 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6 -echo "configure:13830: checking for tgetent in -ltermcap" >&5 +echo "configure:13973: checking for tgetent in -ltermcap" >&5 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'` xe_check_libs=" -ltermcap " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:13989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13890,15 +14033,15 @@ EOF test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for gpm.h""... $ac_c" 1>&6 -echo "configure:13894: checking for gpm.h" >&5 +echo "configure:14037: checking for gpm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:13902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -13921,12 +14064,12 @@ fi } test -z "$with_gpm" && { echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 -echo "configure:13925: checking for Gpm_Open in -lgpm" >&5 +echo "configure:14068: checking for Gpm_Open in -lgpm" >&5 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'` xe_check_libs=" -lgpm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -13987,20 +14130,20 @@ test "$with_x11" = "yes" -o "$with_tty" = "yes" -o "$need_event_unixoid" = "yes" test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \ != "no no no" && echo "checking for database support" 1>&6 -echo "configure:13991: checking for database support" >&5 +echo "configure:14134: checking for database support" >&5 if test "$with_database_gdbm $with_database_dbm" != "no no"; then ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6 -echo "configure:13996: checking for ndbm.h" >&5 +echo "configure:14139: checking for ndbm.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:14004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -14030,12 +14173,12 @@ fi if test "$with_database_gdbm" != "no"; then echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6 -echo "configure:14034: checking for dbm_open in -lgdbm" >&5 +echo "configure:14177: checking for dbm_open in -lgdbm" >&5 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'` xe_check_libs=" -lgdbm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14074,10 +14217,10 @@ fi if test "$with_database_dbm" != "no"; then echo $ac_n "checking for dbm_open""... $ac_c" 1>&6 -echo "configure:14078: checking for dbm_open" >&5 +echo "configure:14221: checking for dbm_open" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_dbm_open=yes" else @@ -14119,12 +14262,12 @@ else echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6 -echo "configure:14123: checking for dbm_open in -ldbm" >&5 +echo "configure:14266: checking for dbm_open in -ldbm" >&5 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'` xe_check_libs=" -ldbm " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14176,12 +14319,12 @@ EOF if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6 -echo "configure:14180: checking for Berkeley db.h" >&5 +echo "configure:14323: checking for Berkeley db.h" >&5 for header in "db/db.h" "db.h"; do case "$opsys" in *freebsd*) cat > conftest.$ac_ext < @@ -14197,7 +14340,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* db_h_file="$header"; break else @@ -14208,7 +14351,7 @@ rm -f conftest* ;; *) cat > conftest.$ac_ext < @@ -14230,7 +14373,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:14234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* db_h_file="$header"; break else @@ -14248,9 +14391,9 @@ rm -f conftest* if test "$with_database_berkdb" != "no"; then echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6 -echo "configure:14252: checking for Berkeley DB version" >&5 +echo "configure:14395: checking for Berkeley DB version" >&5 cat > conftest.$ac_ext < #if DB_VERSION_MAJOR > 1 @@ -14262,7 +14405,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "yes" >/dev/null 2>&1; then rm -rf conftest* cat > conftest.$ac_ext < #if DB_VERSION_MAJOR > 2 @@ -14289,10 +14432,10 @@ fi rm -f conftest* echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6 -echo "configure:14293: checking for $dbfunc" >&5 +echo "configure:14436: checking for $dbfunc" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$dbfunc=yes" else @@ -14334,12 +14477,12 @@ else echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6 -echo "configure:14338: checking for $dbfunc in -ldb" >&5 +echo "configure:14481: checking for $dbfunc in -ldb" >&5 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'` xe_check_libs=" -ldb " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14409,17 +14552,27 @@ EOF extra_objs="$extra_objs database.o" && if test "$extra_verbose" = "yes"; then echo " xemacs will be linked with \"database.o\"" fi + if test "$with_utf_2000" = "yes" -a "$with_chise" != "yes" ; then + { test "$extra_verbose" = "yes" && cat << \EOF + Defining HAVE_CHISE +EOF +cat >> confdefs.h <<\EOF +#define HAVE_CHISE 1 +EOF +} + + fi fi if test "$with_socks" = "yes"; then echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6 -echo "configure:14418: checking for SOCKSinit in -lsocks" >&5 +echo "configure:14571: checking for SOCKSinit in -lsocks" >&5 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'` xe_check_libs=" -lsocks " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14485,7 +14638,7 @@ fi if test "$with_modules" != "no"; then echo "checking for module support" 1>&6 -echo "configure:14489: checking for module support" >&5 +echo "configure:14642: checking for module support" >&5 if test "$with_msw" = "yes"; then have_dl=yes; @@ -14501,15 +14654,15 @@ EOF ;; *) ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6 -echo "configure:14505: checking for dlfcn.h" >&5 +echo "configure:14658: checking for dlfcn.h" >&5 cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:14513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:14666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -14526,16 +14679,16 @@ if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6 -echo "configure:14530: checking for dlopen in -lc" >&5 +echo "configure:14683: checking for dlopen in -lc" >&5 cat > conftest.$ac_ext < int main() { dlopen ("", 0); ; return 0; } EOF -if { (eval echo configure:14539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* have_dl=yes else @@ -14544,18 +14697,18 @@ else rm -rf conftest* echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6 -echo "configure:14548: checking for dlopen in -ldl" >&5 +echo "configure:14701: checking for dlopen in -ldl" >&5 ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext < int main() { dlopen ("", 0); ; return 0; } EOF -if { (eval echo configure:14559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* have_dl=yes else @@ -14584,12 +14737,12 @@ EOF else echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6 -echo "configure:14588: checking for shl_load in -ldld" >&5 +echo "configure:14741: checking for shl_load in -ldld" >&5 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'` xe_check_libs=" -ldld " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14627,12 +14780,12 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6 -echo "configure:14631: checking for dld_init in -ldld" >&5 +echo "configure:14784: checking for dld_init in -ldld" >&5 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'` xe_check_libs=" -ldld " cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -14690,7 +14843,7 @@ xehost=$canonical xealias=$internal_configuration echo "checking how to build dynamic libraries for ${xehost}" 1>&6 -echo "configure:14694: checking how to build dynamic libraries for ${xehost}" >&5 +echo "configure:14847: checking how to build dynamic libraries for ${xehost}" >&5 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts. case "$xehost" in *-*-linux-gnu*) ;; @@ -14718,9 +14871,9 @@ if test "$GCC" = "yes"; then XEGCC=yes else echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:14722: checking checking whether we are using GNU C" >&5 +echo "configure:14875: checking checking whether we are using GNU C" >&5 cat > conftest.$ac_ext <&6 -echo "configure:14746: checking how to produce PIC code" >&5 +echo "configure:14899: checking how to produce PIC code" >&5 wl= can_build_shared=yes @@ -14843,18 +14996,18 @@ if test -n "$dll_cflags"; then # Check to make sure the dll_cflags actually works. echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6 -echo "configure:14847: checking if PIC flag ${dll_cflags} really works" >&5 +echo "configure:15000: checking if PIC flag ${dll_cflags} really works" >&5 save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $dll_cflags -DPIC" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:15011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also @@ -14885,7 +15038,7 @@ cc_produces_so=no xldf= xcldf= echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6 -echo "configure:14889: checking if C compiler can produce shared libraries" >&5 +echo "configure:15042: checking if C compiler can produce shared libraries" >&5 if test "$XEGCC" = yes; then xcldf="-shared" xldf="-shared" @@ -14936,14 +15089,14 @@ if test -n "$xcldf"; then xe_libs= ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5' cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cc_produces_so=yes else @@ -14968,7 +15121,7 @@ if test -z "$LTLD"; then if test "$XEGCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:14972: checking for ld used by GCC" >&5 +echo "configure:15125: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -14994,7 +15147,7 @@ echo "configure:14972: checking for ld used by GCC" >&5 esac else echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:14998: checking for GNU ld" >&5 +echo "configure:15151: checking for GNU ld" >&5 fi if test -z "$LTLD"; then @@ -15032,7 +15185,7 @@ ld_dynamic_link_flags= # Check to see if it really is or isn't GNU ld. echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6 -echo "configure:15036: checking if the linker is GNU ld" >&5 +echo "configure:15189: checking if the linker is GNU ld" >&5 # I'd rather use --version here, but apparently some GNU ld's only accept -v. if $LTLD -v 2>&1 &5; then xe_gnu_ld=yes @@ -15060,7 +15213,7 @@ else # OK - only NOW do we futz about with ld. # See if the linker supports building shared libraries. echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6 -echo "configure:15064: checking whether the linker supports shared libraries" >&5 +echo "configure:15217: checking whether the linker supports shared libraries" >&5 dll_ld=$CC dll_ldflags=$LDFLAGS ld_shlibs=yes @@ -15271,10 +15424,10 @@ EOF for ac_func in dlerror _dlerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:15275: checking for $ac_func" >&5 +echo "configure:15428: checking for $ac_func" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:15454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -15336,11 +15489,11 @@ done fi cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 +if { (eval echo configure:15497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5 then : else @@ -16115,8 +16268,11 @@ if test "$with_postgresql" = yes; then fi echo " -Internationalization:" +Multiscriptization / Multilingualization / Internationalization:" test "$with_mule" = yes && echo " Compiling in support for Mule (multi-lingual Emacs)." +test "$with_chise" = yes && echo " Using CHISE (CHaracter Information Service Environment) support." +test "$with_utf_2000" = yes && echo " Using UTF-2000 (UTF-8) buffer/string representation." +test "$with_text_coding" = yes && echo " Compiling in support for text coding." test "$with_file_coding" = yes && echo " Compiling in support for file coding." test "$with_xim" != no && echo " Compiling in support for XIM (X11R5+ I18N input method)." test "$with_xim" = motif && echo " - Using Motif to provide XIM support." diff --git a/configure.in b/configure.in index 4135e38..d27f8ab 100644 --- a/configure.in +++ b/configure.in @@ -493,6 +493,9 @@ while test $# != 0; do with_xfs | \ with_i18n3 | \ with_mule | \ + with_utf_2000 | \ + with_chise | \ + with_text_coding| \ with_file_coding| \ with_canna | \ with_wnn | \ @@ -3721,16 +3724,59 @@ if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then XE_ADD_OBJS(file-coding.o) fi +test -z "$with_chise" && with_chise=yes +if test "$with_chise" = "yes"; then + with_mule=yes + with_utf_2000=yes + with_text_coding=yes +fi + if test "$with_mule" = "yes" ; then AC_CHECKING(for Mule-related features) AC_DEFINE(MULE) - AC_DEFINE(FILE_CODING) - XE_ADD_OBJS(mule.o mule-ccl.o mule-charset.o file-coding.o) + dnl Autodetect chise + chise_includes_found=no + if test "$with_chise" != "no"; then + AC_CHECK_HEADER(chise.h, ,with_chise=no) + fi + if test "$chise_includes_found" = "no" -a "$with_chise" != "no" -a \ + -d "/usr/local/chise/include"; then + save_c_switch_site="$c_switch_site" + c_switch_site="$c_switch_site -I/usr/local/chise/include" + AC_CHECK_HEADER(chise.h,chise_includes_found=yes) + if test "$chise_includes_found" != "yes"; then + c_switch_site="$save_c_switch_site" + with_chise="no" + fi + fi + + test -z "$with_chise" && with_chise=yes + if test "$with_chise" = "yes"; then + AC_DEFINE(HAVE_CHISE) + AC_DEFINE(HAVE_LIBCHISE) + XE_PREPEND(-lchise, libs_x) + fi + + AC_DEFINE(FILE_CODING) + XE_ADD_OBJS(mule.o mule-ccl.o mule-charset.o) + if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then + AC_DEFINE(TEXT_CODING) + XE_ADD_OBJS(text-coding.o) + else + XE_ADD_OBJS(file-coding.o) + fi dnl Use -lintl to get internationalized strerror for Mule AC_CHECK_HEADERS(libintl.h) AC_CHECK_LIB(intl, strerror) + if test "$with_utf_2000" = "yes" ; then + AC_DEFINE(CHAR_IS_UCS4) + AC_DEFINE(UTF2000) + with_wnn=no + with_wnn6=no + fi + AC_CHECKING(for Mule input methods) dnl Do we have the XmIm* routines? And if so, do we want to use them? dnl XIM seems to be flaky except on Solaris... @@ -4471,6 +4517,9 @@ if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \ != "no no no"; then AC_DEFINE(HAVE_DATABASE) XE_ADD_OBJS(database.o) + if test "$with_utf_2000" = "yes" -a "$with_chise" != "yes" ; then + AC_DEFINE(HAVE_CHISE) + fi fi dnl Socks support @@ -5105,8 +5154,11 @@ if test "$with_postgresql" = yes; then fi echo " -Internationalization:" +Multiscriptization / Multilingualization / Internationalization:" test "$with_mule" = yes && echo " Compiling in support for Mule (multi-lingual Emacs)." +test "$with_chise" = yes && echo " Using CHISE (CHaracter Information Service Environment) support." +test "$with_utf_2000" = yes && echo " Using UTF-2000 (UTF-8) buffer/string representation." +test "$with_text_coding" = yes && echo " Compiling in support for text coding." test "$with_file_coding" = yes && echo " Compiling in support for file coding." test "$with_xim" != no && echo " Compiling in support for XIM (X11R5+ I18N input method)." test "$with_xim" = motif && echo " - Using Motif to provide XIM support." diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a21be94..4d86876 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,1098 @@ +2003-08-19 MORIOKA Tomohiko + + * mule/mule-category.el (word-combining-categories): Don't setup + `word-combining-categories' in XEmacs CHISE. + (word-separating-categories): Add setting about Latin script in + XEmacs CHISE. + +2003-08-09 MORIOKA Tomohiko + + * mule/mule-coding.el (coded-charset-entity-reference-alist): Add + setting for `chinese-big5'. + +2003-08-05 MORIOKA Tomohiko + + * mule/mule-coding.el (coded-charset-entity-reference-alist): + Prefer `chinese-big5-cdp' to `ideograph-daikanwa' and + `ideograph-gt-k'; prefer `ideograph-daikanwa' to `ideograph-gt-k'; + add setting for HZK0[12]-xxxx. + +2003-08-04 MORIOKA Tomohiko + + * mule/mule-conf.el (=iso-ir165): Define to inherit from `=gb2312' + in XEmacs CHISE. + +2003-07-28 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): + Prefer `=big5-cdp', `chinese-big5-eten-a', `chinese-big5-eten-b' + and `chinese-big5' to `=gt-pj-*'. + +2003-05-10 MORIOKA Tomohiko + + * mule/mule-conf.el (=daikanwa): Renamed from + `ideograph-daikanwa'. + (ideograph-daikanwa): Changed to an alias for `=daikanwa'. + +2003-05-09 MORIOKA Tomohiko + + * mule/mule-conf.el (=cns11643-7): Renamed from + `chinese-cns11643-7'. + (chinese-cns11643-7): Changed to an alias for `=cns11643-7'. + +2003-05-07 MORIOKA Tomohiko + + * mule/mule-conf.el (=cns11643-6): Renamed from + `chinese-cns11643-6'. + (chinese-cns11643-6): Changed to an alias for `=cns11643-6'. + +2003-05-06 MORIOKA Tomohiko + + * mule/mule-conf.el (=cns11643-5): Renamed from + `chinese-cns11643-5'. + (chinese-cns11643-5): Changed to an alias for `=cns11643-5'. + +2003-05-05 MORIOKA Tomohiko + + * mule/mule-conf.el (=cns11643-4): Renamed from + `chinese-cns11643-4'. + (chinese-cns11643-4): Changed to an alias for `=cns11643-4'. + +2003-05-02 MORIOKA Tomohiko + + * mule/mule-conf.el (=cns11643-3): Renamed from + `chinese-cns11643-3'. + (chinese-cns11643-3): Changed to an alias for `=cns11643-3'. + +2003-04-30 MORIOKA Tomohiko + + * mule/mule-conf.el: `chinese-cns11643-2' is renamed to + `=cns11643-2'. + (chinese-cns11643-2): New alias for `=cns11643-2'. + +2003-04-27 MORIOKA Tomohiko + + * mule/mule-conf.el: `chinese-cns11643-1' is renamed to + `=cns11643-1'. + (chinese-cns11643-1): New alias for `=cns11643-1'. + +2003-04-25 MORIOKA Tomohiko + + * mule/mule-conf.el: `chinese-gb12345' is renamed to `=gb12345'. + (chinese-gb12345): New alias for `=gb12345'. + +2003-04-21 MORIOKA Tomohiko + + * mule/mule-conf.el: `chinese-gb2312' is renamed to `=gb2312'. + (chinese-gb2312): New alias for `=gb2312'. + +2003-04-19 MORIOKA Tomohiko + + * mule/mule-conf.el: `chinese-big5' is renamed to `=big5'. + (chinese-big5): New alias for `=big5'. + +2003-04-17 MORIOKA Tomohiko + + * mule/mule-conf.el: `korean-ksc5601' is renamed to `=ks-x1001'. + (korean-ksc5601): New alias for `=ks-x1001'. + +2003-04-15 MORIOKA Tomohiko + + * mule/mule-conf.el: `japanese-jisx0212' is renamed to + `=jis-x0212'. + (japanese-jisx0212): New alias for `=jis-x0212'. + +2003-04-12 MORIOKA Tomohiko + + * mule/mule-conf.el: `japanese-jisx0208' is renamed to + `=jis-x0208-1983'. + (japanese-jisx0208): New alias for `=jis-x0208-1983'. + +2003-04-07 MORIOKA Tomohiko + + * mule/mule-conf.el: `japanese-jisx0208-1978' is renamed to + `=jis-x0208-1978'. + (japanese-jisx0208-1978): New alias for `=jis-x0208-1978'. + +2003-04-05 MORIOKA Tomohiko + + * mule/mule-conf.el (=iso-ir165): Renamed from `chinese-isoir165'. + (chinese-isoir165): Changed to an alias for `=iso-ir165'. + +2003-04-03 MORIOKA Tomohiko + + * mule/mule-conf.el (chinese-isoir165): Specify iso-ir 165. + (chinese-cns11643-3): Specify iso-ir 183. + (chinese-cns11643-4): Specify iso-ir 184. + (chinese-cns11643-5): Specify iso-ir 185. + (chinese-cns11643-6): Specify iso-ir 186. + (chinese-cns11643-7): Specify iso-ir 187. + (=jis-x0213-1-2000): In XEmacs CHISE, specify iso-ir 228. + (=jis-x0213-2-2000): In XEmacs CHISE, specify iso-ir 229. + +2003-04-03 MORIOKA Tomohiko + + * bytecomp.el (byte-compile-insert-header): In XEmacs CHISE, check + \uXXXX for every cases. + +2003-03-31 MORIOKA Tomohiko + + * mule/mule-conf.el (=ucs@big5): Renamed from `ucs-big5'. + (ucs-big5): Changed to an alias for `=ucs@big5'. + +2003-03-29 MORIOKA Tomohiko + + * mule/mule-conf.el (=ucs@ks): Renamed from `ucs-ks'. + (ucs-ks): Changed to an alias for `=ucs@ks'. + +2003-03-27 MORIOKA Tomohiko + + * mule/mule-conf.el (=ucs@jis-2000): Renamed from `=ucs-jis-2000'. + (=ucs-jis-2000): Changed to an alias for `=ucs@jis-2000'. + +2003-03-26 MORIOKA Tomohiko + + * mule/mule-conf.el (=ucs@jis-1990): Renamed from `=ucs-jis-1990'. + (=ucs-jis-1990): Changed to an alias for `=ucs@jis-1990'. + +2003-03-24 MORIOKA Tomohiko + + * mule/mule-conf.el (=ucs@jis): Renamed from `ucs-jis'. + (ucs-jis): Changed to an alias for `=ucs@jis'. + +2003-03-23 MORIOKA Tomohiko + + * mule/mule-conf.el (=ucs@cns): Renamed from `ucs-cns'. + (ucs-cns): Changed to an alias for `=ucs@cns'. + +2003-03-20 MORIOKA Tomohiko + + * mule/mule-conf.el (=ucs@gb): Renamed from `ucs-gb'. + (ucs-gb): Changed to an alias for `=ucs@gb'. + +2003-03-16 MORIOKA Tomohiko + + * mule/mule-conf.el (=daikanwa-rev1): Renamed from + `ideograph-daikanwa-2'. + (ideograph-daikanwa-2): Changed to an alias for `=daikanwa-rev1'. + (=daikanwa-rev2): New coded-charset when `utf-2000' is provided. + +2003-03-12 MORIOKA Tomohiko + + * version.el (emacs-version): Rename `XEmacs UTF-2000' to `XEmacs + CHISE'; use `xemacs-chise-version' instead of `utf-2000-version'. + + * obsolete.el (utf-2000-version): Declare as an obsolete variable + for `xemacs-chise-version'. + +2003-03-09 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): + Refer `=jis-x0208-1990' instead of `japanese-jisx0208-1990'; refer + `=gt-pj-*' instead of `ideograph-gt-pj-*'; refer `=hanziku-*' + instead of `ideograph-hanziku-*'. + + * mule/mule-conf.el: `ucs' is renamed to `=ucs'. + (ucs): New alias for `=ucs' when `utf-2000' is provided. + +2003-03-07 MORIOKA Tomohiko + + * mule/mule-conf.el (=jis-x0213-1-2000): Rename + `japanese-jisx0208-1990' to `=jis-x0208-1990'. + (japanese-jisx0208-1990): New alias for `=jis-x0208-1990' when + `utf-2000' is provided. + +2003-03-05 MORIOKA Tomohiko + + * mule/mule-conf.el (ucs-gb): New coded-charsets when `utf-2000' + is provided [was builtin coded-charsets]. + +2003-03-04 MORIOKA Tomohiko + + * mule/mule-conf.el (ucs-cns): New coded-charsets when `utf-2000' + is provided [was builtin coded-charsets]. + +2003-03-03 MORIOKA Tomohiko + + * mule/mule-conf.el (ucs-jis): New coded-charsets when `utf-2000' + is provided [was builtin coded-charsets]. + +2003-03-02 MORIOKA Tomohiko + + * mule/mule-conf.el (ucs-ks): New coded-charsets when `utf-2000' + is provided [was builtin coded-charsets]. + +2003-03-01 MORIOKA Tomohiko + + * mule/mule-conf.el (ideograph-daikanwa-2): New coded-charsets + when `utf-2000' is provided [was builtin coded-charsets]. + +2003-02-28 MORIOKA Tomohiko + + * mule/mule-conf.el (=hanziku-*): Renamed from + `ideograph-hanziku-*'. + (ideograph-hanziku-*): Changed to an alias for `=hanziku-*'. + +2003-02-27 MORIOKA Tomohiko + + * mule/mule-conf.el (ideograph-daikanwa): New coded-charsets when + `utf-2000' is provided [was builtin coded-charsets]. + (ideograph-hanziku-{1..12}): Likewise. + +2003-02-27 MORIOKA Tomohiko + + * mule/mule-conf.el (=gt-pj-*): Renamed from `ideograph-gt-pj-*'. + (ideograph-gt-pj-*): Changed to an alias for `=gt-pj-*'. + +2003-02-26 MORIOKA Tomohiko + + * mule/mule-conf.el (ideograph-gt-pj-{1..11}): New coded-charsets + when `utf-2000' is provided [was builtin coded-charsets]. + +2003-02-24 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Use + `=big5-cdp', `=cbeta' and `=jef-china3' instead of + `chinese-big5-cdp', `ideograph-cbeta' and `china3-jef'. + +2003-02-18 MORIOKA Tomohiko + + * mule/mule-conf.el (=gt): Renamed from `ideograph-gt'. + (ideograph-gt): Changed to an alias for `=gt'. + +2003-02-17 MORIOKA Tomohiko + + * mule/mule-conf.el (ucs-big5): New coded-charset when `utf-2000' + is provided; it was defined as a builtin coded-charset. + (ideograph-gt): Likewise. + +2003-02-16 MORIOKA Tomohiko + + * mule/mule-conf.el (=gt-k): Renamed from `ideograph-gt-k'. + (ideograph-gt-k): Changed to an alias for `=gt-k'. + +2003-02-15 MORIOKA Tomohiko + + * mule/mule-conf.el (=big5-cdp): Renamed from `chinese-big5-cdp'. + (chinese-big5-cdp): Changed to an alias for `=big5-cdp'. + +2003-02-15 MORIOKA Tomohiko + + * mule/mule-conf.el (=big5-eten): Renamed from + `chinese-big5-eten'. + (chinese-big5-eten): Changed to an alias for `=big5-eten'. + +2003-02-14 MORIOKA Tomohiko + + * mule/mule-conf.el (=big5-pua): Renamed from `chinese-big5-pua'. + (chinese-big5-pua): Changed to an alias for `=big5-pua'. + +2003-02-13 MORIOKA Tomohiko + + * mule/mule-conf.el (=cbeta): Renamed from `ideograph-cbeta'. + (ideograph-cbeta): Changed to an alias for `=cbeta'. + +2003-02-11 MORIOKA Tomohiko + + * mule/mule-conf.el (=jef-china3): Renamed from `china3-jef'. + (china3-jef): Changed to an alias for `=jef-china3'. + +2003-02-10 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Use + `=jis-x0213-{1|2}-2000' instead of `japanese-jisx0213-{1|2}'. + + * mule/mule-conf.el (=jis-x0213-{1|2}-2000): Renamed from + `japanese-jisx0213-{1|2}' when `utf-2000' is provided. + (japanese-jisx0213-{1|2}): New alias for =jis-x0213-{1|2}-2000 + when `utf-2000' is provided. + +2003-02-07 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): + Refer Hanziku to CBETA, Big5 variants, UCS-BMP and JEF-CHINA3. + + * mule/mule-conf.el (ucs-jis-1990): Deleted. + (ucs-jis-2000): Deleted. + +2003-02-05 MORIOKA Tomohiko + + * mule/mule-conf.el (=ucs-jis-1990): New coded-charset for + UTF-2000. + (=ucs-jis-2000): New coded-charset for UTF-2000. + +2003-01-19 MORIOKA Tomohiko + + * mule/mule-coding.el (coded-charset-entity-reference-alist): Add + settings for `ideograph-hanziku-{1|2}' and JEF-CHINA3. + +2003-01-09 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): + Prefer `korean-ksc5601' to CNS 11643; prefer Big5-CDP to + `ideograph-cbeta'. + +2003-01-05 MORIOKA Tomohiko + + * mule/mule-conf.el: Add new coded-charset when UTF-2000 [was a + builtin coded-charset]. + +2002-12-22 MORIOKA Tomohiko + + * mule/mule-coding.el (coded-charset-entity-reference-alist): Add + settings for &K0-xxxx and &I-K0-xxxx. + +2002-12-19 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `ideograph-gt-pj-k1' and `ideograph-gt-pj-k2' in UTF-2000. + +2002-12-18 MORIOKA Tomohiko + + * mule/mule-coding.el (coded-charset-entity-reference-alist): Add + settings for >-Knnnnn and &I-GT-Knnnnn in UTF-2000. + +2002-12-18 MORIOKA Tomohiko + + * mule/mule-conf.el (ideograph-gt-k): New coded-charset in + UTF-2000. + (ideograph-gt-pj-k1): Likewise. + (ideograph-gt-pj-k2): Likewise. + +2002-11-29 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `=jis-x0208'. + +2002-11-29 MORIOKA Tomohiko + + * mule/mule-conf.el (china3-jef): Add new coded-charset when + UTF-2000 [was a builtin coded-charset]. + +2002-11-26 MORIOKA Tomohiko + + * mule/mule-coding.el (utf-8-gb): Prefer `ucs-gb' and `=>ucs-gb'. + (utf-8-gb-er): Likewise. + +2002-10-11 MORIOKA Tomohiko + + * mule/mule-coding.el (coded-charset-entity-reference-alist): Add + settings for JIS X 0212 and JIS X 0208:1978. + +2002-10-02 MORIOKA Tomohiko + + * mule/mule-coding.el (coded-charset-entity-reference-alist): Add + setting for JIS X 0213. + +2002-08-26 MORIOKA Tomohiko + + * iso8859-1.el: Don't set `iso8859/1-case-table' to the + standard-case-table in UTF-2000. + +2002-08-20 MORIOKA Tomohiko + + * mule/mule-coding.el (coded-charset-entity-reference-alist): Add + definitions for isolated-chars. + +2002-08-13 MORIOKA Tomohiko + + * setup-paths.el (paths-find-utf-2000-lisp-directory): Use + `configure-utf-2000-lisp-directory'. + (paths-construct-load-path): Prefer `utf-2000-lisp-load-path' to + `mule-lisp-load-path'. + +2002-08-13 MORIOKA Tomohiko + + * startup.el (startup-setup-paths): Set and use + `utf-2000-lisp-directory'. + (startup-setup-paths-warning): Check `utf-2000-lisp-directory' in + UTF-2000. + +2002-08-12 MORIOKA Tomohiko + + * setup-paths.el (paths-utf-2000-load-path-depth): New variable. + (paths-find-utf-2000-lisp-directory): New function. + (paths-construct-load-path): Add new optional argument + `utf-2000-lisp-directory'. + + * dump-paths.el: Set and use `utf-2000-lisp-directory'. + +2002-08-12 MORIOKA Tomohiko + + * mule/mule-charset.el: Don't specify `auto-fill-chars' for + `katakana-jisx0201', `japanese-jisx0208', `japanese-jisx0212', + `chinese-gb2312', `chinese-big5-1' and `chinese-big5-2'. + (default-coded-charset-priority-list): Add `chinese-big5-1' and + `chinese-big5-2' in UTF-2000. + + * mule/chinese.el: Set syntax-entry "w" for `chinese-big5' instead + of `chinese-big5-1' and `chinese-big5-2' in UTF-2000. + +2002-08-11 MORIOKA Tomohiko + + * mule/chinese.el: Add new coding-systems `big5-er', `big5-eten', + `big5-eten-er' in UTF-2000. + (big5-cdp): Modify DOC-string and mnemonic. + +2002-08-09 MORIOKA Tomohiko + + * mule/mule-coding.el (utf-8-mcs-er): New coding-system in + UTF-2000 [renamed from utf-8-er]. + (utf-8-gb): New coding-system in UTF-2000. + (utf-8-gb-er): Likewise. + (utf-8-cns): Likewise. + (utf-8-cns-er): Likewise. + (utf-8-big5): Likewise. + (utf-8-big5-er): Likewise. + (utf-8-jis): Likewise. + (utf-8-jis-er): Likewise. + (utf-8-ks): Likewise. + (utf-8-ks-er): Likewise. + (utf-8-er): Likewise. + +2002-07-29 MORIOKA Tomohiko + + * bytecomp.el (byte-compile-insert-header): Use `utf-8-mcs-unix' + instead of `utf-8-unix' in UTF-2000. + + * mule/mule-coding.el (utf-8): Define as an alias for `utf-8-mcs'. + +2002-07-23 MORIOKA Tomohiko + + * mule/japanese.el (euc-jisx0213): New coding-system. + + * mule/mule-conf.el (japanese-jisx0213-1): Specify + `japanese-jisx0208-1990' as the mother. + +2002-07-16 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Change condition of + loading "close-cdb". + +2002-07-05 MORIOKA Tomohiko + + * mule/mule-coding.el (utf-8-er): New coding-system in UTF-2000; + setup `coded-charset-entity-reference-alist'. + +2002-07-02 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Dump "close-cdb" in + UTF-2000. + +2002-04-12 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `chinese-big5-eten-a' and `chinese-big5-eten-b'. + +2002-04-11 MORIOKA Tomohiko + + * mule/mule-conf.el (chinese-big5-pua): New coded-charset. + (chinese-big5-eten-a): Likewise. + (chinese-big5-eten-b): Likewise. + (chinese-big5-cdp): Declare as a subset of `chinese-big5' whose + code range is #x8140 .. #x8DFE. + +2002-04-08 MORIOKA Tomohiko + + * mule/mule-conf.el (chinese-big5-eten): New coded-charset in + UTF-2000. + (chinese-big5-cdp): Likewise. + +2002-02-26 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Rename + utf-2000/make-cdbs.el -> utf-2000/update-cdb.el. + +2002-02-14 MORIOKA Tomohiko + + * update-elc.el: Load lisp/utf-2000/dumped-chars.el in UTF-2000; + append `system-char-db-source-file-list' into + `preloaded-file-list' in UTF-2000. + +2002-02-12 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Delete + character-definition files. + +2002-02-04 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add `make-cdbs' in + UTF-2000. + +2001-12-31 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): + Delete `mojikyo-2022-1'. + +2001-12-26 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): + Delete `mojikyo'. + +2001-12-11 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `ucs-sip'. + +2001-11-14 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): + Comment out `chinese-gb12345'. + +2001-11-13 MORIOKA Tomohiko + + * bytecomp.el (byte-compile-insert-header): Fixed. + +2001-10-31 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Dump `ad-hoc-cdp' in + XEmacs UTF-2000. + +2001-10-16 MORIOKA Tomohiko + + * mule/chinese.el (big5-cdp): New coding-system in XEmacs + UTF-2000. + +2001-10-15 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `ideograph-hanziku-{1 .. 12}' in XEmacs UTF-2000. + +2001-10-13 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): + `japanese-jef-china3' is renamed `china3-jef'. + +2001-10-08 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `japanese-jef-china3' and `ideograph-cbeta'. + +2001-09-02 MORIOKA Tomohiko + + * list-mode.el: Delete dirty hack for XEmacs UTF-2000. + +2001-08-07 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `chinese-big5-cdp'. + +2001-08-02 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `arabic-digit', `arabic-1-column' and `arabic-2-column'. + +2001-07-31 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Load "arabic" before + loading character definitions. + +2001-07-29 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Rename + u031A0-Extended-Bopomofo.el to u031A0-Bopomofo-Extended.el. + +2001-07-24 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `chinese-big5'. + +2001-07-20 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Dump + "Ideograph-R028-Private" with XEmacs UTF-2000. + +2001-07-15 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `chinese-gb12345'. + +2001-07-09 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `ideograph-gt-pj-{1..11}'. + + * dumped-lisp.el (preloaded-file-list): Dump `isolated-char' in + XEmacs UTF-2000. + +2000-12-06 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): + Prefer `chinese-gb2312' than `chinese-cns11643-*'; add + `chinese-isoir165'. + +2000-10-05 MORIOKA Tomohiko + + * format.el (format-alist): Revive `image/jpeg', `image/gif', + `image/png', `image/x-xpm' and `image/tiff'. + + * files.el (binary-file-regexps): Add *.PNG. + +2000-07-23 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): + Prefer `japanese-jisx0208-1990' than `japanese-jisx0212'; prefer + `korean-ksc5601' than `japanese-jisx0213-1'; add `mojikyo-2022-1'. + +2000-09-27 MORIOKA Tomohiko + + * list-mode.el: Call `completion-list-mode' to avoid slowness of + the first completion when UTF-2000 is running. + +2000-05-30 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): + Delete `ucs'. + +2000-04-28 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Don't add "mojikyo". + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `mojikyo' instead of `mojikyo-pj-[1..21]'. + +2000-04-27 MORIOKA Tomohiko + + * mule/vietnamese.el (vscii-2): Delete abolished property + `composite'; now composite mode is default. + +2000-04-26 MORIOKA Tomohiko + + * bytecomp.el (byte-compile-insert-header): Use `binary' instead + of `raw-text'; check \uHHHH representation even if non-ascii + characters are not found. + + * dumped-lisp.el (preloaded-file-list): Add "ccs-tcvn5712.el" in + UTF-2000; add "viet-ccl" in non-UTF-2000 Mule; add "vietnamese" + unconditionally. + + * mule/viet-ccl.el: New file. + + * mule/vietnamese.el (vscii-2): New coding-system in UTF-2000. + (tcvn-5712): New coding-system alias of `vscii-2' in UTF-2000. + - Separate CCL based implementations to viet-ccl.el. + +2000-02-24 MORIOKA Tomohiko + + * mule/mule-conf.el (japanese-jisx0213-1): Allow + "jisx0213.2000-1". + (japanese-jisx0213-2): Allow "jisx0213.2000-2". + + * mule/mule-charset.el (default-coded-charset-priority-list): + Prefer `japanese-jisx0213-1' and `japanese-jisx0213-2' to + `japanese-jisx0208-1978' and `japanese-jisx0208-1990'. + +2000-01-31 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add "mojikyo" in UTF-2000. + +2000-01-27 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `ucs' in UTF-2000. + +2000-01-26 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): + Prefer `mojikyo-pj-*' and `ideograph-daikanwa' to `ucs-bmp' and + `arabic-iso8859-6'. + +2000-01-12 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `mojikyo-pj-[1 .. 21]' in UTF-2000. + +2000-01-14 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `katakana-jisx0201' in UTF-2000. + +1999-12-23 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add "u0A000-Yi-Syllables", + "u0AC00-Hangul-Syllables", "u0FB00-Alphabetic-Presentation-Forms", + "u0FB50-Arabic-Presentation-Forms-A", + "u0FE20-Combining-Half-Marks", "u0FE30-CJK-Compatibility-Forms", + "u0FE50-Small-Form-Variants", + "u0FE70-Arabic-Presentation-Forms-B", + "u0FF00-Halfwidth-and-Fullwidth-Forms" and "u0FFF0-Specials" in + UTF-2000. + +1999-12-22 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Delete + "ccs-jisx0208-1983.el"; add "Ideograph-R031-Enclosure" + ... "Ideograph-R214-Flute" in UTF-2000. + +1999-11-21 MORIOKA Tomohiko + + * mule/mule-conf.el (japanese-jisx0213-1): New coded-charset. + (japanese-jisx0213-2): New coded-charset. + + * dumped-lisp.el (preloaded-file-list): Add + "Ideograph-R028-Private", "Ideograph-R029-Again" and + "Ideograph-R030-Mouth". + +1999-11-19 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add "Ideograph-R012-Eight", + "Ideograph-R013-Down-Box", "Ideograph-R014-Cover", + "Ideograph-R015-Ice", "Ideograph-R016-Table", + "Ideograph-R017-Open-Box", "Ideograph-R018-Knife", + "Ideograph-R019-Power", "Ideograph-R020-Wrap", "Ideograph-R021-Spoon", + "Ideograph-R022-Right-Open-Box", "Ideograph-R023-Hiding-Enclosure", + "Ideograph-R024-Ten", "Ideograph-R025-Divination", + "Ideograph-R026-Seal" and "Ideograph-R027-Cliff" in UTF-2000. + +1999-11-18 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add "Ideograph-R002-Line", + "Ideograph-R003-Dot", "Ideograph-R004-Slash", + "Ideograph-R005-Second", "Ideograph-R006-Hook", + "Ideograph-R007-Two", "Ideograph-R008-Lid", "Ideograph-R009-Man", + "Ideograph-R010-Legs" and "Ideograph-R011-Enter". + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `japanese-jisx0208-1990' and `japanese-jisx0208-1978'. + +1999-11-16 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add "Ideograph-R001-One" + in UTF-2000. + +1999-11-16 MORIOKA Tomohiko + + * mule/mule-conf.el (sisheng): Moved from mule/chinese.el. + (chinese-isoir165): Moved from mule/chinese.el. + (chinese-cns11643-3): Moved from mule/chinese.el. + (chinese-cns11643-4): Moved from mule/chinese.el. + (chinese-cns11643-5): Moved from mule/chinese.el. + (chinese-cns11643-6): Moved from mule/chinese.el. + (chinese-cns11643-7): Moved from mule/chinese.el. + + * mule/chinese.el: Move definition of coded-charsets to + mule/mule-conf.el. + +1999-11-15 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `ideograph-daikanwa'. + +1999-11-15 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Delete + "ccs-jisx0201-latin.el". + +1999-11-15 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add + "u031A0-Extended-Bopomofo" in UTF-2000. + +1999-11-15 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): u02E00-CJK-Radicals was + renamed to u02E00-CJK-Radical-Supplement. + +1999-11-14 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add + "u03000-CJK-Symbols-and-Punctuation", "u03040-Hiragana", + "u030A0-Katakana", "u03100-Bopomofo", + "u03130-Hangul-Compatibility-Jamo", "u03190-Kanbun", + "u03200-Enclosed-CJK-Letters-and-Months" and + "u03300-CJK-Compatibility". + +1999-11-14 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add "u02E00-CJK-Radicals", + "u02F00-Kangxi-Radicals" and + "u02FF0-Ideographic-Description-Characters". + +1999-11-14 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add + "u02600-Miscellaneous-Symbols", "u02700-Dingbats" and + "u02800-Braille-Patterns" in UTF-2000. + +1999-11-14 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Load "uXXXXX-*" instead of + "uXXXXX-*.el" in UTF-2000. + + * bytecomp.el (byte-compile-insert-header): Delete comments if + non-ASCII characters are found; allow `byte-compile-dynamic' and + `byte-compile-dynamic-docstrings' if *.elc will be encoded by + `raw-text'. + +1999-11-14 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add + "u02500-Box-Drawing.el", "u02580-Block-Elements.el" and + "u025A0-Geometric-Shapes.el". + +1999-11-14 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add + "u02400-Control-Pictures.el", "u02440-OCR.el" and + "u02460-Enclosed-Alphanumerics.el". + +1999-11-14 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `chinese-gb2312'. + + * dumped-lisp.el (preloaded-file-list): Add + "u02200-Mathematical-Operators.el" and + "u02300-Miscellaneous-Technical.el". + +1999-11-14 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `chinese-cns11643-*'. + + * dumped-lisp.el (preloaded-file-list): Add + "u02100-Letterlike-Symbols.el", "u02150-Number-Forms.el" and + "u02190-Arrows.el" in UTF-2000. + +1999-11-14 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `korean-ksc5601'. + + * dumped-lisp.el (preloaded-file-list): Add + "u02000-General-Punctuation.el", "u02070-Superscripts.el", + "u02080-Subscripts.el", "u020A0-Currency-Symbols.el" and + "u020D0-Combining-Diacritical-Marks-for-Symbols.el" in UTF-2000. + +1999-11-14 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Delete "ccs-viscii.el". + +1999-11-14 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add "u013A0-Cherokee.el", + "u01400-Canadian.el", "u01680-Ogham.el", "u016A0-Runic.el", + "u01780-Khmer.el", "u01800-Mongolian.el", + "u01E00-Latin-Extended-Additional.el" and + "u01F00-Greek-Extended.el" in UTF-2000. + +1999-11-13 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `ethiopic-ucs' and `ethiopic'. + + * dumped-lisp.el (preloaded-file-list): Add "u010A0-Georgian.el", + "u01100-Hangul-Jamo.el" and "u01200-Ethiopic.el". + + * mule/mule-conf.el: Move definition of coded-charset `ethiopic' + from mule/ethiopic.el. + + * mule/ethiopic.el: Move definition of coded-charset `ethiopic' to + mule/mule-conf.el. + +1999-11-13 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `lao'. + + * mule/mule-conf.el (lao): New coded-charset. + + * dumped-lisp.el (preloaded-file-list): Add + "u00900-Devanagari.el", "u00980-Bengali.el", "u00A00-Gurmukhi.el", + "u00A80-Gujarati.el", "u00B00-Oriya.el", "u00B80-Tamil.el", + "u00C00-Telugu.el", "u00C80-Kannada.el", "u00D00-Malayalam.el", + "u00D80-Sinhala.el", "u00E00-Thai.el", "u00E80-Lao.el", + "u00F00-Tibetan.el" and "u01000-Myanmar.el". + +1999-11-13 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `ucs-bmp' and `arabic-iso8859-6'. + +1999-11-13 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add "u00400-Cyrillic.el", + "u00530-Armenian.el", "u00590-Hebrew.el", "u00600-Arabic.el", + "u00700-Syriac.el" and "u00780-Thaana.el" in UTF-2000. + +1999-11-12 MORIOKA Tomohiko + + * startup.el (normal-top-level): Load autoload file for UTF-2000 + in UTF-2000. + +1999-11-11 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add "mule-conf" in Mule; + delete "ccs-iso8859-*.el"; add "u00000-C0.el", + "u00020-Basic-Latin.el", "u00080-C1.el", + "u000A0-Latin-1-Supplement.el", "u00100-Latin-Extended-A.el", + "u00180-Latin-Extended-B.el", "u00250-IPA-Extensions.el", + "u002B0-Spacing-Modifier-Letters.el", + "u00300-Combining-Diacritical-Marks.el" and "u00370-Greek.el" in + UTF-2000. + +1999-11-10 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `japanese-jisx0212' and `ipa' in UTF-2000; use `latin-viscii-*' + instead of `vietnamese-viscii-*'. + +1999-11-09 MORIOKA Tomohiko + + * mule/mule-conf.el: New file. + + * mule/misc-lang.el: Move definition of charset `ipa' to + mule/mule-conf.el. + +1999-10-10 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `latin-viscii'; prefer it for characters used in Vietnamese. + +1999-10-08 Daiki Ueno + + * bytecomp.el (byte-compile-insert-header): Fix regexp. + +1999-10-07 MORIOKA Tomohiko + + * mule/viet-chars.el (latin-viscii-lower): Renamed from charset + `vietnamese-viscii-lower'. + (latin-viscii-upper): Renamed from charset + `vietnamese-viscii-upper'. + (vietnamese-viscii-lower): New alias for charset + `latin-viscii-lower'. + (vietnamese-viscii-upper): New alias for charset + `latin-viscii-upper'. + +1999-10-05 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): + Comment out `hiragana-jisx0208' and `katakana-jisx0208'. + +1999-10-04 MORIOKA Tomohiko + + * mule/ccs-jisx0208-1983.el, mule/ccs-tcvn5712.el, + mule/ccs-viscii.el, mule/ccs-iso8859-9.el, + mule/ccs-jisx0201-latin.el, mule/ccs-iso8859-2.el, + mule/ccs-iso8859-3.el, mule/ccs-iso8859-4.el: Moved to + lisp/utf-2000. + +1999-10-03 MORIOKA Tomohiko + + * mule/ccs-tcvn5712.el: New file. + +1999-10-03 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add "ccs-jisx0208-1983.el" + in UTF-2000. + +1999-10-02 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `japanese-jisx0208'. + +1999-10-02 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Add + "ccs-jisx0201-latin.el", "ccs-iso8859-2.el", "ccs-iso8859-3.el", + "ccs-iso8859-4.el", "ccs-iso8859-9.el" and "ccs-viscii.el" in + UTF-2000. + + * mule/ccs-iso8859-2.el, mule/ccs-iso8859-3.el, + mule/ccs-iso8859-4.el, mule/ccs-iso8859-9.el, + mule/ccs-jisx0201-latin.el, mule/ccs-jisx0208-1983.el, + mule/ccs-viscii.el: New files. + + * bytecomp.el (byte-compile-insert-header): Don't use `raw-text' + if \uXXXX is found. + +1999-09-30 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `hiragana-jisx0208' and `katakana-jisx0208'. + +1999-09-21 MORIOKA Tomohiko + + * mule/chinese.el (chinese-cns11643-3): Define it even if + `utf-2000' is provided. + (chinese-cns11643-4): Likewise. + (chinese-cns11643-5): Likewise. + (chinese-cns11643-6): Likewise. + (chinese-cns11643-7): Likewise. + +1999-09-14 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + thai-tis620 and hebrew-iso8859-8; namely all BMP are covered. + +1999-09-13 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): Add + `cyrillic-iso8859-5' and `greek-iso8859-7'. + +1999-09-13 MORIOKA Tomohiko + + * mule/mule-charset.el (default-coded-charset-priority-list): + Setup in UTF-2000. + +1999-09-09 MORIOKA Tomohiko + + * mule/viet-chars.el: Don't define charset + `vietnamese-viscii-lower' and `vietnamese-viscii-upper' because + they are defined as builtin charsets. + +1999-08-31 MORIOKA Tomohiko + + * version.el (emacs-version): Add more space just before UTF-2000 + version string. + +1999-08-29 MORIOKA Tomohiko + + * version.el ([constant] emacs-version): Don't add a space in the + preceding place of `xemacs-betaname' because it is duplicated. + (emacs-version): Add UTF-2000 version if `utf-2000' is provided. + + * startup.el (splash-frame-body): Add ETL. + +1999-08-28 MORIOKA Tomohiko + + * mule/chinese.el (chinese-cns11643-3): Don't define if `utf-2000' + is provided because it is defined as builtin charset. + (chinese-cns11643-4): Likewise. + (chinese-cns11643-5): Likewise. + (chinese-cns11643-6): Likewise. + (chinese-cns11643-7): Likewise. + +1999-08-24 MORIOKA Tomohiko + + * mule/mule-cmds.el (reset-language-environment): Fix problem when + coding-system `iso-10646-ucs-4' is not defined. + +1999-06-17 MORIOKA Tomohiko + + * bytecomp.el (byte-compile-insert-header): Use utf-8 as + coding-system if `utf-2000' is provided. + +1999-06-15 MORIOKA Tomohiko + + * mule/mule-coding.el: Add `utf-8' to coding-priority-list if + `utf-2000' is provided. + +1999-06-15 MORIOKA Tomohiko + + * dumped-lisp.el (preloaded-file-list): Don't load vietnamese.el + if utf-2000 is provided temporally. + +1999-06-10 MORIOKA Tomohiko + + * mule/vietnamese.el (leading-code-private-11): Deleted [defined + as builtin variable]. + +1999-06-04 MORIOKA Tomohiko + + * files.el (insert-file-contents-literally): Treat file as binary; + call file-name-handlers. [sync with Emacs 20.3.10] + 2003-09-03 Vin Shelton * XEmacs 21.4.14 is released diff --git a/lisp/bytecomp.el b/lisp/bytecomp.el index c1cc824..cf62f7c 100644 --- a/lisp/bytecomp.el +++ b/lisp/bytecomp.el @@ -1773,29 +1773,81 @@ With argument, insert value in current buffer after the form." ;; file if under Mule. If there are any extended characters in the ;; input file, use `escape-quoted' to make sure that both binary and ;; extended characters are output properly and distinguished properly. - ;; Otherwise, use `raw-text' for maximum portability with non-Mule + ;; Otherwise, use `binary' for maximum portability with non-Mule ;; Emacsen. (when (featurep '(or mule file-coding)) (defvar buffer-file-coding-system) - (if (or (featurep '(not mule)) ;; Don't scan buffer if we are not muleized - (save-excursion - (set-buffer byte-compile-inbuffer) + (let (ces) + (if (featurep 'mule) + (save-excursion + (set-buffer byte-compile-inbuffer) + (goto-char (point-min)) + ;; mrb- There must be a better way than skip-chars-forward + (skip-chars-forward (concat (char-to-string 0) "-" + (char-to-string 255))) + (if (eq (point) (point-max)) + (setq ces 'binary) + (goto-char (point-min)) + (while (< (point)(point-max)) + (cond ((and (eq (char-after) ?\;) + (not (eq (char-after (1- (point))) ?\\))) + (delete-region (point)(point-at-eol)) + (if (eq (char-after) ?\n) + (delete-char 1) + (forward-char)) + ) + ((eq (char-after) ?\?) + (forward-char 2) + ) + ((eq (char-after) ?\n) + (forward-char) + ) + ((eq (char-after) ?\") + (forward-char) + (while (and (< (point)(point-max)) + (not (when (eq (char-after) ?\") + (forward-char) + t))) + (if (eq (char-after) ?\\) + (forward-char 2) + (forward-char))) + ) + (t + (forward-char)))) (goto-char (point-min)) - ;; mrb- There must be a better way than skip-chars-forward (skip-chars-forward (concat (char-to-string 0) "-" - (char-to-string 255))) - (eq (point) (point-max)))) - (setq buffer-file-coding-system 'raw-text-unix) - (insert "(require 'mule)\n;;;###coding system: escape-quoted\n") - (setq buffer-file-coding-system 'escape-quoted) - ;; #### Lazy loading not yet implemented for MULE files - ;; mrb - Fix this someday. - (save-excursion - (set-buffer byte-compile-inbuffer) - (setq byte-compile-dynamic nil - byte-compile-dynamic-docstrings nil)) - ;;(external-debugging-output (prin1-to-string (buffer-local-variables)))) - )) + (char-to-string 255)))) + (setq ces + (if (eq (point) (point-max)) + (if (and (featurep 'utf-2000) + (re-search-backward "\\\\u[0-9A-Fa-f]+" nil t)) + 'utf-8-mcs-unix + 'binary) + (when (featurep 'utf-2000) + (goto-char (point-min)) + (if (re-search-forward "\\\\u[0-9A-Fa-f]+" nil t) + 'utf-8-mcs-unix))))) + (setq ces 'binary)) + (if (eq ces 'binary) + (setq buffer-file-coding-system 'binary) + (cond ((eq ces 'utf-8-mcs-unix) + (insert + "(require 'mule)\n;;;###coding system: utf-8-mcs-unix\n") + (setq buffer-file-coding-system 'utf-8-mcs-unix) + ) + (t + (insert "(require 'mule)\n;;;###coding system: escape-quoted\n") + (setq buffer-file-coding-system 'escape-quoted) + )) + ;; #### Lazy loading not yet implemented for MULE files + ;; mrb - Fix this someday. + (save-excursion + (set-buffer byte-compile-inbuffer) + (setq byte-compile-dynamic nil + byte-compile-dynamic-docstrings nil)) + ;; (external-debugging-output + ;; (prin1-to-string (buffer-local-variables))) + ))) ) diff --git a/lisp/custom-load.el b/lisp/custom-load.el deleted file mode 100644 index b0e7ad7..0000000 --- a/lisp/custom-load.el +++ /dev/null @@ -1,92 +0,0 @@ -;;; custom-load.el --- automatically extracted custom dependencies - -;;; Code: - -(autoload 'custom-add-loads "cus-load") - -(custom-add-loads 'extensions '("auto-show" "wid-edit")) -(custom-add-loads 'info-faces '("info")) -(custom-add-loads 'custom-buffer '("cus-edit")) -(custom-add-loads 'custom-faces '("cus-edit")) -(custom-add-loads 'auto-show '("auto-show")) -(custom-add-loads 'drag-n-drop '("dragdrop")) -(custom-add-loads 'mouse '("mouse" "mwheel")) -(custom-add-loads 'etags '("etags")) -(custom-add-loads 'package-tools '("package-get" "package-ui")) -(custom-add-loads 'widgets '("wid-browse" "wid-edit")) -(custom-add-loads 'menu '("menubar-items")) -(custom-add-loads 'minibuffer '("simple" "minibuf")) -(custom-add-loads 'log-message '("simple")) -(custom-add-loads 'environment '("frame" "keydefs" "minibuf" "modeline" "window-xemacs" "gutter" "cus-edit" "gnuserv" "menubar" "sound" "toolbar-items" "x-init")) -(custom-add-loads 'sound '("sound")) -(custom-add-loads 'pui '("package-ui")) -(custom-add-loads 'terminals '("gnuserv")) -(custom-add-loads 'auto-save '("files" "auto-save")) -(custom-add-loads 'mail '("simple" "startup")) -(custom-add-loads 'custom-menu '("cus-edit")) -(custom-add-loads 'docs '("hyper-apropos" "info")) -(custom-add-loads 'tools '("etags" "hyper-apropos")) -(custom-add-loads 'editing-basics '("cmdloop" "simple" "files" "lisp")) -(custom-add-loads 'internal '("cus-edit")) -(custom-add-loads 'help-appearance '("help" "help-macro")) -(custom-add-loads 'build-report '("build-report")) -(custom-add-loads 'buffers-menu '("menubar-items")) -(custom-add-loads 'hypermedia '("wid-edit")) -(custom-add-loads 'lisp '("lisp" "lisp-mode" "hyper-apropos")) -(custom-add-loads 'applications '("cus-edit")) -(custom-add-loads 'help '("help" "cus-edit" "hyper-apropos" "info")) -(custom-add-loads 'keyboard '("cmdloop")) -(custom-add-loads 'hyper-apropos-faces '("hyper-apropos")) -(custom-add-loads 'ldap '("ldap")) -(custom-add-loads 'widget-browse '("wid-browse")) -(custom-add-loads 'data '("auto-save")) -(custom-add-loads 'warnings '("simple")) -(custom-add-loads 'widget-documentation '("wid-edit")) -(custom-add-loads 'comm '("ldap")) -(custom-add-loads 'backup '("files")) -(custom-add-loads 'frames '("frame" "window-xemacs" "gnuserv" "gui")) -(custom-add-loads 'customize '("wid-edit" "cus-edit")) -(custom-add-loads 'custom-browse '("cus-edit")) -(custom-add-loads 'abbrev '("abbrev" "files")) -(custom-add-loads 'programming '("cus-edit")) -(custom-add-loads 'printing '("printer")) -(custom-add-loads 'toolbar '("toolbar-items")) -(custom-add-loads 'dired '("files")) -(custom-add-loads 'dnd-debug '("dragdrop")) -(custom-add-loads 'package-get '("package-get")) -(custom-add-loads 'killing '("simple")) -(custom-add-loads 'widget-button '("wid-edit")) -(custom-add-loads 'paren-blinking '("simple")) -(custom-add-loads 'find-file '("files")) -(custom-add-loads 'font-menu '("font-menu")) -(custom-add-loads 'files '("files")) -(custom-add-loads 'build '("build-report")) -(custom-add-loads 'font-lock '("font-lock")) -(custom-add-loads 'external '("process" "cus-edit")) -(custom-add-loads 'development '("process" "lisp-mode" "cus-edit")) -(custom-add-loads 'gnuserv '("gnuserv")) -(custom-add-loads 'gutter '("gutter" "gutter-items")) -(custom-add-loads 'fill-comments '("simple")) -(custom-add-loads 'windows '("window" "window-xemacs")) -(custom-add-loads 'widget-faces '("wid-edit")) -(custom-add-loads 'languages '("lisp-mode" "cus-edit" "font-lock")) -(custom-add-loads 'fill '("simple" "fill")) -(custom-add-loads 'custom-magic-faces '("cus-edit")) -(custom-add-loads 'display '("modeline" "auto-show" "scrollbar" "toolbar")) -(custom-add-loads 'faces '("faces" "font" "cus-edit" "font-lock" "hyper-apropos" "info" "wid-edit")) -(custom-add-loads 'emacs '("faces" "help" "files" "cus-edit" "package-get")) -(custom-add-loads 'processes '("process" "gnuserv")) -(custom-add-loads 'hyper-apropos '("hyper-apropos")) -(custom-add-loads 'wp '("printer" "cus-edit")) -(custom-add-loads 'vc '("files")) -(custom-add-loads 'isearch '("isearch-mode")) -(custom-add-loads 'font-lock-faces '("font-lock")) -(custom-add-loads 'modeline '("modeline")) -(custom-add-loads 'editing '("simple" "abbrev" "fill" "cus-edit" "dragdrop" "mouse")) -(custom-add-loads 'matching '("simple" "isearch-mode" "hyper-apropos")) -(custom-add-loads 'i18n '("cus-edit")) -(custom-add-loads 'info '("info" "toolbar-items")) -(custom-add-loads 'x '("gtk-faces" "x-faces")) -(custom-add-loads 'buffers-tab '("gutter-items")) - -;;; custom-load.el ends here diff --git a/lisp/dump-paths.el b/lisp/dump-paths.el index ed3d568..d6d87c8 100644 --- a/lisp/dump-paths.el +++ b/lisp/dump-paths.el @@ -72,6 +72,16 @@ mule-lisp-directory) 'external-debugging-output))) (setq mule-lisp-directory '())) + (if (featurep 'utf-2000) + (progn + (setq utf-2000-lisp-directory + (paths-find-utf-2000-lisp-directory roots + lisp-directory)) + (if debug-paths + (princ (format "utf-2000-lisp-directory:\n%S\n" + utf-2000-lisp-directory) + 'external-debugging-output))) + (setq utf-2000-lisp-directory '())) (setq site-directory (and (null inhibit-site-lisp) (paths-find-site-lisp-directory roots))) (if (and debug-paths (null inhibit-site-lisp)) @@ -84,7 +94,8 @@ '() lisp-directory site-directory - mule-lisp-directory)) + mule-lisp-directory + utf-2000-lisp-directory)) (setq module-directory (paths-find-module-directory roots)) (if debug-paths diff --git a/lisp/dumped-lisp.el b/lisp/dumped-lisp.el index 731eef2..36d7942 100644 --- a/lisp/dumped-lisp.el +++ b/lisp/dumped-lisp.el @@ -120,6 +120,9 @@ ;; Provide basic commands to set coding systems to user (when-feature file-coding "code-cmds") ;;;;;;;;;;;;;;;;;; MULE support + (when-feature mule "mule-conf") + (when-feature mule "arabic") + (when-feature utf-2000 "update-cdb") (when-feature mule "mule-charset") (when-feature mule "mule-coding") ;; All files after this can have extended characters in them. @@ -148,7 +151,6 @@ ;; Now load files to set up all the different languages/environments ;; that Mule knows about. - (when-feature mule "arabic") (when-feature mule "chinese") (when-feature mule "mule/cyrillic") ; overloaded in leim/quail (when-feature mule "english") @@ -163,6 +165,7 @@ (when-feature mule "thai-xtis-chars") (when-feature mule "mule/thai-xtis") ; overloaded in leim/quail (when-feature mule "viet-chars") + (when-feature (and mule (not utf-2000)) "viet-ccl") (when-feature mule "vietnamese") ;; Specialized language support @@ -251,6 +254,8 @@ ;; (when-feature sparcworks "sun-eos-debugger") ;; (when-feature sparcworks "sun-eos-debugger-extra") ;; (when-feature sparcworks "sun-eos-menubar") + ;; (when-feature utf-2000 "make-cdbs") + (when-feature chise "close-cdb") "loadhist" ; Must be dumped before loaddefs is loaded "loaddefs" ; <=== autoloads get loaded here )) diff --git a/lisp/files.el b/lisp/files.el index 9bdd6d4..1c2aa6f 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -899,6 +899,7 @@ conversion, find-file-hooks, automatic uncompression, etc. (after-insert-file-functions nil) (coding-system-for-read 'binary) (coding-system-for-write 'binary) + (jka-compr-compression-info-list nil) (find-buffer-file-type-function (if (fboundp 'find-buffer-file-type) (symbol-function 'find-buffer-file-type) @@ -1202,7 +1203,8 @@ with the name of the interpreter specified in the first line. If it matches, mode MODE is selected.") (defvar binary-file-regexps - '("\\.\\(?:bz2\\|elc\\|g\\(if\\|z\\)\\|jp\\(eg\\|g\\)\\|png\\|t\\(ar\\|gz\\|iff\\)\\|[Zo]\\)\\'") + (purecopy + '("\\.\\(?:bz2\\|elc\\|g\\(if\\|z\\)\\|jp\\(eg\\|g\\)\\|png\\|PNG\\|t\\(ar\\|gz\\|iff\\)\\|[Zo]\\)\\'")) "List of regexps of filenames containing binary (non-text) data.") ; (eval-when-compile diff --git a/lisp/format.el b/lisp/format.el index 076dba5..50c522a 100644 --- a/lisp/format.el +++ b/lisp/format.el @@ -70,20 +70,20 @@ (defvar format-alist '( -; (image/jpeg "JPEG image" "\377\330\377\340\000\020JFIF" -; image-decode-jpeg nil t image-mode) -; (image/gif "GIF image" "GIF8[79]" -; image-decode-gif nil t image-mode) -; (image/png "Portable Network Graphics" "\211PNG" -; image-decode-png nil t image-mode) -; (image/x-xpm "XPM image" "/\\* XPM \\*/" -; image-decode-xpm nil t image-mode) - -; ;; TIFF files have lousy magic -; (image/tiff "TIFF image" "II\\*\000" -; image-decode-tiff nil t image-mode) ;; TIFF 6.0 big-endian -; (image/tiff "TIFF image" "MM\000\\*" -; image-decode-tiff nil t image-mode) ;; TIFF 6.0 little-endian + (image/jpeg "JPEG image" "\377\330\377\340\000\020JFIF" + image-decode-jpeg nil t image-mode) + (image/gif "GIF image" "GIF8[79]" + image-decode-gif nil t image-mode) + (image/png "Portable Network Graphics" "\211PNG" + image-decode-png nil t image-mode) + (image/x-xpm "XPM image" "/\\* XPM \\*/" + image-decode-xpm nil t image-mode) + + ;; TIFF files have lousy magic + (image/tiff "TIFF image" "II\\*\000" + image-decode-tiff nil t image-mode) ;; TIFF 6.0 big-endian + (image/tiff "TIFF image" "MM\000\\*" + image-decode-tiff nil t image-mode) ;; TIFF 6.0 little-endian (text/enriched "Extended MIME text/enriched format." "Content-[Tt]ype:[ \t]*text/enriched" diff --git a/lisp/iso8859-1.el b/lisp/iso8859-1.el index 01a15eb..37ed71e 100644 --- a/lisp/iso8859-1.el +++ b/lisp/iso8859-1.el @@ -142,6 +142,7 @@ ) +(unless (featurep 'utf-2000) (defconst iso8859/1-case-table nil "The case table for ISO-8859/1 characters.") @@ -198,6 +199,7 @@ ) (set-standard-case-table (mapcar 'copy-sequence iso8859/1-case-table)) +) (setq-default ctl-arrow 'iso-8859/1) diff --git a/lisp/mule/chinese.el b/lisp/mule/chinese.el index 7ab691e..05260da 100644 --- a/lisp/mule/chinese.el +++ b/lisp/mule/chinese.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. -;; Copyright (C) 1997 MORIOKA Tomohiko +;; Copyright (C) 1997,1999,2001,2002 MORIOKA Tomohiko ;; Keywords: multilingual, Chinese @@ -39,58 +39,23 @@ ;;(loop for row from 42 to 126 ;; do (modify-syntax-entry `[chinese-gb2312 ,row] "w")) -(modify-syntax-entry 'chinese-cns11643-1 "w") -(modify-syntax-entry 'chinese-cns11643-2 "w") -(modify-syntax-entry 'chinese-big5-1 "w") -(modify-syntax-entry 'chinese-big5-2 "w") - -;; CNS11643 Plane3 thru Plane7 -;; These represent more and more obscure Chinese characters. -;; By the time you get to Plane 7, we're talking about characters -;; that appear once in some ancient manuscript and whose meaning -;; is unknown. - -(flet - ((make-chinese-cns11643-charset - (name plane final) - (make-charset - name (concat "CNS 11643 Plane " plane " (Chinese traditional)") - `(registry - ,(concat "CNS11643[.-]\\(.*[.-]\\)?" plane "$") - dimension 2 - chars 94 - final ,final - graphic 0)) - (modify-syntax-entry name "w") - (modify-category-entry name ?t) - )) - (make-chinese-cns11643-charset 'chinese-cns11643-3 "3" ?I) - (make-chinese-cns11643-charset 'chinese-cns11643-4 "4" ?J) - (make-chinese-cns11643-charset 'chinese-cns11643-5 "5" ?K) - (make-chinese-cns11643-charset 'chinese-cns11643-6 "6" ?L) - (make-chinese-cns11643-charset 'chinese-cns11643-7 "7" ?M) - ) - -;; ISO-IR-165 (CCITT Extended GB) -;; It is based on CCITT Recommendation T.101, includes GB 2312-80 + -;; GB 8565-88 table A4 + 293 characters. -(make-charset - 'chinese-isoir165 - "ISO-IR-165 (CCITT Extended GB; Chinese simplified)" - `(registry "isoir165" - dimension 2 - chars 94 - final ?E - graphic 0)) - -;; PinYin-ZhuYin -(make-charset 'sisheng "PinYin-ZhuYin" - '(registry "sisheng_cwnn\\|OMRON_UDC_ZH" - dimension 1 - chars 94 - final ?0 - graphic 0 - )) +(modify-syntax-entry 'chinese-cns11643-1 "w") +(modify-syntax-entry 'chinese-cns11643-2 "w") +(modify-syntax-entry 'chinese-cns11643-3 "w") +(modify-syntax-entry 'chinese-cns11643-4 "w") +(modify-syntax-entry 'chinese-cns11643-5 "w") +(modify-syntax-entry 'chinese-cns11643-6 "w") +(modify-syntax-entry 'chinese-cns11643-7 "w") +(if (featurep 'utf-2000) + (modify-syntax-entry 'chinese-big5 "w") + (modify-syntax-entry 'chinese-big5-1 "w") + (modify-syntax-entry 'chinese-big5-2 "w")) + +(modify-category-entry 'chinese-cns11643-3 ?t) +(modify-category-entry 'chinese-cns11643-4 ?t) +(modify-category-entry 'chinese-cns11643-5 ?t) +(modify-category-entry 'chinese-cns11643-6 ?t) +(modify-category-entry 'chinese-cns11643-7 ?t) ;; If you prefer QUAIL to EGG, please modify below as you wish. ;;(when (and (featurep 'egg) (featurep 'wnn)) @@ -232,6 +197,33 @@ "Coding-system of BIG5." '(mnemonic "Zh/Big5")) +(when (featurep 'utf-2000) + (make-coding-system + 'big5-er 'big5 "Coding-system of BIG5 with entity-reference." + '(mnemonic "Big5r" + charset-g0 ascii + charset-g1 chinese-big5 + use-entity-reference t)) + + (make-coding-system + 'big5-eten 'big5 "Coding-system of BIG5-ETEN." + '(mnemonic "Big5E" + charset-g0 ascii + charset-g1 chinese-big5-eten)) + (make-coding-system + 'big5-eten-er 'big5 "Coding-system of BIG5-ETEN with entity-reference." + '(mnemonic "Big5Er" + charset-g0 ascii + charset-g1 chinese-big5-eten + use-entity-reference t)) + + (make-coding-system + 'big5-cdp 'big5 "Coding-system of BIG5 with CDP-extension." + '(mnemonic "Big5C" + charset-g0 ascii + charset-g1 chinese-big5-cdp)) + ) + ;; (define-coding-system-alias 'big5 'chinese-big5) ;; (define-coding-system-alias 'cn-big5 'chinese-big5) diff --git a/lisp/mule/ethiopic.el b/lisp/mule/ethiopic.el index 66e08ed..4963470 100644 --- a/lisp/mule/ethiopic.el +++ b/lisp/mule/ethiopic.el @@ -28,15 +28,6 @@ ;;; Code: -;; Ethiopic -(make-charset 'ethiopic "Ethiopic" - '(registry "Ethio" - dimension 2 - chars 94 - final ?3 - graphic 0 - )) - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ETHIOPIC ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/lisp/mule/japanese.el b/lisp/mule/japanese.el index 42b2207..60fc8b9 100644 --- a/lisp/mule/japanese.el +++ b/lisp/mule/japanese.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. -;; Copyright (C) 1997 MORIOKA Tomohiko +;; Copyright (C) 1997,1999,2002 MORIOKA Tomohiko ;; Keywords: multilingual, Japanese @@ -243,6 +243,17 @@ mnemonic "Ja/EUC" )) +(make-coding-system + 'euc-jisx0213 'iso2022 + "Coding-system of Japanese EUC based on JIS X 0213." + '(charset-g0 ascii + charset-g1 japanese-jisx0213-1 + charset-g2 katakana-jisx0201 + charset-g3 japanese-jisx0213-2 + short t + mnemonic "Ja/EUC0213" + )) + ;; (define-coding-system-alias 'euc-japan-1990 'japanese-iso-8bit) ;; (define-coding-system-alias 'euc-japan 'japanese-iso-8bit) ;; (define-coding-system-alias 'euc-jp 'japanese-iso-8bit) diff --git a/lisp/mule/misc-lang.el b/lisp/mule/misc-lang.el index b0f9ff3..481691d 100644 --- a/lisp/mule/misc-lang.el +++ b/lisp/mule/misc-lang.el @@ -25,18 +25,6 @@ ;;; Code: -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; IPA (International Phonetic Alphabet) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(make-charset 'ipa "International Phonetic Alphabet" - '(registry "MuleIPA" - dimension 1 - chars 96 - final ?0 - graphic 1 - )) ; for XEmacs - (defun setup-ipa-environment () "Setup multilingual environment (MULE) for IPA." (interactive) diff --git a/lisp/mule/mule-category.el b/lisp/mule/mule-category.el index 3757302..a769751 100644 --- a/lisp/mule/mule-category.el +++ b/lisp/mule/mule-category.el @@ -5,6 +5,7 @@ ;; Licensed to the Free Software Foundation. ;; Copyright (C) 1995 Amdahl Corporation. ;; Copyright (C) 1995 Sun Microsystems. +;; Copyright (C) 2003 MORIOKA Tomohiko ;; This file is part of XEmacs. @@ -262,8 +263,10 @@ Each element is a list of a charset, a designator, and maybe a doc string.") ;;; Setting word boundary. +(unless (featurep 'utf-2000) (setq word-combining-categories '((?l . ?l))) +) (setq word-separating-categories ; (2-byte character sets) '((?A . ?K) ; Alpha numeric - Katakana @@ -277,6 +280,17 @@ Each element is a list of a charset, a designator, and maybe a doc string.") (?C . ?K) ; Chinese - Katakana )) +(when (featurep 'utf-2000) + (setq word-separating-categories + (list* + '(?l . ?K) ; Latin - Katakana + '(?l . ?C) ; Latin - Chinese + '(?H . ?l) ; Hiragana - Latin + '(?K . ?l) ; Katakana - Latin + '(?C . ?l) ; Chinese - Latin + word-separating-categories))) + + ;;; At the present, I know Japanese and Chinese text can ;;; break line at any point under a restriction of 'kinsoku'. ;;; #### SJT this needs to be set by language environments and probably should diff --git a/lisp/mule/mule-charset.el b/lisp/mule/mule-charset.el index 9dd8fef..09c8fe3 100644 --- a/lisp/mule/mule-charset.el +++ b/lisp/mule/mule-charset.el @@ -3,6 +3,7 @@ ;; Copyright (C) 1992 Free Software Foundation, Inc. ;; Copyright (C) 1995 Amdahl Corporation. ;; Copyright (C) 1996 Sun Microsystems. +;; Copyright (C) 1999,2000,2001,2002,2003 MORIOKA Tomohiko ;; Author: Unknown ;; Keywords: i18n, mule, internal @@ -251,11 +252,97 @@ DESCRIPTION (string) is the description string of the charset." ;; Setup auto-fill-chars for charsets that should invoke auto-filling. ;; SPACE and NEWLIE are already set. -(let ((l '(katakana-jisx0201 - japanese-jisx0208 japanese-jisx0212 - chinese-gb2312 chinese-big5-1 chinese-big5-2))) - (while l - (put-char-table (car l) t auto-fill-chars) - (setq l (cdr l)))) +;; (let ((l '(katakana-jisx0201 +;; japanese-jisx0208 japanese-jisx0212 +;; chinese-gb2312 chinese-big5-1 chinese-big5-2))) +;; (while l +;; (put-char-table (car l) t auto-fill-chars) +;; (setq l (cdr l)))) + + +;;; @ Coded character set +;;; + +(when (featurep 'utf-2000) + (setq default-coded-charset-priority-list + '(ascii + control-1 + latin-iso8859-1 + latin-iso8859-2 + latin-iso8859-3 + latin-iso8859-4 + latin-iso8859-9 + latin-jisx0201 + cyrillic-iso8859-5 + greek-iso8859-7 + thai-tis620 + =jis-x0208 + japanese-jisx0208 + =jis-x0208-1990 + japanese-jisx0212 + japanese-jisx0208-1978 + chinese-gb2312 + korean-ksc5601 + chinese-cns11643-1 + chinese-cns11643-2 + chinese-cns11643-3 + chinese-cns11643-4 + chinese-cns11643-5 + chinese-cns11643-6 + chinese-cns11643-7 + =jis-x0213-1-2000 + =jis-x0213-2-2000 + ;; chinese-gb12345 + chinese-isoir165 + katakana-jisx0201 + hebrew-iso8859-8 + latin-viscii + latin-viscii-lower + latin-viscii-upper + ipa + lao + ethiopic-ucs + ethiopic + arabic-digit + arabic-1-column + arabic-2-column + =big5-cdp + chinese-big5-eten-a + chinese-big5-eten-b + chinese-big5 + =gt-pj-1 + =gt-pj-2 + =gt-pj-3 + =gt-pj-4 + =gt-pj-5 + =gt-pj-6 + =gt-pj-7 + =gt-pj-8 + =gt-pj-9 + =gt-pj-10 + =gt-pj-11 + =gt-pj-k1 + =gt-pj-k2 + ideograph-daikanwa-2 + ideograph-daikanwa + =hanziku-1 + =hanziku-2 + =hanziku-3 + =hanziku-4 + =hanziku-5 + =hanziku-6 + =hanziku-7 + =hanziku-8 + =hanziku-9 + =hanziku-10 + =hanziku-11 + =hanziku-12 + =cbeta + ucs-bmp + =jef-china3 + arabic-iso8859-6 + chinese-big5-1 + chinese-big5-2 + ucs-sip))) ;;; mule-charset.el ends here diff --git a/lisp/mule/mule-cmds.el b/lisp/mule/mule-cmds.el index c63bc97..2059483 100644 --- a/lisp/mule/mule-cmds.el +++ b/lisp/mule/mule-cmds.el @@ -729,19 +729,34 @@ The default status is as follows: ;; #### Can we now assume the existence of the 10646 coding systems? ;; #### These lists need to be synched with the ones in mule-coding.el. (cond ((eq (coding-system-type (coding-category-system 'utf-8)) 'utf-8) - (set-coding-category-system 'ucs-4 'iso-10646-ucs-4) (set-coding-category-system 'utf-8 'utf-8) - (set-coding-priority-list - '(iso-7 - no-conversion - utf-8 - iso-8-1 - iso-8-2 - iso-8-designate - iso-lock-shift - shift-jis - big5 - ucs-4)) + (cond ((eq (coding-system-type (coding-category-system 'ucs-4)) + 'iso-10646-ucs-4) + (set-coding-category-system 'ucs-4 'iso-10646-ucs-4) + (set-coding-priority-list + '(iso-7 + no-conversion + utf-8 + iso-8-1 + iso-8-2 + iso-8-designate + iso-lock-shift + shift-jis + big5 + ucs-4)) + ) + (t + (set-coding-priority-list + '(iso-7 + no-conversion + utf-8 + iso-8-1 + iso-8-2 + iso-8-designate + iso-lock-shift + shift-jis + big5)) + )) ) (t (set-coding-priority-list diff --git a/lisp/mule/mule-coding.el b/lisp/mule/mule-coding.el index 0608850..133da19 100644 --- a/lisp/mule/mule-coding.el +++ b/lisp/mule/mule-coding.el @@ -4,7 +4,7 @@ ;; Licensed to the Free Software Foundation. ;; Copyright (C) 1995 Amdahl Corporation. ;; Copyright (C) 1995 Sun Microsystems. -;; Copyright (C) 1997 MORIOKA Tomohiko +;; Copyright (C) 1997,1999,2002,2003 MORIOKA Tomohiko ;; This file is part of XEmacs. @@ -171,22 +171,180 @@ mnemonic "ISO7/Lock" )) +(when (featurep 'utf-2000) + (setq coded-charset-entity-reference-alist + '(((ideograph-gt . isolated) "I-GT-" 5 d) + ( ideograph-gt "GT-" 5 d) + ((chinese-big5-cdp . isolated) "I-CDP-" 4 X) + ( chinese-big5-cdp "CDP-" 4 X) + ((ideograph-daikanwa . isolated) "I-M-" 5 d) + ( ideograph-daikanwa "M-" 5 d) + ((ideograph-gt-k . isolated) "I-GT-K" 5 d) + ( ideograph-gt-k "GT-K" 5 d) + ((ideograph-cbeta . isolated) "I-CB" 5 d) + ( ideograph-cbeta "CB" 5 d) + ((ideograph-hanziku-1 . isolated) "I-HZK01-" 4 X) + ( ideograph-hanziku-1 "HZK01-" 4 X) + ((ideograph-hanziku-2 . isolated) "I-HZK02-" 4 X) + ( ideograph-hanziku-2 "HZK02-" 4 X) + ((ideograph-hanziku-1 . isolated) "I-HZK1-" 4 X) + ( ideograph-hanziku-1 "HZK1-" 4 X) + ((ideograph-hanziku-2 . isolated) "I-HZK2-" 4 X) + ( ideograph-hanziku-2 "HZK2-" 4 X) + ((japanese-jisx0208-1990 . isolated) "I-J90-" 4 X) + ( japanese-jisx0208-1990 "J90-" 4 X) + ((japanese-jisx0208 . isolated) "I-J83-" 4 X) + ( japanese-jisx0208 "J83-" 4 X) + ((japanese-jisx0213-1 . isolated) "I-JX1-" 4 X) + ( japanese-jisx0213-1 "JX1-" 4 X) + ((japanese-jisx0213-2 . isolated) "I-JX2-" 4 X) + ( japanese-jisx0213-2 "JX2-" 4 X) + ((japanese-jisx0212 . isolated) "I-JSP-" 4 X) + ( japanese-jisx0212 "JSP-" 4 X) + ((japanese-jisx0208-1978 . isolated) "I-J78-" 4 X) + ( japanese-jisx0208-1978 "J78-" 4 X) + ((chinese-cns11643-1 . isolated) "I-C1-" 4 X) + ( chinese-cns11643-1 "C1-" 4 X) + ((chinese-cns11643-2 . isolated) "I-C2-" 4 X) + ( chinese-cns11643-2 "C2-" 4 X) + ((chinese-cns11643-3 . isolated) "I-C3-" 4 X) + ( chinese-cns11643-3 "C3-" 4 X) + ((chinese-cns11643-4 . isolated) "I-C4-" 4 X) + ( chinese-cns11643-4 "C4-" 4 X) + ((chinese-cns11643-5 . isolated) "I-C5-" 4 X) + ( chinese-cns11643-5 "C5-" 4 X) + ((chinese-cns11643-6 . isolated) "I-C6-" 4 X) + ( chinese-cns11643-6 "C6-" 4 X) + ((chinese-cns11643-7 . isolated) "I-C7-" 4 X) + ( chinese-cns11643-7 "C7-" 4 X) + ((korean-ksc5601 . isolated) "I-K0-" 4 X) + ( korean-ksc5601 "K0-" 4 X) + ( china3-jef "JC3-" 4 X) + ( chinese-big5 "B-" 4 X) + ( chinese-big5 "C0-" 4 X) + )) + + (make-coding-system + 'utf-8-mcs-er 'utf-8 + "Coding-system of UTF-8 with entity-reference." + '(mnemonic "MTF8r" use-entity-reference t)) + + (make-coding-system + 'utf-8-gb 'utf-8 + "Coding-system of UTF-8 using GB mapping." + '(mnemonic "UTF8G" + charset-g0 ucs-gb + charset-g1 =>ucs-gb + charset-g2 =>ucs)) + + (make-coding-system + 'utf-8-gb-er 'utf-8 + "Coding-system of UTF-8 using GB mapping with entity-reference." + '(mnemonic "UTF8Gr" + charset-g0 ucs-gb + charset-g1 =>ucs-gb + charset-g2 =>ucs + use-entity-reference t)) + + (make-coding-system + 'utf-8-cns 'utf-8 + "Coding-system of UTF-8 using CNS mapping." + '(mnemonic "UTF8C" + charset-g0 ucs-cns + charset-g1 =>ucs-cns + charset-g2 =>ucs)) + + (make-coding-system + 'utf-8-cns-er 'utf-8 + "Coding-system of UTF-8 using CNS mapping with entity-reference." + '(mnemonic "UTF8Cr" + charset-g0 ucs-cns + charset-g1 =>ucs-cns + charset-g2 =>ucs + use-entity-reference t)) + + (make-coding-system + 'utf-8-big5 'utf-8 + "Coding-system of UTF-8 using Big5 mapping." + '(mnemonic "UTF8B" + charset-g0 ucs-big5 + charset-g1 =>ucs-big5 + charset-g2 =>ucs)) + + (make-coding-system + 'utf-8-big5-er 'utf-8 + "Coding-system of UTF-8 using Big5 mapping with entity-reference." + '(mnemonic "UTF8Br" + charset-g0 ucs-big5 + charset-g1 =>ucs-big5 + charset-g2 =>ucs + use-entity-reference t)) + + (make-coding-system + 'utf-8-jis 'utf-8 + "Coding-system of UTF-8 using JIS mapping." + '(mnemonic "UTF8J" + charset-g0 ucs-jis + charset-g1 =>ucs-jis + charset-g2 =>ucs)) + + (make-coding-system + 'utf-8-jis-er 'utf-8 + "Coding-system of UTF-8 using JIS mapping with entity-reference." + '(mnemonic "UTF8Jr" + charset-g0 ucs-jis + charset-g1 =>ucs-jis + charset-g2 =>ucs + use-entity-reference t)) + + (make-coding-system + 'utf-8-ks 'utf-8 + "Coding-system of UTF-8 using KS mapping." + '(mnemonic "UTF8K" + charset-g0 ucs-ks + charset-g1 =>ucs-ks + charset-g2 =>ucs)) + + (make-coding-system + 'utf-8-ks-er 'utf-8 + "Coding-system of UTF-8 using KS mapping with entity-reference." + '(mnemonic "UTF8Kr" + charset-g0 ucs-ks + charset-g1 =>ucs-ks + charset-g2 =>ucs + use-entity-reference t)) + + (define-coding-system-alias 'utf-8 'utf-8-mcs) + (define-coding-system-alias 'utf-8-er 'utf-8-mcs-er) + ) + ;; initialize the coding categories to something semi-reasonable ;; so that the remaining Lisp files can contain extended characters. ;; (They will be in ISO-7 format) ;; #### This list needs to be synched with the ones in mule-cmds.el. -(set-coding-priority-list '(iso-7 - no-conversion - ;; utf-8 - iso-8-1 - iso-8-2 - iso-8-designate - iso-lock-shift - shift-jis - big5 - ;; ucs-4 - )) +(if (featurep 'utf-2000) + (set-coding-priority-list '(iso-7 + no-conversion + utf-8 + iso-8-1 + iso-8-2 + iso-8-designate + iso-lock-shift + shift-jis + big5 + ucs-4)) + (set-coding-priority-list '(iso-7 + no-conversion + ;; utf-8 + iso-8-1 + iso-8-2 + iso-8-designate + iso-lock-shift + shift-jis + big5 + ;; ucs-4 + ))) (set-coding-category-system 'iso-7 'iso-2022-7) (set-coding-category-system 'iso-8-designate 'ctext) diff --git a/lisp/mule/viet-chars.el b/lisp/mule/viet-chars.el index 0df00f9..3f935a7 100644 --- a/lisp/mule/viet-chars.el +++ b/lisp/mule/viet-chars.el @@ -31,21 +31,26 @@ ;; read in before the code that creates those sets is evaluated. ;; Vietnamese VISCII with two tables. -(make-charset 'vietnamese-viscii-lower "VISCII lower (Vietnamese)" - '(registry "VISCII1.1" - dimension 1 - chars 96 - final ?1 - graphic 1 - )) - -(make-charset 'vietnamese-viscii-upper "VISCII upper (Vietnamese)" - '(registry "VISCII1.1" - dimension 1 - chars 96 - final ?2 - graphic 1 - )) +(unless (featurep 'utf-2000) + (make-charset 'latin-viscii-lower "VISCII lower (Vietnamese)" + '(registry "VISCII1.1" + dimension 1 + chars 96 + final ?1 + graphic 1 + )) + + (make-charset 'latin-viscii-upper "VISCII upper (Vietnamese)" + '(registry "VISCII1.1" + dimension 1 + chars 96 + final ?2 + graphic 1 + )) + ) + +(define-charset-alias 'vietnamese-viscii-lower 'latin-viscii-lower) +(define-charset-alias 'vietnamese-viscii-upper 'latin-viscii-upper) (modify-syntax-entry 'vietnamese-viscii-lower "w") (modify-syntax-entry 'vietnamese-viscii-upper "w") diff --git a/lisp/mule/vietnamese.el b/lisp/mule/vietnamese.el index a3f6540..26dff69 100644 --- a/lisp/mule/vietnamese.el +++ b/lisp/mule/vietnamese.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. ;; Licensed to the Free Software Foundation. -;; Copyright (C) 1997 MORIOKA Tomohiko +;; Copyright (C) 1997,2000 MORIOKA Tomohiko ;; Keywords: multilingual, Vietnamese @@ -29,217 +29,19 @@ ;;; Code: -(eval-and-compile +(when (featurep 'utf-2000) + (make-coding-system + 'vscii-2 'iso2022 + "TCVN 5712 (VSCII 2)." + '(charset-g0 ascii + charset-g1 latin-tcvn5712 + charset-g2 t ;; unspecified but can be used later. + short t + mnemonic "VIET/ISO8")) + (define-coding-system-alias 'tcvn-5712 'vscii-2) + ) -(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 - "Coding-system used for VISCII 1.1." - `(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 - "Coding-system used for VSCII 1.1." - `(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) +;;; [tomo] CCL based implementations were moved into viet-ccl.el. (make-coding-system 'viqr 'no-conversion @@ -262,32 +64,18 @@ Both tables are indexed by the position code of Vietnamese characters.") ;; (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-nonascii-translation-table -;; (make-translation-table-from-vector viet-viscii-decode-table) -;; "Value of `nonascii-translation-table' in Vietnamese language environment.") - (set-language-info-alist - "Vietnamese" '((charset vietnamese-viscii-lower vietnamese-viscii-upper) - (coding-system viscii vscii viqr) - (coding-priority viscii) + "Vietnamese" `((charset vietnamese-viscii-lower vietnamese-viscii-upper) + ,(if (find-coding-system 'vscii-2) + ;; viscii will be supported in UTF-2000 + '(coding-system vscii-2 viqr) + '(coding-system viscii vscii viqr)) + ,(if (find-coding-system 'vscii-2) + '(coding-priority vscii-2) + '(coding-priority viscii)) (input-method . "vietnamese-viqr") (features viet-util) - (sample-text . "Vietnamese (Ti,1*(Bng Vi,1.(Bt) Ch,1`(Bo b,1U(Bn") + (sample-text . "Vietnamese (Ti,1*(Bng Vi,1.(Bt) Ch,A`(Bo b,1U(Bn") (documentation . "\ For Vietnamese, Emacs uses special charsets internally. They can be decoded from and encoded to VISCC, VSCII, and VIQR. diff --git a/lisp/obsolete.el b/lisp/obsolete.el index 4970f11..94f201f 100644 --- a/lisp/obsolete.el +++ b/lisp/obsolete.el @@ -393,5 +393,8 @@ the resulting string may be narrower than END-COLUMN." (make-obsolete 'function-called-at-point 'function-at-point) +(when (featurep 'utf-2000) + (make-obsolete-variable 'utf-2000-version 'xemacs-chise-version)) + (provide 'obsolete) ;;; obsolete.el ends here diff --git a/lisp/setup-paths.el b/lisp/setup-paths.el index c7a3bf1..7ad409b 100644 --- a/lisp/setup-paths.el +++ b/lisp/setup-paths.el @@ -47,6 +47,9 @@ (defvar paths-mule-load-path-depth 0 "Depth of load-path searches in Mule Lisp paths.") +(defvar paths-utf-2000-load-path-depth 0 + "Depth of load-path searches in UTF-2000 Lisp paths.") + (defvar paths-default-info-directories (mapcar (function (lambda (dirlist) @@ -89,6 +92,19 @@ nil configure-mule-lisp-directory))))) +(defun paths-find-utf-2000-lisp-directory (roots &optional lisp-directory) + "Find the UTF-2000 Lisp directory of the XEmacs hierarchy." + ;; #### kludge + (if lisp-directory + (let ((guess + (file-name-as-directory + (paths-construct-path (list lisp-directory "utf-2000"))))) + (if (paths-file-readable-directory-p guess) + guess + (paths-find-version-directory roots "utf-2000-lisp" + nil + configure-utf-2000-lisp-directory))))) + (defun paths-find-module-directory (roots) "Find the main modules directory of the XEmacs hierarchy." (paths-find-architecture-directory roots "modules" @@ -97,7 +113,8 @@ (defun paths-construct-load-path (roots early-package-load-path late-package-load-path last-package-load-path lisp-directory - &optional site-lisp-directory mule-lisp-directory) + &optional site-lisp-directory mule-lisp-directory + utf-2000-lisp-directory) "Construct the load path." (let* ((envvar-value (getenv "EMACSLOADPATH")) (env-load-path @@ -111,6 +128,10 @@ (and mule-lisp-directory (paths-find-recursive-load-path (list mule-lisp-directory) paths-mule-load-path-depth))) + (utf-2000-lisp-load-path + (and utf-2000-lisp-directory + (paths-find-recursive-load-path (list utf-2000-lisp-directory) + paths-utf-2000-load-path-depth))) (lisp-load-path (and lisp-directory (paths-find-recursive-load-path (list lisp-directory) @@ -119,6 +140,7 @@ early-package-load-path site-lisp-load-path late-package-load-path + utf-2000-lisp-load-path mule-lisp-load-path lisp-load-path last-package-load-path))) diff --git a/lisp/startup.el b/lisp/startup.el index 937dcdf..5c036fa 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -421,10 +421,15 @@ Type ^H^H^H (Control-h Control-h Control-h) to get more help options.\n") debug-paths) (startup-setup-paths-warning)) - (if (and (not inhibit-autoloads) - lisp-directory) - (load (expand-file-name (file-name-sans-extension autoload-file-name) - lisp-directory) nil t)) + (when (and (not inhibit-autoloads) + lisp-directory) + (load (expand-file-name (file-name-sans-extension autoload-file-name) + lisp-directory) nil t) + (if (featurep 'utf-2000) + (load (expand-file-name + (file-name-sans-extension autoload-file-name) + (expand-file-name "utf-2000" lisp-directory)) + nil t))) (if (not inhibit-autoloads) (progn @@ -1130,7 +1135,9 @@ Copyright (C) 1985-2001 Free Software Foundation, Inc. Copyright (C) 1990-1994 Lucid, Inc. Copyright (C) 1993-1997 Sun Microsystems, Inc. All Rights Reserved. Copyright (C) 1994-1996 Board of Trustees, University of Illinois -Copyright (C) 1995-2001 Ben Wing\n")) +Copyright (C) 1995-2001 Ben Wing +Copyright (C) 1996-2002 MORIOKA Tomohiko +")) ((face (blue bold underline) "\nInformation, on-line help:\n\n") "XEmacs comes with plenty of documentation...\n\n" @@ -1289,6 +1296,17 @@ It's idempotent, so call this as often as you like!" 'external-debugging-output))) (setq mule-lisp-directory '())) + (if (featurep 'utf-2000) + (progn + (setq utf-2000-lisp-directory + (paths-find-utf-2000-lisp-directory roots + lisp-directory)) + (if debug-paths + (princ (format "utf-2000-lisp-directory:\n%S\n" + utf-2000-lisp-directory) + 'external-debugging-output))) + (setq utf-2000-lisp-directory '())) + (setq site-directory (and (null inhibit-site-lisp) (paths-find-site-lisp-directory roots))) @@ -1302,7 +1320,8 @@ It's idempotent, so call this as often as you like!" last-package-load-path lisp-directory site-directory - mule-lisp-directory)) + mule-lisp-directory + utf-2000-lisp-directory)) (setq Info-directory-list (paths-construct-info-path roots @@ -1372,6 +1391,9 @@ It's idempotent, so call this as often as you like!" (if (and (featurep 'mule) (null mule-lisp-directory)) (push "mule-lisp-directory" warnings)) + (if (and (featurep 'utf-2000) + (null utf-2000-lisp-directory)) + (push "utf-2000-lisp-directory" warnings)) (if (null exec-directory) (push "exec-directory" warnings)) (if (null data-directory) (push "data-directory" warnings)) (if (null doc-directory) (push "doc-directory" warnings)) diff --git a/lisp/update-elc.el b/lisp/update-elc.el index 1fda28d..9dcc274 100644 --- a/lisp/update-elc.el +++ b/lisp/update-elc.el @@ -87,6 +87,9 @@ (let (preloaded-file-list site-load-packages need-to-dump dumped-exe) (load (expand-file-name "../lisp/dumped-lisp.el")) + (when (featurep 'utf-2000) + (load (expand-file-name "../lisp/utf-2000/dumped-chars.el"))) + (setq dumped-exe (cond ((file-exists-p "../src/xemacs.exe") "../src/xemacs.exe") ((file-exists-p "../src/xemacs") "../src/xemacs") @@ -106,6 +109,8 @@ (setq preloaded-file-list (append packages-hardcoded-lisp preloaded-file-list + (if (featurep 'utf-2000) + system-char-db-source-file-list) packages-useful-lisp site-load-packages)) (while preloaded-file-list diff --git a/lisp/version.el b/lisp/version.el index d2bc894..7f74440 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -42,9 +42,7 @@ Warning, this variable did not exist in XEmacs versions prior to 20.3") (if emacs-patch-level (format "(patch %d)" emacs-patch-level) "") - (if xemacs-betaname - (concat " " xemacs-betaname) - "") + (or xemacs-betaname "") (if xemacs-codename (concat " \"" xemacs-codename "\"") "") @@ -79,7 +77,7 @@ Warning, this variable did not exist in XEmacs versions prior to 20.3") (defconst emacs-build-system (system-name)) -(defun emacs-version (&optional arg) +(defun emacs-version (&optional arg) "Return string describing the version of Emacs that is running. When called interactively with a prefix argument, insert string at point. Don't use this function in programs to choose actions according @@ -88,7 +86,7 @@ to the system configuration; look at `system-configuration' instead." (save-match-data (let ((version-string (format - "XEmacs %s %s(%s%s) of %s %s on %s" + "XEmacs %s %s(%s%s)%s of %s %s on %s" (substring emacs-version 0 (string-match " XEmacs" emacs-version)) (if (not (featurep 'infodock)) "[Lucid] " @@ -98,6 +96,11 @@ to the system configuration; look at `system-configuration' instead." (featurep 'mule)) (memq 'mule features)) ", Mule") (t "")) + (cond ((or (and (fboundp 'featurep) + (featurep 'utf-2000)) + (memq 'utf-2000 features)) + (concat " CHISE v" xemacs-chise-version)) + (t "")) (substring emacs-build-time 0 (string-match " *[0-9]*:" emacs-build-time)) (substring emacs-build-time diff --git a/src/ChangeLog b/src/ChangeLog index 4aaac55..a0187b0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,5110 @@ +2003-10-15 MORIOKA Tomohiko + + * chartab.c (Vchise_system_db_directory): New variable. + (vars_of_chartab): Add new variable `chise-system-db-directory'. + +2003-10-14 MORIOKA Tomohiko + + * chartab.c: EXFUN `Fmount_char_attribute_table'. + (print_chartab_range): Don't define when `UTF2000' is defined. + (open_chise_data_source_maybe): Specify 0 instead of DB_HASH for + `CHISE_DS_open'. + +2003-10-13 MORIOKA Tomohiko + + * chartab.c (Fchar_attribute_list): When HAVE_LIBCHISE is defined + and optional argument `rehash' is specified, call + `open_chise_data_source_maybe' before + `chise_ds_foreach_char_feature_name' is called. + +2003-10-12 MORIOKA Tomohiko + + * chartab.c (char_attribute_list_reset_map_func): New function + when HAVE_LIBCHISE is defined. + (Fchar_attribute_list): Add new optional argument `rehash' when + HAVE_LIBCHISE is defined. + (open_chise_data_source_maybe): Use "chise-db" instead of + "char-db". + (char_attribute_system_db_file): Likewise. + (Fload_char_attribute_table): Use + `chise_feature_foreach_char_with_value' instead of + `chise_char_feature_value_iterate'. + +2003-10-07 MORIOKA Tomohiko + + * chartab.c (Vchise_db_directory): New variable. + (vars_of_chartab): Add new built-in variable `chise-db-directory'. + +2003-10-06 MORIOKA Tomohiko + + * mule-charset.c (Freset_charset_mapping_table): Use HAVE_LIBCHISE + instead of HAVE_CHISE to specify using with libchise. + + * config.h.in (HAVE_CHISE_CLIENT): Deleted. + + * chartab.h: Don't use HAVE_CHISE_CLIENT. + + * chartab.c (Qsystem_char_id): Don't define when HAVE_CHISE is not + defined or HAVE_LIBCHISE_LIBCHISE is defined. + (char_attribute_system_db_file): Don't define when HAVE_LIBCHISE + is defined. + (Freset_char_attribute_table): Use HAVE_LIBCHISE instead of + HAVE_CHISE to specify using with libchise. + (syms_of_chartab): Don't define symbol `system-char-id' when + HAVE_CHISE is not defined or HAVE_LIBCHISE_LIBCHISE is defined. + +2003-10-06 MORIOKA Tomohiko + + * mule-charset.c: Use HAVE_CHISE instead of HAVE_CHISE_CLIENT to + specify CHISE DB support. + (Freset_charset_mapping_table): Use `chise_ccs_setup_db' instead + of `char_attribute_system_db_file' to check feature DB file. + + * chartab.h, casetab.c, char-ucs.h: Use HAVE_CHISE instead of + HAVE_CHISE_CLIENT to specify CHISE DB support. + + * chartab.c: Use HAVE_CHISE instead of HAVE_CHISE_CLIENT to + specify CHISE DB support. + (open_chise_data_source_maybe): Don't define when HAVE_LIBCHISE is + not defined. + (Freset_char_attribute_table): Use `chise_feature_setup_db' + instead of `char_attribute_system_db_file' to check feature DB + file. + +2003-10-06 MORIOKA Tomohiko + + * mule.c (vars_of_mule): Use `HAVE_CHISE' instead of `CHISE' and + `HAVE_CHISE_CLIENT'. + +2003-10-05 MORIOKA Tomohiko + + * mule-charset.c: Use HAVE_LIBCHISE instead of CHISE. + (Fsave_charset_mapping_table): Don't use + `char_attribute_system_db_file' when HAVE_LIBCHISE is defined. + + * config.h.in (HAVE_CHISE): Renamed from `CHISE'. + (HAVE_LIBCHISE): New macro. + + * chartab.h: Use HAVE_LIBCHISE instead of CHISE. + + * chartab.c: Use HAVE_LIBCHISE instead of CHISE. + (Fsave_char_attribute_table): Don't use + `char_attribute_system_db_file' when HAVE_LIBCHISE is defined. + +2003-10-04 MORIOKA Tomohiko + + * chartab.c (save_uint8_byte_table): Use libchise when CHISE is + defined. + (save_uint16_byte_table): Likewise. + (save_byte_table): Likewise. + (char_table_get_db): Use `chise_ds_load_char_feature_value' + instead of `chise_char_load_feature_value'. + (Fsave_char_attribute_table): Use libchise when CHISE is defined. + +2003-10-03 MORIOKA Tomohiko + + * chartab.h (struct Lisp_Char_Table): Delete member + `feature_table' if CHISE is defined. + + * chartab.c (Fmake_char_table): Don't refer `ct->feature_table'. + (Fcopy_char_table): Likewise. + (char_table_open_db_maybe): Likewise. + (char_table_close_db_maybe): Likewise. + (char_table_get_db): Likewise. + (Fmount_char_attribute_table): Likewise. + (Fload_char_attribute_table): Likewise. + +2003-10-03 MORIOKA Tomohiko + + * mule-charset.c (load_char_decoding_entry_maybe): Use + `chise_ds_decode_char' instead of `chise_ds_get_ccs' and + `chise_ccs_decode'. + +2003-10-02 MORIOKA Tomohiko + + * chartab.c (open_chise_data_source_maybe): Use `CHISE_DS_open' + instead of `chise_open_data_source'. + (Fclose_char_data_source): Use `CHISE_DS_close' instead of + `chise_ds_close'. + +2003-10-02 MORIOKA Tomohiko + + * chartab.c (char_table_open_db_maybe): Use `chise_ds_get_feature' + instead of `chise_ds_open_feature_table'. + (char_table_close_db_maybe): Don't use `chise_ft_close'. + +2003-10-02 MORIOKA Tomohiko + + * mule-charset.c (Fsave_charset_mapping_table): Use + `chise_ds_get_ccs' instead of `chise_ds_open_ccs_table'; use + `chise_ccs_set_decoded_char' instead of `chise_ccst_put_char'; use + `chise_ccs_sync' instead of `chise_ccst_close'. + (load_char_decoding_entry_maybe): Modify for `chise_ds_get_ccs'. + + * chartab.c (open_chise_data_source_maybe): Modify for + `chise_open_data_source'. + (char_table_open_db_maybe): Modify for + `chise_ds_open_feature_table'. + +2003-08-31 MORIOKA Tomohiko + + * mule-charset.c (load_char_decoding_entry_maybe): Use + `chise_ds_get_ccs' instead of `chise_ds_open_ccs_table'; don't use + `chise_ccst_close'. + +2003-08-25 MORIOKA Tomohiko + + * mule-charset.c (Fsave_charset_mapping_table): Use + `chise_ds_open_ccs_table', `chise_ccst_put_char' and + `chise_ccst_close' instead of `chise_ds_open_decoding_table', + `chise_dt_put_char' and `chise_dt_close'. + (load_char_decoding_entry_maybe): Use `chise_ds_open_ccs_table', + `chise_ccs_decode' and `chise_ccst_close' instead of + `chise_ds_open_decoding_table', `chise_dt_get_char' and + `chise_dt_close'. + + * chartab.c (char_table_get_db): Use + `chise_char_load_feature_value' instead of `chise_ft_get_value'. + (load_char_attribute_table_map_func): Modify for + `chise_char_feature_value_iterate'. + (Fload_char_attribute_table): Use + `chise_char_feature_value_iterate' instead of `chise_ft_iterate'. + +2003-10-11 MORIOKA Tomohiko + + * text-coding.c (COMPOSE_ADD_CHAR): Fixed. + +2003-08-19 MORIOKA Tomohiko + + * chartab.c (put_char_table): Modify for inherited coded-charsets + in XEmacs CHISE. + +2003-08-19 MORIOKA Tomohiko + + * chartab.c (Fput_char_table_map_function): Fixed. + (word_boundary_p): Don't check charset in XEmacs CHISE. + +2003-08-17 MORIOKA Tomohiko + + * mule-charset.c (Fsave_charset_mapping_table): Use + `open_chise_data_source_maybe'; use `chise_ds_open_decoding_table' + instead of `chise_open_decoding_table'; refer + `default_chise_data_source'; use `chise_dt_close' instead of + `chise_close_decoding_table'. + (load_char_decoding_entry_maybe): Likewise. + + * chartab.c (default_chise_data_source): New variable when `CHISE' + is defined. + (Fcopy_char_table): `ct->ds' is deleted. + (open_chise_data_source_maybe): New function. + (Fclose_char_data_source): New function. + (char_table_open_db_maybe): Use `open_chise_data_source_maybe'; + use `chise_ds_open_feature_table' instead of + `chise_open_feature_table'. + (char_table_close_db_maybe): Use `chise_ft_close' instead of + `chise_close_feature_table'; `cit->ds' is deleted. + (syms_of_chartab): Add new builtin function + `close-char-data-source' when `HAVE_CHISE_CLIENT' is defined. + + * chartab.h (default_chise_data_source): New extern variable. + (open_chise_data_source_maybe): New prototype. + (struct Lisp_Char_Table): Delete `ds'. + +2003-08-11 MORIOKA Tomohiko + + * mule-charset.c (Fsave_charset_mapping_table): Use libchise when + `CHISE' is defined. + +2003-08-10 MORIOKA Tomohiko + + * chartab.c (char_table_open_db_maybe): Defined even if `CHISE' is + not defined; add code for non-libchise setting. + (char_table_close_db_maybe): Likewise. + (char_table_get_db): New function when `HAVE_CHISE_CLIENT' is + defined. + (Fclose_char_attribute_table): Use `char_table_close_db_maybe' + even if `CHISE' is not defined. + (Freset_char_attribute_table): Likewise. + (load_char_attribute_maybe): Use `char_table_open_db_maybe' and + `char_table_close_db_maybe' even if `CHISE' is not defined; use + `char_table_get_db'. + (Fload_char_attribute_table): Use `char_table_open_db_maybe' and + `char_table_close_db_maybe' even if `CHISE' is not defined. + +2003-08-10 MORIOKA Tomohiko + + * chartab.c (char_table_open_db_maybe): New function. + (char_table_close_db_maybe): New function. + (Fclose_char_attribute_table): Use `char_table_close_db_maybe'. + (Freset_char_attribute_table): Likewise. + (load_char_attribute_maybe): Use `char_table_open_db_maybe' and + `char_table_close_db_maybe'. + (Fload_char_attribute_table): Likewise. + +2003-08-09 MORIOKA Tomohiko + + * chartab.c: Don't include because it is included in + chartab.h. + (Fmake_char_table): Initialize `ct->feature_table' when `CHISE' is + defined. + (Fcopy_char_table): Copy `ct->ds' and `ct->feature_table' when + `CHISE' is defined. + (Fmount_char_attribute_table): Initialize `ct->feature_table' when + `CHISE' is defined. + (Fclose_char_attribute_table): Close `ct->feature_table' and + `ct->ds' when `CHISE' is defined. + (Freset_char_attribute_table): Likewise. + (load_char_attribute_maybe): Use `cit->ds' and + `cit->feature_table' when `CHISE' is defined. + (Fload_char_attribute_table): Likewise. + + * chartab.h: Include when `CHISE' is defined. + (struct Lisp_Char_Table): Add new member `ds' and `feature_table' + when `CHISE' is defined. + +2003-08-09 MORIOKA Tomohiko + + * chartab.c (mark_char_table): Member `db' is deleted when `CHISE' + is defined. + (char_table_description): Likewise. + (Fmake_char_table): Likewise. + (Fcopy_char_table): Likewise. + (Fmount_char_attribute_table): Likewise. + (Fclose_char_attribute_table): Likewise. + (Freset_char_attribute_table): Likewise. + (load_char_attribute_maybe): Likewise. + (Fload_char_attribute_table): Likewise. + + * chartab.h (struct Lisp_Char_Table): Delete `db' when `CHISE' is + defined. + +2003-08-09 MORIOKA Tomohiko + + * chartab.c (load_char_attribute_table_map_func): New function + when CHISE is defined. + (Qload_char_attribute_table_map_function): Don't define when CHISE + is defined. + (Fload_char_attribute_table_map_function): Likewise. + (Fload_char_attribute_table): Use libchise when `CHISE' is + defined. + (syms_of_chartab): Don't define + `load-char-attribute-table-map-function' when CHISE is defined. + +2003-08-06 MORIOKA Tomohiko + + * chartab.c: Include when `CHISE' is defined. + (load_char_attribute_maybe): Use libchise when `CHISE' is defined. + +2003-07-01 MORIOKA Tomohiko + + * mule-charset.c (charset_code_point): Fix problem when searching + in mother CCS fails with `defined_only' mode. + +2003-06-29 MORIOKA Tomohiko + + * chartab.c (Q_ucs_unified): Renamed from `Q_ucs_variants'. + (Fchar_variants): Rename `Q_ucs_variants' to `Q_ucs_unified'. + (put_char_composition): Likewise. + (Fput_char_attribute): Likewise. + (syms_of_chartab): Rename `->ucs-variants' to `->ucs-unified'. + +2003-06-29 MORIOKA Tomohiko + + * chartab.c (Q_ucs): Deleted. + (Fput_char_attribute): Don't refer `->ucs'. + (Fdefine_char): Likewise. + (Ffind_char): Likewise. + (syms_of_chartab): Delete `->ucs'. + +2003-04-30 MORIOKA Tomohiko + + * mule-charset.c (Qmap_cns11643_2): Renamed from + `Qchinese_cns11643_2'. + (syms_of_mule_charset): Add new symbol `=cns11643-2' instead of + `chinese-cns11643-2'. + (complex_vars_of_mule_charset): Rename `chinese-cns11643-2' to + `=cns11643-2'. + +2003-04-27 MORIOKA Tomohiko + + * mule-charset.c (Qmap_cns11643_1): Renamed from + `Qchinese_cns11643_1'. + (syms_of_mule_charset): Add new symbol `=cns11643-1' instead of + `chinese-cns11643-1'. + (complex_vars_of_mule_charset): Rename `chinese-cns11643-1' to + `=cns11643-1'. + +2003-04-24 MORIOKA Tomohiko + + * mule-charset.c (Qmap_gb12345): Renamed from `Qchinese_gb12345'. + (syms_of_mule_charset): Add new symbol `=gb12345' instead of + `chinese-gb12345'. + (complex_vars_of_mule_charset): Rename `chinese-gb12345' to + `=gb12345'. + +2003-04-21 MORIOKA Tomohiko + + * mule-charset.c (Qmap_gb2312): Renamed from `Qchinese_gb2312'. + (syms_of_mule_charset): Add new symbol `=gb2312' instead of + `chinese-gb2312'. + (complex_vars_of_mule_charset): Rename `chinese-gb2312' to + `=gb2312'. + +2003-04-19 MORIOKA Tomohiko + + * mule-charset.c (Qmap_big5): Renamed from `Qchinese_big5'. + (syms_of_mule_charset): Add new symbol `=big5' instead of + `chinese-big5'. + (complex_vars_of_mule_charset): Rename `chinese-big5' to `=big5'. + +2003-04-17 MORIOKA Tomohiko + + * mule-charset.c (Qmap_ks_x1001): Renamed from `Qkorean_ksc5601'. + (syms_of_mule_charset): Add new symbol `=ks-x1001' instead of + `korean-ksc5601'. + (complex_vars_of_mule_charset): Rename `korean-ksc5601' to + `=ks-x1001'. + +2003-04-15 MORIOKA Tomohiko + + * mule-charset.c (Qmap_jis_x0212): Renamed from + `Qjapanese_jisx0212'. + (syms_of_mule_charset): Add new symbol `=jis-x0212' instead of + `japanese-jisx0212'. + (complex_vars_of_mule_charset): Rename `japanese-jisx0212' to + `=jis-x0212'. + +2003-04-12 MORIOKA Tomohiko + + * mule-charset.c (Qmap_jis_x0208_1983): Renamed from + `Qjapanese_jisx0208'. + (syms_of_mule_charset): Add new symbol `=jis-x0208-1983' instead + of `japanese-jisx0208'. + (complex_vars_of_mule_charset): Rename `japanese-jisx0208' to + `=jis-x0208-1983'. + +2003-04-07 MORIOKA Tomohiko + + * mule-charset.c (Qmap_jis_x0208_1978): Renamed from + `Qjapanese_jisx0208_1978'. + (syms_of_mule_charset): Add new symbol `=jis-x0208-1978' instead + of `japanese-jisx0208-1978'. + (complex_vars_of_mule_charset): Rename `japanese-jisx0208-1978' to + `=jis-x0208-1978'. + +2003-04-04 MORIOKA Tomohiko + + * chartab.c (decode_char_table_range): CHARTAB_RANGE_DEFAULT is + only for XEmacs CHISE. + +2003-04-03 MORIOKA Tomohiko + + * char-ucs.h: Compact non-ISO-IR charset-ids. + (LEADING_BYTE_UCS): Changed to -177. + (LEADING_BYTE_CONTROL_1): Changed to -77. + (LEADING_BYTE_UCS_BMP): Changed to -176. + (LEADING_BYTE_JAPANESE_JISX0208_1990): Changed to -168. + +2003-04-03 MORIOKA Tomohiko + + * mule-charset.c (Qiso_ir): New variable. + (Fmake_charset): Recognise new property `iso-ir'. + (syms_of_mule_charset): Add new symbol `iso-ir'. + +2003-04-02 MORIOKA Tomohiko + + * char-ucs.h: Change charset-id of ISO-IR sets from ISO-IR-number + n to -n; charset-id of non ISO-IR sets are changed to positive + numbers. + +2003-03-19 MORIOKA Tomohiko + + * text-coding.c (decode_add_er_char): Use XUINT instead of XINT + for &MCS-XXXXXXXX; values. + +2003-03-12 MORIOKA Tomohiko + + * mule.c (Vxemacs_chise_version): Renamed from + `Vutf_2000_version'. + (vars_of_mule): Add new variable `xemacs-chise-version'; define + `utf-2000-version' as an alias for `xemacs-chise-version'. + +2003-03-10 MORIOKA Tomohiko + + * mule-charset.c: Include when `CHISE' is defined. + (load_char_decoding_entry_maybe): Use libchise when `CHISE' is + defined. + + * config.h.in (CHISE): New macro. + +2003-03-09 MORIOKA Tomohiko + + * mule-charset.c (put_char_ccs_code_point): Refer `=ucs' instead + of `ucs'. + (Qmap_ucs): New variable. + (syms_of_mule_charset): Add new symbol `=ucs'. + (complex_vars_of_mule_charset): Rename `ucs' to `=ucs'. + + * fns.c (ids_format_unit): Refer `=ucs' instead of `ucs'. + (simplify_char_spec): Likewise. + + * chartab.c (Fdefine_char): Refer `=ucs' as same as `ucs'. + + * char-ucs.h (Qmap_ucs): New extern variable. + +2003-03-07 MORIOKA Tomohiko + + * mule-charset.c (Qmap_jis_x0208): Renamed from `Qjis_x0208'. + (Qmap_jis_x0208_1990): Renamed from `Qjapanese_jisx0208_1990'; + don't define it when UTF2000 is not defined. + (syms_of_mule_charset): Modify for `Qmap_jis_x0208'; rename + `japanese-jisx0208-1990' to `=jis-x0208-1990'; don't define it + when UTF2000 is not defined. + (complex_vars_of_mule_charset): Modify for `Qmap_jis_x0208'; + rename `japanese-jisx0208-1990' to `=jis-x0208-1990'. + +2003-03-05 MORIOKA Tomohiko + + * char-ucs.h (LEADING_BYTE_UCS_GB): Deleted. + + * mule-charset.c (Vcharset_ucs_gb): Deleted. + (Qucs_gb): Deleted. + (syms_of_mule_charset): Delete `ucs-gb'. + (complex_vars_of_mule_charset): Likewise. + +2003-03-04 MORIOKA Tomohiko + + * char-ucs.h (LEADING_BYTE_UCS_CNS): Deleted. + + * mule-charset.c (Vcharset_ucs_cns): Deleted. + (Qucs_cns): Deleted. + (syms_of_mule_charset): Delete `ucs-cns'. + (complex_vars_of_mule_charset): Likewise. + +2003-03-03 MORIOKA Tomohiko + + * char-ucs.h (LEADING_BYTE_UCS_JIS): Deleted. + + * mule-charset.c (Vcharset_ucs_jis): Deleted. + (Qucs_jis): Deleted. + (syms_of_mule_charset): Delete `ucs-jis'. + (complex_vars_of_mule_charset): Likewise. + +2003-03-02 MORIOKA Tomohiko + + * char-ucs.h (LEADING_BYTE_UCS_KS): Deleted. + + * mule-charset.c (Vcharset_ucs_ks): Deleted. + (Qucs_ks): Deleted. + (syms_of_mule_charset): Delete `ucs-ks'. + (complex_vars_of_mule_charset): Likewise. + +2003-03-01 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_ideograph_daikanwa_2): Deleted. + (Qideograph_daikanwa_2): Deleted. + (syms_of_mule_charset): Delete `ideograph-daikanwa-2'. + (complex_vars_of_mule_charset): Likewise. + + * char-ucs.h (LEADING_BYTE_DAIKANWA_0): Deleted. + (LEADING_BYTE_DAIKANWA_1): Deleted. + (LEADING_BYTE_DAIKANWA_2): Deleted. + (MIN_CHAR_DAIKANWA): Deleted. + (MAX_CHAR_DAIKANWA): Deleted. + +2003-02-27 MORIOKA Tomohiko + + * char-ucs.h (LEADING_BYTE_DAIKANWA_3): Deleted. + (LEADING_BYTE_HANZIKU_{1..12}): Deleted. + ({MIN|MAX}_CHAR_HANZIKU_{1..12}): Deleted. + + * mule-charset.c (Vcharset_ideograph_hanziku_{1..12}): Deleted. + (Vcharset_ideograph_daikanwa): Deleted. + (Qideograph_hanziku_{1..12}): Deleted. + (Qideograph_daikanwa): Deleted. + (encode_builtin_char_1): Don't use {MIN|MAX}_CHAR_DAIKANWA and + Vcharset_ideograph_daikanwa. + (syms_of_mule_charset): Delete `ideograph-daikanwa' and + `ideograph-hanziku-{1..12}'. + (complex_vars_of_mule_charset): Likewise. + +2003-02-26 MORIOKA Tomohiko + + * char-ucs.h (LEADING_BYTE_GT_PJ_{1..11}): Deleted. + + * mule-charset.c (Vcharset_ideograph_gt_pj_{1..11}): Deleted. + (Qideograph_gt_pj_{1..11}): Deleted. + (syms_of_mule_charset): Delete `ideograph-gt-pj-{1..11}'. + (complex_vars_of_mule_charset): Likewise. + +2003-02-17 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_ucs_big5): Deleted. + (Vcharset_ideograph_gt): Deleted. + (Qucs_big5): Deleted. + (Qideograph_gt): Deleted. + (syms_of_mule_charset): Delete symbol `ucs-big5' and + `ideograph-gt'. + (complex_vars_of_mule_charset): Delete coded-charset `ucs-big5' + and `ideograph-gt'. + + * char-ucs.h (LEADING_BYTE_UCS_BIG5): Deleted. + (LEADING_BYTE_GT): Deleted. + (MIN_CHAR_GT): Deleted. + (MAX_CHAR_GT): Deleted. + +2003-02-07 MORIOKA Tomohiko + + * chartab.c (Fput_char_attribute): Canonicalise charset-aliases. + +2003-01-08 MORIOKA Tomohiko + + * chartab.c (save_uint8_byte_table): Add new argument `filter'. + (save_uint16_byte_table): Likewise. + (save_byte_table): Likewise; convert values by it. + (Fput_char_attribute): Don't use `char-refs-simplify-char-specs' + for `ideographic-structure'. + (Fsave_char_attribute_table): Use `char-refs-simplify-char-specs' + as the filter for `ideographic-structure'. + +2003-01-07 MORIOKA Tomohiko + + * chartab.c (put_char_composition): New function. + (Fput_char_attribute): Use `put_char_composition'; use + `Fchar_refs_simplify_char_specs' for `ideographic-structure'. + + * fns.c (simplify_char_spec): New function. + (char_ref_simplify_spec): New function. + (Fchar_refs_simplify_char_specs): New function. + (syms_of_fns): Add new builtin function + `char-refs-simplify-char-specs'. + +2003-01-05 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_ideograph_cbeta): Deleted. + (Qideograph_cbeta): Deleted. + (syms_of_mule_charset): Don't define `ideograph-cbeta'. + (complex_vars_of_mule_charset): Likewise. + + * char-ucs.h (LEADING_BYTE_CBETA): Deleted. + (MIN_CHAR_CBETA): Comment out. + (MAX_CHAR_CBETA): Likewise. + +2002-12-30 MORIOKA Tomohiko + + * mule-charset.c, chartab.h, casetab.c, char-ucs.h, chartab.c: Use + `HAVE_CHISE_CLIENT' instead of `HAVE_DATABASE' to indicate the + CHISE client feature. + +2002-12-25 MORIOKA Tomohiko + + * mule.c (vars_of_mule): Update `utf-2000-version' to 0.20. + +2002-12-19 MORIOKA Tomohiko + + * mule-charset.c (charset_lookup_description_1): Use + `NUM_LEADING_BYTES' in UTF-2000. + +2002-12-18 MORIOKA Tomohiko + + * char-ucs.h (GC_CHARSETP): Deleted. + +2002-12-18 MORIOKA Tomohiko + + * char-ucs.h (MAX_CHAR_GT): Updated. + +2002-12-15 MORIOKA Tomohiko + + * text-coding.c: Sync with XEmacs 21.4.10. + +2002-11-29 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_china3_jef): Deleted. + (Qchina3_jef): Deleted. + (syms_of_mule_charset): Don't define `china3-jef'. + (complex_vars_of_mule_charset): Likewise. + + * char-ucs.h (LEADING_BYTE_CHINA3_JEF): Deleted. + (MIN_CHAR_CHINA3_JEF): Comment out. + (MAX_CHAR_CHINA3_JEF): Comment out. + +2002-11-26 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_ucs_gb): New variable. + (Qucs_gb): New variable. + (syms_of_mule_charset): Add new symbol `ucs-gb'. + (complex_vars_of_mule_charset): Add new coded-charset `ucs-gb'. + + * char-ucs.h (LEADING_BYTE_UCS_GB): New macro. + +2002-11-20 MORIOKA Tomohiko + + * mule-charset.c (charset_code_point): if a coded-charset has a + final-byte, don't inherit the builtin range of the mother CCS. + +2002-11-15 MORIOKA Tomohiko + + * mule-charset.c (charset_code_point): Fix problem about + inheritance. + +2002-11-14 MORIOKA Tomohiko + + * mule-charset.c (decode_builtin_char): Reorganized. + +2002-10-31 MORIOKA Tomohiko + + * text-coding.c (char_encode_as_entity_reference): Modify for + `charset_code_point'. + (char_encode_shift_jis): Likewise. + (char_encode_big5): Likewise. + (char_encode_utf8): Likewise. + (char_encode_iso2022): Likewise. + + * mule-charset.c (charset_code_point): Add new argument + `defined_only'. + (Fencode_char): Add new optional argument `defined_only'. + + * chartab.c (put_char_table): Modify for `charset_code_point'. + + * char-ucs.h (charset_code_point): Add new argument + `defined_only'. + (encode_char_1): Modify for `charset_code_point'. + +2002-10-30 MORIOKA Tomohiko + + * mule-charset.c (complex_vars_of_mule_charset): Don't specify + `MIN_CHAR_THAI' and `MAX_CHAR_THAI' for `thai-tis620'. + +2002-10-29 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_jis_x0208): New variable in UTF-2000. + (Qjis_x0208): Likewise. + (decode_builtin_char): Prefer XCHARSET_MAX_CODE(charset) than + XCHARSET_FINAL(charset). + (charset_code_point): Modify condition for final-byte based + builtin-chars. + (syms_of_mule_charset): Add new symbol `=jis-x0208' in UTF-2000. + (complex_vars_of_mule_charset): Add new coded-charset `=jis-x0208' + in UTF-2000; specify `=jis-x0208' as the mother of + `japanese-jisx0208-1978', `japanese-jisx0208' and + `japanese-jisx0208-1990' in UTF-2000. + +2002-10-27 MORIOKA Tomohiko + + * char-ucs.h (LEADING_BYTE_JIS_X0208): New macro. + +2002-10-29 MORIOKA Tomohiko + + * text-coding.c (decode_coding_utf16): Support UTF-16. + (char_encode_utf16): Fixed. + +2002-10-03 MORIOKA Tomohiko + + * text-coding.c (Qutf16): New variable in MULE. + (Fmake_coding_system): Accept `utf-16' as `type' in MULE. + (Fcoding_system_type): Add `utf-16' in MULE. + (struct detection_state): Add a structure for utf16 in MULE. + (detect_coding_type): Setup st->utf16.mask in MULE. + (mule_decode): Use `decode_coding_utf16' for `CODESYS_UTF16' in + MULE. + (reset_encoding_stream): Use `char_encode_utf16' and + `char_finish_utf16' for `CODESYS_UTF16' in MULE. + (detect_coding_utf16): New function [incomplete]. + (decode_coding_utf16): New function [support only UCS-2]. + (char_encode_utf16): New function. + (char_finish_utf16): New function. + (syms_of_file_coding): Add new symbol `utf-16'; setup + `coding_category_symbol[CODING_CATEGORY_UTF16]'. + + * file-coding.h (enum coding_system_type): Add `CODESYS_UTF16' in + UTF-2000. + (enum coding_category_type): Add `CODING_CATEGORY_UTF16' in MULE. + (CODING_CATEGORY_UTF16_MASK): New macro in MULE. + +2002-10-08 MORIOKA Tomohiko + + * chartab.c (put_char_table): When a charset is specified as a + range in UTF-2000, don't support builtin characters. + +2002-09-30 MORIOKA Tomohiko + + * mule-charset.c (decode_defined_char): Don't refer external + database if Qunbound or Qnil are found. + (Fsave_charset_mapping_table): Don't define it if + HAVE_CHISE_CLIENT is not defined. + (Freset_charset_mapping_table): New function. + (load_char_decoding_entry_maybe): Store Qnil if a character is not + found in external database. + (syms_of_mule_charset): Don't define `save-charset-mapping-table' + if HAVE_CHISE_CLIENT is not defined; add new builtin function + `reset-charset-mapping-table' if HAVE_CHISE_CLIENT is defined. + +2002-09-18 MORIOKA Tomohiko + + * text-coding.c (decode_coding_utf8): Check CCS is specified or + not. + +2002-08-26 MORIOKA Tomohiko + + * chartab.h: Add extern declarations for Qdowncase, Qflippedcase, + Q_lowercase, Q_uppercase in UTF-2000. + + * chartab.c (get_char_table): Add special code for the standard + case table to use character attribute `->downcase' and + `->uppercase' for case operations in UTF-2000. + + * casetab.c (Qflippedcase): New variable in UTF-2000. + (Q_lowercase): Likewise. + (Q_uppercase): Likewise. + (syms_of_casetab): Add new symbols `flippedcase', `->lowercase' + and `->uppercase' in UTF-2000. + (complex_vars_of_casetab): Assign attribute name `downcase' to + downcase and CANON table of Vstandard_case_table in UTF-2000; + assign attribute name `flippedcase' to upcase and EQV table of + Vstandard_case_table in UTF-2000. + +2002-08-20 MORIOKA Tomohiko + + * text-coding.c (decode_add_er_char): Support isolated-chars. + (char_encode_as_entity_reference): Likewise. + +2002-08-13 MORIOKA Tomohiko + + * emacs.c (Vutf_2000_lisp_directory): New variable. + (Vconfigure_utf_2000_lisp_directory): Likewise. + (complex_vars_of_emacs): Add new variable + `utf-2000-lisp-directory' and `configure-utf-2000-lisp-directory'. + +2002-08-12 MORIOKA Tomohiko + + * char-ucs.h (DECODE_CHAR): Delete special code for + `chinese-big5-1' and `chinese-big5-2'. + + * mule-charset.c (Qbig5_1): New variable in UTF-2000. + (Qbig5_2): Likewise. + (decode_defined_char): Support CONVERSION_BIG5_1 and + CONVERSION_BIG5_2. + (decode_builtin_char): Likewise. + (charset_code_point): Likewise. + (Fmake_charset): Accept `big5-1' and `big5-2' as a value of + 'conversion in UTF-2000. + (syms_of_mule_charset): Add new symbol `big5-1' and `big5-2'. + (complex_vars_of_mule_charset): Define `chinese-big5-1' and + `chinese-big5-2' as children of `chinese-big5'. + + * char-ucs.h (CONVERSION_BIG5_1): New macro. + (CONVERSION_BIG5_2): New macro. + +2002-08-11 MORIOKA Tomohiko + + * text-coding.c (char_encode_big5): Support entity-reference. + +2002-08-10 MORIOKA Tomohiko + + * text-coding.c (char_encode_as_entity_reference): New function. + (char_encode_utf8): Use `char_encode_as_entity_reference'. + +2002-08-09 MORIOKA Tomohiko + + * text-coding.c (decode_coding_big5): Support entity-reference + decoding feature. + +2002-08-09 MORIOKA Tomohiko + + * text-coding.c (allocate_coding_system): Initialize initial + charsets for CODESYS_UTF8. + (Fmake_coding_system): Accept charset-g0, charset-g1 and + charset-g2 for CODESYS_UTF8. + (decode_coding_utf8): Use charset-g0. + (char_encode_utf8): Use charset-g0; use charset-g1 and charset-g2 + to force variants to map to UCS. + +2002-07-29 MORIOKA Tomohiko + + * text-coding.c (Qutf_8_mcs): New variable. + (syms_of_file_coding): Add new symbol `utf-8-mcs' in UTF-2000. + (complex_vars_of_file_coding): Define coding-system `utf-8-mcs' + instead of `utf-8' in UTF-2000. + +2002-07-22 MORIOKA Tomohiko + + * mule-charset.c (charset_code_point): If CHARSET_CONVERSION is + CONVERSION_IDENTICAL, identical conversion is used even if a CCS + is ISO-2022 style; instead of it, CONVERSION_94, CONVERSION_96, + CONVERSION_94x94, CONVERSION_96x96, CONVERSION_94x94x94, + CONVERSION_96x96x96, CONVERSION_94x94x94x94 and + CONVERSION_96x96x96x96 are introduced. + (complex_vars_of_mule_charset): Specify CONVERSION_96 instead of + CONVERSION_IDENTICAL for thai-tis620; Specify CONVERSION_94x94 + instead of CONVERSION_IDENTICAL for japanese-jisx0208-1990. + + * char-ucs.h (CONVERSION_94): New macro. + (CONVERSION_96): New macro. + (CONVERSION_94x94): New macro. + (CONVERSION_96x96): New macro. + (CONVERSION_94x94x94): New macro. + (CONVERSION_96x96x96): New macro. + (CONVERSION_94x94x94x60): New macro. + (CONVERSION_94x94x94x94): New macro. + (CONVERSION_96x96x96x96): New macro. + +2002-07-17 MORIOKA Tomohiko + + * chartab.c (Vcharacter_variant_table): Deleted. + (Fchar_variants): Use character-attribute `->ucs-variants' instead + of `Vcharacter_variant_table'. + (Fput_char_attribute): Likewise. + (vars_of_chartab): Don't setup `Vcharacter_variant_table'. + (complex_vars_of_chartab): Likewise. + +2002-07-17 MORIOKA Tomohiko + + * lisp.h: Add an EXFUN for `Fchar_ref_p'. + + * fns.c (Qideographic_structure): New variable. + (Qkeyword_char): New variable. + (ids_format_unit): New function. + (Fideographic_structure_to_ids): New function. + (syms_of_fns): Add new symbols `ideographic-structure' and + `:char'; add new builtin function `ideographic-structure-to-ids'. + + * data.c (Fchar_ref_p): New function. + (syms_of_data): Add new builtin function `char-ref-p'. + + * chartab.h: Add an EXFUN for `Ffind_char'. + +2002-07-16 MORIOKA Tomohiko + + * text-coding.c (Vcharacter_composition_table): Deleted. + (COMPOSE_ADD_CHAR): Use the implementation for external-DB support + in every UTF-2000. + + * chartab.c: Add EXFUN for `Fmap_char_attribute' in every + UTF-2000. + (Vcharacter_composition_table): Deleted. + (Fget_composite_char): Use the implementation for external-DB + support in every UTF-2000. + (Fput_char_attribute): Likewise. + (char_attribute_system_db_file): Don't define if external-DB + feature is not available. + (Fsave_char_attribute_table): Likewise. + (Fmount_char_attribute_table): Likewise. + (Fclose_char_attribute_table): Likewise. + (Freset_char_attribute_table): Likewise. + (Fload_char_attribute_table): Likewise. + (syms_of_chartab): Don't define `save-char-attribute-table', + `mount-char-attribute-table', `reset-char-attribute-table', + `close-char-attribute-table' and `load-char-attribute-table' if + external-DB feature is not available. + (vars_of_chartab): Don't setup `Vcharacter_composition_table'. + +2002-07-15 MORIOKA Tomohiko + + * text-coding.c (Qcomposition): Add extern if external-DB feature + is supported. + (Vcharacter_composition_table): Don't add extern if external-DB + feature is supported. + (COMPOSE_ADD_CHAR): Modify for new data-representation of + character composition rule if external-DB feature is supported. + + * chartab.c (Vcharacter_composition_table): Don't define if + external-DB feature is supported. + (Qcomposition): New variable. + (Fget_composite_char): New implementation for external-DB support. + (Fput_char_attribute): Use `composition' property of each + character instead of `Vcharacter_composition_table' to store + character-composition rules if external-DB feature is supported. + (syms_of_chartab): Add new symbol `composition'. + (vars_of_chartab): Don't setup `Vcharacter_composition_table' if + external-DB feature is supported. + +2002-07-14 MORIOKA Tomohiko + + * chartab.c (Vchar_db_stingy_mode): New variable. + (load_char_attribute_maybe): Close database if + Vchar_db_stingy_mode is not NIL. + (Fload_char_attribute_table_map_function): Use + `get_char_id_table_0' instead of `get_char_id_table'. + (vars_of_chartab): Add new variable `char-db-stingy-mode'. + + * chartab.h (get_char_id_table_0): New inline function. + (get_char_id_table): Use `get_char_id_table_0'. + +2002-07-07 MORIOKA Tomohiko + + * text-coding.c (decode_coding_utf8): Use `COMPOSE_FLUSH_CHARS' + and `COMPOSE_ADD_CHAR'. + (decode_coding_iso2022): Use `decode_flush_er_chars'. + +2002-07-07 MORIOKA Tomohiko + + * text-coding.c (COMPOSE_FLUSH_CHARS): Use `decode_add_er_char' + instead of `DECODE_ADD_UCS_CHAR'. + (COMPOSE_ADD_CHAR): Likewise. + +2002-07-06 MORIOKA Tomohiko + + * text-coding.c (decode_flush_er_chars): New inline function. + (decode_add_er_char): New function. + (decode_coding_utf8): Use `decode_flush_er_chars' and + `decode_add_er_char'. + +2002-07-06 MORIOKA Tomohiko + + * text-coding.c (decode_coding_utf8): Flush for er_buf must be + done before `decode_output_utf8_partial_char'. + + * mule-charset.c (complex_vars_of_mule_charset): Specify + `Vcharset_ucs' as the mother of `Vcharset_ucs_cns', + `Vcharset_ucs_ks' and `Vcharset_ucs_big5'. + +2002-07-05 MORIOKA Tomohiko + + * mule-charset.c (decode_defined_char): New function; search + mother. + (decode_builtin_char): Don't search mother if + XCHARSET_MAX_CODE(charset) == 0. + (charset_code_point): Search mother if XCHARSET_MAX_CODE(charset) + == 0 even if code >= XCHARSET_MAX_CODE(charset). + (Fdecode_char): Use `decode_defined_char' instead of + `DECODE_DEFINED_CHAR'. + (complex_vars_of_mule_charset): Specify `Vcharset_ucs' as the + mother of `Vcharset_ucs_jis'. + + * text-coding.c (decode_coding_big5): Use `decode_defined_char' + instead of `DECODE_DEFINED_CHAR'. + + * char-ucs.h (decode_defined_char): Renamed from + `DECODE_DEFINED_CHAR'; changed to normal function. + (DECODE_CHAR): Use `decode_defined_char' instead of + `DECODE_DEFINED_CHAR'. + + * lisp.h: Add `EXFUN' for `Fstring_to_number'. + +2002-07-04 MORIOKA Tomohiko + + * char-ucs.h: Add `extern' for `Vcharset_ucs'. + + * text-coding.c (Vcoded_charset_entity_reference_alist): New + variable. + (Quse_entity_reference): New variable. + (Qd): New variable. + (Qx): New variable. + (QX): New variable. + (coding_system_description): Add description for + `ccs_priority_list'. + (mark_coding_system): Mark `ccs_priority_list' in UTF-2000. + (allocate_coding_system): Initialize `ccs_priority_list' in + UTF-2000. + (Fmake_coding_system): Add description about + 'use-entity-reference; setup CODING_SYSTEM_USE_ENTITY_REFERENCE + (codesys). + (Fcoding_system_property): Accept `disable-composition' and + `use-entity-reference' in UTF-2000. + (struct decoding_stream): Add new member `er_counter' and `er_buf' + in UTF-2000. + (reset_decoding_stream): Initialize `str->er_counter' in UTF-2000. + (decode_coding_utf8): Decode entity-reference if + CODING_SYSTEM_USE_ENTITY_REFERENCE (str->codesys). + (char_encode_utf8): Encode non-Unicode characters as + entity-references if CODING_SYSTEM_USE_ENTITY_REFERENCE + (str->codesys). + (syms_of_file_coding): Add new symbols `use-entity-reference', + `d', `x', `X'. + (vars_of_file_coding): Add new variable + `coded-charset-entity-reference-alist'. + (complex_vars_of_file_coding): Declare `disable-composition' and + `use-entity-reference' to be coding-system-properties in UTF-2000. + + * file-coding.h (struct Lisp_Coding_System): Add new member + `use_entity_reference' and `ccs_priority_list'. + (CODING_SYSTEM_USE_ENTITY_REFERENCE): New macro. + (CODING_SYSTEM_CCS_PRIORITY_LIST): New macro. + (XCODING_SYSTEM_USE_ENTITY_REFERENCE): New macro. + +2002-07-03 MORIOKA Tomohiko + + * chartab.c (save_uint8_byte_table): Don't clear the table. + (save_uint16_byte_table): Likewise. + (save_byte_table): Likewise. + (Fmount_char_attribute_table): New function. + (syms_of_chartab): Add new builtin function + `mount-char-attribute-table'. + +2002-07-02 MORIOKA Tomohiko + + * mule-charset.c (Fsave_charset_mapping_table): Open database as + "w+" mode. + (load_char_decoding_entry_maybe): Open database as read-only mode. + + * chartab.c (Fsave_char_attribute_table): Don't share `ct->db'; + open database as "w+" mode. + (load_char_attribute_maybe): Open database as read-only mode. + (Fload_char_attribute_table): Likewise. + +2002-07-02 MORIOKA Tomohiko + + * chartab.c (mark_char_table): Don't refer `ct->db_file'. + (char_table_description): Delete member `db_file'. + (Fmake_char_table): Don't refer `ct->db_file'. + (Fcopy_char_table): Likewise. + (Fsave_char_attribute_table): Likewise. + (Fclose_char_attribute_table): Likewise. + (Freset_char_attribute_table): Likewise. + (load_char_attribute_maybe): Likewise. + (Fload_char_attribute_table): Likewise. + + * chartab.h (struct Lisp_Char_Table): Delete member `db_file'. + +2002-07-02 MORIOKA Tomohiko + + * chartab.c: Add an EXFUN for `Fmap_char_attribute'. + (Fsave_char_attribute_table): Don't check `ct->db_file' if + `ct->db' is living. + (load_char_attribute_maybe): Likewise. + (Fload_char_attribute_table): Likewise. + +2002-07-01 MORIOKA Tomohiko + + * chartab.c (Fclose_char_attribute_table): Set Qnil on + `ct->db_file' unconditionally. + +2002-07-01 MORIOKA Tomohiko + + * chartab.c (mark_char_table): Mark `ct->db_file' and `ct->db' in + UTF-2000. + (char_table_description): Add description for `db_file' and `db' + in UTF-2000. + (Fmake_char_table): Initialize `ct->db_file' and `ct->db' in + UTF-2000. + (Fcopy_char_table): Copy `ct->db_file' and `ct->db' in UTF-2000. + (Fsave_char_attribute_table): Use `ct->db_file' and `ct->db'. + (Fclose_char_attribute_table): New function. + (Freset_char_attribute_table): Reset `ct->db_file' and `ct->db'. + (load_char_attribute_maybe): Change interface; use `cit->db_file' + and `cit->db'. + (Fload_char_attribute_table): Use `ct->db_file' and `ct->db'. + (syms_of_chartab): Add new builtin function + `Fclose_char_attribute_table'. + +2002-06-28 MORIOKA Tomohiko + + * chartab.h (struct Lisp_Char_Table): Add new member `db_file' and + `db' in UTF-2000. + (load_char_attribute_maybe): Change interface. + (get_char_id_table): Modify for `load_char_attribute_maybe'. + +2002-06-27 MORIOKA Tomohiko + + * database.h: Add an EXFUN for `Fdatabase_live_p'. + +2002-04-11 MORIOKA Tomohiko + + * mule-charset.c (decode_builtin_char): Use `decode_builtin_char' + instead of `DECODE_CHAR' for mother; don't use special code for + chinese-big5 to use code space of chinese-big5-1 and + chinese-big5-2. + (complex_vars_of_mule_charset): Use `MIN_CHAR_BIG5_CDP' and + `MAX_CHAR_BIG5_CDP' for chinese-big5. + + * char-ucs.h (MIN_CHAR_BIG5_CDP): Revival. + (MAX_CHAR_BIG5_CDP): Revival. + +2002-04-09 MORIOKA Tomohiko + + * mule-charset.c (complex_vars_of_mule_charset): Use "big5-0" as + the XLFD registry-encoding name of `chinese-big5'. + +2002-04-08 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_chinese_big5_cdp): Deleted. + (Qchinese_big5_cdp): Deleted. + (syms_of_mule_charset): Delete symbol `chinese-big5-cdp'. + (complex_vars_of_mule_charset): Delete coded-charset + `chinese-big5-cdp'. + + * char-ucs.h (CHARSET_ID_OFFSET): Deleted. + (LEADING_BYTE_*): Use `MIN_LEADING_BYTE + n' instead of + `CHARSET_ID_OFFSET - n' for private CCS. + (LEADING_BYTE_CHINESE_BIG5_CDP): Deleted. + (MIN_LEADING_BYTE_PRIVATE): Use `(MIN_LEADING_BYTE + 97)' instead + of `MIN_LEADING_BYTE'. + (MAX_LEADING_BYTE_PRIVATE): Use `-1' instead of + `(CHARSET_ID_OFFSET - 97)'. + (MIN_CHAR_BIG5_CDP): Deleted. + (MAX_CHAR_BIG5_CDP): Deleted. + +2002-03-15 MORIOKA Tomohiko + + * mule.c (vars_of_mule): Update `utf-2000-version' to 0.19. + +2002-03-15 MORIOKA Tomohiko + + * mule.c (Vutf_2000_version): New variable [moved from chartab.c]. + (vars_of_mule): Add new variable `utf-2000-version' [moved from + chartab.c]. + + * chartab.c (Vutf_2000_version): Moved to mule.c. + (vars_of_chartab): Move code about `utf-2000-version' into mule.c. + +2002-03-11 MORIOKA Tomohiko + + * mule-charset.c (load_char_decoding_entry_maybe): Don't define it + when HAVE_CHISE_CLIENT is not defined. + + * mule.c (vars_of_mule): Provide feature `chise' when + HAVE_CHISE_CLIENT is defined. + +2002-03-11 MORIOKA Tomohiko + + * config.h.in (UTF2000): Add comment. + (HAVE_CHISE_CLIENT): New macro. + +2002-02-25 MORIOKA Tomohiko + + * chartab.c (Fchar_variants): Check Vcharacter_variant_table is + CONSP. + (Fput_char_attribute): Likewise. + (char_attribute_system_db_file): Encode file-name of attribute. + (vars_of_chartab): Set Qunbound into Vcharacter_variant_table as + the initial value. + +2002-02-13 MORIOKA Tomohiko + + * mule-charset.c (put_char_ccs_code_point): Delete unused codes. + (Fsave_charset_mapping_table): Use + `char_attribute_system_db_file'. + (load_char_decoding_entry_maybe): Likewise. + + * chartab.h (Qsystem_char_id): New external variable. + (char_attribute_system_db_file): New prototype. + + * chartab.c (Qsystem_char_id): New variable in UTF-2000. + (char_attribute_system_db_file): New function. + (Fsave_char_attribute_table): Use `char_attribute_system_db_file'. + (Freset_char_attribute_table): Likewise. + (load_char_attribute_maybe): Likewise. + (Fload_char_attribute_table): Likewise. + (syms_of_chartab): Add new symbol `system-char-id'. + +2002-02-12 MORIOKA Tomohiko + + * char-ucs.h (DECODE_DEFINED_CHAR): Don't check + `XCHARSET_GRAPHIC(ccs)'. + +2002-02-12 MORIOKA Tomohiko + + * mule-charset.c (Fsave_charset_mapping_table): Fixed. + +2002-02-11 MORIOKA Tomohiko + + * chartab.c (Q_ucs_variants): New variable. + (syms_of_chartab): Add new symbol `->ucs-variants'. + (complex_vars_of_chartab): Set `Vcharacter_variant_table' on + `Vchar_attribute_hash_table' as the value of `->ucs-variants'; set + `->ucs-variants' on `XCHAR_TABLE_NAME (Vcharacter_variant_table)'. + + * mule-charset.c (load_char_decoding_entry_maybe): New function. + + * char-ucs.h (load_char_decoding_entry_maybe): New prototype when + `HAVE_DATABASE' is defined. + (DECODE_DEFINED_CHAR): Use `load_char_decoding_entry_maybe' when + `HAVE_DATABASE' is defined. + +2002-02-11 MORIOKA Tomohiko + + * chartab.c (Fsave_char_attribute_table): Don't clear internal + attribute-table. + (Freset_char_attribute_table): New function. + (syms_of_chartab): Add new builtin function + `reset-char-attribute-table'. + +2002-02-11 MORIOKA Tomohiko + + * chartab.c (load_char_attribute_maybe): Don't make directories. + +2002-02-11 MORIOKA Tomohiko + + * char-ucs.h: Add EXFUN for `Fmake_directory_internal'. + + * mule-charset.c (put_char_ccs_code_point): Don't prepare a vector + for decoding-table. + +2002-02-11 MORIOKA Tomohiko + + * mule-charset.c (Fsave_charset_mapping_table): Use + `XCHARSET_BYTE_SIZE' instead of `XCHARSET_CHARS'. + + * char-ucs.h (put_ccs_octet_table): Use `XCHARSET_BYTE_SIZE' + instead of `XCHARSET_CHARS'. + +2002-02-10 MORIOKA Tomohiko + + * mule-charset.c (CHARSET_BYTE_SIZE): Moved to char-ucs.h. + (XCHARSET_BYTE_SIZE): Likewise. + + * char-ucs.h (CHARSET_BYTE_SIZE): New inline function [moved from + mule-charset.c]. + (XCHARSET_BYTE_SIZE): Likewise. + +2002-02-10 MORIOKA Tomohiko + + * chartab.c (Fput_char_attribute): Use exec-directory instead of + data-directory to store database. + (Fsave_char_attribute_table): Likewise. + (load_char_attribute_maybe): Likewise. + (Fload_char_attribute_table): Likewise. + +2002-02-08 MORIOKA Tomohiko + + * mule-charset.c (Fsave_charset_mapping_table): New function. + (syms_of_mule_charset): Add new builtin function + `save-charset-mapping-table'. + +2002-02-07 MORIOKA Tomohiko + + * char-ucs.h (decoding_table_check_elements): Delete prototype. + (get_ccs_octet_table): New inline function. + (put_ccs_octet_table): Likewise. + (decoding_table_put_char): Use `get_ccs_octet_table' and + `put_ccs_octet_table'. + (decoding_table_remove_char): Use `decoding_table_put_char'. + (DECODE_DEFINED_CHAR): Use `get_ccs_octet_table'. + + * mule-charset.c (remove_char_ccs): Store Qunbound instead of Qnil + into encoding_table. + (make_charset): Use Qunbound instead Qnil as initial value of + decoding_table. + +2002-02-04 MORIOKA Tomohiko + + * chartab.c (map_over_uint8_byte_table): Set Qunbound if an + element is Qunloaded. + (map_over_uint16_byte_table): Likewise. + (map_over_byte_table): Likewise. + (map_char_table): Likewise for CHARTAB_RANGE_ALL in UTF-2000; when + CHARTAB_RANGE_CHARSET is specified in UTF-2000 with external + database support, load encoding-table of the specified + coded-charset if it is not loaded yet. + (save_uint8_byte_table): New function of UTF-2000 with external + database support. + (save_uint16_byte_table): Likewise. + (save_byte_table): Likewise. + (Fput_char_attribute): Don't store value into external database + even if the external database feature is supported in UTF-2000; + set `attribute' as name of char-table if the external database + feature is supported. + (Fsave_char_attribute_table): New function in UTF-2000. + (syms_of_chartab): Add new builtin function + `save-char-attribute-table' in UTF-2000. + +2002-02-03 MORIOKA Tomohiko + + * chartab.c (char_attribute_table_to_put): New variable in + UTF-2000. + (Qput_char_table_map_function): Likewise. + (value_to_put): Likewise. + (Fput_char_table_map_function): New function in UTF-2000. + (put_char_table): Use `Fmap_char_attribute' for + CHARTAB_RANGE_CHARSET in UTF-2000. + (Fput_char_attribute): Store symbol instead of string in + `XCHAR_TABLE_NAME (table)'. + (load_char_attribute_maybe): Likewise. + (syms_of_chartab): Add new symbol/function + `put-char-table-map-function'. + +2002-01-30 MORIOKA Tomohiko + + * database.h: Add new EXFUN for `Fmap_database'. + + * database.c (Fmap_database): Renamed from `Fmapdatabase'. + (syms_of_database): Likewise. + + * chartab.h (struct Lisp_Char_Table): Add new member `unloaded' in + UTF-2000. + (CHAR_TABLE_UNLOADED): New macro of UTF-2000. + (XCHAR_TABLE_UNLOADED): Likewise. + + * chartab.c (fill_char_table): Initialize `ct->unloaded'. + (Fput_char_attribute): Set XCHAR_TABLE_UNLOADED(table) if + HAVE_DATABASE is defined. + (char_attribute_table_to_load): New variable of UTF-2000 with + external database support. + (Qload_char_attribute_table_map_function): Likewise. + (Fload_char_attribute_table_map_function): New function of + UTF-2000 with external database support. + (Fload_char_attribute_table): New function of UTF-2000. + (Fmap_char_attribute): Call Fload_char_attribute_table if + CHAR_TABLE_UNLOADED(ct) is set when HAVE_DATABASE is defined. + (syms_of_chartab): Add new symbol and function + `load-char-attribute-table-map-function' in UTF-2000 with external + database support; add new function `load-char-attribute-table' in + UTF-2000. + +2002-01-29 MORIOKA Tomohiko + + * chartab.h (load_char_attribute_maybe): New prototype for + UTF-2000 with DATABASE support. + (get_char_id_table): Use `load_char_attribute_maybe' if + HAVE_DATABASE is defined. + + * chartab.c (load_char_attribute_maybe): New function in UTF-2000 + with DATABASE support. + +2002-01-29 MORIOKA Tomohiko + + * chartab.c (Fput_char_attribute): Use S-expression as key of + external database. + + * chartab.h (get_char_id_table): Use S-expression as key of + external database. + +2002-01-24 MORIOKA Tomohiko + + * chartab.c (map_over_uint8_byte_table): Add new argument `root'; + if an element is not loaded, load the corresponding attributes + from an external database. + (map_over_uint16_byte_table): Likewise. + (map_over_byte_table): Likewise. + (map_char_table): Modify for `map_over_uint8_byte_table', + `map_over_uint16_byte_table' and `map_over_byte_table'; if an + element is not loaded, load the corresponding attributes from an + external database. + (Fput_char_attribute): Change initial values to Qunloaded. + + * chartab.h (get_char_id_table): If a character attribute is not + loaded and the attribute value is not found in an external + database, store Qunbound as the attribute value. + +2002-01-22 MORIOKA Tomohiko + + * chartab.c (BT_UINT8_unloaded): New macro. + (UINT8_VALUE_P): Accept Qunloaded. + (UINT8_ENCODE): Likewise. + (UINT8_DECODE): Likewise. + (BT_UINT16_unloaded): New macro. + (UINT16_VALUE_P): Accept Qunloaded. + (UINT16_ENCODE): Likewise. + (UINT16_DECODE): Likewise. + (UINT8_TO_UINT16): Convert BT_UINT8_unloaded into + BT_UINT16_unloaded. + (mark_char_table): Mark `ct->name' in UTF-2000. + (char_table_description): Add `name' in UTF-2000. + (Fmake_char_table): Initialize `ct->name'. + (Fcopy_char_table): Copy `ct->name'. + (Fput_char_attribute): Store value into an external database if + HAVE_DATABASE is defined. + + * chartab.h (struct Lisp_Char_Table): Add new member `name' in + UTF-2000. + (CHAR_TABLE_NAME): New macro in UTF-2000. + (XCHAR_TABLE_NAME): New macro in UTF-2000. + (get_char_id_table): Try to read an external database if Qunloaded + is stored in a table. + + * symbols.c (init_symbols_once_early): Assign '# into + Qunloaded. + +2002-01-21 MORIOKA Tomohiko + + * database.h: Add EXFUN definitions for Fopen_database, + Fput_database, Fget_database and Fclose_database. + + * data.c (Qunloaded): New variable in UTF-2000. + + * lisp.h (Qunloaded): New variable in UTF-2000. + +2002-01-10 MORIOKA Tomohiko + + * mule-charset.c (put_char_ccs_code_point): Modify for + `decoding_table_remove_char' and `decoding_table_put_char'. + (remove_char_ccs): Modify for `decoding_table_remove_char'. + + * char-ucs.h (decoding_table_remove_char): Change arguments to + hide decoding_table vector. + (decoding_table_put_char): Likewise. + +2002-01-10 MORIOKA Tomohiko + + * mule-charset.c (decoding_table_remove_char): Moved to + char-ucs.h. + (decoding_table_put_char): Likewise. + + * char-ucs.h (decoding_table_check_elements): New prototype [moved + from mule-charset.c]. + (decoding_table_remove_char): New inline function [moved from + mule-charset.c]. + (decoding_table_put_char): Likewise. + +2002-01-03 MORIOKA Tomohiko + + * mule-charset.c (Fmake_charset): Modify DOC-string for UTF-2000 + extension. + +2001-12-31 MORIOKA Tomohiko + + * mule-charset.c (decode_builtin_char): Support mother charsets. + +2001-12-31 MORIOKA Tomohiko + + * mule-charset.c (Q94x94x60): New variable. + (charset_code_point): Support conversion `94x94x60'. + (Fmake_charset): Likewise. + (syms_of_mule_charset): Add new symbol `94x94x60'. + + * char-ucs.h (CONVERSION_94x94x60): New macro. + +2001-12-31 MORIOKA Tomohiko + + * mule-charset.c (charset_code_point): Unify code about + `code-offset'. + +2001-12-30 MORIOKA Tomohiko + + * mule-charset.c (charset_code_point): Merge code about builtin + characters into code about mother charsets; don't use + `range_charset_code_point'. + (range_charset_code_point): Deleted. + +2001-12-28 MORIOKA Tomohiko + + * mule-charset.c (Qcode_offset): New variable. + (Fmake_charset): Use `XUINT' to get value of `min-code' and + `max-code'; accept new property `code-offset'. + (syms_of_mule_charset): Add new symbol `code-offset'. + +2001-12-27 MORIOKA Tomohiko + + * mule-charset.c (range_charset_code_point): Fixed. + +2001-12-26 MORIOKA Tomohiko + + * mule-charset.c (decode_builtin_char): Change semantics of + code-offset of coded-charset. + (charset_code_point): Likewise. + (range_charset_code_point): Likewise. + (complex_vars_of_mule_charset): Modify for the change. + +2001-12-26 MORIOKA Tomohiko + + * mule-charset.c (Fencode_char): Reverse arguments. + + * mule-charset.c (charset_code_point): Fixed. + +2001-12-25 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_mojikyo): Deleted. + (Vcharset_mojikyo_2022_1): Deleted. + (Vcharset_mojikyo_pj_{1..21}): Deleted. + (Qmin_code): New variable in UTF-2000. + (Qmax_code): Likewise. + (Qmother): Likewise. + (Qconversion): Likewise. + (Q94x60): Likewise. + (Qmojikyo): Deleted. + (Qmojikyo_2022_1): Deleted. + (Qmojikyo_pj_{1..22}): Deleted. + (mark_charset): Mark `cs->mother'. + (charset_description): Add description for `mother'. + (make_charset): Rename `ucs_{min|max}' to `{min|max}_code'; add + new arguments `mother' and `conversion'; use + `CHARSET_{MIN|MAX}_CODE' instead of `CHARSET_UCS_{MIN|MAX}'. + (charset_code_point): Moved from char-ucs.h; support `mother' + charset feature. + (range_charset_code_point): use `CHARSET_{MIN|MAX}_CODE' instead + of `CHARSET_UCS_{MIN|MAX}'; delete hard code for `mojikyo-2022-1'. + (Fmake_charset): Allow 3 and 4 as the value of `dimension' in + UTF-2000; allow 128 and 256 as the value of `chars' in UTF-2000; + allow 2 as the value of `graphic' in UTF-2000; add new properties + `min-code', `max-code', `mother', `conversion' in UTF-2000; don't + require `final' in UTF-2000; modify for `make_charset'. + (Fmake_reverse_direction_charset): use `CHARSET_{MIN|MAX}_CODE' + instead of `CHARSET_UCS_{MIN|MAX}'; modify for `make_charset'. + (Fcharset_property): Support `mother', `min-code' and `max-code'. + (Fencode_char): New function. + (syms_of_mule_charset): Add new builtin function `encode-char' in + UTF-2000; add new symbols `min-code', `max-code', `mother', + `conversion' and `94x60'; delete symbols `mojikyo', + `mojikyo-2022-1' and `mojikyo-pj-{1..21}'. + (complex_vars_of_mule_charset): Modify for `make_charset' change; + delete coded-charsets `mojikyo', `mojikyo-2022-1' and + `mojikyo-pj-{1..21}'; delete `DEF_MOJIKYO_PJ'. + + * chartab.c (Fdefine_char): Use `XCHARSET_MAX_CODE' instead of + `XCHARSET_UCS_MAX'; regard `chinese-big5' as a base CCS. + + * char-ucs.h (Vcharset_mojikyo): Deleted. + (Vcharset_mojikyo_2022_1): Deleted. + (LEADING_BYTE_MOJIKYO): Deleted. + (LEADING_BYTE_MOJIKYO_2022_1): Deleted. + (LEADING_BYTE_MOJIKYO_2022_2): Deleted. + (LEADING_BYTE_MOJIKYO_PJ_{1 .. 21}): Deleted. + (struct Lisp_Charset): Rename `ucs_{min|max}' to `{min|max}_code'; + add new member `mother'; add new member `conversion'. + (CHARSET_MIN_CODE): Renamed from `CHARSET_UCS_MIN'. + (CHARSET_MAX_CODE): Renamed from `CHARSET_UCS_MAX'. + (CHARSET_MOTHER): New macro. + (CHARSET_CONVERSION): New macro. + (CONVERSION_IDENTICAL): New macro. + (CONVERSION_94x60): New macro. + (XCHARSET_MIN_CODE): Renamed from `CHARSET_MIN_CODE'. + (XCHARSET_MAX_CODE): Renamed from `CHARSET_MAX_CODE'. + (XCHARSET_MOTHER): New macro. + (XCHARSET_CONVERSION): New macro. + (MIN_CHAR_MOJIKYO): Deleted. + (MAX_CHAR_MOJIKYO): Deleted. + (DECODE_MOJIKYO_2022): Deleted. + (DECODE_CHAR): Delete hard code for builtin Mojikyo characters. + (charset_code_point): Changed to non-inline function. + (encode_char_1): Use `charset_code_point'. + (CHAR_TO_CHARC): Delete hard code for Mojikyo characters. + +2001-12-24 MORIOKA Tomohiko + + * lread.c (read_compiled_function): Fix prototype. + (read_vector): Likewise. + +2001-12-10 MORIOKA Tomohiko + + * lrecord.h (struct lrecord_header): Delete `older'. + (set_lheader_implementation): Delete code for `older'. + (set_lheader_older_implementation): Deleted. + (enum lrecord_type): Delete `lrecord_type_char_id_table'. + (OLDER_RECORD_P): Deleted. + (OLDER_RECORD_HEADER_P): Deleted. + (alloc_older_lcrecord): Deleted. + (alloc_older_lcrecord_type): Deleted. + + * alloc.c (all_older_lcrecords): Deleted. + (alloc_older_lcrecord): Deleted. + (disksave_object_finalization_1): Delete code for older objects. + (mark_object): Don't use `OLDER_RECORD_HEADER_P'. + (reinit_alloc_once_early): Don't initialize `all_older_lcrecords'. + +2001-12-09 MORIOKA Tomohiko + + * mule-charset.c (decoding_table_put_char): Use `make_vector' + instead of `make_older_vector'. + (put_char_ccs_code_point): Likewise. + (mark_charset): Mark `cs->decoding_table'. + (Fset_charset_mapping_table): Don't use `make_vector_newer'. + + * lisp.h (make_older_vector): Deleted. + (make_vector_newer): Deleted. + + * config.h.in (HAVE_GGC): Deleted. + + * alloc.c (make_older_vector): Deleted. + (make_vector_newer_1): Deleted. + (make_vector_newer): Deleted. + +2001-12-07 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_ideograph_daikanwa_2): New variable. + (Qideograph_daikanwa_2): New variable. + (syms_of_mule_charset): Add new symbol `ideograph-daikanwa-2'. + (complex_vars_of_mule_charset): Add new coded-charset + `ideograph-daikanwa-2'; use `LEADING_BYTE_DAIKANWA_3' instead of + `LEADING_BYTE_DAIKANWA'. + + * char-ucs.h (LEADING_BYTE_DAIKANWA_0): New macro. + (LEADING_BYTE_DAIKANWA_1): New macro. + (LEADING_BYTE_DAIKANWA_2): New macro. + (LEADING_BYTE_DAIKANWA_3): Renamed from `LEADING_BYTE_DAIKANWA'. + +2001-12-05 MORIOKA Tomohiko + + * mule-charset.c (complex_vars_of_mule_charset): Change + DOC-strings and registry of `ideograph-daikanwa'; now it indicates + the second revised version. + +2001-12-04 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_ucs_smp): New variable. + (Vcharset_ucs_sip): New variable. + (Qucs_smp): New variable. + (Qucs_sip): New variable. + (encode_builtin_char_1): Treat MIN_CHAR_{SMP|SIP} to + MAX_CHAR_{SMP|SIP} as `ucs-{smp|sip}'. + (syms_of_mule_charset): Add new symbols `ucs-smp' and `ucs-sip'. + (complex_vars_of_mule_charset): Modify middle-DOC and registry of + `ucs-bmp'; add new coded-charset `ucs-smp' and `ucs-sip'; change + charset width of `ucs-cns', `ucs-jis', `ucs-ks' and `ucs-big5'. + + * char-ucs.h (LEADING_BYTE_UCS_SMP): New macro. + (LEADING_BYTE_UCS_SIP): New macro. + (MIN_CHAR_SMP): New macro. + (MAX_CHAR_SMP): New macro. + (MIN_CHAR_SIP): New macro. + (MAX_CHAR_SIP): New macro. + +2001-11-30 Yoshiki Hayashi + + * dumper.c (PDUMP_HASH_SIZE): Increase the size of hash table when + utf-2000. + +2001-11-20 MORIOKA Tomohiko + + * mule-charset.c (put_char_ccs_code_point): Return canonicalized + value; don't store value into `encoding_table' of `Lisp_Charset'. + (mark_charset): `encoding_table' was deleted. + (charset_description): Likewise. + (make_charset): Likewise. + (Fset_charset_mapping_table): Use `Fput_char_attribute' instead of + `put_char_ccs_code_point'. + + * chartab.h (Fput_char_attribute): New EXFUN. + + * chartab.c (Fchar_attribute_alist): Name space of CCS-attributes + is unified with normal symbol space. + (Fget_char_attribute): Likewise. + (Fput_char_attribute): Likewise; behavior of + `put_char_ccs_code_point' is changed. + + * char-ucs.h: Include "elhash.h". + (Vchar_attribute_hash_table): New external variable. + (struct Lisp_Charset): Delete `encoding_table'. + (CHARSET_ENCODING_TABLE): New implementation; refer + `Vchar_attribute_hash_table' instead of `encoding_table' of struct + `Lisp_Charset'. + +2001-11-15 MORIOKA Tomohiko + + * mule-charset.c (Fcharset_property): Return Qnil if CHARSET_FINAL + (cs) == 0. + +2001-11-14 MORIOKA Tomohiko + + * text-coding.c (char_encode_big5): Prefer charset-g1 than + `chinese-big5'. + +2001-11-05 MORIOKA Tomohiko + + * chartab.c (uint8_byte_table_description): New constant. + (uint8-byte-table): Use `uint8_byte_table_description'. + (uint16_byte_table_description): New constant. + (uint16-byte-table): Use `uint16_byte_table_description'. + +2001-10-20 MORIOKA Tomohiko + + * mule-charset.c (complex_vars_of_mule_charset): Don't use builtin + range MIN_CHAR_BIG5_CDP .. MAX_CHAR_BIG5_CDP. + +2001-10-18 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_ucs_ks): New variable. + (Qucs_ks): New variable. + (syms_of_mule_charset): Add new symbol `ucs-ks'. + (complex_vars_of_mule_charset): Add new coded-charset `ucs-ks'. + + * char-ucs.h (LEADING_BYTE_UCS_KS): New macro. + +2001-10-16 MORIOKA Tomohiko + + * chartab.h (Fmake_char): New EXFUN; moved from chartab.c. + (Fdecode_char): Likewise. + + * chartab.c: Move EXFUN for Fmake_char and Fdecode_char into + chartab.h. + (Fdefine_char): Modify for Fdecode_char. + (Ffind_char): Likewise. + + * mule-charset.c (Fdecode_char): Add new optional argument + `defined-only'. + (Fdecode_builtin_char): Modify for `Fdecode_char'. + +2001-10-15 MORIOKA Tomohiko + + * text-coding.c (mark_coding_system): Mark initial-charset-g0 and + -g1 of CODESYS_BIG5 in XEmacs UTF-2000. + (allocate_coding_system): Initialize initial-charsets of + CODESYS_BIG5 in XEmacs UTF-2000. + (Fmake_coding_system): Accept `charset-g0' and `charset-g1' for + CODESYS_BIG5 in XEmacs UTF-2000. + (decode_coding_big5): Use initial-charset-g0 and -g1 of + CODESYS_BIG5 in XEmacs UTF-2000; use `DECODE_DEFINED_CHAR'. + + * mule-charset.c (Vcharset_ideograph_hanziku_{1 .. 12}): New + variables. + (Qideograph_hanziku_{1 .. 12}): Likewise. + (syms_of_mule_charset): Add new symbols `ideograph-hanziku-{1 + .. 12}'. + (complex_vars_of_mule_charset): Use `MIN_CHAR_BIG5_CDP' to + `MAX_CHAR_BIG5_CDP' for `chinese-big5'; add news coded-charsets + `ideograph-hanziku-{1 .. 12}'. + + * char-ucs.h (MIN_LEADING_BYTE): Changed to -0x200. + (LEADING_BYTE_HANZIKU_{1 .. 12}): New macros. + ({MIN|MAX}_CHAR_BIG5_CDP): New macros. + ({MIN|MAX}_CHAR_HANZIKU_{1 .. 12}): New macros. + (DECODE_DEFINED_CHAR): New inline function. + (DECODE_CHAR): Use `DECODE_DEFINED_CHAR'. + +2001-10-12 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_china3_jef): Renamed from + `Vcharset_japanese_jef_china3'. + (Qchina3_jef): Renamed from `Qjapanese_jef_china3'. + (encode_builtin_char_1): Rename `{MIN|MAX}_CHAR_CHINA3_JEF' from + `{MIN|MAX}_CHAR_JEF_CHINA3'.. + (syms_of_mule_charset): Rename `china3-jef' from + `japanese-jef-china3'. + (complex_vars_of_mule_charset): Likewise; rename + `LEADING_BYTE_CHINA3_JEF' from `LEADING_BYTE_JEF_CHINA3'. + + * char-ucs.h (LEADING_BYTE_CHINA3_JEF): Renamed from + `LEADING_BYTE_JEF_CHINA3'. + (MIN_CHAR_CHINA3_JEF): Renamed from `MIN_CHAR_JEF_CHINA3'. + (MAX_CHAR_CHINA3_JEF): Renamed from `MAX_CHAR_JEF_CHINA3'. + +2001-10-11 MORIOKA Tomohiko + + * mule-charset.c (encode_builtin_char_1): Comment out special code + for MIN_CHAR_MOJIKYO_0 ... MAX_CHAR_MOJIKYO_0. + + * char-ucs.h (MIN_CHAR_MOJIKYO_0): Comment out. + (MAX_CHAR_MOJIKYO_0): Comment out. + (MIN_CHAR_CBETA): Changed to 0x00E20000. + (MAX_CHAR_CBETA): Changed to 0x00E2FFFF. + (MIN_CHAR_JEF_CHINA3): Changed to 0x00E80000. + (MAX_CHAR_JEF_CHINA3): Changed to 0x00E8FFFF. + +2001-10-08 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_ideograph_cbeta): New variable. + (Qideograph_cbeta): New variable. + (encode_builtin_char_1): Comment out special code for + coded-charset `mojikyo' and `japanese-jef-china3'. + (syms_of_mule_charset): Add new symbol `ideograph-cbeta'. + (complex_vars_of_mule_charset): Add new coded-charset + `ideograph-cbeta'. + + * char-ucs.h (LEADING_BYTE_CBETA): New macro. + (MIN_CHAR_CBETA): New macro. + (MAX_CHAR_CBETA): New macro. + +2001-10-04 MORIOKA Tomohiko + + * char-ucs.h (MIN_LEADING_BYTE): Changed to -0x100. + (LEADING_BYTE_JEF_CHINA3): New macro. + (MIN_CHAR_JEF_CHINA3): New macro. + (MAX_CHAR_JEF_CHINA3): Likewise. + (DECODE_CHAR): Fixed. + +2001-10-03 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_japanese_jef_china3): New variable. + (Qjapanese_jef_china3): New variable. + (encode_builtin_char_1): Support `japanese-jef-china3'. + (syms_of_mule_charset): Add new symbol `japanese-jef-china3'. + (complex_vars_of_mule_charset): Add new coded-charset + `japanese-jef-china3'. + +2001-09-07 MORIOKA Tomohiko + + * chartab.c (XCHARSET_CELL_RANGE): New inline function. + (decode_char_table_range): Use `XCHARSET_CELL_RANGE'; accept 94^3, + 94^4, 96^3, 96^4, 128^n and 256^n set. + (put_char_table): Use `XCHARSET_CELL_RANGE'. + (map_char_table): Likewise. + +2001-09-07 MORIOKA Tomohiko + + * chartab.c (get_char_table): Use `get_char_id_table' in XEmacs + UTF-2000. + +2001-09-07 MORIOKA Tomohiko + + * chartab.h (get_char_id_table): New inline function. + + * chartab.c (get_char_id_table): Moved to chartab.h as an inline + function. + +2001-09-07 MORIOKA Tomohiko + + * chartab.h (decode_char_table_range): New prototype in XEmacs + UTF-2000. + (put_char_id_table): New inline function in XEmacs UTF-2000. + + * chartab.c (put_char_id_table): Moved to chartab.h as an inline + function. + (decode_char_table_range): Delete static declaration in XEmacs + UTF-2000. + +2001-09-07 MORIOKA Tomohiko + + * chartab.c (put_char_id_table): Use `put_char_table'. + +2001-09-07 MORIOKA Tomohiko + + * chartab.c (map_over_uint8_byte_table): Delete argument `ccs'. + (map_over_uint16_byte_table): Likewise. + (map_over_byte_table): Likewise. + (map_char_table): Modify for `map_over_uint8_byte_table', + `map_over_uint16_byte_table' and `map_over_byte_table' in XEmacs + UTF-2000. + +2001-09-06 MORIOKA Tomohiko + + * chartab.c (struct map_char_table_for_charset_arg): New + structure. + (map_char_table_for_charset_fun): New function. + (map_char_table): Use `map_char_table' for encoding_table of + `range->charset'. + +2001-09-06 MORIOKA Tomohiko + + * chartab.c (map_char_table): Check a character is found in + range->charset instead of non default value is defined in + char-table when range is CHARTAB_RANGE_ROW. + +2001-09-05 MORIOKA Tomohiko + + * chartab.c (map_char_id_table): Deleted. + (Fmap_char_attribute): Use `map_char_table' instead of + `map_char_id_table'. + +2001-09-05 MORIOKA Tomohiko + + * syntax.h (SYNTAX_CODE_UNSAFE): New implementation in XEmacs + UTF-2000. + (update_syntax_table): Deleted in XEmacs UTF-2000. + + * syntax.c (find_defun_start): Use `syntax_table' instead of + `mirror_syntax_table' in XEmacs UTF-2000. + (Fset_syntax_table): Don't use `mirror_syntax_table' in XEmacs + UTF-2000. + (Fchar_syntax): Use `syntax_table' instead of `mirror_table' in + XEmacs UTF-2000. + (Fmatching_paren): Likewise. + (scan_words): Use `syntax_table' instead of `mirror_syntax_table' + in XEmacs UTF-2000. + (find_start_of_comment): Likewise. + (find_end_of_comment): Likewise. + (Fforward_comment): Likewise. + (scan_lists): Likewise. + (char_quoted): Likewise. + (Fbackward_prefix_chars): Likewise. + (scan_sexps_forward): Likewise. + (update_just_this_syntax_table): Deleted in XEmacs UTF-2000. + (update_syntax_table): Likewise. + + * search.c (skip_chars): Use `syntax_table' instead of + `mirror_syntax_table' in XEmacs UTF-2000. + (wordify): Likewise. + (Freplace_match): Likewise. + + * regex.c (re_compile_fastmap): Use `syntax_table' instead of + `mirror_syntax_table' in XEmacs UTF-2000. + (WORDCHAR_P_UNSAFE): Likewise. + (re_match_2_internal): Likewise. + + * font-lock.c (find_context): Use `buf->syntax_table' instead of + `buf->mirror_syntax_table' in XEmacs UTF-2000. + + * cmds.c (internal_self_insert): Use `buf->syntax_table' instead + of `buf->mirror_syntax_table' in XEmacs UTF-2000. + + * chartab.h (struct Lisp_Char_Table): Delete `mirror_table' in + XEmacs UTF-2000. + + * chartab.c (mark_char_table): Don't mark `mirror_table' in XEmacs + UTF-2000. + (print_char_table): Print `default_value' in XEmacs UTF-2000. + (char_table_description): Delete `mirror_table' in XEmacs + UTF-2000. + (fill_char_table): Don't call `update_syntax_table' in XEmacs + UTF-2000. + (Fmake_char_table): Don't use `mirror_table' in XEmacs UTF-2000. + (Fcopy_char_table): Likewise. + (put_char_table): Don't call `update_syntax_table' in XEmacs + UTF-2000. + + * casefiddle.c (casify_object): Use `buf->syntax_table' instead of + `buf->mirror_syntax_table' in XEmacs UTF-2000. + (casify_region_internal): Likewise. + + * bufslots.h: Delete `mirror_syntax_table' in XEmacs UTF-2000. + + * buffer.c (common_init_complex_vars_of_buffer): Don't use + `mirror_syntax_table' in XEmacs UTF-2000. + + * abbrev.c (abbrev_match): Use `buf->syntax_table' instead of + `buf->mirror_syntax_table' in XEmacs UTF-2000. + (Fexpand_abbrev): Likewise. + +2001-09-04 MORIOKA Tomohiko + + * chartab.c (vars_of_chartab): Update `utf-2000-version' to 0.18. + +2001-09-04 MORIOKA Tomohiko + + * chartab.c (map_over_uint8_byte_table): Cancel temporary hack. + (map_over_uint16_byte_table): Likewise. + (map_over_byte_table): Likewise. + (get_char_id_table): Refer `cit->default_value'. + (put_char_id_table): Support `CHARTAB_RANGE_DEFAULT'. + (map_char_id_table): Use `1 << 30' instead of `1 << 24' as number + of character-id ranges. + (mark_char_table): Mark `ct->default_value'. + (char_table_description): Add `default_value'. + (fill_char_table): Use `default_value'. + (decode_char_table_range): Decode `nil' as + `CHARTAB_RANGE_DEFAULT'. + (get_char_id_table): Refer `cit->default_value'. + (put_char_id_table): Support `CHARTAB_RANGE_DEFAULT'. + (map_char_table): Support `CHARTAB_RANGE_DEFAULT'; cancel + temporary hack; check value of char-table is bound or not. + (slow_map_char_table_fun): Support `CHARTAB_RANGE_DEFAULT'. + + * chartab.h (struct Lisp_Char_Table): Add new member + `default_value' in XEmacs UTF-2000. + (CHAR_TABLE_VALUE_UNSAFE): Use `default_value'. + (enum chartab_range_type): Add `CHARTAB_RANGE_DEFAULT' in XEmacs + UTF-2000. + +2001-09-03 MORIOKA Tomohiko + + * chartab.h (Lisp_Char_ID_Table): Deleted. + + * chartab.c (char_table_description): Fix typo. + (Fmap_char_attribute): Use `Lisp_Char_Table' instead of + `Lisp_Char_ID_Table'. + +2001-09-03 MORIOKA Tomohiko + + * text-coding.c (COMPOSE_ADD_CHAR): Use `CHAR_TABLEP' instead of + `CHAR_ID_TABLE_P'. + + * mule-charset.c (remove_char_ccs): Use `CHAR_TABLEP' instead of + `CHAR_ID_TABLE_P'. + + * chartab.h (XCHAR_ID_TABLE): Deleted. + (XSETCHAR_ID_TABLE): Deleted. + (CHAR_ID_TABLE_P): Deleted. + + * chartab.c (put_char_id_table): Use `CHAR_TABLEP' instead of + `CHAR_ID_TABLE_P'. + (Fget_composite_char): Likewise. + (put_char_table): Likewise. + (add_char_attribute_alist_mapper): Fixed. + (Fchar_attribute_alist): Use `CHAR_TABLEP' instead of + `CHAR_ID_TABLE_P'. + (Fget_char_attribute): Likewise. + (Fget_char_attribute): Likewise. + (Fmap_char_attribute): Likewise. + + * char-ucs.h (charset_code_point): Use `CHAR_TABLEP' instead of + `CHAR_ID_TABLE_P'. + (encode_char_1): Likewise. + +2001-09-03 MORIOKA Tomohiko + + * text-coding.c (COMPOSE_ADD_CHAR): Use `XCHAR_TABLE' instead of + `XCHAR_ID_TABLE'. + + * mule-charset.c (put_char_ccs_code_point): Use `XCHAR_TABLE' + instead of `XCHAR_ID_TABLE'. + (remove_char_ccs): Likewise. + + * chartab.c (put_char_id_table): Use `XCHAR_TABLE' instead of + `XCHAR_ID_TABLE'. + (Fget_composite_char): Likewise. + (Fchar_variants): Likewise. + (put_char_table): Likewise. + (add_char_attribute_alist_mapper): Likewise. + (Fchar_attribute_alist): Likewise. + (Fget_char_attribute): Likewise. + (Fput_char_attribute): Likewise. + (Fmap_char_attribute): Likewise. + (Fmap_char_attribute): Likewise. + + * char-ucs.h (charset_code_point): Use `XCHAR_TABLE' instead of + `XCHAR_ID_TABLE'. + (encode_char_1): Likewise. + +2001-09-03 MORIOKA Tomohiko + + * chartab.c (map_char_id_table): Use `Lisp_Char_Table' instead of + `Lisp_Char_ID_Table'. + (mark_char_id_table): Deleted. + (print_char_id_table): Likewise. + (char_id_table_equal): Likewise. + (char_id_table_hash): Likewise. + (char_id_table_description): Likewise. + (char_id_table): Likewise. + (make_char_id_table): Use `Fmake_char_table' and + `fill_char_table'. + (get_char_id_table): Use `Lisp_Char_Table' instead of + `Lisp_Char_ID_Table'. + (put_char_id_table): Likewise. + (Fput_char_attribute): Use `XCHAR_TABLE' instead of + `XCHAR_ID_TABLE'. + (Fremove_char_attribute): Likewise. + (syms_of_chartab): Don't define type `char-id-table'. + + * chartab.h (struct Lisp_Char_ID_Table): Deleted. + (char_id_table): Likewise. + (GC_CHAR_ID_TABLE_P): Likewise. + (Lisp_Char_ID_Table): Use structure `Lisp_Char_Table'. + (XCHAR_ID_TABLE): Use `XCHAR_TABLE'. + (XSETCHAR_ID_TABLE): Use `XSETCHAR_TABLE'. + (CHAR_ID_TABLE_P): Use `CHAR_TABLEP'. + (get_char_id_table): Use `Lisp_Char_Table' instead of + `Lisp_Char_ID_Table'. + (put_char_id_table_0): Likewise. + (put_char_id_table): Likewise. + +2001-09-02 MORIOKA Tomohiko + + * chartab.h: Lisp_Byte_Table related codes are moved from + chartab.h. + + * char-ucs.h: Move Lisp_Byte_Table related codes to chartab.h. + +2001-09-02 MORIOKA Tomohiko + + * chartab.h: Don't include "chartab.h". + (struct Lisp_Char_ID_Table): Moved from char-ucs.h. + (Lisp_Char_ID_Table): Likewise. + (char_id_table): Likewise. + (XCHAR_ID_TABLE): Likewise. + (XSETCHAR_ID_TABLE): Likewise. + (CHAR_ID_TABLE_P): Likewise. + (GC_CHAR_ID_TABLE_P): Likewise. + (get_char_id_table): Likewise. + + * char-ucs.h: Include "chartab.h". + (struct Lisp_Char_ID_Table): Moved to chartab.h. + (Lisp_Char_ID_Table): Likewise. + (char_id_table): Likewise. + (XCHAR_ID_TABLE): Likewise. + (XSETCHAR_ID_TABLE): Likewise. + (CHAR_ID_TABLE_P): Likewise. + (GC_CHAR_ID_TABLE_P): Likewise. + (get_char_id_table): Likewise. + +2001-09-01 MORIOKA Tomohiko + + * chartab.c (copy_uint8_byte_table): New function. + (copy_uint16_byte_table): New function. + (copy_byte_table): New function. + (map_over_uint8_byte_table): Modify to avoid huge numbers of + characters to call. + (map_over_uint16_byte_table): Likewise. + (map_over_byte_table): Likewise. + (get_byte_table): Move prototype to chartab.h. + (put_byte_table): Likewise. + (put_char_id_table_0): Moved to chartab.h. + (mark_char_table_entry): Don't define in XEmacs UTF-2000. + (char_table_entry_equal): Likewise. + (char_table_entry_hash): Likewise. + (char_table_entry_description): Likewise. + (char_table_entry): Likewise. + (make_char_table_entry): Likewise. + (copy_char_table_entry): Likewise. + (get_non_ascii_char_table_value): Likewise. + (map_over_charset_ascii): Likewise. + (map_over_charset_control_1): Likewise. + (map_over_charset_row): Likewise. + (map_over_other_charset): Likewise. + (mark_char_table): Modify for new structure in XEmacs UTF-2000. + (print_char_table): Likewise. + (char_table_equal): Likewise. + (char_table_hash): Likewise. + (char_table_description): Likewise. + (fill_char_table): Likewise. + (Fcopy_char_table): Likewise. + (get_char_table): Likewise. + (Fget_range_char_table): Likewise. + (put_char_table): Likewise. + (map_char_table): Likewise. + (syms_of_chartab): Don't define `char_table_entry' in XEmacs + UTF-2000. + +2001-08-31 MORIOKA Tomohiko + + * cmds.c (vars_of_cmds): Use `put_char_id_table_0' for + `Vauto_fill_chars' in XEmacs UTF-2000. + + * chartab.h (get_byte_table): New prototype [moved from + chartab.c]. + (put_byte_table): Likewise [moved from chartab.c]. + (put_char_id_table_0): New inline function [moved from chartab.c]. + (struct Lisp_Char_Table_Entry): Don't define in XEmacs UTF-2000. + (Lisp_Char_Table_Entry): Likewise. + (char_table_entry): Likewise. + (XCHAR_TABLE_ENTRY): Likewise. + (XSETCHAR_TABLE_ENTRY): Likewise. + (CHAR_TABLE_ENTRYP): Likewise. + (CHECK_CHAR_TABLE_ENTRY): Likewise. + (NUM_ASCII_CHARS): Likewise. + (struct Lisp_Char_Table): New implementation in XEmacs UTF-2000. + (CHAR_TABLE_VALUE_UNSAFE): Likewise. + +2001-08-30 MORIOKA Tomohiko + + * chartab.c (get_char_id_table): Change interface. + (put_char_id_table_0): New function. + (put_char_id_table): Change interface; new implementation. + (Fget_composite_char): Modify for interface change of + `get_char_id_table'. + (Fchar_variants): Likewise. + (add_char_attribute_alist_mapper): Likewise. + (Fchar_attribute_alist): Likewise. + (Fget_char_attribute): Likewise. + (Fput_char_attribute): Allow coded-charset or [CODED-CHARSET ROW] + as same as character as the first argument like `put-char-table'; + modify for interface change of `put_char_id_table'. + (Fremove_char_attribute): Modify for interface change of + `put_char_id_table'. + +2001-08-20 MORIOKA Tomohiko + + * text-coding.c: Sync up with XEmacs 21.2.41. + (COMPOSE_ADD_CHAR): Modify for interface change of + `get_char_id_table'. + + * mule-charset.c (put_char_ccs_code_point): Modify for interface + change of `put_char_id_table'. + (remove_char_ccs): Likewise. + + * chartab.h (put_char_id_table): Change interface. + + * char-ucs.h (get_char_id_table): Change interface. + (charset_code_point): Modify for interface change of + `get_char_id_table'. + (encode_char_1): Likewise. + +2001-08-19 MORIOKA Tomohiko + + * chartab.c (map_over_uint8_byte_table): Change arguments; add new + argument `ccs'. + (map_over_uint16_byte_table): Likewise. + (map_over_byte_table): Likewise. + (map_char_id_table): Add new argument `range' like + `map_char_table'. + (Fmap_char_attribute): Add new argument `range' like + `Fmap_char_table'. + +2001-08-17 MORIOKA Tomohiko + + * chartab.c (map_over_uint8_byte_table): Change interface of + mapping function to use struct chartab_range instead of Emchar. + (map_over_uint16_byte_table): Likewise. + (map_over_byte_table): Likewise. + (map_char_id_table): Likewise. + (struct slow_map_char_id_table_arg): Deleted. + (slow_map_char_id_table_fun): Deleted. + (Fmap_char_attribute): Use struct `slow_map_char_table_arg' and + function `slow_map_char_table_fun' instead of struct + `slow_map_char_id_table_arg' and function + `slow_map_char_id_table_fun'. + +2001-08-16 MORIOKA Tomohiko + + * mule-charset.c: Move char-it-table related codes to chartab.c. + (Vutf_2000_version): Moved to chartab.c. + (Fdefine_char): Likewise. + (Ffind_char): Likewise. + (syms_of_mule_charset): Move types `uint8-byte-table', + `uint16-byte-table', `byte-table' and `char-id-table' to + chartab.c; move functions `char_attribute_list, + `find_char_attribute_table, `char_attribute_alist, + `get_char_attribute, `put_char_attribute, `remove_char_attribute, + `map_char_attribute, `define_char, `find_char, `char_variants and + `get_composite_char to chartab.c; move symbols `=>ucs', + `->decomposition', `compat', `isolated', `initial', `medial', + `final', `vertical', `noBreak', `fraction', `super', `sub', + `circle', `square', `wide', `narrow', `small' and `font' to + chartab.c. + (vars_of_mule_charset): Move `utf-2000-version' to chartab.c; move + setting codes for `Vcharacter_composition_table' and + `Vcharacter_variant_table' to chartab.c. + (complex_vars_of_mule_charset): Move setting code for + `Vchar_attribute_hash_table' to chartab.c. + + * chartab.h: Include "char-ucs.h" if --with-utf-2000 is specified. + (make_char_id_table): New prototype. + (put_char_id_table): Likewise. + (Fget_char_attribute): Likewise. + + * chartab.c: Move char-id-table related code from mule-charset.c. + (Vutf_2000_version): Moved from mule-charset.c. + + * char-ucs.h (Qucs): New external variable. + (put_char_ccs_code_point): New prototype. + (remove_char_ccs): Likewise. + +2001-08-14 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_ucs_jis): New variable. + (Qucs_jis): Likewise. + (syms_of_mule_charset): Add new symbol `ucs-jis'. + (complex_vars_of_mule_charset): Add new coded-charset `ucs-jis'. + + * char-ucs.h (LEADING_BYTE_UCS_JIS): New macro. + +2001-08-10 MORIOKA Tomohiko + + * mule-charset.c (map_over_uint8_byte_table): New function. + (map_over_uint16_byte_table): Likewise. + (map_over_byte_table): Likewise. + (map_char_id_table): Likewise. + (slow_map_char_id_table_fun): Likewise. + (Fmap_char_attribute): Likewise. + (syms_of_mule_charset): Add new function `map-char-attribute'. + +2001-08-10 MORIOKA Tomohiko + + * mule-charset.c (Ffind_char): New function in XEmacs UTF-2000. + (syms_of_mule_charset): Add new function `find-char'. + +2001-08-07 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_chinese_big5_cdp): New variable in + XEmacs UTF-2000. + (Qchinese_big5_cdp): New variable in XEmacs UTF-2000. + (syms_of_mule_charset): Add new symbol `chinese-big5-cdp' in + XEmacs UTF-2000. + (complex_vars_of_mule_charset): Add new coded-charset + `chinese-big5-cdp' in XEmacs UTF-2000; change registry of + `ideograph-gt-pj-*'. + + * char-ucs.h (LEADING_BYTE_CHINESE_BIG5_CDP): New macro. + +2001-07-24 MORIOKA Tomohiko + + * mule-charset.c (encode_builtin_char_1): Purge codes about + {MIN|MAX}_CHAR_{GREEK|CYRILLIC}; comment out code about + {MIN|MAX}_CHAR_HEBREW. + (complex_vars_of_mule_charset): Comment out {MIN|MAX}_CHAR_HEBREW; + don't use {MIN|MAX}_CHAR_HEBREW to define `hebrew-iso8859-8'. + + * char-ucs.h (MIN_CHAR_GREEK): Purged. + (MAX_CHAR_GREEK): Purged. + (MIN_CHAR_CYRILLIC): Purged. + (MAX_CHAR_CYRILLIC): Purged. + (MIN_CHAR_HEBREW): Commented out. + (MAX_CHAR_HEBREW): Likewise. + +2001-07-23 MORIOKA Tomohiko + + * mule-charset.c (Qto_ucs): New variable. + (Fput_char_attribute): Treat `=>ucs' as same as `->ucs'. + (Fdefine_char): Likewise. + (syms_of_mule_charset): Add new symbol `=>ucs'. + +2001-07-23 MORIOKA Tomohiko + + * mule-charset.c (Fdecode_char): Fixed. + +2001-07-22 MORIOKA Tomohiko + + * mule-charset.c (complex_vars_of_mule_charset): Modify registry + of latin-tcvn5712 to accept "tcvn5712.1993-1" as same as + "tcvn5712-1". + +2001-07-21 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_ucs_big5): New variable. + (Qucs_big5): Likewise. + (syms_of_mule_charset): Add new symbol `ucs-big5'. + (complex_vars_of_mule_charset): Add new coded-charset `ucs-big5'. + + * char-ucs.h (LEADING_BYTE_UCS_BIG5): New macro. + +2001-07-17 MORIOKA Tomohiko + + * mule-charset.c (decode_builtin_char): Check Big5 code range + which can be mapped to `chinese-big5-1' and `chinese-big5-2'. + +2001-07-15 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_chinese_gb12345): New variable. + (Qchinese_gb12345): Likewise. + (Fdecode_builtin_char): Fixed. + (syms_of_mule_charset): Add `chinese-gb12345'. + (complex_vars_of_mule_charset): Add coded-charset + `chinese-gb12345'. + + * char-ucs.h (MIN_LEADING_BYTE): Changed to -0x70. + (LEADING_BYTE_CHINESE_GB12345): New macro. + +2001-07-12 MORIOKA Tomohiko + + * mule-charset.c (Fdecode_builtin_char): Use `latin-viscii-lower' + and `latin-viscii-upper' for `latin-viscii'. + +2001-07-11 MORIOKA Tomohiko + + * mule-charset.c (Fdecode_builtin_char): Comment out + regularization code for ISO-IR GR representation. + +2001-07-11 MORIOKA Tomohiko + + * mule-charset.c (decode_builtin_char): New function; renamed from + `make_builtin_char'; return -1 instead of signal. + (Fdecode_builtin_char): Use `decode_builtin_char'. + + * char-ucs.h (decode_builtin_char): New prototype; renamed from + `make_builtin_char'. + (DECODE_CHAR): Use `decode_builtin_char' instead of + `make_builtin_char'; use mapping table of `chinese-big5' for + `chinese-big5-{1,2}'. + +2001-07-11 MORIOKA Tomohiko + + * text-coding.c (char_encode_big5): New function. + (char_finish_big5): Likewise. + (reset_encoding_stream): Use `char_encode_big5' and + `char_finish_big5' for CODESYS_BIG5. + (mule_encode): Don't use `encode_coding_big5'. + (encode_coding_big5): Deleted. + +2001-07-11 MORIOKA Tomohiko + + * text-coding.c (BYTE_BIG5_TWO_BYTE_1_P): Support private area + 0x81- in XEmacs UTF-2000. + (detect_coding_big5): Likewise. + +2001-07-09 MORIOKA Tomohiko + + * mule-charset.c (Fdefine_char): Don't use a CCS property to + generate character-id if the CCS property does not have + corresponding predefined character. + (make_builtin_char): Return -1 if corresponding predefined + character is not found. + (Fdecode_char): Return nil if corresponding character is not + found. + (complex_vars_of_mule_charset): Change `ucs-cns' to 256^3-set and + don't map to builtin ucs space. + +2001-07-06 MORIOKA Tomohiko + + * char-ucs.h (MAX_LEADING_BYTE_PRIVATE): Fixed. + (MAX_CHAR_GT): Changed to `(MIN_CHAR_GT + 66773)'. + +2001-07-05 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_ideograph_gt): New variable. + (Vcharset_ideograph_gt_pj_{1..11}): Likewise. + (Qideograph_gt): Likewise. + (Qideograph_gt_pj_{1..11}): Likewise. + (syms_of_mule_charset): Add `ideograph-gt', `ideograph-gt-pj-1', + `ideograph-gt-pj-2', ..., `ideograph-gt-pj-10' and + `ideograph-gt-pj-11'. + (complex_vars_of_mule_charset): Add coded-charset `ideograph-gt', + `ideograph-gt-pj-1', `ideograph-gt-pj-2', ..., + `ideograph-gt-pj-10' and `ideograph-gt-pj-11'. + + * char-ucs.h (LEADING_BYTE_GT): New macro. + (LEADING_BYTE_GT_PJ_{1..11}): Likewise. + (MIN_CHAR_GT): Likewise. + (MAX_CHAR_GT): Likewise. + +2001-06-14 MORIOKA Tomohiko + + * lisp-disunion.h (XCHARVAL): New implementation for UTF-2000 to + support U-60000000 .. U-7FFFFFFF with 32 bits architecture. + + * doprnt.c (unsigned_int_converters): Add `c'. + (emacs_doprnt_1): Use `XUINT' for unsigned integers. + + * char-ucs.h (MIN_CHAR_DAIKANWA): Don't refer `MIN_CHAR_MOJIKYO'. + (MAX_CHAR_DAIKANWA): Refer `MIN_CHAR_DAIKANWA' instead of + `MIN_CHAR_MOJIKYO'. + (MIN_CHAR_MOJIKYO_0): New macro; refer `MIN_CHAR_DAIKANWA'. + (MAX_CHAR_MOJIKYO_0): New macro. + (MIN_CHAR_MOJIKYO): Changed to 0x60000000. + +2001-06-13 MORIOKA Tomohiko + + * mule-charset.c (Fdefine_char): Delete cemented out code. + (encode_builtin_char_1): Modify for new allocation of builtin + Mojikyo characters. + + * lisp-disunion.h (XCHARVAL): Cast the argument into EMACS_UINT. + +2001-06-04 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_ucs_cns): New variable. + (Qucs_cns): New variable. + (syms_of_mule_charset): Add new symbol `ucs-cns'. + (complex_vars_of_mule_charset): Add new coded-charset `ucs-cns'. + +2001-05-29 MORIOKA Tomohiko + + * char-ucs.h (LEADING_BYTE_UCS_CNS): New macro. + +2000-12-09 MORIOKA Tomohiko + + * search.c (search_buffer): Make `charset_base_code' as + character-id >> 6 to eliminate the corresponding last byte in + UTF-8 representation [I'm not sure it is right thing]. + (boyer_moore): Likewise. + +2000-12-09 MORIOKA Tomohiko + + * emacs.c (vars_of_emacs): Convert XEMACS_CODENAME to internal + representation in MULE. + +2000-11-29 MORIOKA Tomohiko + + * text-coding.c (Fmake_coding_system): Use + `EXTERNAL_PROPERTY_LIST_LOOP_3' instead of + `EXTERNAL_PROPERTY_LIST_LOOP'. + +2000-11-28 MORIOKA Tomohiko + + * text-coding.c (decode_output_utf8_partial_char): New function. + (decode_coding_utf8): Use `decode_output_utf8_partial_char'. + +2000-11-28 MORIOKA Tomohiko + + * text-coding.c (decode_coding_utf8): Output original byte + sequence if it is broken; change order of conditions. + + * mb-utf-8.h (REP_BYTES_BY_FIRST_BYTE): Use Bufbyte; reverse order + of conditions. + + * mb-multibyte.h (BYTE_ASCII_P): + Use bit ops for char-signedness safety. + (BYTE_C0_P): Use bit ops for char-signedness safety. + (BYTE_C1_P): Use bit ops for char-signedness safety. + + * character.h: (XCHAR_OR_CHAR_INT): + Always use inline function. + Remove redundant type checking assert() - XINT will abort quite + nicely. + +2000-11-27 MORIOKA Tomohiko + + * text-coding.c: (Fencode_shift_jis_char): + (Fencode_big5_char): + Docstring arglist/Texinfo fixes. See man/ChangeLog for details. + Replace 0 with '\0' when working with bytes. + Replace initial "(" with "\(" in docstrings. + + (Fmake_coding_system): + When type is ccl and value is vector, register it with a proper + symbol. And checks whether the given ccl program is valid. + (mule_decode): When calling ccl_driver, if src indicates + NULL pointer, set an empty string instead. + (mule_encode): Likewise. + + (detect_eol_type): + (detect_coding_sjis): + (decode_coding_sjis): + (detect_coding_big5): + (decode_coding_big5): + (detect_coding_ucs4): + (decode_coding_ucs4): + (detect_coding_utf8): + (decode_coding_utf8): + (detect_coding_iso2022): + (decode_coding_iso2022): + (decode_coding_no_conversion): + (mule_decode): + Make all detecting and decoding functions take an Extbyte * arg. + (text_encode_generic): + (encode_coding_big5): + (encode_coding_no_conversion): + (mule_encode): + Make all encoding functions take a Bufbyte * arg. + Use size_t instead of unsigned int for memory sizes. + Only cast to unsigned char whenever dereferencing Extbyte *. + + (struct lrecord_description fcd_description_1): Use countof. + (complex_vars_of_file_coding): + Use countof instead of sizeof. + Use CHECK_NATNUM instead of CHECK_INT. + +2000-11-09 MORIOKA Tomohiko + + * mule-charset.c (Fget_char_attribute): Add new optional argument + `default-value'. + (put_char_ccs_code_point): Modify for `Fget_char_attribute'. + (remove_char_ccs): Likewise. + +2000-10-05 MORIOKA Tomohiko + + * text-coding.c (char_encode_shift_jis): New implementation in + UTF-2000. + (decode_coding_big5): Use `DECODE_CHAR (Vcharset_chinese_big5, + ...)'. + + * mule-charset.c (Vcharset_chinese_big5): New variable in + UTF-2000. + (Qchinese_big5): New variable in UTF-2000. + (BIG5_SAME_ROW): New macro in UTF-2000. + (make_builtin_char): Use builtin characters of + `Vcharset_chinese_big5_1' and `Vcharset_chinese_big5_2' as builtin + characters of `Vcharset_chinese_big5'. + (syms_of_mule_charset): Add new symbol `chinese-big5' in UTF-2000. + (complex_vars_of_mule_charset): Add new coded-charset + `chinese-big5' in UTF-2000. + + * char-ucs.h (LEADING_BYTE_CHINESE_BIG5): New macro. + (Vcharset_chinese_big5): New external variable declaration. + (Vcharset_japanese_jisx0208_1990): Likewise. + +2000-07-28 MORIOKA Tomohiko + + * mule-charset.c (expand_uint8_byte_table_to_uint16): New + function. + (put_byte_table): Use `expand_uint8_byte_table_to_uint16'. + +2000-07-26 MORIOKA Tomohiko + + * mule-charset.c (complex_vars_of_mule_charset): Define new macro + `DEF_MOJIKYO_PJ' in UTF-2000; use `DEF_MOJIKYO_PJ' to define + `mojikyo-pj-*'; add "MojikyoPJ-*" to charset-registry of + `mojikyo-pj-*'. + +2000-07-24 MORIOKA Tomohiko + + * text-coding.c (decode_coding_big5): Modify for UTF-2000. + +2000-07-24 MORIOKA Tomohiko + + * mule-charset.c (vars_of_mule_charset): Update `utf-2000-version' + to 0.17. + +2000-07-22 MORIOKA Tomohiko + + * file-coding.c (ucs_to_char): Don't use `CHARSET_TYPE_*'; modify + for `CHARSET_BY_ATTRIBUTES'. + (parse_iso2022_esc): Don't use `CHARSET_TYPE_*'; modify for + `CHARSET_BY_ATTRIBUTES'. + + * text-coding.c (struct decoding_stream): Rename member `CH' to + `CPOS'. + (reset_decoding_stream): Use `str->cpos' instead of `str->ch'. + (decode_coding_sjis): Likewise. + (decode_coding_big5): Likewise. + (decode_coding_ucs4): Likewise. + (decode_coding_utf8): Likewise. + (parse_iso2022_esc): Don't use `CHARSET_TYPE_*'; modify for + `CHARSET_BY_ATTRIBUTES'. + (decode_coding_iso2022): Use `str->cpos' instead of `str->ch'; use + `str->counter'; decode 3, 4 bytes sets. + (char_encode_iso2022): Don't use `BREAKUP_CHAR'; encode 3, 4 bytes + sets. + (decode_coding_no_conversion): Use `str->cpos' instead of + `str->ch'. + + * mule-charset.c (Vcharset_mojikyo_2022_1): New variable. + (Qmojikyo_2022_1): New variable. + (make_charset): Don't use `CHARSET_TYPE_*'. + (range_charset_code_point): Support coded-charset + `mojikyo-2022-1'. + (encode_builtin_char_1): Modify for `CHARSET_BY_ATTRIBUTES'. + (Fmake_charset): Don't use `CHARSET_TYPE_*'; modify for + `CHARSET_BY_ATTRIBUTES'. + (Fcharset_from_attributes): Don't use `CHARSET_TYPE_*'; modify for + `CHARSET_BY_ATTRIBUTES'. + (syms_of_mule_charset): Add new symbol `mojikyo-2022-1'. + (complex_vars_of_mule_charset): Add new coded-charset + `mojikyo-2022-1'. + + * mule-charset.h (CHARSET_BY_ATTRIBUTES): New implementation and + interface; changed to inline function. + + * char-ucs.h (Vcharset_mojikyo_2022_1): New variable. + (LEADING_BYTE_MOJIKYO_2022_1): New macro. + (LEADING_BYTE_MOJIKYO_2022_2): New macro. + (CHARSET_TYPE_94): Deleted. + (CHARSET_TYPE_94X94): Deleted. + (CHARSET_TYPE_96): Deleted. + (CHARSET_TYPE_96X96): Deleted. + (CHARSET_TYPE_128): Deleted. + (CHARSET_TYPE_128X128): Deleted. + (CHARSET_TYPE_256): Deleted. + (CHARSET_TYPE_256X256): Deleted. + (CHARSET_BY_ATTRIBUTES): New implementation and interface; changed + to inline function. + (DECODE_MOJIKYO_2022): New inline function. + (DECODE_CHAR): Use `DECODE_MOJIKYO_2022'; decode + `Vcharset_mojikyo_2022_1'. + +2000-07-18 MORIOKA Tomohiko + + * mule-charset.c (byte_table_same_value_p): Use `internal_equal' + instead of `EQ'. + (put_byte_table): Likewise. + (char_id_table_equal): Use `get_byte_table' [new implementation]. + +2000-07-17 MORIOKA Tomohiko + + * mule-charset.c: Include in UTF-2000. + (BT_UINT8_MIN): New macro in UTF-2000. + (BT_UINT8_MAX): New macro in UTF-2000. + (BT_UINT8_t): New macro in UTF-2000. + (BT_UINT8_nil): New macro in UTF-2000. + (BT_UINT8_unbound): New macro in UTF-2000. + (INT_UINT8_P): New inline function in UTF-2000. + (UINT8_VALUE_P): New inline function in UTF-2000. + (UINT8_ENCODE): New inline function in UTF-2000. + (UINT8_DECODE): New inline function in UTF-2000. + (mark_uint8_byte_table): New function in UTF-2000. + (print_uint8_byte_table): New function in UTF-2000. + (uint8_byte_table_equal): New function in UTF-2000. + (uint8_byte_table_hash): New function in UTF-2000. + (make_uint8_byte_table): New function in UTF-2000. + (uint8_byte_table_same_value_p): New function in UTF-2000. + (BT_UINT16_MIN): New macro in UTF-2000. + (BT_UINT16_MAX): New macro in UTF-2000. + (BT_UINT16_t): New macro in UTF-2000. + (BT_UINT16_nil): New macro in UTF-2000. + (BT_UINT16_unbound): New macro in UTF-2000. + (INT_UINT16_P): New inline function in UTF-2000. + (UINT16_VALUE_P): New inline function in UTF-2000. + (UINT16_ENCODE): New inline function in UTF-2000. + (UINT16_DECODE): New inline function in UTF-2000. + (UINT8_TO_UINT16): New inline function in UTF-2000. + (mark_uint16_byte_table): New function in UTF-2000. + (print_uint16_byte_table): New function in UTF-2000. + (uint16_byte_table_equal): New function in UTF-2000. + (uint16_byte_table_hash): New function in UTF-2000. + (make_uint16_byte_table): New function in UTF-2000. + (uint16_byte_table_same_value_p): New function in UTF-2000. + (print_byte_table): New function in UTF-2000. + (byte-table): Use `print_byte_table' as printer. + (make_byte_table): Delete second argument `older'. + (byte_table_same_value_p): New function in UTF-2000. + (copy_byte_table): Deleted. + (get_byte_table): New function in UTF-2000. + (put_byte_table): New function in UTF-2000. + (print_char_id_table): New function in UTF-2000. + (char-id-table): Use `print_char_id_table' as printer. + (make_char_id_table): Delete second argument `older'. + (get_char_id_table): Use `get_byte_table [new implementation]. + (put_char_id_table): Use `get_byte_table and `put_byte_table' [new + implementation]. + (Ffind_char_attribute_table): New function in UTF-2000. + (mark_charset): Mark `cs->encoding_table' in UTF-2000. + (syms_of_mule_charset): Add LRECORD_IMPLEMENTATION + `uint8_byte_table' and `uint16_byte_table' in UTF-2000. + (syms_of_mule_charset): Add new function + `find-char-attribute-table' in UTF-2000. + + * lrecord.h (enum lrecord_type): Add + `lrecord_type_uint16_byte_table' and + `lrecord_type_uint8_byte_table'. + + * char-ucs.h (struct Lisp_Uint8_Byte_Table): New structure. + (Lisp_Uint8_Byte_Table): New type. + (XUINT8_BYTE_TABLE): New macro. + (XSETUINT8_BYTE_TABLE): New macro. + (UINT8_BYTE_TABLE_P): New macro. + (GC_UINT8_BYTE_TABLE_P): New macro. + (struct Lisp_Uint16_Byte_Table): New structure. + (Lisp_Uint16_Byte_Table): New type. + (XUINT16_BYTE_TABLE): New macro. + (XSETUINT16_BYTE_TABLE): New macro. + (UINT16_BYTE_TABLE_P): New macro. + (GC_UINT16_BYTE_TABLE_P): New macro. + +2000-07-13 MORIOKA Tomohiko + + * mule-charset.c (Vcharacter_ideographic_radical_table): Deleted. + (Vcharacter_ideographic_strokes_table): Deleted. + (Vcharacter_total_strokes_table): Deleted. + (Vcharacter_morohashi_daikanwa_table): Deleted. + (Vcharacter_decomposition_table): Deleted. + (Qname): Deleted because it is duplicated. + (Qideographic_radical): Deleted. + (Qideographic_strokes): Deleted. + (Qtotal_strokes): Deleted. + (Qmorohashi_daikanwa): Deleted. + (Fchar_attribute_alist): Use `Vchar_attribute_hash_table' for + `ideographic-radical', `ideographic-strokes', `total-strokes', + `morohashi-daikanwa' and `->decomposition'. + (Fget_char_attribute): Likewise. + (Fput_char_attribute): Likewise; use `make-vector' instead of + `make_older_vector' for `->decomposition' value. + (Fdefine_char): Comment out code to check `morohashi-daikanwa' and + `ideograph-daikanwa'. + (syms_of_mule_charset): Delete builtin symbols `name', + `ideographic-radical', `ideographic-strokes', `total-strokes' and + `morohashi-daikanwa'. + (vars_of_mule_charset): Don't setup + `Vcharacter_ideographic_radical_table', + `Vcharacter_ideographic_strokes_table', + `Vcharacter_total_strokes_table', + `Vcharacter_morohashi_daikanwa_table' and + `Vcharacter_decomposition_table'. + +2000-06-30 MORIOKA Tomohiko + + * alloc.c: Use `HAVE_GGC' instead of `UTF2000' for + `make_older_vector', `make_vector_newer_1' and + `make_vector_newer'. + + * lisp.h: Use `HAVE_GGC' instead of `UTF2000' for + `make_older_vector' and `make_vector_newer'. + + * config.h.in (HAVE_GGC): New macro. + +2000-06-16 MORIOKA Tomohiko + + * mule-charset.c (struct char_attribute_list_closure): New + structure in UTF-2000. + (add_char_attribute_to_list_mapper): New function in UTF-2000. + (Fchar_attribute_list): Likewise. + (Fset_charset_mapping_table): Use `make_vector_newer'. + (Fdecode_builtin_char): New function in UTF-2000. + (syms_of_mule_charset): Add new function `char-attribute-list' and + `decode-builtin-char' in UTF-2000. + + * lisp.h (make_vector_newer): New prototype. + + * alloc.c (make_vector_newer_1): New function. + (make_vector_newer): New function. + +2000-06-14 MORIOKA Tomohiko + + * char-ucs.h (MAX_CHAR_DAIKANWA): Changed to `(MIN_CHAR_MOJIKYO + + 50100)'. + +2000-06-12 MORIOKA Tomohiko + + * mule-charset.c (Vchar_attribute_hash_table): New variable. + (Vcharacter_attribute_table): Deleted. + (Vcharacter_name_table): Deleted. + (put_char_attribute): Deleted. + (remove_char_attribute): Deleted. + (struct char_attribute_alist_closure): New structure. + (add_char_attribute_alist_mapper): New function. + (Fchar_attribute_alist): Use `Vchar_attribute_hash_table' instead + of `Vcharacter_attribute_table' and `Vcharacter_name_table'. + (Fget_char_attribute): Likewise. + (Fput_char_attribute): Likewise. + (Fremove_char_attribute): Use `Vchar_attribute_hash_table' instead + of `remove_char_attribute'. + (Fdefine_char): Return character. + (vars_of_mule_charset): Don't setup `Vcharacter_attribute_table' + and `Vcharacter_name_table'. + (complex_vars_of_mule_charset): Likewise + `Vchar_attribute_hash_table'. + +2000-06-10 MORIOKA Tomohiko + + * character.h (CHARC_CHARSET): New macro. + (CHARC_CHARSET_ID): New macro. + (CHARC_CODE_POINT): New macro. + (CHARC_COLUMNS): New macro. + (CHARC_TO_CHAR): New inline function. + (CHARC_EQ): New inline function. + (CHARC_ASCII_EQ): New inline function. + (CHARC_IS_SPACE): New inline function. + (ASCII_TO_CHARC): New inline function. + + * char-ucs.h (encode_char_2): Deleted. + (ENCODE_CHAR): Use `encode_char_1' again. + (breakup_char_1): Likewise. + (CHAR_TO_CHARC): New inline function. + + * char-lb.h, char-1byte.h (CHAR_TO_CHARC): New inline function. + +2000-06-09 MORIOKA Tomohiko + + * redisplay.c (add_emchar_rune): Use `ASCII_TO_CHARC', + `CHAR_TO_CHARC' and `CHARC_CHARSET'. + (create_text_block): Use `CHARC_ASCII_EQ' and `CHARC_IS_SPACE'. + (generate_formatted_string_db): Use `CHARC_TO_CHAR'. + (create_string_text_block): Use `CHARC_ASCII_EQ' and + `CHARC_IS_SPACE'. + (pixel_to_glyph_translation): Use `CHARC_ASCII_EQ'. + + * redisplay-x.c (separate_textual_runs): Use `CHARC_CHARSET' and + `CHARC_CODE_POINT'. + (x_output_display_block): Use `CHARC_CHARSET' and + `CHARC_ASCII_EQ'. + + * redisplay-tty.c (tty_output_display_block): Use + `CHARC_ASCII_EQ'. + (tty_output_display_block): Likewise; use `ASCII_TO_CHARC'. + + * redisplay-output.c (compare_runes): Use `CHARC_EQ'. + + * insdel.c (find_charsets_in_charc_string): Use + `CHARC_CHARSET_ID'. + (charc_string_displayed_columns): Use `CHARC_COLUMNS'. + (convert_bufbyte_string_into_charc_dynarr): Use `CHAR_TO_CHARC'. + (convert_charc_string_into_bufbyte_dynarr): Use `CHARC_TO_CHAR'. + (convert_charc_string_into_malloced_string): Likewise. + +2000-06-09 MORIOKA Tomohiko + + * toolbar-x.c (x_output_toolbar_button): Use + instead of for buf; use + `convert_bufbyte_string_into_charc_dynarr' instead of + `convert_bufbyte_string_into_emchar_dynarr'; use + `find_charsets_in_charc_string' instead of + `find_charsets_in_emchar_string'. + + * redisplay.h: + - Include "character.h". + (struct rune): New member `cglyph'; delete member `chr'. + + * redisplay.c (redisplay_text_width_charc_string): New function; + delete `redisplay_text_width_emchar_string'. + (rtw_charc_dynarr): New variable; renamed from + `rtw_emchar_dynarr'. + (redisplay_text_width_string): Use `rtw_charc_dynarr' instead of + `rtw_emchar_dynarr'; use + `convert_bufbyte_string_into_charc_dynarr' instead of + `convert_bufbyte_string_into_emchar_dynarr'; use + `redisplay_text_width_charc_string' instead of + `redisplay_text_width_emchar_string'. + (redisplay_frame_text_width_string): Use `rtw_charc_dynarr' + instead of `rtw_emchar_dynarr'; use + `convert_bufbyte_string_into_charc_dynarr' instead of + `convert_bufbyte_string_into_emchar_dynarr'. + (add_emchar_rune): Add instead of ; use + `redisplay_text_width_charc_string' instead of + `redisplay_text_width_emchar_string'. + (create_text_block): Modify for change. + (generate_formatted_string_db): Likewise. + (create_string_text_block): Likewise. + (pixel_to_glyph_translation): Likewise. + + * redisplay-x.c (separate_textual_runs): Use + instead of . + (x_text_width): Likewise. + (x_output_display_block): Use instead + ; modify for change. + (x_output_string): Use instead of . + + * redisplay-tty.c (tty_text_width): Use instead of + ; use `charc_string_displayed_columns' instead of + `emchar_string_displayed_columns'. + (tty_output_display_block): Use instead of + for buf; modify for change; use + `tty_output_charc_dynarr' instead of `tty_output_emchar_dynarr'. + (tty_output_charc_dynarr_dynarr): New variable; renamed from + `tty_output_emchar_dynarr_dynarr'. + (tty_output_charc_dynarr): New function; delete + `tty_output_charc_dynarr'. + + * redisplay-output.c (compare_runes): Modify for `struct rune'. + (redisplay_output_layout): Use instead of + for buf; use + `convert_bufbyte_string_into_charc_dynarr' instead of + `convert_bufbyte_string_into_emchar_dynarr'. + + * frame.c (title_string_charc_dynarr): New variable; renamed from + `title_string_emchar_dynarr'. + (generate_title_string): Use `title_string_charc_dynarr' instead + of `title_string_emchar_dynarr'; use + `convert_charc_string_into_malloced_string' instead of + `convert_emchar_string_into_malloced_string'. + (init_frame): Use `title_string_charc_dynarr' instead of + `title_string_emchar_dynarr'. + + * console.h: + - Include "character.h". + (struct console_methods): Use instead of in `text_width_method'; use instead of + in output_string_method. + + * console-x.h (x_output_string): Use instead of + . + + * console-stream.c (stream_text_width): Use + instead of . + + * character.h (Charc_dynarr): New type. + + * char-ucs.h (structure Charc): New structure; define new type + `Charc'. + + * char-lb.h (DECODE_CHAR): New inline function. + (encode_char_1): New inline function. + (ENCODE_CHAR): New macro. + (structure Charc): New structure; define new type `Charc'. + + * char-1byte.h (Vcharset_control_1): New macro. + (Vcharset_latin_iso8859_1): New macro. + (DECODE_CHAR): New inline function. + (encode_char_1): New inline function. + (ENCODE_CHAR): New macro. + (structure Charc): New structure; define new type `Charc'. + + * insdel.c (find_charsets_in_charc_string): New function; delete + `find_charsets_in_emchar_string'. + (charc_string_displayed_columns): New function; delete + `emchar_string_displayed_columns'. + (convert_bufbyte_string_into_charc_dynarr): New function; delete + `convert_bufbyte_string_into_emchar_dynarr'. + (convert_charc_string_into_bufbyte_dynarr): New function; delete + `convert_charc_string_into_bufbyte_dynarr'. + (convert_charc_string_into_malloced_string): New function; delete + `convert_charc_string_into_malloced_string'. + + * buffer.h (find_charsets_in_charc_string): New prototype; delete + `find_charsets_in_emchar_string'. + (charc_string_displayed_columns): New prototype; delete + `emchar_string_displayed_columns'. + (convert_charc_string_into_bufbyte_dynarr): New prototype; delete + `convert_charc_string_into_bufbyte_dynarr'. + (convert_charc_string_into_malloced_string): New prototype; delete + `convert_charc_string_into_malloced_string'. + +2000-06-08 MORIOKA Tomohiko + + * select-x.c (Fx_store_cutbuffer_internal): Modify for UTF-2000. + +2000-06-07 MORIOKA Tomohiko + + * chartab.h (get_non_ascii_char_table_value): Use . + + * char-ucs.h: Use for . + + * mule-charset.h, char-1byte.h: Use for + . + +2000-06-02 MORIOKA Tomohiko + + * mule-charset.c (vars_of_mule_charset): Update `utf-2000-version' + to 0.16. + +2000-06-02 MORIOKA Tomohiko + + * mule-charset.c (Vcharacter_morohashi_daikanwa_table): New + variable. + (Qmorohashi_daikanwa): New variable. + (Fchar_attribute_alist): Use `Vcharacter_morohashi_daikanwa_table' + for `morohashi-daikanwa' attribute. + (Fget_char_attribute): Likewise. + (Fput_char_attribute): Likewise. + (Fdefine_char): Don't setup `morohashi-daikanwa' attribute if it + has the same value of `ideograph-daikanwa'. + (syms_of_mule_charset): Add new symbol `morohashi-daikanwa'. + (vars_of_mule_charset): Setup + `Vcharacter_morohashi_daikanwa_table'. + +2000-06-02 MORIOKA Tomohiko + + * mule-charset.c (Fchar_attribute_alist): Add coded-charset + attributes. + (add_charset_to_list_mapper): Add `key' instead of + `XCHARSET_NAME (value)' to return aliases. + +2000-06-02 MORIOKA Tomohiko + + * mule-charset.c (Vcharacter_ideographic_radical_table): New + variable. + (Vcharacter_ideographic_strokes_table): New variable. + (Qideographic_radical): New variable. + (Qideographic_strokes): New variable. + (Fchar_attribute_alist): Use + `Vcharacter_ideographic_radical_table' for `ideographic-radical' + attribute; use `Vcharacter_ideographic_strokes_table' for + `ideographic-strokes' attribute. + (Fget_char_attribute): Likewise. + (Fput_char_attribute): Likewise. + (syms_of_mule_charset): Add new symbol `ideographic-radical' and + `ideographic-strokes'. + (vars_of_mule_charset): Setup + `Vcharacter_ideographic_radical_table' and + `Vcharacter_ideographic_strokes_table'. + +2000-06-02 MORIOKA Tomohiko + + * mule-charset.c (Vcharacter_total_strokes_table): New variable. + (Qtotal_strokes): New variable. + (Fchar_attribute_alist): Use `Vcharacter_total_strokes_table' for + `total-strokes' attribute. + (Fget_char_attribute): Likewise. + (Fput_char_attribute): Likewise. + (syms_of_mule_charset): Add new symbol `total-strokes'. + (vars_of_mule_charset): Setup `Vcharacter_total_strokes_table'. + +2000-06-02 MORIOKA Tomohiko + + * mule-charset.c (Vcharacter_decomposition_table): New variable. + (Fchar_attribute_alist): Add `name' and `->decomposition' if they + are found. + (Fget_char_attribute): Use `Vcharacter_decomposition_table' for + `->decomposition' attribute. + (Fput_char_attribute): Likewise. + (vars_of_mule_charset): Setup `Vcharacter_decomposition_table'. + +2000-06-01 MORIOKA Tomohiko + + * mule-charset.c (decoding_table_check_elements): New function. + (Fset_charset_mapping_table): Use `decoding_table_check_elements'. + +2000-05-31 MORIOKA Tomohiko + + * mule-charset.c (Fset_charset_mapping_table): Use + `put_char_ccs_code_point'. + +2000-05-31 MORIOKA Tomohiko + + * mule-charset.c (decoding_table_put_char): New inline function. + (put_char_ccs_code_point): Use `decoding_table_put_char'. + +2000-05-31 MORIOKA Tomohiko + + * mule-charset.c (CHARSET_BYTE_SIZE): New inline function. + (XCHARSET_BYTE_SIZE): New macro. + (decoding_table_remove_char): New inline function. + (put_char_ccs_code_point): Use `XCHARSET_BYTE_SIZE'; use + `decoding_table_remove_char'. + (remove_char_ccs): Use `decoding_table_remove_char'. + (Fset_charset_mapping_table): Use `CHARSET_BYTE_SIZE'. + +2000-05-31 MORIOKA Tomohiko + + * mule-charset.c (Vcharacter_name_table): New variable. + (Qname): New variable. + (Fget_char_attribute): Use `Vcharacter_name_table' for `name' + attribute. + (Fput_char_attribute): Use function `put_char_ccs_code_point'; use + `Vcharacter_name_table' for `name' attribute. + (Fremove_char_attribute): Use function `remove_char_ccs'. + (put_char_ccs_code_point): New function. + (remove_char_ccs): New function. + (syms_of_mule_charset): Add new symbol `name'. + (vars_of_mule_charset): Setup `Vcharacter_name_table'. + +2000-05-30 MORIOKA Tomohiko + + * mule-charset.c (make_byte_table): Add new argument `older'. + (make_char_id_table): Likewise. + (copy_char_id_table): Comment out because it is not used. + (put_char_id_table): Modify for `make_byte_table'. + (Fput_char_attribute): Make encoding_table as older object; + inherit older bit of `Vcharacter_composition_table'. + (mark_charset): Don't mark `cs->encoding_table'. + (vars_of_mule_charset): Make `Vcharacter_attribute_table' as a + normal object; make `Vcharacter_composition_table' as an older + object; delete staticpro for `Vcharacter_composition_table'; make + `Vcharacter_variant_table' as a normal object. + + * alloc.c (alloc_older_lcrecord): New function in UTF-2000. + (mark_object): Don't check older object in UTF-2000. + + * lrecord.h (struct lrecord_header): Add new member `older' in + UTF-2000. + (set_lheader_implementation): Setup `SLI_header->older' in + UTF-2000. + (set_lheader_older_implementation): New macro in UTF-2000. + (OLDER_RECORD_P): New macro in UTF-2000. + (OLDER_RECORD_HEADER_P): New macro in UTF-2000. + (alloc_older_lcrecord): New prototype in UTF-2000. + (alloc_older_lcrecord_type): New macro in UTF-2000. + +2000-05-29 MORIOKA Tomohiko + + * mule-charset.c (byte_table_description): Use + `XD_LISP_OBJECT_ARRAY' instead of `XD_LISP_OBJECT'. + (char_id_table_description): Delete bogus `, 1'. + (Fget_char_attribute): Refer encoding_table of each coded-charset + to get value of coded-charset attribute of a character. + (Fput_char_attribute): Use `make_older_vector' instead of + `make_vector'; use encoding_table of each coded-charset to store + value of coded-charset attribute of a character. + (Fremove_char_attribute): Use encoding_table of each coded-charset + to store value of coded-charset attribute of a character. + (mark_charset): Mark `cs->encoding_table'; don't mark + `cs->decoding_table'. + (charset_description): Add description of new member + `encoding_table'. + (make_charset): Initialize `encoding_table'. + + * char-ucs.h (struct Lisp_Charset): Add new member + `encoding_table'. + (CHARSET_ENCODING_TABLE): New macro. + (XCHARSET_ENCODING_TABLE): New macro. + (charset_code_point): New implementation. + (encode_char_1): Likewise. + + * alloc.c (all_older_lcrecords): New variable in UTF-2000. + (disksave_object_finalization_1): Call finalizers of + `all_older_lcrecords' in UTF-2000. + (make_older_vector): New function in UTF-2000. + (reinit_alloc_once_early): Initialize `all_older_lcrecords' in + UTF-2000. + + * lisp.h (make_older_vector): New prototype in UTF-2000. + +2000-05-22 MORIOKA Tomohiko + + * lrecord.h (enum lrecord_type): Rename + `lrecord_type_char_code_table' to `lrecord_type_char_id_table'. + + * text-coding.c (COMPOSE_ADD_CHAR): Use `CHAR_ID_TABLE_P' and + `get_char_id_table' instead of `CHAR_CODE_TABLE_P' and + `get_char_code_table'. + + * mule-charset.c (mark_char_id_table): Renamed from + `mark_char_code_table'. + (char_id_table_equal): Renamed from `char_code_table_equal'. + (char_id_table_hash): Renamed from `char_code_table_hash'. + (make_char_id_table): Renamed from `make_char_code_table'. + (copy_char_id_table): Renamed from `copy_char_code_table'. + (get_char_id_table): Renamed from `get_char_code_table'. + (put_char_id_table): Renamed from `put_char_code_table'. + (to_char_id): Renamed from `to_char_code'. + + * char-ucs.h (struct Lisp_Char_ID_Table): Renamed from + `Lisp_Char_Code_Table'. + (char_id_table): Renamed from `char_code_table'. + (XCHAR_ID_TABLE): Renamed from `XCHAR_CODE_TABLE'. + (XSETCHAR_ID_TABLE): Renamed from `XSETCHAR_CODE_TABLE'. + (CHAR_ID_TABLE_P): Renamed from `CHAR_CODE_TABLE_P'. + (GC_CHAR_ID_TABLE_P): Renamed from `GC_CHAR_CODE_TABLE_P'. + (get_char_id_table): Renamed from `get_char_code_table'. + +2000-05-22 MORIOKA Tomohiko + + * lrecord.h (enum lrecord_type): Rename + `lrecord_type_char_byte_table' to `lrecord_type_byte_table'. + + * mule-charset.c (mark_byte_table): Renamed from + `mark_char_byte_table'. + (byte_table_equal): Renamed from `char_byte_table_equal'. + (byte_table_hash): Renamed from `byte_table_hash'. + (make_byte_table): Renamed from `make_byte_table'. + (copy_byte_table): Renamed from `copy_char_byte_table'. + + * char-ucs.h (struct Lisp_Byte_Table): Renamed from + `Lisp_Char_Byte_Table'. + (byte_table): Renamed from `char_byte_table'. + (XBYTE_TABLE): Renamed from `XCHAR_BYTE_TABLE'. + (XSETBYTE_TABLE): Renamed from `XSET_CHAR_BYTE_TABLE'. + (BYTE_TABLE_P): Renamed from `XBYTE_TABLE_P'. + (GC_BYTE_TABLE_P): Renamed from `GC_CHAR_BYTE_TABLE_P'. + +2000-05-02 MORIOKA Tomohiko + + * buffer.c (dfc_convert_to_external_format): Modify for UTF-2000. + (dfc_convert_to_internal_format): Likewise. + + * text-coding.c (Fcoding_system_canonical_name_p): New function. + * text-coding.c (Fcoding_system_alias_p): New function. + * text-coding.c (Fcoding_system_aliasee): New function. + * text-coding.c (append_suffix_to_symbol): New function. + * text-coding.c (dangling_coding_system_alias_p): New function. + * text-coding.c (Ffind_coding_system): + * text-coding.c (Fcopy_coding_system): + * text-coding.c (encode_coding_no_conversion): + * text-coding.c (syms_of_file_coding): + * text-coding.c (vars_of_file_coding): + Rewrite coding system alias code. + Allow nested aliases, like symbolic links. + Allow redefinition of coding system aliases. + Prevent existence of dangling coding system aliases. + Eliminate convert_to_external_format. + Eliminate convert_to_internal_format. + + * text-coding.c: Change enum eol_type to eol_type_t. + +2000-05-02 MORIOKA Tomohiko + + * mule-charset.c (encode_builtin_char_1): Limit builtin-code-range + of `mojikyo' to MIN_CHAR_MOJIKYO + 94 * 60 * 22. + + * char-ucs.h (MAX_CHAR_MOJIKYO): Limit builtin-code-range to + MIN_CHAR_MOJIKYO + 94 * 60 * 22. + +2000-04-28 MORIOKA Tomohiko + + * mule-charset.c (encode_builtin_char_1): Use `mojikyo' instead of + `ideograph-daikanwa'. + + * char-ucs.h (Vcharset_ucs): Deleted because it is not used. + (Vcharset_ucs_bmp): Likewise. + (Vcharset_mojikyo): Add new extern variable definition. + (Vcharset_latin_iso8859_2): Deleted because it is not used. + (Vcharset_latin_iso8859_3): Likewise. + (Vcharset_latin_iso8859_4): Likewise. + (Vcharset_latin_iso8859_9): Likewise. + (Vcharset_latin_viscii_lower): Likewise. + (Vcharset_latin_viscii_upper): Likewise. + (DECODE_CHAR): If charset is `mojikyo-pj-N', corresponding + `mojikyo' code-point is used to decode. + (encode_char_2): New function [to convert `mojikyo' code-point to + Mojikyo font encoding]. + (ENCODE_CHAR): Use `encode_char_2' instead of `encode_code_1'. + (breakup_char_1): Likewise. + (CHAR_CHARSET): Use `ENCODE_CHAR' instead of `BREAKUP_CHAR'. + +2000-04-27 MORIOKA Tomohiko + + * text-coding.c (Fmake_coding_system): Add document about + `disable-composition' property. + +2000-04-27 MORIOKA Tomohiko + + * text-coding.c (Qdisable_composition): New variable; delete + `Qcomposite'. + (Fmake_coding_system): Add new property `disable-composite'; + delete property `composite'. + (COMPOSE_ADD_CHAR): Use `CODING_SYSTEM_DISABLE_COMPOSITION' + instead of `!CODING_SYSTEM_COMPOSITE'. + (syms_of_file_coding): Add new symbol `disable-composition'; + delete symbol `composite'. + + * file-coding.h (struct Lisp_Coding_System): Add + `disable_composition'; delete `enable_composition'. + (CODING_SYSTEM_DISABLE_COMPOSITION): New macro; delete + `CODING_SYSTEM_COMPOSITE'. + (XCODING_SYSTEM_DISABLE_COMPOSITION): New macro; delete + `XCODING_SYSTEM_COMPOSITE'. + +2000-04-27 MORIOKA Tomohiko + + * mule-charset.c (vars_of_mule_charset): Update `utf-2000-version' + to 0.15. + +2000-04-26 MORIOKA Tomohiko + + * text-coding.c (Qcomposite): New variable. + (Fmake_coding_system): Add new property `composite'. + (struct decoding_stream): Add `combined_char_count', + `combined_chars' and `combining_table' in UTF-2000. + (COMPOSE_FLUSH_CHARS): New macro. + (COMPOSE_ADD_CHAR): New macro. + (reset_decoding_stream): Reset `str->combined_char_count' and + `str->combining_table' in UTF-2000. + (decode_coding_iso2022): Modify for character-decomposition. + (syms_of_file_coding): Add new symbol `composite'. + +2000-04-25 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_latin_tcvn5712): New variable. + (Fput_char_attribute): Set up `Vcharacter_variant_table' instead + of `Vcharacter_composition_table' if `->decomposition' property + has only 1 element. + (Qlatin_tcvn5712): New variable. + (syms_of_mule_charset): Add new symbol `latin-tcvn5712'. + (complex_vars_of_mule_charset): Add new coded-charset + `latin-tcvn5712'. + + * char-ucs.h (LEADING_BYTE_LATIN_TCVN5712): New macro. + +2000-04-20 MORIOKA Tomohiko + + * file-coding.h (struct Lisp_Coding_System): Add + `enable_composition'. + (CODING_SYSTEM_COMPOSITE): New macro. + (XCODING_SYSTEM_COMPOSITE): New macro. + +2000-03-17 MORIOKA Tomohiko + + * mule-canna.c (c2mu): Fix problem with UTF-2000. + +2000-03-16 MORIOKA Tomohiko + + * mule-charset.c (Fput_char_attribute): Don't make mapping-table + if ATTRIBUTE is `ucs' and character-id of CHARACTER = VALUE. + +2000-02-24 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_mojikyo): New variable. + (Fdefine_char): Don't use coded-charset which does not have + non-builtin character range to allocate character-id. + (Qmojikyo): New variable. + (syms_of_mule_charset): Add new symbol `mojikyo'. + (complex_vars_of_mule_charset): Add new coded-charset `mojikyo'. + + * char-ucs.h (LEADING_BYTE_DAIKANWA_EKANJI): New macro. + (LEADING_BYTE_MOJIKYO): New macro. + (MIN_CHAR_MOJIKYO): New macro. + (MIN_CHAR_DAIKANWA): Use `MIN_CHAR_MOJIKYO'. + (MAX_CHAR_MOJIKYO): New macro. + +2000-02-12 MORIOKA Tomohiko + + * mule-charset.c (remove_char_attribute): Fixed. + +2000-02-08 MORIOKA Tomohiko + + * mule-charset.c (remove_char_attribute): New function. + (Fremove_char_attribute): New function. + (encode_builtin_char_1): Comment out builtin-support for + greek-iso8859-7 and cyrillic-iso8859-5. + (Fdecode_char): Check `code' is an integer. + (syms_of_mule_charset): Add `remove-char-attribute'. + (MIN_CHAR_GREEK): Deleted. + (MAX_CHAR_GREEK): Likewise. + (MIN_CHAR_CYRILLIC): Likewise. + (MAX_CHAR_CYRILLIC): Likewise. + (complex_vars_of_mule_charset): Don't use MIN_CHAR_GREEK and + MAX_CHAR_GREEK for `greek-iso8859-7'. + + * char-ucs.h (MIN_CHAR_GREEK): Comment out. + (MAX_CHAR_GREEK): Likewise. + (MIN_CHAR_CYRILLIC): Likewise. + (MAX_CHAR_CYRILLIC): Likewise. + +2000-02-02 MORIOKA Tomohiko + + * mule-charset.c (Fdefine_char): Fix problem when new code-point + format is used without `ucs' property. + (Fdecode_char): Fix problem with GR representation. + (complex_vars_of_mule_charset): Don't use `MIN_CHAR_CYRILLIC' and + `MAX_CHAR_CYRILLIC' as range of builtin `cyrillic-iso8859-5'. + +2000-01-28 MORIOKA Tomohiko + + * mule-charset.c (make_builtin_char): New function. + (encode_builtin_char_1): Check ISO-2022-charset is defined or not. + (Fset_charset_mapping_table): Modify for new representation of + code-point. + (Fdecode_char): New function. + (syms_of_mule_charset): Add new builtin function `decode-char' in + UTF-2000. + + * char-ucs.h (make_builtin_char): New prototype. + (DECODE_CHAR): New inline function. + (MAKE_CHAR): Use `DECODE_CHAR'. + +2000-01-28 MORIOKA Tomohiko + + * text-coding.c (parse_charset_conversion_specs): Use + `XCHARSET_CHARS' and `XCHARSET_DIMENSION' instead of + `XCHARSET_TYPE'. + (iso2022_designate): Likewise. + + * chartab.c (decode_char_table_range): Use `XCHARSET_CHARS' and + `XCHARSET_DIMENSION' instead of `XCHARSET_TYPE'. + + * mule-charset.c (Vcharset_ucs): New variable. + (print_charset): Change design; use `CHARSET_CHARS' and + `CHARSET_DIMENSION' instead of `CHARSET_TYPE'. + (make_charset): Change signature to specify `chars' and + `dimension' instead of `type'. + (range_charset_code_point): Modify for 256^n-set. + (encode_builtin_char_1): Encode as `ucs' in default. + (Fmake_charset): Modify for `make_charset'. + (Fmake_reverse_direction_charset): Likewise. + (Fsplit_char): Use `ENCODE_CHAR' instead of `BREAKUP_CHAR' in + UTF-2000. + (complex_vars_of_mule_charset): Add coded-charset `ucs'; modify + for `make_charset'. + + * char-ucs.h (Vcharset_ucs): New variable. + (LEADING_BYTE_UCS): New macro. + (struct Lisp_Charset): Delete `type'; change type of `dimension' + and `chars' to `unsigned short' from `unsigned int'. + (CHARSET_TYPE): Deleted. + (XCHARSET_TYPE): Deleted. + +2000-01-27 MORIOKA Tomohiko + + * mule-charset.c (charset_code_point): Moved to char-ucs.h. + + * char-ucs.h (charset_code_point): Moved from mule-charset.c. + (ENCODE_CHAR): New macro. + +2000-01-26 MORIOKA Tomohiko + + * mule-charset.c (vars_of_mule_charset): Update `utf-2000-version' + to 0.14 (Kawachi-Katakami). + +2000-01-26 MORIOKA Tomohiko + + * text-coding.c (char_encode_shift_jis): Modify for + `charset_code_point'. + (char_encode_iso2022): Likewise. + + * mule-charset.c (Fput_char_attribute): Use + (integer) instead of list of s (integers) as the + format of code-point of a coded-charset. + (range_charset_code_point): Return instead of . + (encode_builtin_char_1): New function; delete + `split_builtin_char'. + (charset_code_point): Return instead of . + (Fsplit_char): Don't use `SPLIT_CHAR'. + + * char-ucs.h (encode_builtin_char_1): New prototype; delete + prototype for `split_builtin_char'. + (range_charset_code_point): Return instead of . + (charset_code_point): Likewise. + (encode_char_1): New inline function; delete `SPLIT_CHAR'. + (breakup_char_1): Use `encode_char_1' instead of `SPLIT_CHAR'. + +2000-01-20 MORIOKA Tomohiko + + * mule-charset.c (complex_vars_of_mule_charset): Don't define + `japanese-jisx0208-1990' in non-UTF-2000 Mule. + +2000-01-11 MORIOKA Tomohiko + + * mule-charset.c (split_builtin_char): Don't support OBS_94x94. + + * char-ucs.h (MIN_CHAR_OBS_94x94): Deleted. + (MAX_CHAR_OBS_94x94): Deleted. + +2000-01-11 MORIOKA Tomohiko + + * mule-charset.c (split_builtin_char): Use `MAX_CHAR_BMP'. + + * char-ucs.h (MAX_CHAR_BMP): New macro. + +2000-01-10 MORIOKA Tomohiko + + * text-coding.c: Sync with r21-2-24. + +2000-01-08 MORIOKA Tomohiko + + * file-coding.c: Modify for UTF-2000. + +2000-01-18 MORIOKA Tomohiko + + * mule-charset.c (vars_of_mule_charset): Update `utf-2000-version' + to 0.13 (Takaida). + +2000-01-15 MORIOKA Tomohiko + + * mule-charset.c (split_builtin_char): Delete builtin support for + `katakana-jisx0201'. + (complex_vars_of_mule_charset): Don't map `katakana-jisx0201' to + BMP area in builtin representation. + + * char-ucs.h (MAKE_CHAR): Delete builtin support for + `Vcharset_katakana_jisx0201'. + +1999-12-24 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_mojikyo_pj_[1 .. 21]): New variable. + (Qisolated): New variable. + (Qinitial): New variable. + (Qmedial): New variable. + (Qfinal): New variable. + (Qvertical): New variable. + (Qsmall): New variable. + (to_char_code): Use `Qisolated', `Qinitial', `Qmedial', `Qfinal', + `Qvertical' and `Qsmall'. + (Qmojikyo_pj_[1 .. 21]): New variable. + (syms_of_mule_charset): Add new symbols `isolated', `initial', + `medial', `final', `vertical', `small' and `mojikyo-pj-[1 .. 21]'. + (complex_vars_of_mule_charset): Add new charset `mojikyo-pj-[1 + .. 21]'. + +1999-11-23 MORIOKA Tomohiko + + * char-ucs.h (MIN_LEADING_BYTE): Changed to -0x60. + (LEADING_BYTE_MOJIKYO_PJ_[1 .. 21]): New macros. + (MAX_LEADING_BYTE_PRIVATE): Changed to `(CHARSET_ID_OFFSET - 32)'. + +1999-11-18 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_japanese_jisx0208_1990): New variable. + (Fdefine_char): Use Group 00 Plane 10 for non-coded variants of + BMP. + (Qjapanese_jisx0208_1990): New variable. + (syms_of_mule_charset): Add new symbol `Qjapanese_jisx0208_1990'. + (complex_vars_of_mule_charset): Add new coded-charset + `japanese-jisx0208-1990'. + + * char-ucs.h (LEADING_BYTE_JAPANESE_JISX0208_1990): New macro. + (MIN_CHAR_JIS_X0208_1990): New macro. + (MAX_CHAR_JIS_X0208_1990): New macro. + +1999-11-16 MORIOKA Tomohiko + + * text-coding.c (char_encode_iso2022): Output `~' if ISO 2022 + coded-charset is not found. + +1999-11-16 MORIOKA Tomohiko + + * mule-charset.c (Fget_char_attribute): Forgot to `CHECK_CHAR'. + (Fdefine_char): Use `Fmake_char'. + +1999-11-15 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_ideograph_daikanwa): New variable. + (Vcharset_hiragana_jisx0208): Deleted. + (Vcharset_katakana_jisx0208): Deleted. + (Qideograph_daikanwa): New variable. + (Qhiragana_jisx0208): Deleted. + (Qkatakana_jisx0208): Deleted. + (split_builtin_char): Split `ideograph-daikanwa'. + (Fsplit_char): New implementation for UTF-2000. + (syms_of_mule_charset): Add new symbol `ideograph-daikanwa'; + delete symbol `hiragana-jisx0208' and `katakana-jisx0208'. + (complex_vars_of_mule_charset): Add new coded-charset + `ideograph-daikanwa'; delete coded-charset `hiragana-jisx0208' and + `katakana-jisx0208'. + + * char-ucs.h (LEADING_BYTE_DAIKANWA): New macro. + (LEADING_BYTE_HIRAGANA_JISX0208): Deleted. + (LEADING_BYTE_KATAKANA_JISX0208): Deleted. + (MIN_CHAR_DAIKANWA): New macro. + (MAX_CHAR_DAIKANWA): New macro. + +1999-11-15 MORIOKA Tomohiko + + * data.c (Fstring_to_number): Don't recognize floating point if + base is not 10. + +1999-11-15 MORIOKA Tomohiko + + * mule-charset.c (Fput_char_attribute): Forgot to `CHECK_CHAR'. + +1999-11-14 MORIOKA Tomohiko + + * mule-charset.c (Qsquare): New variable. + (to_char_code): Add `Qsquare'. + (syms_of_mule_charset): Add new symbol `square'. + +1999-11-14 MORIOKA Tomohiko + + * mule-charset.c (Qcircle): New variable. + (to_char_code): Add `Qcircle'. + (syms_of_mule_charset): Add new symbol `circle'. + +1999-11-14 MORIOKA Tomohiko + + * mule-charset.c (Qfont): New variable. + (to_char_code): Add `Qfont'. + (syms_of_mule_charset): Add new symbol `font'. + +1999-11-14 MORIOKA Tomohiko + + * mule-charset.c (Qsub): New variable. + (to_char_code): Add `Qsub'. + (syms_of_mule_charset): Add new symbol `sub'. + +1999-11-14 MORIOKA Tomohiko + + * mule-charset.c (Fput_char_attribute): Convert each element of + VALUE to GL position if ATTRIBUTE is a GR-set, + +1999-11-14 MORIOKA Tomohiko + + * mule-charset.c (Fput_char_attribute): Allow GR code-point if a + coded-charset is a GR-set. + +1999-11-13 MORIOKA Tomohiko + + * mule-charset.c (Fput_char_attribute): Check each element of + VALUE is a byte if ATTRIBUTE is a coded-charset or its name. + +1999-11-13 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_ethiopic_ucs): New variable in + UTF-2000. + (Qethiopic_ucs): New variable in UTF-2000. + (syms_of_mule_charset): Add new symbol `ethiopic-ucs' in UTF-2000. + (complex_vars_of_mule_charset): Add new coded-charset + `ethiopic-ucs' in UTF-2000. + + * char-ucs.h (LEADING_BYTE_ETHIOPIC_UCS): New macro. + (LEADING_BYTE_HIRAGANA_JISX0208): Changed to `(CHARSET_ID_OFFSET - + 9)'. + (LEADING_BYTE_KATAKANA_JISX0208): Changed to `(CHARSET_ID_OFFSET - + 10)'. + (LEADING_BYTE_PRIVATE): Changed to `(CHARSET_ID_OFFSET - 11)'. + +1999-11-13 MORIOKA Tomohiko + + * mule-charset.c (Fset_charset_mapping_table): Fix problem with + `ascii'. + +1999-11-12 MORIOKA Tomohiko + + * mule-charset.c (Vcharacter_variant_table): New variable. + (Q_ucs): New variable. + (Fchar_variants): New function. + (Fput_char_attribute): Register `->ucs' value to + `Vcharacter_variant_table'. + (syms_of_mule_charset): Add new function `char-variants' and new + symbol `->ucs'. + (vars_of_mule_charset): Setup `Vcharacter_variant_table'. + +1999-11-12 MORIOKA Tomohiko + + * mule-charset.c (get_char_code_table): Allow negative character + code. + (put_char_code_table): Likewise. + (Vcharacter_composition_table): New variable. + (Q_decomposition): New variable. + (Qwide): New variable. + (Qnarrow): New variable. + (Qcompat): New variable. + (QnoBreak): New variable. + (Qsuper): New variable. + (Qfraction): New variable. + (to_char_code): New function. + (Fget_composite_char): New function. + (Fput_char_attribute): Register `->decomposition' value to + `Vcharacter_composition_table'. + (syms_of_mule_charset): Add new function `get-composite-char', new + symbol `->decomposition', `wide', `narrow', `compat', `noBreak', + `super' and `fraction'. + (vars_of_mule_charset): Setup `Vcharacter_composition_table'. + +1999-11-12 MORIOKA Tomohiko + + * mule-charset.c (Fchar_attribute_alist): Check the argument is a + character; copy the return value. + +1999-11-12 MORIOKA Tomohiko + + * char-ucs.h (SPLIT_CHAR): Use `split_builtin_char'. + + * mule-charset.c (range_charset_code_point): Must use make_int. + (split_builtin_char): New function. + +1999-11-12 MORIOKA Tomohiko + + * mule-charset.c (char_byte_table): Change name from + "char-code-table" to "char-byte-table". + (mark_char_code_table): New function. + (char_code_table_equal): New function. + (char_code_table_hash): New function. + (char_code_table_description): New constant. + (char_code_table): New type. + (make_char_code_table): New function. + (copy_char_code_table): New function. + (get_char_code_table): Modify for `char_code_table' type. + (put_char_code_table): Likewise. + (vars_of_mule_charset): Update `utf-2000-version' to 0.12 + (Kashiwara). + + * char-ucs.h (char_code_table): New type. + (XCHAR_CODE_TABLE): New macro. + (XSETCHAR_CODE_TABLE): New macro. + (CHAR_CODE_TABLE_P): New macro. + (GC_CHAR_CODE_TABLE_P): New macro. + (struct Lisp_Char_Code_Table): New structure. + +1999-11-09 MORIOKA Tomohiko + + * mule-charset.c (Fmake_charset): Setup byte_offset for + {94|96}^n-set. + +1999-11-09 MORIOKA Tomohiko + + * mule-charset.c (Fdefine_char): Fix problem with non-UCS + character. + +1999-11-09 MORIOKA Tomohiko + + * char-ucs.h (SPLIT_CHAR): Don't make new cell if a charset slot + is found. + +1999-11-09 MORIOKA Tomohiko + + * mule-charset.c (Fget_char_attribute): If ATTRIBUTE is a name of + charset, it is regarded as a charset. + (put_char_attribute): New function in UTF-2000. + (Fput_char_attribute): If ATTRIBUTE is a charset or a name of + charset, mapping-table of the charset is modified. + (Fdefine_char): New function in UTF-2000. + (Fset_charset_mapping_table): Use `put_char_attribute' instead of + `Fput_char_attribute'. + (syms_of_mule_charset): Add new function `define-char' and new + symbol `ucs' in UTF-2000. + (vars_of_mule_charset): Update `utf-2000-version' to 0.11 (Shiki). + +1999-10-29 MORIOKA Tomohiko + + * mule-charset.c (Fcharset_name): Define `byte_offset' in + non-UTF-2000 configuration. + +1999-10-29 MORIOKA Tomohiko + + * text-coding.c (char_encode_shift_jis): Use `charset_code_point' + not to use `XCHARSET_ENCODING_TABLE (Vcharset_latin_jisx0201)'. + + * mule-charset.c (mark_charset): `cs->encoding_table' has been + deleted. + (make_charset): Don't use `CHARSET_ENCODING_TABLE(cs)'. + (Fset_charset_mapping_table): Likewise. + + * char-ucs.h (struct Lisp_Charset): Delete `encoding_table'. + (CHARSET_ENCODING_TABLE): Delete. + (XCHARSET_ENCODING_TABLE): Delete. + (charset_code_point): New interface. + +1999-10-29 MORIOKA Tomohiko + + * text-coding.c (char_encode_iso2022): Use `charset_code_point' + instead of `charset_get_byte1' and `charset_get_byte2'. + + * mule-charset.c, char-ucs.h (charset_get_byte1): Deleted. + (charset_get_byte2): Deleted. + +1999-10-28 MORIOKA Tomohiko + + * char-ucs.h (SPLIT_CHAR): New inline function. + (breakup_char_1): Use `SPLIT_CHAR'. + + * mule-charset.c (range_charset_code_point): New function. + (charset_code_point): New function. + + * char-ucs.h (range_charset_code_point): New interface. + (breakup_char_1): Use `range_charset_code_point'. + +1999-10-27 MORIOKA Tomohiko + + * mule-charset.c (Fmake_charset): Delete unused local variable + `code_offset'. + + * char-ucs.h (Vcharacter_attribute_table): New extern variable. + (breakup_char_1): Find a charset and code-point in + `Vcharacter_attribute_table'. + +1999-10-27 MORIOKA Tomohiko + + * mule-charset.c (vars_of_mule_charset): Update `utf-2000-version' + to 0.10 (Yao). + +1999-10-25 MORIOKA Tomohiko + + * mule-charset.c (Vcharacter_attribute_table): New variable. + (Fchar_attribute_alist): New function. + (Fget_char_attribute): New function. + (Fput_char_attribute): New function. + (Fset_charset_mapping_table): Setup `Vcharacter_attribute_table' + too. + (syms_of_mule_charset): Add new function `char-attribute-alist', + `get-char-attribute' and `put-char-attribute'. + (vars_of_mule_charset): Setup `Vcharacter_attribute_table'. + +1999-10-19 MORIOKA Tomohiko + + * mule-charset.c (Fmake_charset): Just use + `get_unallocated_leading_byte'. + + * char-ucs.h (LEADING_BYTE_*): Use ISO-IR numbers for official + sets; don't use final-byte based number for private sets. + +1999-10-12 MORIOKA Tomohiko + + * doprnt.c (emacs_doprnt_1): Fix problem with %0XXd for a negative + integer. + +1999-10-12 MORIOKA Tomohiko + + * mule-charset.c (vars_of_mule_charset): Update `utf-2000-version' + to 0.9. + +1999-10-11 MORIOKA Tomohiko + + * regex.c (compile_extended_range): Use `CHAR_CHARSET_ID' instead + of `CHAR_LEADING_BYTE' in UTF-2000. + + * insdel.c (find_charsets_in_bufbyte_string): Use + `CHAR_CHARSET_ID' instead of `CHAR_LEADING_BYTE' in UTF-2000. + (find_charsets_in_emchar_string): Likewise. + + * chartab.h (CHAR_TABLE_NON_ASCII_VALUE_UNSAFE): Use + `CHAR_CHARSET_ID' instead of `CHAR_LEADING_BYTE' in UTF-2000. + + * char-ucs.h (CHAR_LEADING_BYTE): Deleted. + (CHAR_CHARSET_ID): New macro. + +1999-10-11 MORIOKA Tomohiko + + * chartab.c (get_char_table): Don't use type `Charset_ID' for + charset-id - MIN_LEADING_BYTE. + (put_char_table): Likewise. + +1999-10-11 MORIOKA Tomohiko + + * char-ucs.h (MIN_LEADING_BYTE): Changed to `-0x40'. + (NUM_LEADING_BYTES): Changed to (80 * 3 - MIN_LEADING_BYTE). + (CHARSET_LEADING_BYTE): Don't cast by `Bufbyte'. + (CHARSET_ID_OFFSET): New macro. + (LEADING_BYTE_CONTROL_1): Changed to (CHARSET_ID_OFFSET - 1). + (LEADING_BYTE_UCS_BMP): Changed to (CHARSET_ID_OFFSET - 2). + (LEADING_BYTE_LATIN_VISCII): Changed to (CHARSET_ID_OFFSET - 3). + (LEADING_BYTE_HIRAGANA_JISX0208): Changed to (CHARSET_ID_OFFSET - + 4). + (LEADING_BYTE_KATAKANA_JISX0208): Changed to (CHARSET_ID_OFFSET - + 5). + (MIN_LEADING_BYTE_PRIVATE): Changed to `MIN_LEADING_BYTE'. + (MAX_LEADING_BYTE_PRIVATE): Changed to (CHARSET_ID_OFFSET - 6). + (CHARSET_ID_OFFSET_94): Changed to (CHARSET_ID_OFFSET - '0'). + (CHARSET_ID_OFFSET_96): Changed to (CHARSET_ID_OFFSET_94 + 80). + (CHARSET_ID_OFFSET_94x94): Changed to (CHARSET_ID_OFFSET_96 + 80). + +1999-10-11 MORIOKA Tomohiko + + * mule-charset.c (next_allocated_leading_byte): New variable in + UTF-2000. + (next_allocated_1_byte_leading_byte): Don't define in UTF-2000. + (next_allocated_2_byte_leading_byte): Don't define in UTF-2000. + (get_unallocated_leading_byte): Simply use + `next_allocated_leading_byte' [ignore dimension] in UTF-2000. + (vars_of_mule_charset): Setup `next_allocated_leading_byte' in + UTF-2000. + + * char-ucs.h (MIN_LEADING_BYTE_PRIVATE): New macro. + (MAX_LEADING_BYTE_PRIVATE): New macro. + (MIN_LEADING_BYTE_OFFICIAL_2): Deleted. + (MAX_LEADING_BYTE_OFFICIAL_2): Deleted. + +1999-10-11 MORIOKA Tomohiko + + * mule-charset.c (Fmake_charset): Allocate final-byte based + charset-id for 94-set, 96-set and 94x94-set. + +1999-10-11 MORIOKA Tomohiko + + * mule-charset.c (char_byte_table_equal): Fill braces to avoid + ambiguous `else'. + (Fmake_charset): Likewise. + (complex_vars_of_mule_charset): Modify the font registry of + `ucs-bmp' not to match `Ethiopic-Unicode'. + +1999-10-10 MORIOKA Tomohiko + + * mule-charset.c (complex_vars_of_mule_charset): Add font + registory of `ucs-bmp'. + +1999-10-10 MORIOKA Tomohiko + + * text-coding.c (char_encode_iso2022): Ignore non-ISO-2022 + coded-charsets in `default-coded-charset-priority-list' when + breaking up a character. + + * mule-charset.c (Vcharset_latin_viscii): New variable. + (Qlatin_viscii): New variable. + (make_charset): Don't use `decoding_table'. + (Fmake_charset): Regard graphic = 2 as 256^n-set; setup + byte_offset. + (Fset_charset_mapping_table): New implementation. + (syms_of_mule_charset): Add new symbol `latin-viscii'. + (complex_vars_of_mule_charset): Set `graphic' attribute of charset + `ucs-bmp' and `latin_viscii' to 2; change font registry of charset + `latin-viscii-lower' to "MULEVISCII-LOWER"; change font registry + of charset `latin-viscii-upper' to "MULEVISCII-UPPER"; add new + charset `latin_viscii'. + + * char-ucs.h (LEADING_BYTE_LATIN_VISCII): New macro. + (CHARSET_TYPE_94X94): Change to 1 from 2. + (CHARSET_TYPE_96): Change to 2 from 1. + (CHARSET_TYPE_128): New macro. + (CHARSET_TYPE_128X128): Change to 5 from 4. + (CHARSET_TYPE_256): New macro. + (CHARSET_TYPE_256X256): Change to 7 from 5. + (MAKE_CHAR): Use `XCHARSET_BYTE_OFFSET(charset)'. + +1999-10-10 MORIOKA Tomohiko + + * text-coding.c (char_encode_shift_jis): Refer + `XCHARSET_ENCODING_TABLE(Vcharset_latin_jisx0201)' instead of + `XCHARSET_TO_BYTE1_TABLE(Vcharset_latin_jisx0201)'. + + * mule-charset.c (mark_char_byte_table): New function in UTF-2000. + (char_byte_table_equal): New function in UTF-2000. + (char_byte_table_hash): New function in UTF-2000. + (char_byte_table_description): New constant in UTF-2000. + (char_byte_table): New type in UTF-2000. + (make_char_byte_table): New function in UTF-2000. + (copy_char_byte_table): New function in UTF-2000. + (make_char_code_table): New macro in UTF-2000. + (get_char_code_table): New function in UTF-2000. + (put_char_code_table): New function in UTF-2000. + (mark_charset): Mark `cs->encoding_table' in UTF-2000. + (charset_description): Add setting in UTF-2000. + (make_charset): Setup `CHARSET_ENCODING_TABLE(cs)' instead of + `CHARSET_TO_BYTE1_TABLE(cs)'. + (charset_get_byte1): Refer `XCHARSET_ENCODING_TABLE(charset)' + instead of `XCHARSET_TO_BYTE1_TABLE(charset)'. + (charset_get_byte2): Refer `XCHARSET_ENCODING_TABLE(charset)' + instead of `XCHARSET_TO_BYTE2_TABLE(charset)'. + (Fset_charset_mapping_table): Setup `CHARSET_ENCODING_TABLE(cs)' + instead of `CHARSET_TO_BYTE1_TABLE(cs)' and + `CHARSET_TO_BYTE2_TABLE(cs)'. + + * char-ucs.h (char_byte_table): New type. + (XCHAR_BYTE_TABLE): New macro. + (XSETCHAR_BYTE_TABLE): New macro. + (CHAR_BYTE_TABLE_P): New macro. + (GC_CHAR_BYTE_TABLE_P): New macro. + (struct Lisp_Char_Byte_Table): New structure. + (get_char_code_table): New interface. + (Emchar_to_byte_table): Deleted. + (get_byte_from_character_table): Deleted. + (struct Lisp_Charset): Add `encoding_table'; delete + `to_byte1_table' and `to_byte2_table'. + (CHARSET_ENCODING_TABLE): New macro. + (CHARSET_TO_BYTE1_TABLE): Deleted. + (CHARSET_TO_BYTE2_TABLE): Deleted. + (XCHARSET_ENCODING_TABLE): New macro. + (XCHARSET_TO_BYTE1_TABLE): Deleted. + (XCHARSET_TO_BYTE2_TABLE): Deleted. + +1999-10-07 MORIOKA Tomohiko + + * mule-charset.c (syms_of_mule_charset): Delete charset alias + `vietnamese-viscii-*'. + +1999-10-07 MORIOKA Tomohiko + + * mule-charset.c (Qvietnamese_viscii_lower): New variable. + (Qvietnamese_viscii_upper): New variable. + (Fdefine_charset_alias): New function. + (syms_of_mule_charset): Add new function `define-charset-alias'. + (syms_of_mule_charset): Rename charset `vietnamese-viscii-*' to + `latin-viscii-*'; define `vietnamese-viscii-*' as aliases for + `latin-viscii-*'. + +1999-10-04 MORIOKA Tomohiko + + * char-ucs.h (MIN_CHAR_OBS_94x94): New macro. + (MAX_CHAR_OBS_94x94): New macro. + (breakup_char_1): Support obsolete XEmacs-UCS private code space + for 94x94 sets. + + * mule-charset.c (put_byte_from_character_table): Change unit size + from 128 to 256. + (mark_charset): Don't mark `cs->decoding_table' if `UTF2000' is + not defined. + (Fmake_reverse_direction_charset): Modify dummy argument of + `make_charset' for non-UTF-2000 environment. + +1999-10-03 MORIOKA Tomohiko + + * char-ucs.h (MAKE_CHAR): Allow nested decoding-table. + + * mule-charset.c (destroy_byte_from_character_table): New macro. + (latin_jisx0201_to_ucs): Deleted. + (latin_iso8859_2_to_ucs): Deleted. + (latin_iso8859_3_to_ucs): Deleted. + (latin_iso8859_4_to_ucs): Deleted. + (latin_iso8859_9_to_ucs): Deleted. + (latin_viscii_lower_to_ucs): Deleted. + (latin_viscii_upper_to_ucs): Deleted. + (mark_charset): Mark `cs->decoding_table'. + (Fcharset_mapping_table): Fix DOC-string. + (Fset_charset_mapping_table): New function. + (syms_of_mule_charset): Add nwe function + `set-charset-mapping-table'. + (complex_vars_of_mule_charset): Don't setup and use + `latin_*_to_ucs'. + +1999-10-01 MORIOKA Tomohiko + + * char-ucs.h (MAKE_CHAR): Check the result for range-represented + charset. + +1999-09-30 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_hiragana_jisx0208): New variable. + (Vcharset_katakana_jisx0208): New variable. + (Qhiragana_jisx0208): New variable. + (Qkatakana_jisx0208): New variable. + (make_charset): Add new argument `byte_offset'. + (charset_get_byte1): Modify for new coded-charset definition; use + `XCHARSET_UCS_MIN', `XCHARSET_UCS_MAX', `XCHARSET_CODE_OFFSET' and + `XCHARSET_BYTE_OFFSET'. + (Fmake_charset): Modify for `make_charset'. + (Fmake_reverse_direction_charset): Likewise. + (syms_of_mule_charset): Add new symbols `hiragana-jisx0208' and + `katakana-jisx0208'. + (complex_vars_of_mule_charset): Modify for `make_charset'; quote + `.' in font registry of charset `katakana-jisx0201', + `latin-jisx0201', `vietnamese-viscii-lower' and + `vietnamese-viscii-upper'; modify DOC-string of charset + `japanese-jisx0208-1978' and `japanese-jisx0208'; modify font + registry of charset `japanese-jisx0208' not to use font for JIS + X0208:1990; add new charset `hiragana-jisx0208' and + `katakana-jisx0208'. + + * char-ucs.h (LEADING_BYTE_HIRAGANA_JISX0208): New macro. + (LEADING_BYTE_KATAKANA_JISX0208): New macro. + (struct Lisp_Charset): Add `byte_offset'. + (CHARSET_BYTE_OFFSET): New macro. + (XCHARSET_UCS_MIN): New macro. + (XCHARSET_UCS_MAX): New macro. + (XCHARSET_CODE_OFFSET): New macro. + (XCHARSET_BYTE_OFFSET): New macro. + (MIN_CHAR_HIRAGANA): New macro. + (MAX_CHAR_HIRAGANA): New macro. + (MIN_CHAR_KATAKANA): New macro. + (MAX_CHAR_KATAKANA): New macro. + (MAKE_CHAR): Modify for new coded-charset definition; use + `XCHARSET_UCS_MIN', `XCHARSET_UCS_MAX', `XCHARSET_CODE_OFFSET' and + `XCHARSET_BYTE_OFFSET'. + +1999-09-27 MORIOKA Tomohiko + + * mule-charset.c (CHAR96): Deleted. + (latin_jisx0201_to_ucs): Type is changed from array of to + . + (latin_iso8859_2_to_ucs): Likewise. + (latin_iso8859_3_to_ucs): Likewise. + (latin_iso8859_4_to_ucs): Likewise. + (latin_iso8859_9_to_ucs): Likewise. + (latin_viscii_lower_to_ucs): Likewise. + (latin_viscii_upper_to_ucs): Likewise. + (latin_tcvn5712_to_ucs): Commented out. + (make_charset): Change type of argument `decoding_table' from + to [vector of characters]. + (Fmake_charset): Modify for `make_charset'. + (Fmake_reverse_direction_charset): Likewise. + (Fcharset_mapping_table): New function in UTF-2000. + (syms_of_mule_charset): Setup `Fcharset_mapping_table' in + UTF-2000. + (complex_vars_of_mule_charset): Modify for type change of + `*_to_ucs'; modify for `make_charset'. + + * char-ucs.h (struct Lisp_Charset): Change type of + `decoding_table' from to . + (MAKE_CHAR): Modify for new specification of `decoding_table'. + +1999-09-23 MORIOKA Tomohiko + + * mule-charset.c (Fmake_reverse_direction_charset): Fix compile + error with non-UTF-2000-Mule. + +1999-09-21 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_chinese_cns11643_3): Deleted [defined + in lisp again]. + (Vcharset_chinese_cns11643_4): Likewise. + (Vcharset_chinese_cns11643_5): Likewise. + (Vcharset_chinese_cns11643_6): Likewise. + (Vcharset_chinese_cns11643_7): Likewise. + (Qchinese_cns11643_3): Likewise. + (Qchinese_cns11643_4): Likewise. + (Qchinese_cns11643_5): Likewise. + (Qchinese_cns11643_6): Likewise. + (Qchinese_cns11643_7): Likewise. + (syms_of_mule_charset): Move definitions for `chinese-cns11643-3', + `chinese-cns11643-4', `chinese-cns11643-5', `chinese-cns11643-6' + and `chinese-cns11643-7' to lisp/mule/chinese.el. + (complex_vars_of_mule_charset): Likewise. + +1999-09-18 MORIOKA Tomohiko + + * mule-charset.c (charset_get_byte1): Fix bug about 94- and + 96-set. + (Fmake_reverse_direction_charset): Inherit CHARSET_DECODING_TABLE, + CHARSET_UCS_MIN, CHARSET_UCS_MAX and CHARSET_CODE_OFFSET. + +1999-09-17 MORIOKA Tomohiko + + * char-ucs.h (MIN_CHAR_HALFWIDTH_KATAKANA): Changed to 0xFF61 from + 0xFF60. + (MAKE_CHAR): Change offset for katakana-jisx0201 to 33 from 0x20. + (breakup_char_1): Likewise. + + * text-coding.c (char_encode_iso2022): Keep designated charsets if + one of them includes the specified character. + +1999-09-14 MORIOKA Tomohiko + + * mule-charset.c: Update `utf-2000-version' to 0.8 (Kami). + +1999-09-14 MORIOKA Tomohiko + + * char-ucs.h (MAKE_CHAR): Fix problem in 2-dimension charset. + +1999-09-14 MORIOKA Tomohiko + + * mule-charset.c (latin_iso8859_2_to_ucs NULL): Add pseudo + definition for non-UTF-2000 Mule. + (latin_iso8859_3_to_ucs): Likewise. + (latin_iso8859_4_to_ucs): Likewise. + (latin_iso8859_9_to_ucs): Likewise. + (latin_jisx0201_to_ucs): Likewise. + (MIN_CHAR_THAI): Likewise. + (MAX_CHAR_THAI): Likewise. + (MIN_CHAR_GREEK): Likewise. + (MAX_CHAR_GREEK): Likewise. + (MIN_CHAR_HEBREW): Likewise. + (MAX_CHAR_HEBREW): Likewise. + (MIN_CHAR_HALFWIDTH_KATAKANA): Likewise. + (MAX_CHAR_HALFWIDTH_KATAKANA): Likewise. + (MIN_CHAR_CYRILLIC): Likewise. + (MAX_CHAR_CYRILLIC): Likewise. + +1999-09-14 MORIOKA Tomohiko + + * char-ucs.h (breakup_char_1): Use + `Vdefault_coded_charset_priority_list' for hebrew-iso8859-8, + thai-tis620 and katakana-jisx0201 area. + +1999-09-13 MORIOKA Tomohiko + + * char-ucs.h (breakup_char_1): Use + `Vdefault_coded_charset_priority_list' for cyrillic-iso8859-5 + area. + + * text-coding.c (reset_encoding_stream): Fixed. + (char_encode_ucs4): Delete `& 255'. + + * char-ucs.h (breakup_char_1): Use + `Vdefault_coded_charset_priority_list' for greek-iso8859-7 area. + +1999-09-13 MORIOKA Tomohiko + + * file-coding.c (Fmake_coding_system): Don't set up + `codesys->fixed.size'. + (encode_coding_no_conversion): Don't refer + `str->codesys->fixed.size'. + +1999-09-13 MORIOKA Tomohiko + + * mule-charset.c, char-ucs.h (latin_a_char_to_charset): Deleted. + (latin_a_char_to_byte1): Deleted. + (latin_a_char_to_byte2): Deleted. + +1999-09-13 MORIOKA Tomohiko + + * mule-charset.c (make_charset): Add new argument `ucs_min', + `ucs_max' and `code_offset'. + (charset_get_byte1): New implementation [delete specific charset + depended implementations]. + (Fmake_charset): Modify for `make_charset'. + (Fmake_reverse_direction_charset): Likewise. + (complex_vars_of_mule_charset): Likewise. + + * char-ucs.h (struct Lisp_Charset): Add `ucs_min', `ucs_max' and + `code_offset'. + (CHARSET_UCS_MIN): New macro. + (CHARSET_UCS_MAX): New macro. + (CHARSET_CODE_OFFSET): New macro. + (MAKE_CHAR): Delete charset depended definitions [except + katakana-jisx0201]. + +1999-09-13 MORIOKA Tomohiko + + * char-ucs.h (breakup_char_1): Use + `Vdefault_coded_charset_priority_list' for C0-Controls, + Basic-Latin, C1-Controls and Latin-1-Supplement area. + +1999-09-13 MORIOKA Tomohiko + + * char-ucs.h (charset_get_byte1): New function. + (XCHARSET_GET_BYTE1): Deleted. + (charset_get_byte2): New function. + (XCHARSET_GET_BYTE2): Deleted. + (Vdefault_coded_charset_priority_list): New external variable. + (breakup_char_1): Use `charset_get_byte1', `charset_get_byte2' and + `Vdefault_preferred_coded_charset_list'. + + * mule-charset.c (charset_get_byte1): New function. + (charset_get_byte2): New function. + (Vdefault_coded_charset_priority_list): New variable. + (vars_of_mule_charset): Add new variable + `default-coded-charset-priority-list'. + +1999-09-12 MORIOKA Tomohiko + + * char-ucs.h (XCHARSET_GET_BYTE1): New inline function. + (XCHARSET_GET_BYTE2): New inline function. + (breakup_char_1): Use `XCHARSET_GET_BYTE1' and + `XCHARSET_GET_BYTE2'. + +1999-09-12 MORIOKA Tomohiko + + * mule-charset.c (make_charset): Initialize + `CHARSET_TO_BYTE1_TABLE(cs)' and `CHARSET_TO_BYTE2_TABLE(cs)' by + NULL if table is not defined. + +1999-09-11 MORIOKA Tomohiko + + * text-coding.c (char_encode_shift_jis): Use + `XCHARSET_TO_BYTE1_TABLE' for `Vcharset_latin_jisx0201' instead of + `ucs_to_latin_jisx0201'. + + * mule-charset.c (ucs_to_latin_jisx0201): Deleted. + (ucs_to_latin_iso8859_2): Deleted. + (ucs_to_latin_iso8859_3): Deleted. + (ucs_to_latin_iso8859_4): Deleted. + (ucs_to_latin_iso8859_9): Deleted. + (ucs_to_latin_viscii_lower): Deleted. + (ucs_to_latin_viscii_upper): Deleted. + (ucs_to_latin_tcvn5712): Deleted. + (make_charset): Add new argument `decoding_table'; set up + `CHARSET_DECODING_TABLE(cs)' in UTF-2000; set up + `CHARSET_TO_BYTE1_TABLE(cs)' for 94-set and 96-set if + `decoding_table' is defined in UTF-2000. + (Fmake_charset): Modify for `make_charset'. + (Fmake_reverse_direction_charset): Likewise. + (complex_vars_of_mule_charset): Likewise; delete `GENERATE_94_SET' + and `GENERATE_96_SET'. + + * char-ucs.h (latin_jisx0201_to_ucs): Deleted. + (ucs_to_latin_jisx0201): Deleted. + (latin_iso8859_2_to_ucs): Deleted. + (ucs_to_latin_iso8859_2): Deleted. + (latin_iso8859_3_to_ucs): Deleted. + (ucs_to_latin_iso8859_3): Deleted. + (latin_iso8859_4_to_ucs): Deleted. + (ucs_to_latin_iso8859_4): Deleted. + (latin_iso8859_9_to_ucs): Deleted. + (ucs_to_latin_iso8859_9): Deleted. + (latin_viscii_lower_to_ucs): Deleted. + (ucs_to_latin_viscii_lower): Deleted. + (latin_viscii_upper_to_ucs): Deleted. + (ucs_to_latin_viscii_upper): Deleted. + (struct Lisp_Charset): Renamed `encoding_table' to + `to_byte1_table'; add `to_byte2_table'. + (CHARSET_DECODING_TABLE): New macro. + (CHARSET_TO_BYTE1_TABLE): New macro. + (CHARSET_TO_BYTE2_TABLE): New macro. + (XCHARSET_DECODING_TABLE): New macro. + (XCHARSET_TO_BYTE1_TABLE): New macro. + (XCHARSET_TO_BYTE2_TABLE): New macro. + (MAKE_CHAR): Use `XCHARSET_DECODING_TABLE'; don't use `*_to_ucs' + tables. + (breakup_char_1): Use `XCHARSET_TO_BYTE1_TABLE' if it is defined; + don't use `ucs_to_*' tables. + +1999-09-11 MORIOKA Tomohiko + + * text-coding.c (Fmake_coding_system): Don't set up + `codesys->fixed.size'. + (encode_coding_no_conversion): Use `if' instead of `switch'. + + * file-coding.h (struct Lisp_Coding_System): Delete `fixed.size'. + +1999-09-11 MORIOKA Tomohiko + + * mule-charset.c (make_charset): Delete argument `rep_bytes'. + (Fmake_charset): Modify for `make_charset'. + (Fmake_reverse_direction_charset): Likewise. + (complex_vars_of_mule_charset): Likewise. + +1999-09-11 MORIOKA Tomohiko + + * text-coding.c (char_encode_shift_jis): Use table + `ucs_to_latin_jisx0201' and BREAKUP_CHAR. + +1999-09-11 MORIOKA Tomohiko + + * text-coding.c (text_encode_generic): Use `if' instead of + `switch'. + (decode_coding_sjis): Use `MAKE_CHAR' and `DECODE_ADD_UCS_CHAR' to + decode JIS-Latin. + +1999-09-10 MORIOKA Tomohiko + + * text-coding.c (encode_coding_sjis): Deleted. + (char_encode_shift_jis): New function. + (char_finish_shift_jis): New function. + (reset_encoding_stream): Set up `encode_char' and `finish' for + `CODESYS_UCS4' and `CODESYS_SHIFT_JIS'. + (mule_encode): Use generic encoder for `CODESYS_SHIFT_JIS'. + (char_encode_utf8): Treat `eol_type'. + +1999-09-10 MORIOKA Tomohiko + + * file-coding.c (decode_coding_iso2022): Use + `DECODE_ADD_UCS_CHAR'; don't use `XCHARSET_REP_BYTES'. + +1999-09-10 MORIOKA Tomohiko + + * mule-charset.c (vars_of_mule_charset): Update `utf-2000-version' + to 0.7 (Hirano). + +1999-09-10 MORIOKA Tomohiko + + * char-lb.h (CHAR_COLUMNS): New macro. + +1999-09-09 MORIOKA Tomohiko + + * text-coding.c (char_encode_ucs4): New function. + (char_finish_ucs4): New function. + (encode_coding_ucs4): Deleted. + (mule_encode): Use generic encoder for `CODESYS_UCS4'. + (text_encode_generic): Delete local variable `charset' and `half'. + (ucs_to_mule_table): Deleted. + (mule_to_ucs_table): Deleted. + (Fset_ucs_char): Deleted. + (ucs_to_char): Deleted. + (Fucs_char): Deleted. + (Fset_char_ucs): Deleted. + (Fchar_ucs): Deleted. + (decode_ucs4): Deleted. + (mule_char_to_ucs4): Deleted. + (encode_ucs4): Deleted. + (decode_coding_ucs4): Use `DECODE_ADD_UCS_CHAR'. + (decode_coding_utf8): Likewise. + (decode_coding_iso2022): Likewise; don't use `XCHARSET_REP_BYTES'. + (char_encode_iso2022): Fixed. + (syms_of_file_coding): Delete `Fset_ucs_char', `Fucs_char', + `Fset_char_ucs' and `Fchar_ucs'. + (complex_vars_of_file_coding): Don't initialize + `ucs_to_mule_table'. + + * objects-tty.c (tty_initialize_font_instance): Don't use + `XCHARSET_COLUMNS'. + + * mule-charset.c (make_charset): Don't set up CHARSET_REP_BYTES in + UTF-2000. + + * redisplay-tty.c (tty_output_display_block): Use `CHAR_COLUMNS' + instead of `XCHARSET_COLUMNS' and `CHAR_CHARSET'. + + * insdel.c (bufbyte_string_displayed_columns): Use `CHAR_COLUMNS' + instead of `XCHARSET_COLUMNS' and `CHAR_CHARSET'. + (emchar_string_displayed_columns): Likewise. + + * indent.c (column_at_point): Use `CHAR_COLUMNS' instead of + `XCHARSET_COLUMNS' and `CHAR_CHARSET'. + (string_column_at_point): Likewise. + (Fmove_to_column): Likewise. + + * char-ucs.h (struct Lisp_Charset): Delete `rep_bytes'; add + `encoding_table' and `decoding_table'. + (CHARSET_REP_BYTES): Deleted. + (XCHARSET_REP_BYTES): Deleted. + (XCHARSET_COLUMNS): Deleted. + (CHAR_COLUMNS): New macro. + (lookup_composite_char): Deleted unconditionally. + (composite_char_string): Likewise. + +1999-09-09 MORIOKA Tomohiko + + * char-ucs.h (Emchar_to_byte_table): New type. + (get_byte_from_character_table): New function interface. + (Vcharset_latin_jisx0201): New variable. + (latin_jisx0201_to_ucs): New variable. + (ucs_to_latin_jisx0201): New variable. + (Vcharset_latin_iso8859_2): New variable. + (latin_iso8859_2_to_ucs): New variable. + (ucs_to_latin_iso8859_2): New variable. + (Vcharset_latin_iso8859_3): New variable. + (latin_iso8859_3_to_ucs): New variable. + (ucs_to_latin_iso8859_3): New variable. + (Vcharset_latin_iso8859_4): New variable. + (latin_iso8859_4_to_ucs): New variable. + (ucs_to_latin_iso8859_4): New variable. + (Vcharset_latin_iso8859_9): New variable. + (latin_iso8859_9_to_ucs): New variable. + (ucs_to_latin_iso8859_9): New variable. + (Vcharset_latin_viscii_lower): New variable. + (latin_viscii_lower_to_ucs): New variable. + (ucs_to_latin_viscii_lower): New variable. + (Vcharset_latin_viscii_upper): New variable. + (latin_viscii_upper_to_ucs): New variable. + (ucs_to_latin_viscii_upper): New variable. + (CHARSET_ID_OFFSET_94): Changed from 0x60 to 0x55. + (LEADING_BYTE_LATIN_VISCII_LOWER): New macro. + (LEADING_BYTE_LATIN_VISCII_UPPER): New macro. + (MAKE_CHAR): Map `latin-iso8859-2', `latin-iso8859-3', + `latin-iso8859-4', `latin-iso8859-9', `latin-jisx0201', + `vietnamese-viscii-lower' and `vietnamese-viscii-upper' to BMP. + (breakup_char_1): Use `ucs_to_latin_iso8859_2', + `ucs_to_latin_iso8859_3', `ucs_to_latin_iso8859_4', + `ucs_to_latin_iso8859_9', `ucs_to_latin_viscii_lower', + `ucs_to_latin_viscii_upper' and `ucs_to_latin_jisx0201' tables. + + * mule-charset.c (Vcharset_latin_viscii_lower): New variable. + (Vcharset_latin_viscii_upper): New variable. + (make_byte_from_character_table): New function. + (put_byte_from_character_table): New function. + (get_byte_from_character_table): New function. + (CHAR96): New macro. + (ucs_to_latin_jisx0201): New variable. + (latin_jisx0201_to_ucs): New variable. + (ucs_to_latin_iso8859_2): New variable. + (latin_iso8859_2_to_ucs): New variable. + (ucs_to_latin_iso8859_3): New variable. + (latin_iso8859_3_to_ucs): New variable. + (ucs_to_latin_iso8859_4): New variable. + (latin_iso8859_4_to_ucs): New variable. + (ucs_to_latin_iso8859_9): New variable. + (latin_iso8859_9_to_ucs): New variable. + (ucs_to_latin_viscii_lower): New variable. + (latin_viscii_lower_to_ucs): New variable. + (ucs_to_latin_viscii_upper): New variable. + (latin_viscii_upper_to_ucs): New variable. + (ucs_to_latin_tcvn5712): New variable. + (latin_tcvn5712_to_ucs): New variable. + (Qlatin_viscii_lower): New variable. + (Qlatin_viscii_upper): New variable. + (syms_of_mule_charset): Set up new symbol + `vietnamese-viscii-lower' and `vietnamese-viscii-upper'. + (complex_vars_of_mule_charset): Set up new charset + `vietnamese-viscii-lower' and `vietnamese-viscii-upper'; new macro + `GENERATE_94_SET' and `GENERATE_96_SET'; use them to generate + `ucs_to_' tables. + +1999-09-08 MORIOKA Tomohiko + + * text-coding.c: New file. + +1999-09-07 MORIOKA Tomohiko + + * mule-charset.c (Fmake_char): Fix problem of 256-set. + + * char-ucs.h (Vcharset_ucs_bmp): New variable. + (MAKE_CHAR): Modify for `ucs-bmp'. + (breakup_char_1): Return `ucs-bmp' and code point of BMP for + non-MULE characters of BMP. + +1999-09-06 MORIOKA Tomohiko + + * mule-charset.c (vars_of_mule_charset): Update `utf-2000-version' + to 0.6. + +1999-09-05 MORIOKA Tomohiko + + * lstream.h: + - Include multibyte.h instead of character.h for `BYTE_ASCII_P'. + - Include character.h for `CHAR_ASCII_P'. + + * mb-multibyte.h (CHAR_MULTIBYTE_P): Moved from mule-charset.h. + + * mule-charset.h (CHAR_MULTIBYTE_P): Moved to mb-multibyte.h. + (CHAR_ASCII_P): Don't use `CHAR_MULTIBYTE_P'. + + * mb-multibyte.h (BYTE_ASCII_P): Moved from char-ucs.h. + (BYTE_C0_P): Likewise. + (BYTE_C1_P): Likewise. + (Lstream_get_emchar_1): Likewise. + (Lstream_fput_emchar): Likewise. + (Lstream_funget_emchar): Likewise. + (copy_internal_to_external): Likewise. + (copy_external_to_internal): Likewise. + + * char-ucs.h (BYTE_ASCII_P): Moved to mb-multibyte.h. + (BYTE_C0_P): Likewise. + (BYTE_C1_P): Likewise. + (Lstream_get_emchar_1): Likewise. + (Lstream_fput_emchar): Likewise. + (Lstream_funget_emchar): Likewise. + (copy_internal_to_external): Likewise. + (copy_external_to_internal): Likewise. + + * mb-1byte.h (BYTE_ASCII_P): Moved from buffer.h. + (REP_BYTES_BY_FIRST_BYTE): Likewise. + + * buffer.h (REP_BYTES_BY_FIRST_BYTE): Moved to mb-1byte.h. + (BYTE_ASCII_P): Moved to mb-1byte.h. + +1999-09-04 MORIOKA Tomohiko + + * mb-utf-8.h, mb-lb.h: Include mb-multibyte.h. + + * multibyte.h: Include mb-1byte.h in unibyte-XEmacs. + (MAX_EMCHAR_LEN): Moved to mb-1byte.h. + (VALID_CHARPTR_P): Moved to mb-*byte.h. + (VALIDATE_CHARPTR_BACKWARD): Likewise. + (VALIDATE_CHARPTR_FORWARD): Likewise. + (simple_charptr_emchar): Moved to mb-multibyte.h. + (simple_set_charptr_emchar): Likewise. + (simple_charptr_copy_char): Likewise. + (non_ascii_charptr_emchar): Likewise. + (non_ascii_set_charptr_emchar): Likewise. + (non_ascii_charptr_copy_char): Likewise. + (charptr_emchar): Moved to mb-*byte.h. + (set_charptr_emchar): Likewise. + (charptr_copy_char): Likewise. + + * mb-1byte.h, mb-multibyte.h: New files. + +1999-09-03 MORIOKA Tomohiko + + * mb-utf-8.h (MULTIBYTE): New macro. + (MAX_EMCHAR_LEN): Moved from buffer.h. + (REP_BYTES_BY_FIRST_BYTE): Moved from char-ucs.h. + + * char-ucs.h (REP_BYTES_BY_FIRST_BYTE): Moved to mb-utf-8.h. + + * mb-lb.h, multibyte.h: New files. + + * char-1byte.h (Charset_ID): Moved from buffer.h. + (MIN_LEADING_BYTE): Likewise. + (LEADING_BYTE_ASCII): Likewise. + (NUM_LEADING_BYTES): Likewise. + (CHARSETP): Likewise. + (CHARSET_BY_LEADING_BYTE): Likewise. + (XCHARSET_LEADING_BYTE): Likewise. + (XCHARSET_GRAPHIC): Likewise. + (XCHARSET_COLUMNS): Likewise. + (XCHARSET_DIMENSION): Likewise. + (CHAR_CHARSET): Likewise. + (CHAR_LEADING_BYTE): Likewise. + (BREAKUP_CHAR): Likewise. + (Vcharset_ascii): Likewise. + + * buffer.h: Include multibyte.h unconditionally. + (VALID_CHARPTR_P): Moved to multibyte.h. + (ASSERT_VALID_CHARPTR): Likewise. + (REAL_INC_CHARPTR): Likewise. + (REAL_INC_CHARBYTIND): Likewise. + (REAL_DEC_CHARPTR): Likewise. + (INC_CHARPTR): Likewise. + (INC_CHARBYTIND): Likewise. + (DEC_CHARPTR): Likewise. + (VALIDATE_CHARPTR_BACKWARD): Likewise. + (VALIDATE_CHARPTR_FORWARD): Likewise. + (charptr_n_addr): Likewise. + (MAX_EMCHAR_LEN): Moved to mb-*.h. + (simple_charptr_emchar): Moved to multibyte.h. + (simple_set_charptr_emchar): Likewise. + (simple_charptr_copy_char): Likewise. + (non_ascii_charptr_emchar): Likewise. + (non_ascii_set_charptr_emchar): Likewise. + (non_ascii_charptr_copy_char): Likewise. + (charptr_emchar): Likewise. + (set_charptr_emchar): Likewise. + (charptr_copy_char): Likewise. + (charptr_emchar_n): Likewise. + (Charset_ID): Moved to char-1byte.h. + (Vcharset_ascii): Likewise. + (CHAR_CHARSET): Likewise. + (CHAR_LEADING_BYTE): Likewise. + (LEADING_BYTE_ASCII): Likewise. + (NUM_LEADING_BYTES): Likewise. + (MIN_LEADING_BYTE): Likewise. + (CHARSETP): Likewise. + (CHARSET_BY_LEADING_BYTE): Likewise. + (XCHARSET_LEADING_BYTE): Likewise. + (XCHARSET_GRAPHIC): Likewise. + (XCHARSET_COLUMNS): Likewise. + (XCHARSET_DIMENSION): Likewise. + (BREAKUP_CHAR): Likewise. + +1999-09-02 MORIOKA Tomohiko + + * character.h: Add document about interface for characters. + + * char-ucs.h (CHAR_ASCII_P): Modify name of argument. + (MAKE_CHAR): Delete comment about + `FIELD2_TO_OFFICIAL_LEADING_BYTE' and + `FIELD2_TO_PRIVATE_LEADING_BYTE'. + (BREAKUP_CHAR): Modify name of arguments. + (CHAR_CHARSET): Modify name of argument. + + * buffer.h: Delete document about Emchar accessors. + +1999-09-02 MORIOKA Tomohiko + + * character.h (CHAR_INTP): Moved from buffer.h + (CHAR_OR_CHAR_INTP): Likewise. + (XCHAR_OR_CHAR_INT): Likewise. + (CHECK_CHAR_COERCE_INT): Likewise. + + * buffer.h (CHAR_INTP): Moved to character.h + (CHAR_OR_CHAR_INTP): Likewise. + (XCHAR_OR_CHAR_INT): Likewise. + (CHECK_CHAR_COERCE_INT): Likewise. + +1999-09-02 MORIOKA Tomohiko + + * character.h: + - Move definitions about UCS-2000 (UCS-4) to char-ucs.h. + - Include char-1byte.h, char-lb.h or char-ucs.h. + + * mb-utf-8.h (CHAR_ASCII_P): Moved to char-ucs.h. + + * buffer.h: Include character unconditionally. + (valid_char_p): Moved to char-*.h. + (non_ascii_valid_char_p): Moved to char-lb.h. + + * char-1byte.h, char-lb.h, char-ucs.h: New files. + +1999-09-02 MORIOKA Tomohiko + + * mule-ccl.c (ccl_driver): Don't define `CCL_WriteMultibyteChar2' + in UTF-2000 because it is not ported yet and not to use + `FIELD2_TO_OFFICIAL_LEADING_BYTE', `MIN_LEADING_BYTE_OFFICIAL_2', + `FIELD1_TO_OFFICIAL_LEADING_BYTE' and + `FIELD1_TO_PRIVATE_LEADING_BYTE'. + + * mb-utf-8.h (CHAR_MULTIBYTE_P): Moved from character.h. + (CHAR_ASCII_P): Moved from character.h. + + * character.h (CHAR_MULTIBYTE_P): Moved to mb-utf-8.h. + (CHAR_ASCII_P): Likewise. + (CHAR_FIELD1_MASK): Deleted. + (CHAR_FIELD2_MASK): Deleted. + (CHAR_FIELD3_MASK): Deleted. + (MAX_CHAR_BASIC_LATIN): New macro. + (CHAR_FIELD1): Deleted. + (CHAR_FIELD2_INTERNAL): Deleted. + (CHAR_FIELD3_INTERNAL): Deleted. + (FIELD1_TO_PRIVATE_LEADING_BYTE): Deleted. + (FIELD1_TO_OFFICIAL_LEADING_BYTE): Deleted. + (FIELD2_TO_PRIVATE_LEADING_BYTE): Deleted. + (FIELD2_TO_OFFICIAL_LEADING_BYTE): Deleted. + (MIN_CHAR_FIELD1_OFFICIAL): Deleted. + (MAX_CHAR_FIELD1_OFFICIAL): Deleted. + (MIN_CHAR_FIELD2_PRIVATE): Deleted. + (MAX_CHAR_FIELD2_PRIVATE): Deleted. + (MIN_CHAR_FIELD1_PRIVATE): Deleted. + (MAX_CHAR_FIELD1_PRIVATE): Deleted. + (MULE_CHAR_PRIVATE_OFFSET): Deleted. + (MIN_CHAR_PRIVATE_TYPE9N): Deleted. + (MAX_CHAR_PRIVATE_TYPE9N): Deleted. + (MIN_CHAR_PRIVATE_TYPE9NX9N): Deleted. + (MIN_CHAR_OFFICIAL_TYPE9NX9N): Deleted. + (MIN_CHAR_COMPOSITION): Deleted. + (breakup_char_1): Use `MAX_CHAR_BASIC_LATIN' instead of + `CHAR_ASCII_P'; use `0x7f' instead of `CHAR_FIELD3_INTERNAL'. + +1999-09-02 MORIOKA Tomohiko + + * buffer.h: Include mb-utf-8.h in UTF-2000. + + * character.h (BUFBYTE_FIRST_BYTE_P): Moved to mb-utf-8.h. + + * mb-utf-8.h: New file. + +1999-09-02 MORIOKA Tomohiko + + * chartab.h (CHAR_TABLE_NON_ASCII_VALUE_UNSAFE): Use `Charset_ID' + instead of `int'. + + * mule-charset.h, buffer.h (Charset_ID): New type. + +1999-09-01 MORIOKA Tomohiko + + * mule-canna.c (c2mu): Use `MAKE_CHAR', + `Vcharset_japanese_jisx0212' and `Vcharset_japanese_jisx0208' + instead of `MULE_CHAR_PRIVATE_OFFSET', + `LEADING_BYTE_JAPANESE_JISX0212', `LEADING_BYTE_JAPANESE_JISX0208' + and `FIELD1_TO_OFFICIAL_LEADING_BYTE'. + (m2c): Use `BREAKUP_CHAR' and `XCHARSET_FINAL'. + + * character.h (Vcharset_japanese_jisx0212): New variable + definition. + +1999-09-01 MORIOKA Tomohiko + + * mule-charset.c (Vcharset_ucs_bmp): New variable in UTF-2000. + (charset_by_attributes): Delete array about direction. + (latin_a_char_to_charset): New variable in UTF-2000. + (latin_a_char_to_byte1): New variable in UTF-2000. + (latin_a_char_to_byte2): New variable in UTF-2000. + (Qucs_bmp): New variable. + (next_allocated_1_byte_leading_byte): Use `Charset_ID' instead of + `Bufbyte'. + (next_allocated_2_byte_leading_byte): Likewise. + (non_ascii_set_charptr_emchar): Likewise. + (make_charset): Likewise; add `CHARSET_TYPE_128X128' and + `CHARSET_TYPE_256X256' in UTF-2000; modify for + `charset_by_attributes'. + (get_unallocated_leading_byte): Use `Charset_ID' instead of `int'. + (char-charset): Use `CHAR_CHARSET' instead of `CHAR_LEADING_BYTE' + and `CHARSET_BY_LEADING_BYTE'. + (syms_of_mule_charset): Set up `ucs-bmp'; move setting of + `utf-2000-version' to `vars_of_mule_charset'. + (vars_of_mule_charset): Modify for `charset_by_attributes'; don't + define `leading-code-private-11' in UTF-2000; move setting of + `utf-2000-version' from `syms_of_mule_charset'. + (complex_vars_of_mule_charset): Set up charset `ucs-bmp' in + UTF-2000. + + * character.h (Charset_ID): New type. + (LEADING_BYTE_UCS_BMP): New macro. + (LEADING_BYTE_CONTROL_1): Changed from 0x8F to 0x81. + (CHARSET_ID_OFFSET_94): New macro. + (MIN_CHARSET_ID_PRIVATE_94): New macro. + (MAX_CHARSET_ID_PRIVATE_94): New macro. + (LEADING_BYTE_ASCII): Changed to use CHARSET_ID_OFFSET_94 and + final-byte. + (LEADING_BYTE_KATAKANA_JISX0201): Likewise. + (LEADING_BYTE_LATIN_JISX0201): Likewise. + (CHARSET_ID_OFFSET_96): New macro. + (LEADING_BYTE_LATIN_ISO8859_1): Changed to use + CHARSET_ID_OFFSET_96 and final-byte. + (LEADING_BYTE_LATIN_ISO8859_2): Likewise. + (LEADING_BYTE_LATIN_ISO8859_3): Likewise. + (LEADING_BYTE_LATIN_ISO8859_4): Likewise. + (LEADING_BYTE_GREEK_ISO8859_7): Likewise. + (LEADING_BYTE_ARABIC_ISO8859_6): Likewise. + (LEADING_BYTE_HEBREW_ISO8859_8): Likewise. + (LEADING_BYTE_CYRILLIC_ISO8859_5): Likewise. + (LEADING_BYTE_LATIN_ISO8859_9): Likewise. + (LEADING_BYTE_THAI_TIS620): Likewise. + (MIN_LEADING_BYTE_PRIVATE_1): Changed from 0x0D0 to 0xD0. + (MAX_LEADING_BYTE_PRIVATE_1): Changed from 0x11f to 0xDF. + (CHARSET_ID_OFFSET_94x94): New macro. + (LEADING_BYTE_CHINESE_BIG5_1): Changed to use + CHARSET_ID_OFFSET_94x94 and final-byte. + (LEADING_BYTE_CHINESE_BIG5_2): Likewise. + (MIN_LEADING_BYTE_PRIVATE_2): Likewise. + (MAX_LEADING_BYTE_PRIVATE_2): Likewise. + (LEADING_BYTE_JAPANESE_JISX0208_1978): Likewise. + (LEADING_BYTE_CHINESE_GB2312): Likewise. + (LEADING_BYTE_JAPANESE_JISX0208): Likewise. + (LEADING_BYTE_KOREAN_KSC5601): Likewise. + (LEADING_BYTE_JAPANESE_JISX0212): Likewise. + (LEADING_BYTE_CHINESE_CCITT_GB): Likewise. + (LEADING_BYTE_CHINESE_CNS11643_*): Likewise. + (LEADING_BYTE_KOREAN_KPS9566): Likewise. + (CHARSET_TYPE_128X128): New macro. + (CHARSET_TYPE_256X256): New macro. + (XCHARSET_PRIVATE_P): Delete unconditionally. + (charset_by_attributes): Delete array about direction. + (CHARSET_BY_LEADING_BYTE): Use `Charset_ID' instead of `int'. + (CHARSET_BY_ATTRIBUTES): Modify for `charset_by_attributes'. + (MIN_CHAR_94): New macro. + (MAX_CHAR_94): New macro. + (MIN_CHAR_96): New macro. + (MAX_CHAR_96): New macro. + (MIN_CHAR_94x94): New macro. + (MAX_CHAR_94x94): New macro. + (MIN_CHAR_96x96): New macro. + (MAX_CHAR_96x96): New macro. + (FIELD1_TO_PRIVATE_LEADING_BYTE): Use `CHARSET_ID_OFFSET_94x94'. + (FIELD1_TO_OFFICIAL_LEADING_BYTE): Likewise. + (FIELD2_TO_PRIVATE_LEADING_BYTE): Use `(MIN_LEADING_BYTE_PRIVATE_1 + - 32)'. + (FIELD2_TO_OFFICIAL_LEADING_BYTE): Use `LEADING_BYTE_ASCII'. + (MIN_CHAR_FIELD2_OFFICIAL): Deleted. + (MAX_CHAR_FIELD2_OFFICIAL): Deleted. + (MIN_CHAR_OFFICIAL_TYPE9N): Deleted. + (MAX_CHAR_PRIVATE_TYPE9N): Changed. + (MAKE_CHAR): Use `XCHARSET_FINAL' instead of + `XCHARSET_LEADING_BYTE' to make code-point. + (latin_a_char_to_charset): New variable. + (latin_a_char_to_byte1): New variable. + (latin_a_char_to_byte2): New variable. + (breakup_char_1): Use `latin_a_char_to_{charset|byte1|byte2}' for + Latin Extended-A; use `CHARSET_BY_ATTRIBUTES' instead of + `CHARSET_BY_LEADING_BYTE' to get charset for ISO-2022 characters. + + * insdel.c (find_charsets_in_bufbyte_string): Use `Charset_ID' + instead of `unsigned char'; use `MIN_LEADING_BYTE' instead of 128. + (find_charsets_in_emchar_string): Likewise. + (vars_of_insdel): Don't define local variable `i' in UTF-2000. + + * file-coding.c (Fdecode_big5_char): Use `Charset_ID' instead of + `int'. + (decode_coding_iso2022): Likewise. + + * toolbar-x.c (x_output_toolbar_button): Use `Charset_ID' instead + of `unsigned char'. + + * redisplay.c (redisplay_text_width_emchar_string): Use + `Charset_ID' instead of `unsigned char'. + (redisplay_frame_text_width_string): Likewise. + + * glyphs.c (glyph_height_internal): Use `Charset_ID' instead of + `unsigned char'. + + * faces.h, faces.c (ensure_face_cachel_complete): Use `Charset_ID' + instead of `unsigned char'. + (face_cachel_charset_font_metric_info): Likewise. + + * chartab.c (print_char_table): Use `Charset_ID' instead of `int'. + (get_non_ascii_char_table_value): Likewise. + (get_char_table): Likewise. + (put_char_table): Likewise. + (map_over_other_charset): Likewise. + (map_char_table): Likewise. + + * buffer.h (find_charsets_in_bufbyte_string): Use `Charset_ID' + instead of `unsigned char'. + +1999-08-31 MORIOKA Tomohiko + + * character.h (PRE_LEADING_BYTE_PRIVATE_1): Deleted. + (PRE_LEADING_BYTE_PRIVATE_2): Deleted. + + * mule-charset.c (leading_code_private_11): Don't define in + UTF-2000. + + * mule-ccl.c (ccl_driver): Don't define `CCL_ReadMultibyteChar2' + in UTF-2000 because it is not ported yet and not to use + `PRE_LEADING_BYTE_PRIVATE_1' and `PRE_LEADING_BYTE_PRIVATE_2'. + +1999-08-30 MORIOKA Tomohiko + + * character.h (LEADING_BYTE_COMPOSITE): Deleted. + +1999-08-29 MORIOKA Tomohiko + + * regex.c (re_compile_fastmap): Don't use `LEADING_BYTE_PREFIX_P' + in UTF-2000. + + * chartab.h (CHAR_TABLE_NON_ASCII_VALUE_UNSAFE): Use int instead + of unsigned char to store leading-byte. + + * chartab.c (get_non_ascii_char_table_value): Don't use + `BREAKUP_CHAR_1_UNSAFE' in UTF-2000. + + * file-coding.c (encode_coding_big5): Delete bogus implementation + in UTF2000. + + * character.h (LEADING_BYTE_*): Delete definition for + non-UTF-2000. + (LEADING_BYTE_PRIVATE_P): Deleted unconditionally. + (LEADING_BYTE_PREFIX_P): Deleted. + (PRIVATE_LEADING_BYTE_PREFIX): Deleted. + (BUFBYTE_FIRST_BYTE_P): Delete definition for non-UTF-2000. + (BUFBYTE_LEADING_BYTE_P): Deleted. + (CHARSET_PRIVATE_P): Deleted unconditionally. + (rep_bytes_by_first_byte): Deleted unconditionally. + (REP_BYTES_BY_FIRST_BYTE): Delete definition for non-UTF-2000. + (FIELD1_TO_PRIVATE_LEADING_BYTE): Likewise. + (FIELD1_TO_OFFICIAL_LEADING_BYTE): Likewise. + (FIELD2_TO_PRIVATE_LEADING_BYTE): Likewise. + (CHAR_FIELD2): Deleted. + (CHAR_FIELD3): Deleted. + (MAKE_CHAR): Delete definition for non-UTF-2000. + (BREAKUP_CHAR_1_UNSAFE): Deleted. + (breakup_char_1): New implementation. + (CHAR_CHARSET): Use `BREAKUP_CHAR'. + (CHAR_LEADING_BYTE): Use `CHAR_CHARSET'. + +1999-08-29 MORIOKA Tomohiko + + * character.h (REP_BYTES_BY_FIRST_BYTE): Change order of + condition. + +1999-08-28 MORIOKA Tomohiko + + * character.h (LEADING_BYTE_PRIVATE_P): Don't define in UTF2000. + (CHARSET_PRIVATE_P): Likewise. + (XCHARSET_PRIVATE_P): Likewise. + (MAKE_CHAR): Don't use XCHARSET_PRIVATE_P in UTF2000. + + * file-coding.c (encode_coding_ucs4): Delete bogus implement in + UTF2000. + (decode_coding_iso2022): Don't use XCHARSET_PRIVATE_P in UTF2000. + +1999-08-28 MORIOKA Tomohiko + + * character.h (LEADING_BYTE_*): Changed in UTF2000. + (NUM_LEADING_BYTES): Changed from 128 to 256. + (FIELD1_TO_PRIVATE_LEADING_BYTE): Change value to 0x80 in UTF2000. + (FIELD1_TO_OFFICIAL_LEADING_BYTE): Change value to 0x80 in + UTF2000. + (FIELD2_TO_PRIVATE_LEADING_BYTE): Change value to 0x80 in UTF2000. + + * mule-charset.c (Vcharset_chinese_cns11643_3): New variable in + UTF2000. + (Vcharset_chinese_cns11643_4): New variable in UTF2000. + (Vcharset_chinese_cns11643_5): New variable in UTF2000. + (Vcharset_chinese_cns11643_6): New variable in UTF2000. + (Vcharset_chinese_cns11643_7): New variable in UTF2000. + (Qchinese_cns11643_3): New variable in UTF2000. + (Qchinese_cns11643_4): New variable in UTF2000. + (Qchinese_cns11643_5): New variable in UTF2000. + (Qchinese_cns11643_6): New variable in UTF2000. + (Qchinese_cns11643_7): New variable in UTF2000. + (syms_of_mule_charset): Define `chinese-cns11643-3', + `chinese-cns11643-4', `chinese-cns11643-5', `chinese-cns11643-6' + and `chinese-cns11643-7' in UTF2000. + (vars_of_mule_charset): Initialize + next_allocated_2_byte_leading_byte by LEADING_BYTE_CHINESE_BIG5_2 + + 1 in UTF2000. + (complex_vars_of_mule_charset): Setup charset + `chinese-cns11643-3', `chinese-cns11643-4', `chinese-cns11643-5', + `chinese-cns11643-6' and `chinese-cns11643-7' in UTF2000. + +1999-08-27 MORIOKA Tomohiko + + * mule-charset.c: Move setting for `leading-code-private-11' from + `syms_of_mule_charset' to `vars_of_mule_charset'. + +1999-08-27 MORIOKA Tomohiko + + * mule-charset.h (CHARSET_BY_LEADING_BYTE): Use `MIN_LEADING_BYTE' + and `NUM_LEADING_BYTES' in assert. + +1999-08-27 MORIOKA Tomohiko + + * character.h (charset_by_leading_byte): Use `NUM_LEADING_BYTES' + instead of 128. + (CHARSET_BY_LEADING_BYTE): Use `MIN_LEADING_BYTE' and + `NUM_LEADING_BYTES' instead of 128. + +1999-08-26 MORIOKA Tomohiko + + * mule-charset.h (charset_by_leading_byte): Use + `NUM_LEADING_BYTES' instead of 128. + (CHARSET_BY_LEADING_BYTE): Use `MIN_LEADING_BYTE' instead of 128. + + * mule-charset.c (charset_by_leading_byte): Use + `NUM_LEADING_BYTES' instead of 128. + (make_charset): Use `MIN_LEADING_BYTE' instead of 128. + + * faces.h (FACE_CACHEL_FONT): Use `MIN_LEADING_BYTE' instead of + 128. + +1999-08-25 MORIOKA Tomohiko + + * mule-charset.c (syms_of_mule_charset): Update to + 0.4 (Shin-Imamiya). + +1999-07-13 Daiki Ueno + + * file-coding.c (encode_coding_sjis): New implementation for + UTF2000. (decode_coding_sjis): Ditto. + +1999-06-17 MORIOKA Tomohiko + + * mule-charset.c, character.h (Bytecount rep_bytes_by_first_byte): + Don't define in UTF2000. + + * character.h: Include mule-charset.h if CHAR_IS_UCS4 is not + defined. + + * redisplay-msw.c, objects-tty.c, objects-msw.c, mule-wnnfns.c, + mule-ccl.c, lstream.h, buffer.h: Include character.h in every + MULE. + +1999-06-17 MORIOKA Tomohiko + + * config.h.in (CHAR_IS_UCS4): New macro. + + * mule-charset.c (rep_bytes_by_first_byte): Modify for + conventional MULE representation. + (syms_of_mule_charset): Update to 0.3 (Imamiya). + + * mule-charset.h: Reverted to original. + + * redisplay-msw.c, objects-tty.c, objects-msw.c, mule-wnnfns.c, + mule-ccl.c, lstream.h, buffer.h: Use "character.h" instead of + "mule-charset.h" if CHAR_IS_UCS4 is defined. + + * character.h: New file. + + * file-coding.c (Fmake_coding_system): Set 1 to + `codesys->fixed.size' if TYPE is `no-conversion' and UTF2000 is + defined. + (encode_coding_no_conversion): New implementation for UTF2000. + + * file-coding.h (struct Lisp_Coding_System): Add new member + `fixed.size'. + +1999-06-16 MORIOKA Tomohiko + + * file-coding.c (decode_coding_iso2022): Code-point arguments of + `MAKE_CHAR' must be smaller than 0x80 in UTF2000. + (encode_coding_iso2022): New implementation for UTF2000. + +1999-06-15 MORIOKA Tomohiko + + * mule-canna.c (c2mu): New implementation for UTF2000. + (m2c): Likewise. + +1999-06-15 MORIOKA Tomohiko + + * file-coding.c (encode_coding_no_conversion): Modify for UTF2000. + +1999-06-15 MORIOKA Tomohiko + + * file-coding.c (reset_encoding_stream): Set 0 to + `str->iso2022.current_char_boundary' in UTF2000. + (encode_utf8): Don't define in UTF2000. + (encode_coding_utf8): New implementation for UTF-8 representation + of UTF2000. + (complex_vars_of_file_coding): Define coding-system `utf-8'. + +1999-06-15 MORIOKA Tomohiko + + * mule.c (vars_of_mule): Provide `utf-2000' in UTF2000. + + * mule-charset.h (BUFBYTE_FIRST_BYTE_P): Modify for UTF-8 in + UTF2000. + (REP_BYTES_BY_FIRST_BYTE): Likewise. + + * buffer.h (non_ascii_valid_char_p): Don't define in UTF2000. + + * mule-charset.c (non_ascii_set_charptr_emchar): Don't define + local variables `lb', `c1', `c2' and `charset' in UTF2000; encode + as UTF-8 in UTF2000. + (non_ascii_charptr_emchar): Decode as UTF-8 in UTF2000. + (non_ascii_valid_char_p): Don't define in UTF2000. + (non_ascii_charptr_copy_char): Add case 5 and 6 in UTF2000. + (Lstream_get_emchar_1): Likewise. + (utf-2000-version): New variable in UTF2000. + + * lread.c (read_escape): Add new reader `u'. + + * insdel.c (three_to_one_table): Don't define in UTF2000. + (bufpos_to_bytind_func): Use `buf->text->mule_size' instead of + `buf->text->mule_shifter' and `buf->text->mule_three_p' in + UTF2000. + (bytind_to_bufpos_func): Likewise. + (buffer_mule_signal_inserted_region): Likewise. + (vars_of_insdel): Don't initialize `three_to_one_table'. + (init_buffer_text): Use `buf->text->mule_size' instead of + `buf->text->mule_shifter' and `buf->text->mule_three_p' in + UTF2000. + + * file-coding.c (DECODE_ADD_BINARY_CHAR): New implementation for + UTF-8 representation in UTF2000. + (DECODE_ADD_UCS_CHAR): New macro in UTF2000. + (decode_ucs4): Use `DECODE_ADD_UCS_CHAR' in UTF2000. + (decode_coding_iso2022): Don't define local variable `lb' in + UTF2000; don't use LEADING_BYTE in UTF2000; use + `DECODE_ADD_UCS_CHAR' in UTF2000. + (convert_to_external_format): Decode as UTF-8 in UTF2000. + + * config.h.in (UTF2000): New macro. + + * buffer.h (struct buffer_text): Add new member `mule_size' and + don't add `mule_shifter' and `mule_three_p' in UTF2000. + (valid_char_p): Return always 1 in UTF2000. + (MAX_EMCHAR_LEN): 6 in UTF2000. + (three_to_one_table): Don't define in UTF2000. + (real_bufpos_to_bytind): Modify for UTF-8 representation in + UTF2000. + (real_bytind_to_bufpos): Likewise. + + * alloc.c (Fmake_string): Add case 5 and 6 for UTF2000. + +1999-06-10 MORIOKA Tomohiko + + * mule-charset.c (rep_bytes_by_first_byte): Modified for character + representation change. + (Vutf_2000_version): New variable. + (leading_code_private_11): New variable. + (syms_of_mule_charset): Add new variables `utf-2000-version' and + `leading-code-private-11'. + + * mule-charset.h (LEADING_BYTE_CHINESE_CCITT_GB): New macro. + (LEADING_BYTE_CHINESE_BIG5_1): Changed to 0x96 temporally. + (LEADING_BYTE_CHINESE_CNS11643_1): Changed to 0x97. + (LEADING_BYTE_CHINESE_CNS11643_2): Changed to 0x98. + (LEADING_BYTE_CHINESE_CNS11643_3): New macro. + (LEADING_BYTE_CHINESE_CNS11643_4): Likewise. + (LEADING_BYTE_CHINESE_CNS11643_5): Likewise. + (LEADING_BYTE_CHINESE_CNS11643_6): Likewise. + (LEADING_BYTE_CHINESE_CNS11643_7): Likewise [but not used]. + (LEADING_BYTE_CHINESE_BIG5_2): Changed to 0x9D temporally. + (LEADING_BYTE_KOREAN_KPS9566): New macro [but not used]. + (CHAR_FIELD1_MASK): Changed to (0x7F << 14). + (MIN_CHAR_GREEK): New macro. + (MAX_CHAR_GREEK): New macro. + (MIN_CHAR_CYRILLIC): New macro. + (MAX_CHAR_CYRILLIC): New macro. + (MIN_CHAR_HEBREW): New macro. + (MAX_CHAR_HEBREW): New macro. + (MIN_CHAR_THAI): New macro. + (MAX_CHAR_THAI): New macro. + (MIN_CHAR_HALFWIDTH_KATAKANA): New macro. + (MAX_CHAR_HALFWIDTH_KATAKANA): New macro. + (CHAR_FIELD2_INTERNAL): New macro [renamed from `CHAR_FIELD2'. + (CHAR_FIELD3_INTERNAL): New macro [renamed from `CHAR_FIELD3'. + (FIELD1_TO_PRIVATE_LEADING_BYTE): Changed to 0xc0. + (FIELD1_TO_OFFICIAL_LEADING_BYTE): Changed to 0x50. + (CHAR_FIELD2): New inline function. + (CHAR_FIELD3): New inline function. + (MULE_CHAR_PRIVATE_OFFSET): New macro. + (MIN_CHAR_OFFICIAL_TYPE9N): Shifted to `MULE_CHAR_PRIVATE_OFFSET'. + (MIN_CHAR_PRIVATE_TYPE9N): Likewise. + (MIN_CHAR_PRIVATE_TYPE9NX9N): Likewise. + (MIN_CHAR_OFFICIAL_TYPE9NX9N): Likewise. + (MIN_CHAR_COMPOSITION): Likewise. + (CHAR_LEADING_BYTE): Modified for character representation change. + (MAKE_CHAR): Likewise. + + * lisp.h (Vcharset_latin_iso8859_1): New variable. + (Vcharset_greek_iso8859_7): Likewise. + (Vcharset_cyrillic_iso8859_5): Likewise. + (Vcharset_hebrew_iso8859_8): Likewise. + (Vcharset_thai_tis620): Likewise. + (Vcharset_katakana_jisx0201): Likewise. + 2003-09-03 Vin Shelton * XEmacs 21.4.14 is released diff --git a/src/abbrev.c b/src/abbrev.c index 34bf815..5687ee1 100644 --- a/src/abbrev.c +++ b/src/abbrev.c @@ -1,5 +1,6 @@ /* Primitives for word-abbrev mode. Copyright (C) 1985, 1986, 1992, 1993 Free Software Foundation, Inc. + Copyright (C) 2001 MORIOKA Tomohiko This file is part of XEmacs. @@ -157,7 +158,11 @@ abbrev_match (struct buffer *buf, Lisp_Object obarray) closure.buf = buf; closure.point = BUF_PT (buf); closure.maxlen = closure.point - BUF_BEGV (buf); +#ifdef UTF2000 + closure.chartab = XCHAR_TABLE (buf->syntax_table); +#else closure.chartab = XCHAR_TABLE (buf->mirror_syntax_table); +#endif closure.found = 0; map_obarray (obarray, abbrev_match_mapper, &closure); @@ -385,8 +390,14 @@ If no abbrev matched, but `pre-abbrev-expand-hook' changed the buffer, Bufpos pos = abbrev_start; /* Find the initial. */ while (pos < point +#ifdef UTF2000 + && !WORD_SYNTAX_P (XCHAR_TABLE (buf->syntax_table), + BUF_FETCH_CHAR (buf, pos)) +#else && !WORD_SYNTAX_P (XCHAR_TABLE (buf->mirror_syntax_table), - BUF_FETCH_CHAR (buf, pos))) + BUF_FETCH_CHAR (buf, pos)) +#endif + ) pos++; /* Change just that. */ Fupcase_initials_region (make_int (pos), make_int (pos + 1), diff --git a/src/alloc.c b/src/alloc.c index add03ec..1b2b806 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -2051,6 +2051,10 @@ LENGTH must be a non-negative integer. Bufbyte *init_ptr = init_str; switch (len) { +#ifdef UTF2000 + case 6: *ptr++ = *init_ptr++; + case 5: *ptr++ = *init_ptr++; +#endif case 4: *ptr++ = *init_ptr++; case 3: *ptr++ = *init_ptr++; case 2: *ptr++ = *init_ptr++; diff --git a/src/buffer.c b/src/buffer.c index 8685e5a..5790dc9 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -2,6 +2,7 @@ Copyright (C) 1985-1989, 1992-1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. Copyright (C) 1995, 1996 Ben Wing. + Copyright (C) 1999,2000,2001 MORIOKA Tomohiko This file is part of XEmacs. @@ -29,6 +30,7 @@ Boston, MA 02111-1307, USA. */ list per frame.) Mly: a few changes for buffer-local vars, 19.8 or 19.9. Ben Wing: some changes and cleanups for Mule, 19.12. + MORIOKA Tomohiko: some changes for XEmacs UTF-2000. */ /* This file contains functions that work with buffer objects. @@ -1861,11 +1863,17 @@ dfc_convert_to_external_format (dfc_conversion_type source_type, const Bufbyte *end; for (end = ptr + len; ptr < end;) { +#ifdef UTF2000 + Bufbyte c = + (*ptr < 0xc0) ? *ptr : + ((*ptr & 0x1f) << 6) | (*(ptr+1) & 0x3f); +#else Bufbyte c = (BYTE_ASCII_P (*ptr)) ? *ptr : (*ptr == LEADING_BYTE_CONTROL_1) ? (*(ptr+1) - 0x20) : (*ptr == LEADING_BYTE_LATIN_ISO8859_1) ? (*(ptr+1)) : '~'; +#endif Dynarr_add (conversion_out_dynarr, (Extbyte) c); INC_CHARPTR (ptr); @@ -2001,6 +2009,15 @@ dfc_convert_to_internal_format (dfc_conversion_type source_type, { Bufbyte c = *ptr; +#ifdef UTF2000 + if (BYTE_ASCII_P (c)) + Dynarr_add (conversion_in_dynarr, c); + else + { + Dynarr_add (conversion_in_dynarr, (c >> 6) | 0xC0); + Dynarr_add (conversion_in_dynarr, (c & 0x3F) | 0x80); + } +#else if (BYTE_ASCII_P (c)) Dynarr_add (conversion_in_dynarr, c); else if (BYTE_C1_P (c)) @@ -2013,6 +2030,7 @@ dfc_convert_to_internal_format (dfc_conversion_type source_type, Dynarr_add (conversion_in_dynarr, LEADING_BYTE_LATIN_ISO8859_1); Dynarr_add (conversion_in_dynarr, c); } +#endif } #else Dynarr_add_many (conversion_in_dynarr, source->data.ptr, source->data.len); @@ -2418,8 +2436,10 @@ common_init_complex_vars_of_buffer (void) defs->category_table = Vstandard_category_table; #endif /* MULE */ defs->syntax_table = Vstandard_syntax_table; +#ifndef UTF2000 defs->mirror_syntax_table = XCHAR_TABLE (Vstandard_syntax_table)->mirror_table; +#endif defs->modeline_format = build_string ("%-"); /* reset in loaddefs.el */ defs->case_fold_search = Qt; defs->selective_display_ellipses = Qt; diff --git a/src/buffer.h b/src/buffer.h index 590219e..2fffa70 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -32,9 +32,8 @@ Boston, MA 02111-1307, USA. */ #ifndef INCLUDED_buffer_h_ #define INCLUDED_buffer_h_ -#ifdef MULE -#include "mule-charset.h" -#endif +#include "character.h" +#include "multibyte.h" #include "casetab.h" #include "chartab.h" @@ -97,7 +96,11 @@ struct buffer_text This information is text-only so it goes here. */ Bufpos mule_bufmin, mule_bufmax; Bytind mule_bytmin, mule_bytmax; +#ifdef UTF2000 + int mule_size; +#else int mule_shifter, mule_three_p; +#endif /* And we also cache 16 positions for fairly fast access near those positions. */ @@ -283,310 +286,8 @@ for (mps_bufcons = Qunbound, \ denoted with the word "unsafe" in their name and are generally meant to be called only by other macros that have already stored the calling values in temporary variables. - - - Use the following functions/macros on contiguous strings of data. - If the text you're operating on is known to come from a buffer, use - the buffer-level functions below -- they know about the gap and may - be more efficient. - - - (A) For working with charptr's (pointers to internally-formatted text): - ----------------------------------------------------------------------- - - VALID_CHARPTR_P (ptr): - Given a charptr, does it point to the beginning of a character? - - ASSERT_VALID_CHARPTR (ptr): - If error-checking is enabled, assert that the given charptr - points to the beginning of a character. Otherwise, do nothing. - - INC_CHARPTR (ptr): - Given a charptr (assumed to point at the beginning of a character), - modify that pointer so it points to the beginning of the next - character. - - DEC_CHARPTR (ptr): - Given a charptr (assumed to point at the beginning of a - character or at the very end of the text), modify that pointer - so it points to the beginning of the previous character. - - VALIDATE_CHARPTR_BACKWARD (ptr): - Make sure that PTR is pointing to the beginning of a character. - If not, back up until this is the case. Note that there are not - too many places where it is legitimate to do this sort of thing. - It's an error if you're passed an "invalid" char * pointer. - NOTE: PTR *must* be pointing to a valid part of the string (i.e. - not the very end, unless the string is zero-terminated or - something) in order for this function to not cause crashes. - - VALIDATE_CHARPTR_FORWARD (ptr): - Make sure that PTR is pointing to the beginning of a character. - If not, move forward until this is the case. Note that there - are not too many places where it is legitimate to do this sort - of thing. It's an error if you're passed an "invalid" char * - pointer. - - - (B) For working with the length (in bytes and characters) of a - section of internally-formatted text: - -------------------------------------------------------------- - - bytecount_to_charcount (ptr, nbi): - Given a pointer to a text string and a length in bytes, - return the equivalent length in characters. - - charcount_to_bytecount (ptr, nch): - Given a pointer to a text string and a length in characters, - return the equivalent length in bytes. - - charptr_n_addr (ptr, n): - Return a pointer to the beginning of the character offset N - (in characters) from PTR. - - - (C) For retrieving or changing the character pointed to by a charptr: - --------------------------------------------------------------------- - - charptr_emchar (ptr): - Retrieve the character pointed to by PTR as an Emchar. - - charptr_emchar_n (ptr, n): - Retrieve the character at offset N (in characters) from PTR, - as an Emchar. - - set_charptr_emchar (ptr, ch): - Store the character CH (an Emchar) as internally-formatted - text starting at PTR. Return the number of bytes stored. - - charptr_copy_char (ptr, ptr2): - Retrieve the character pointed to by PTR and store it as - internally-formatted text in PTR2. - - - (D) For working with Emchars: - ----------------------------- - - [Note that there are other functions/macros for working with Emchars - in mule-charset.h, for retrieving the charset of an Emchar - and such. These are only valid when MULE is defined.] - - valid_char_p (ch): - Return whether the given Emchar is valid. - - CHARP (ch): - Return whether the given Lisp_Object is a character. - - CHECK_CHAR_COERCE_INT (ch): - Signal an error if CH is not a valid character or integer Lisp_Object. - If CH is an integer Lisp_Object, convert it to a character Lisp_Object, - but merely by repackaging, without performing tests for char validity. - - MAX_EMCHAR_LEN: - Maximum number of buffer bytes per Emacs character. - */ - -/* ---------------------------------------------------------------------- */ -/* (A) For working with charptr's (pointers to internally-formatted text) */ -/* ---------------------------------------------------------------------- */ - -#ifdef MULE -# define VALID_CHARPTR_P(ptr) BUFBYTE_FIRST_BYTE_P (* (unsigned char *) ptr) -#else -# define VALID_CHARPTR_P(ptr) 1 -#endif - -#ifdef ERROR_CHECK_BUFPOS -# define ASSERT_VALID_CHARPTR(ptr) assert (VALID_CHARPTR_P (ptr)) -#else -# define ASSERT_VALID_CHARPTR(ptr) -#endif - -/* Note that INC_CHARPTR() and DEC_CHARPTR() have to be written in - completely separate ways. INC_CHARPTR() cannot use the DEC_CHARPTR() - trick of looking for a valid first byte because it might run off - the end of the string. DEC_CHARPTR() can't use the INC_CHARPTR() - method because it doesn't have easy access to the first byte of - the character it's moving over. */ - -#define REAL_INC_CHARPTR(ptr) \ - ((void) ((ptr) += REP_BYTES_BY_FIRST_BYTE (* (unsigned char *) (ptr)))) - -#define REAL_INC_CHARBYTIND(ptr, pos) \ - (pos += REP_BYTES_BY_FIRST_BYTE (* (unsigned char *) (ptr))) - -#define REAL_DEC_CHARPTR(ptr) do { \ - (ptr)--; \ -} while (!VALID_CHARPTR_P (ptr)) - -#ifdef ERROR_CHECK_BUFPOS -#define INC_CHARPTR(ptr) do { \ - ASSERT_VALID_CHARPTR (ptr); \ - REAL_INC_CHARPTR (ptr); \ -} while (0) - -#define INC_CHARBYTIND(ptr, pos) do { \ - ASSERT_VALID_CHARPTR (ptr); \ - REAL_INC_CHARBYTIND (ptr, pos); \ -} while (0) - -#define DEC_CHARPTR(ptr) do { \ - const Bufbyte *dc_ptr1 = (ptr); \ - const Bufbyte *dc_ptr2 = dc_ptr1; \ - REAL_DEC_CHARPTR (dc_ptr2); \ - assert (dc_ptr1 - dc_ptr2 == \ - REP_BYTES_BY_FIRST_BYTE (*dc_ptr2)); \ - (ptr) = (Bufbyte *) dc_ptr2; \ -} while (0) - -#else /* ! ERROR_CHECK_BUFPOS */ -#define INC_CHARBYTIND(ptr, pos) REAL_INC_CHARBYTIND (ptr, pos) -#define INC_CHARPTR(ptr) REAL_INC_CHARPTR (ptr) -#define DEC_CHARPTR(ptr) REAL_DEC_CHARPTR (ptr) -#endif /* ! ERROR_CHECK_BUFPOS */ - -#ifdef MULE - -#define VALIDATE_CHARPTR_BACKWARD(ptr) do { \ - while (!VALID_CHARPTR_P (ptr)) ptr--; \ -} while (0) - -/* This needs to be trickier to avoid the possibility of running off - the end of the string. */ - -#define VALIDATE_CHARPTR_FORWARD(ptr) do { \ - Bufbyte *vcf_ptr = (ptr); \ - VALIDATE_CHARPTR_BACKWARD (vcf_ptr); \ - if (vcf_ptr != (ptr)) \ - { \ - (ptr) = vcf_ptr; \ - INC_CHARPTR (ptr); \ - } \ -} while (0) - -#else /* not MULE */ -#define VALIDATE_CHARPTR_BACKWARD(ptr) -#define VALIDATE_CHARPTR_FORWARD(ptr) -#endif /* not MULE */ - -/* -------------------------------------------------------------- */ -/* (B) For working with the length (in bytes and characters) of a */ -/* section of internally-formatted text */ -/* -------------------------------------------------------------- */ - -INLINE_HEADER const Bufbyte * -charptr_n_addr (const Bufbyte *ptr, Charcount offset); -INLINE_HEADER const Bufbyte * -charptr_n_addr (const Bufbyte *ptr, Charcount offset) -{ - return ptr + charcount_to_bytecount (ptr, offset); -} - -/* -------------------------------------------------------------------- */ -/* (C) For retrieving or changing the character pointed to by a charptr */ -/* -------------------------------------------------------------------- */ - -#define simple_charptr_emchar(ptr) ((Emchar) (ptr)[0]) -#define simple_set_charptr_emchar(ptr, x) ((ptr)[0] = (Bufbyte) (x), 1) -#define simple_charptr_copy_char(ptr, ptr2) ((ptr2)[0] = *(ptr), 1) - -#ifdef MULE - -Emchar non_ascii_charptr_emchar (const Bufbyte *ptr); -Bytecount non_ascii_set_charptr_emchar (Bufbyte *ptr, Emchar c); -Bytecount non_ascii_charptr_copy_char (const Bufbyte *src, Bufbyte *dst); - -INLINE_HEADER Emchar charptr_emchar (const Bufbyte *ptr); -INLINE_HEADER Emchar -charptr_emchar (const Bufbyte *ptr) -{ - return BYTE_ASCII_P (*ptr) ? - simple_charptr_emchar (ptr) : - non_ascii_charptr_emchar (ptr); -} - -INLINE_HEADER Bytecount set_charptr_emchar (Bufbyte *ptr, Emchar x); -INLINE_HEADER Bytecount -set_charptr_emchar (Bufbyte *ptr, Emchar x) -{ - return !CHAR_MULTIBYTE_P (x) ? - simple_set_charptr_emchar (ptr, x) : - non_ascii_set_charptr_emchar (ptr, x); -} - -/* Copy the character pointed to by SRC into DST. - Return the number of bytes copied. */ -INLINE_HEADER Bytecount -charptr_copy_char (const Bufbyte *src, Bufbyte *dst); -INLINE_HEADER Bytecount -charptr_copy_char (const Bufbyte *src, Bufbyte *dst) -{ - return BYTE_ASCII_P (*src) ? - simple_charptr_copy_char (src, dst) : - non_ascii_charptr_copy_char (src, dst); -} - -#else /* not MULE */ - -# define charptr_emchar(ptr) simple_charptr_emchar (ptr) -# define set_charptr_emchar(ptr, x) simple_set_charptr_emchar (ptr, x) -# define charptr_copy_char(ptr, ptr2) simple_charptr_copy_char (ptr, ptr2) - -#endif /* not MULE */ - -#define charptr_emchar_n(ptr, offset) \ - charptr_emchar (charptr_n_addr (ptr, offset)) - - -/* ---------------------------- */ -/* (D) For working with Emchars */ -/* ---------------------------- */ - -#ifdef MULE - -int non_ascii_valid_char_p (Emchar ch); - -INLINE_HEADER int valid_char_p (Emchar ch); -INLINE_HEADER int -valid_char_p (Emchar ch) -{ - return ((unsigned int) (ch) <= 0xff) || non_ascii_valid_char_p (ch); -} - -#else /* not MULE */ - -#define valid_char_p(ch) ((unsigned int) (ch) <= 0xff) - -#endif /* not MULE */ - -#define CHAR_INTP(x) (INTP (x) && valid_char_p (XINT (x))) - -#define CHAR_OR_CHAR_INTP(x) (CHARP (x) || CHAR_INTP (x)) - -INLINE_HEADER Emchar XCHAR_OR_CHAR_INT (Lisp_Object obj); -INLINE_HEADER Emchar -XCHAR_OR_CHAR_INT (Lisp_Object obj) -{ - return CHARP (obj) ? XCHAR (obj) : XINT (obj); -} - -#define CHECK_CHAR_COERCE_INT(x) do { \ - if (CHARP (x)) \ - ; \ - else if (CHAR_INTP (x)) \ - x = make_char (XINT (x)); \ - else \ - x = wrong_type_argument (Qcharacterp, x); \ -} while (0) - -#ifdef MULE -# define MAX_EMCHAR_LEN 4 -#else -# define MAX_EMCHAR_LEN 1 -#endif - /*----------------------------------------------------------------------*/ /* Accessor macros for important positions in a buffer */ @@ -972,7 +673,9 @@ Bufpos bytind_to_bufpos_func (struct buffer *buf, Bytind x); 64K for width-three characters. */ +#ifndef UTF2000 extern short three_to_one_table[]; +#endif INLINE_HEADER int real_bufpos_to_bytind (struct buffer *buf, Bufpos x); INLINE_HEADER int @@ -980,8 +683,13 @@ real_bufpos_to_bytind (struct buffer *buf, Bufpos x) { if (x >= buf->text->mule_bufmin && x <= buf->text->mule_bufmax) return (buf->text->mule_bytmin + +#ifdef UTF2000 + (x - buf->text->mule_bufmin) * buf->text->mule_size +#else ((x - buf->text->mule_bufmin) << buf->text->mule_shifter) + - (buf->text->mule_three_p ? (x - buf->text->mule_bufmin) : 0)); + (buf->text->mule_three_p ? (x - buf->text->mule_bufmin) : 0) +#endif + ); else return bufpos_to_bytind_func (buf, x); } @@ -992,9 +700,15 @@ real_bytind_to_bufpos (struct buffer *buf, Bytind x) { if (x >= buf->text->mule_bytmin && x <= buf->text->mule_bytmax) return (buf->text->mule_bufmin + +#ifdef UTF2000 + (buf->text->mule_size == 0 ? 0 : + (x - buf->text->mule_bytmin) / buf->text->mule_size) +#else ((buf->text->mule_three_p ? three_to_one_table[x - buf->text->mule_bytmin] - : (x - buf->text->mule_bytmin) >> buf->text->mule_shifter))); + : (x - buf->text->mule_bytmin) >> buf->text->mule_shifter)) +#endif + ); else return bytind_to_bufpos_func (buf, x); } @@ -1332,40 +1046,6 @@ typedef union { char c; void *p; } *dfc_aliasing_voidpp; /************************************************************************/ /* */ -/* fake charset functions */ -/* */ -/************************************************************************/ - -/* used when MULE is not defined, so that Charset-type stuff can still - be done */ - -#ifndef MULE - -#define Vcharset_ascii Qnil - -#define CHAR_CHARSET(ch) Vcharset_ascii -#define CHAR_LEADING_BYTE(ch) LEADING_BYTE_ASCII -#define LEADING_BYTE_ASCII 0x80 -#define NUM_LEADING_BYTES 1 -#define MIN_LEADING_BYTE 0x80 -#define CHARSETP(cs) 1 -#define CHARSET_BY_LEADING_BYTE(lb) Vcharset_ascii -#define XCHARSET_LEADING_BYTE(cs) LEADING_BYTE_ASCII -#define XCHARSET_GRAPHIC(cs) -1 -#define XCHARSET_COLUMNS(cs) 1 -#define XCHARSET_DIMENSION(cs) 1 -#define REP_BYTES_BY_FIRST_BYTE(fb) 1 -#define BREAKUP_CHAR(ch, charset, byte1, byte2) do { \ - (charset) = Vcharset_ascii; \ - (byte1) = (ch); \ - (byte2) = 0; \ -} while (0) -#define BYTE_ASCII_P(byte) 1 - -#endif /* ! MULE */ - -/************************************************************************/ -/* */ /* higher-level buffer-position functions */ /* */ /************************************************************************/ @@ -1593,23 +1273,23 @@ int beginning_of_line_p (struct buffer *b, Bufpos pt); /* from insdel.c */ void set_buffer_point (struct buffer *buf, Bufpos pos, Bytind bipos); -void find_charsets_in_bufbyte_string (unsigned char *charsets, +void find_charsets_in_bufbyte_string (Charset_ID *charsets, const Bufbyte *str, Bytecount len); -void find_charsets_in_emchar_string (unsigned char *charsets, - const Emchar *str, - Charcount len); +void find_charsets_in_charc_string (Charset_ID *charsets, + const Charc *str, + Charcount len); int bufbyte_string_displayed_columns (const Bufbyte *str, Bytecount len); -int emchar_string_displayed_columns (const Emchar *str, Charcount len); -void convert_bufbyte_string_into_emchar_dynarr (const Bufbyte *str, - Bytecount len, - Emchar_dynarr *dyn); +int charc_string_displayed_columns (const Charc *str, Charcount len); +void convert_bufbyte_string_into_charc_dynarr (const Bufbyte *str, + Bytecount len, + Charc_dynarr *dyn); Charcount convert_bufbyte_string_into_emchar_string (const Bufbyte *str, Bytecount len, Emchar *arr); -void convert_emchar_string_into_bufbyte_dynarr (Emchar *arr, int nels, - Bufbyte_dynarr *dyn); -Bufbyte *convert_emchar_string_into_malloced_string (Emchar *arr, int nels, +void convert_charc_string_into_bufbyte_dynarr (Charc *arr, int nels, + Bufbyte_dynarr *dyn); +Bufbyte *convert_charc_string_into_malloced_string (Charc *arr, int nels, Bytecount *len_out); /* from marker.c */ void init_buffer_markers (struct buffer *b); diff --git a/src/bufslots.h b/src/bufslots.h index 2b622c7..fd5d36f 100644 --- a/src/bufslots.h +++ b/src/bufslots.h @@ -1,5 +1,6 @@ /* Definitions of marked slots in buffers Copyright (C) 1990, 1992, 1993 Free Software Foundation, Inc. + Copyright (C) 2001 MORIOKA Tomohiko This file is part of XEmacs. @@ -98,8 +99,10 @@ Boston, MA 02111-1307, USA. */ MARKED_SLOT (abbrev_table); /* This buffer's syntax table. */ MARKED_SLOT (syntax_table); +#ifndef UTF2000 /* Massaged values from the syntax table, for faster lookup. */ MARKED_SLOT (mirror_syntax_table); +#endif #ifdef MULE /* This buffer's category table. */ diff --git a/src/casefiddle.c b/src/casefiddle.c index 49cf028..c37860a 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -1,5 +1,6 @@ /* XEmacs case conversion functions. Copyright (C) 1985, 1992, 1993, 1994, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 2001 MORIOKA Tomohiko This file is part of XEmacs. @@ -48,7 +49,11 @@ casify_object (enum case_action flag, Lisp_Object string_or_char, if (STRINGP (string_or_char)) { +#ifdef UTF2000 + Lisp_Char_Table *syntax_table = XCHAR_TABLE (buf->syntax_table); +#else Lisp_Char_Table *syntax_table = XCHAR_TABLE (buf->mirror_syntax_table); +#endif Bufbyte *storage = alloca_array (Bufbyte, XSTRING_LENGTH (string_or_char) * MAX_EMCHAR_LEN); Bufbyte *newp = storage; @@ -155,7 +160,11 @@ casify_region_internal (enum case_action flag, Lisp_Object start, { /* This function can GC */ Bufpos pos, s, e; +#ifdef UTF2000 + Lisp_Char_Table *syntax_table = XCHAR_TABLE (buf->syntax_table); +#else Lisp_Char_Table *syntax_table = XCHAR_TABLE (buf->mirror_syntax_table); +#endif int mccount; int wordp = 0, wordp_prev; diff --git a/src/casetab.c b/src/casetab.c index 656a592..6ce71ca 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -1,6 +1,7 @@ /* XEmacs routines to deal with case tables. Copyright (C) 1987, 1992, 1993, 1994 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. + Copyright (C) 2002 MORIOKA Tomohiko This file is part of XEmacs. @@ -29,6 +30,7 @@ Boston, MA 02111-1307, USA. */ distribution file chartab.c for details. */ /* Modified for Mule by Ben Wing. */ +/* Modified for UTF-2000 by MORIOKA Tomohiko */ /* Case table consists of four char-table. Those are for downcase, upcase, canonical and equivalent respectively. @@ -50,6 +52,9 @@ Boston, MA 02111-1307, USA. */ Lisp_Object Qcase_tablep, Qdowncase, Qupcase; Lisp_Object Vstandard_case_table; +#ifdef UTF2000 +Lisp_Object Qflippedcase, Q_lowercase, Q_uppercase; +#endif static void compute_trt_inverse (Lisp_Object trt, Lisp_Object inverse); Lisp_Object case_table_char (Lisp_Object ch, Lisp_Object table); @@ -450,6 +455,11 @@ syms_of_casetab (void) defsymbol (&Qcase_tablep, "case-table-p"); defsymbol (&Qdowncase, "downcase"); defsymbol (&Qupcase, "upcase"); +#ifdef UTF2000 + defsymbol (&Qflippedcase, "flippedcase"); + defsymbol (&Q_lowercase, "->lowercase"); + defsymbol (&Q_uppercase, "->uppercase"); +#endif DEFSUBR (Fcase_table_p); DEFSUBR (Fget_case_table); @@ -472,7 +482,15 @@ complex_vars_of_casetab (void) Vstandard_case_table = allocate_case_table (); +#ifdef UTF2000 tem = MAKE_TRT_TABLE (); + +#ifdef HAVE_CHISE + XCHAR_TABLE_NAME (tem) = Qdowncase; +#endif +#else + tem = MAKE_TRT_TABLE (); +#endif XSET_CASE_TABLE_DOWNCASE (Vstandard_case_table, tem); XSET_CASE_TABLE_CANON (Vstandard_case_table, tem); @@ -485,7 +503,14 @@ complex_vars_of_casetab (void) SET_TRT_TABLE_CHAR_1 (tem, i, lowered); } +#ifdef UTF2000 + tem = MAKE_TRT_TABLE (); +#ifdef HAVE_CHISE + XCHAR_TABLE_NAME (tem) = Qflippedcase; +#endif +#else tem = MAKE_TRT_TABLE (); +#endif XSET_CASE_TABLE_UPCASE (Vstandard_case_table, tem); XSET_CASE_TABLE_EQV (Vstandard_case_table, tem); diff --git a/src/chartab.c b/src/chartab.c index 3743698..772c7b9 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -4,6 +4,7 @@ Copyright (C) 1995, 1996 Ben Wing. Copyright (C) 1995, 1997, 1999 Electrotechnical Laboratory, JAPAN. Licensed to the Free Software Foundation. + Copyright (C) 1999,2000,2001,2002,2003 MORIOKA Tomohiko This file is part of XEmacs. @@ -33,6 +34,7 @@ Boston, MA 02111-1307, USA. */ loosely based on the original Mule. Jareth Hein: fixed a couple of bugs in the implementation, and added regex support for categories with check_category_at + MORIOKA Tomohiko: Rewritten for XEmacs UTF-2000 */ #include @@ -41,6 +43,9 @@ Boston, MA 02111-1307, USA. */ #include "buffer.h" #include "chartab.h" #include "syntax.h" +#ifdef UTF2000 +#include "elhash.h" +#endif /* UTF2000 */ Lisp_Object Qchar_tablep, Qchar_table; @@ -58,1404 +63,3850 @@ Lisp_Object Vword_combining_categories, Vword_separating_categories; #endif /* MULE */ -/* A char table maps from ranges of characters to values. +#ifdef HAVE_LIBCHISE +Lisp_Object Vchise_db_directory; +Lisp_Object Vchise_system_db_directory; - Implementing a general data structure that maps from arbitrary - ranges of numbers to values is tricky to do efficiently. As it - happens, it should suffice (and is usually more convenient, anyway) - when dealing with characters to restrict the sorts of ranges that - can be assigned values, as follows: +CHISE_DS *default_chise_data_source = NULL; +#endif - 1) All characters. - 2) All characters in a charset. - 3) All characters in a particular row of a charset, where a "row" - means all characters with the same first byte. - 4) A particular character in a charset. +#ifdef UTF2000 - We use char tables to generalize the 256-element vectors now - littering the Emacs code. +EXFUN (Fchar_refs_simplify_char_specs, 1); +extern Lisp_Object Qideographic_structure; - Possible uses (all should be converted at some point): +EXFUN (Fmap_char_attribute, 3); - 1) category tables - 2) syntax tables - 3) display tables - 4) case tables - 5) keyboard-translate-table? +#ifdef HAVE_LIBCHISE +EXFUN (Fmount_char_attribute_table, 1); +#endif - We provide an - abstract type to generalize the Emacs vectors and Mule - vectors-of-vectors goo. - */ +#ifdef HAVE_CHISE +EXFUN (Fload_char_attribute_table, 1); -/************************************************************************/ -/* Char Table object */ -/************************************************************************/ +Lisp_Object Vchar_db_stingy_mode; +#endif -#ifdef MULE +#define BT_UINT8_MIN 0 +#define BT_UINT8_MAX (UCHAR_MAX - 4) +#define BT_UINT8_t (UCHAR_MAX - 3) +#define BT_UINT8_nil (UCHAR_MAX - 2) +#define BT_UINT8_unbound (UCHAR_MAX - 1) +#define BT_UINT8_unloaded UCHAR_MAX + +INLINE_HEADER int INT_UINT8_P (Lisp_Object obj); +INLINE_HEADER int UINT8_VALUE_P (Lisp_Object obj); +INLINE_HEADER unsigned char UINT8_ENCODE (Lisp_Object obj); +INLINE_HEADER Lisp_Object UINT8_DECODE (unsigned char n); +INLINE_HEADER unsigned short UINT8_TO_UINT16 (unsigned char n); + +INLINE_HEADER int +INT_UINT8_P (Lisp_Object obj) +{ + if (INTP (obj)) + { + int num = XINT (obj); + + return (BT_UINT8_MIN <= num) && (num <= BT_UINT8_MAX); + } + else + return 0; +} + +INLINE_HEADER int +UINT8_VALUE_P (Lisp_Object obj) +{ + return EQ (obj, Qunloaded) || EQ (obj, Qunbound) + || EQ (obj, Qnil) || EQ (obj, Qt) || INT_UINT8_P (obj); +} + +INLINE_HEADER unsigned char +UINT8_ENCODE (Lisp_Object obj) +{ + if (EQ (obj, Qunloaded)) + return BT_UINT8_unloaded; + else if (EQ (obj, Qunbound)) + return BT_UINT8_unbound; + else if (EQ (obj, Qnil)) + return BT_UINT8_nil; + else if (EQ (obj, Qt)) + return BT_UINT8_t; + else + return XINT (obj); +} + +INLINE_HEADER Lisp_Object +UINT8_DECODE (unsigned char n) +{ + if (n == BT_UINT8_unloaded) + return Qunloaded; + else if (n == BT_UINT8_unbound) + return Qunbound; + else if (n == BT_UINT8_nil) + return Qnil; + else if (n == BT_UINT8_t) + return Qt; + else + return make_int (n); +} static Lisp_Object -mark_char_table_entry (Lisp_Object obj) +mark_uint8_byte_table (Lisp_Object obj) { - Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (obj); + return Qnil; +} + +static void +print_uint8_byte_table (Lisp_Object obj, + Lisp_Object printcharfun, int escapeflag) +{ + Lisp_Uint8_Byte_Table *bte = XUINT8_BYTE_TABLE (obj); int i; + struct gcpro gcpro1, gcpro2; + GCPRO2 (obj, printcharfun); - for (i = 0; i < 96; i++) + write_c_string ("\n#level2[i]); + unsigned char n = bte->property[i]; + if ( (i & 15) == 0 ) + write_c_string ("\n ", printcharfun); + write_c_string (" ", printcharfun); + if (n == BT_UINT8_unbound) + write_c_string ("void", printcharfun); + else if (n == BT_UINT8_nil) + write_c_string ("nil", printcharfun); + else if (n == BT_UINT8_t) + write_c_string ("t", printcharfun); + else + { + char buf[4]; + + sprintf (buf, "%hd", n); + write_c_string (buf, printcharfun); + } } - return Qnil; + UNGCPRO; + write_c_string (">", printcharfun); } static int -char_table_entry_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) +uint8_byte_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) { - Lisp_Char_Table_Entry *cte1 = XCHAR_TABLE_ENTRY (obj1); - Lisp_Char_Table_Entry *cte2 = XCHAR_TABLE_ENTRY (obj2); + Lisp_Uint8_Byte_Table *te1 = XUINT8_BYTE_TABLE (obj1); + Lisp_Uint8_Byte_Table *te2 = XUINT8_BYTE_TABLE (obj2); int i; - for (i = 0; i < 96; i++) - if (!internal_equal (cte1->level2[i], cte2->level2[i], depth + 1)) + for (i = 0; i < 256; i++) + if (te1->property[i] != te2->property[i]) return 0; - return 1; } static unsigned long -char_table_entry_hash (Lisp_Object obj, int depth) +uint8_byte_table_hash (Lisp_Object obj, int depth) { - Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (obj); + Lisp_Uint8_Byte_Table *te = XUINT8_BYTE_TABLE (obj); + int i; + hashcode_t hash = 0; - return internal_array_hash (cte->level2, 96, depth); + for (i = 0; i < 256; i++) + hash = HASH2 (hash, te->property[i]); + return hash; } -static const struct lrecord_description char_table_entry_description[] = { - { XD_LISP_OBJECT_ARRAY, offsetof (Lisp_Char_Table_Entry, level2), 96 }, +static const struct lrecord_description uint8_byte_table_description[] = { { XD_END } }; -DEFINE_LRECORD_IMPLEMENTATION ("char-table-entry", char_table_entry, - mark_char_table_entry, internal_object_printer, - 0, char_table_entry_equal, - char_table_entry_hash, - char_table_entry_description, - Lisp_Char_Table_Entry); -#endif /* MULE */ +DEFINE_LRECORD_IMPLEMENTATION ("uint8-byte-table", uint8_byte_table, + mark_uint8_byte_table, + print_uint8_byte_table, + 0, uint8_byte_table_equal, + uint8_byte_table_hash, + uint8_byte_table_description, + Lisp_Uint8_Byte_Table); static Lisp_Object -mark_char_table (Lisp_Object obj) +make_uint8_byte_table (unsigned char initval) { - Lisp_Char_Table *ct = XCHAR_TABLE (obj); + Lisp_Object obj; int i; + Lisp_Uint8_Byte_Table *cte; - for (i = 0; i < NUM_ASCII_CHARS; i++) - mark_object (ct->ascii[i]); -#ifdef MULE - for (i = 0; i < NUM_LEADING_BYTES; i++) - mark_object (ct->level1[i]); -#endif - return ct->mirror_table; -} - -/* WARNING: All functions of this nature need to be written extremely - carefully to avoid crashes during GC. Cf. prune_specifiers() - and prune_weak_hash_tables(). */ + cte = alloc_lcrecord_type (Lisp_Uint8_Byte_Table, + &lrecord_uint8_byte_table); -void -prune_syntax_tables (void) -{ - Lisp_Object rest, prev = Qnil; + for (i = 0; i < 256; i++) + cte->property[i] = initval; - for (rest = Vall_syntax_tables; - !NILP (rest); - rest = XCHAR_TABLE (rest)->next_table) - { - if (! marked_p (rest)) - { - /* This table is garbage. Remove it from the list. */ - if (NILP (prev)) - Vall_syntax_tables = XCHAR_TABLE (rest)->next_table; - else - XCHAR_TABLE (prev)->next_table = - XCHAR_TABLE (rest)->next_table; - } - } + XSETUINT8_BYTE_TABLE (obj, cte); + return obj; } static Lisp_Object -char_table_type_to_symbol (enum char_table_type type) -{ - switch (type) - { - default: abort(); - case CHAR_TABLE_TYPE_GENERIC: return Qgeneric; - case CHAR_TABLE_TYPE_SYNTAX: return Qsyntax; - case CHAR_TABLE_TYPE_DISPLAY: return Qdisplay; - case CHAR_TABLE_TYPE_CHAR: return Qchar; -#ifdef MULE - case CHAR_TABLE_TYPE_CATEGORY: return Qcategory; -#endif - } -} - -static enum char_table_type -symbol_to_char_table_type (Lisp_Object symbol) +copy_uint8_byte_table (Lisp_Object entry) { - CHECK_SYMBOL (symbol); + Lisp_Uint8_Byte_Table *cte = XUINT8_BYTE_TABLE (entry); + Lisp_Object obj; + int i; + Lisp_Uint8_Byte_Table *ctenew + = alloc_lcrecord_type (Lisp_Uint8_Byte_Table, + &lrecord_uint8_byte_table); - if (EQ (symbol, Qgeneric)) return CHAR_TABLE_TYPE_GENERIC; - if (EQ (symbol, Qsyntax)) return CHAR_TABLE_TYPE_SYNTAX; - if (EQ (symbol, Qdisplay)) return CHAR_TABLE_TYPE_DISPLAY; - if (EQ (symbol, Qchar)) return CHAR_TABLE_TYPE_CHAR; -#ifdef MULE - if (EQ (symbol, Qcategory)) return CHAR_TABLE_TYPE_CATEGORY; -#endif + for (i = 0; i < 256; i++) + { + ctenew->property[i] = cte->property[i]; + } - signal_simple_error ("Unrecognized char table type", symbol); - return CHAR_TABLE_TYPE_GENERIC; /* not reached */ + XSETUINT8_BYTE_TABLE (obj, ctenew); + return obj; } -static void -print_chartab_range (Emchar first, Emchar last, Lisp_Object val, - Lisp_Object printcharfun) +static int +uint8_byte_table_same_value_p (Lisp_Object obj) { - if (first != last) - { - write_c_string (" (", printcharfun); - print_internal (make_char (first), printcharfun, 0); - write_c_string (" ", printcharfun); - print_internal (make_char (last), printcharfun, 0); - write_c_string (") ", printcharfun); - } - else + Lisp_Uint8_Byte_Table *bte = XUINT8_BYTE_TABLE (obj); + unsigned char v0 = bte->property[0]; + int i; + + for (i = 1; i < 256; i++) { - write_c_string (" ", printcharfun); - print_internal (make_char (first), printcharfun, 0); - write_c_string (" ", printcharfun); + if (bte->property[i] != v0) + return 0; } - print_internal (val, printcharfun, 1); + return -1; } -#ifdef MULE - -static void -print_chartab_charset_row (Lisp_Object charset, - int row, - Lisp_Char_Table_Entry *cte, - Lisp_Object printcharfun) +static int +map_over_uint8_byte_table (Lisp_Uint8_Byte_Table *ct, Lisp_Char_Table* root, + Emchar ofs, int place, + int (*fn) (struct chartab_range *range, + Lisp_Object val, void *arg), + void *arg) { - int i; - Lisp_Object cat = Qunbound; - int first = -1; + struct chartab_range rainj; + int i, retval; + int unit = 1 << (8 * place); + Emchar c = ofs; + Emchar c1; - for (i = 32; i < 128; i++) - { - Lisp_Object pam = cte->level2[i - 32]; + rainj.type = CHARTAB_RANGE_CHAR; - if (first == -1) + for (i = 0, retval = 0; i < 256 && retval == 0; i++) + { + if (ct->property[i] == BT_UINT8_unloaded) { - first = i; - cat = pam; - continue; - } +#if 0 + c1 = c + unit; + for (; c < c1 && retval == 0; c++) + { + Lisp_Object ret = get_char_id_table (root, c); - if (!EQ (cat, pam)) + if (!UNBOUNDP (ret)) + { + rainj.ch = c; + retval = (fn) (&rainj, ret, arg); + } + } +#else + ct->property[i] = BT_UINT8_unbound; + c += unit; +#endif + } + else if (ct->property[i] != BT_UINT8_unbound) { - if (row == -1) - print_chartab_range (MAKE_CHAR (charset, first, 0), - MAKE_CHAR (charset, i - 1, 0), - cat, printcharfun); - else - print_chartab_range (MAKE_CHAR (charset, row, first), - MAKE_CHAR (charset, row, i - 1), - cat, printcharfun); - first = -1; - i--; + c1 = c + unit; + for (; c < c1 && retval == 0; c++) + { + rainj.ch = c; + retval = (fn) (&rainj, UINT8_DECODE (ct->property[i]), arg); + } } - } - - if (first != -1) - { - if (row == -1) - print_chartab_range (MAKE_CHAR (charset, first, 0), - MAKE_CHAR (charset, i - 1, 0), - cat, printcharfun); else - print_chartab_range (MAKE_CHAR (charset, row, first), - MAKE_CHAR (charset, row, i - 1), - cat, printcharfun); + c += unit; } + return retval; } +#ifdef HAVE_CHISE static void -print_chartab_two_byte_charset (Lisp_Object charset, - Lisp_Char_Table_Entry *cte, - Lisp_Object printcharfun) +save_uint8_byte_table (Lisp_Uint8_Byte_Table *ct, Lisp_Char_Table* root, +#ifdef HAVE_LIBCHISE + CHISE_Feature feature, +#else + Lisp_Object db, +#endif + Emchar ofs, int place, + Lisp_Object (*filter)(Lisp_Object value)) { - int i; + struct chartab_range rainj; + int i, retval; + int unit = 1 << (8 * place); + Emchar c = ofs; + Emchar c1; - for (i = 32; i < 128; i++) - { - Lisp_Object jen = cte->level2[i - 32]; + rainj.type = CHARTAB_RANGE_CHAR; - if (!CHAR_TABLE_ENTRYP (jen)) + for (i = 0, retval = 0; i < 256 && retval == 0; i++) + { + if (ct->property[i] == BT_UINT8_unloaded) { - char buf[100]; - - write_c_string (" [", printcharfun); - print_internal (XCHARSET_NAME (charset), printcharfun, 0); - sprintf (buf, " %d] ", i); - write_c_string (buf, printcharfun); - print_internal (jen, printcharfun, 0); + c1 = c + unit; + } + else if (ct->property[i] != BT_UINT8_unbound) + { + c1 = c + unit; + for (; c < c1 && retval == 0; c++) + { +#ifdef HAVE_LIBCHISE + chise_char_set_feature_value + (c, feature, + XSTRING_DATA + (Fprin1_to_string (UINT8_DECODE (ct->property[i]), + Qnil))); +#else + Fput_database (Fprin1_to_string (make_char (c), Qnil), + Fprin1_to_string (UINT8_DECODE (ct->property[i]), + Qnil), + db, Qt); +#endif + } } else - print_chartab_charset_row (charset, i, XCHAR_TABLE_ENTRY (jen), - printcharfun); + c += unit; } } +#endif -#endif /* MULE */ +#define BT_UINT16_MIN 0 +#define BT_UINT16_MAX (USHRT_MAX - 4) +#define BT_UINT16_t (USHRT_MAX - 3) +#define BT_UINT16_nil (USHRT_MAX - 2) +#define BT_UINT16_unbound (USHRT_MAX - 1) +#define BT_UINT16_unloaded USHRT_MAX -static void -print_char_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) +INLINE_HEADER int INT_UINT16_P (Lisp_Object obj); +INLINE_HEADER int UINT16_VALUE_P (Lisp_Object obj); +INLINE_HEADER unsigned short UINT16_ENCODE (Lisp_Object obj); +INLINE_HEADER Lisp_Object UINT16_DECODE (unsigned short us); + +INLINE_HEADER int +INT_UINT16_P (Lisp_Object obj) { - Lisp_Char_Table *ct = XCHAR_TABLE (obj); - char buf[200]; + if (INTP (obj)) + { + int num = XINT (obj); - sprintf (buf, "#s(char-table type %s data (", - string_data (symbol_name (XSYMBOL - (char_table_type_to_symbol (ct->type))))); - write_c_string (buf, printcharfun); + return (BT_UINT16_MIN <= num) && (num <= BT_UINT16_MAX); + } + else + return 0; +} - /* Now write out the ASCII/Control-1 stuff. */ - { - int i; - int first = -1; - Lisp_Object val = Qunbound; +INLINE_HEADER int +UINT16_VALUE_P (Lisp_Object obj) +{ + return EQ (obj, Qunloaded) || EQ (obj, Qunbound) + || EQ (obj, Qnil) || EQ (obj, Qt) || INT_UINT16_P (obj); +} - for (i = 0; i < NUM_ASCII_CHARS; i++) - { - if (first == -1) - { - first = i; - val = ct->ascii[i]; - continue; - } +INLINE_HEADER unsigned short +UINT16_ENCODE (Lisp_Object obj) +{ + if (EQ (obj, Qunloaded)) + return BT_UINT16_unloaded; + else if (EQ (obj, Qunbound)) + return BT_UINT16_unbound; + else if (EQ (obj, Qnil)) + return BT_UINT16_nil; + else if (EQ (obj, Qt)) + return BT_UINT16_t; + else + return XINT (obj); +} - if (!EQ (ct->ascii[i], val)) - { - print_chartab_range (first, i - 1, val, printcharfun); - first = -1; - i--; - } - } +INLINE_HEADER Lisp_Object +UINT16_DECODE (unsigned short n) +{ + if (n == BT_UINT16_unloaded) + return Qunloaded; + else if (n == BT_UINT16_unbound) + return Qunbound; + else if (n == BT_UINT16_nil) + return Qnil; + else if (n == BT_UINT16_t) + return Qt; + else + return make_int (n); +} - if (first != -1) - print_chartab_range (first, i - 1, val, printcharfun); - } +INLINE_HEADER unsigned short +UINT8_TO_UINT16 (unsigned char n) +{ + if (n == BT_UINT8_unloaded) + return BT_UINT16_unloaded; + else if (n == BT_UINT8_unbound) + return BT_UINT16_unbound; + else if (n == BT_UINT8_nil) + return BT_UINT16_nil; + else if (n == BT_UINT8_t) + return BT_UINT16_t; + else + return n; +} -#ifdef MULE - { - int i; +static Lisp_Object +mark_uint16_byte_table (Lisp_Object obj) +{ + return Qnil; +} - for (i = MIN_LEADING_BYTE; i < MIN_LEADING_BYTE + NUM_LEADING_BYTES; - i++) - { - Lisp_Object ann = ct->level1[i - MIN_LEADING_BYTE]; - Lisp_Object charset = CHARSET_BY_LEADING_BYTE (i); +static void +print_uint16_byte_table (Lisp_Object obj, + Lisp_Object printcharfun, int escapeflag) +{ + Lisp_Uint16_Byte_Table *bte = XUINT16_BYTE_TABLE (obj); + int i; + struct gcpro gcpro1, gcpro2; + GCPRO2 (obj, printcharfun); - if (!CHARSETP (charset) || i == LEADING_BYTE_ASCII - || i == LEADING_BYTE_CONTROL_1) - continue; - if (!CHAR_TABLE_ENTRYP (ann)) - { - write_c_string (" ", printcharfun); - print_internal (XCHARSET_NAME (charset), - printcharfun, 0); - write_c_string (" ", printcharfun); - print_internal (ann, printcharfun, 0); - } - else - { - Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (ann); - if (XCHARSET_DIMENSION (charset) == 1) - print_chartab_charset_row (charset, -1, cte, printcharfun); - else - print_chartab_two_byte_charset (charset, cte, printcharfun); - } - } - } -#endif /* MULE */ + write_c_string ("\n#property[i]; + if ( (i & 15) == 0 ) + write_c_string ("\n ", printcharfun); + write_c_string (" ", printcharfun); + if (n == BT_UINT16_unbound) + write_c_string ("void", printcharfun); + else if (n == BT_UINT16_nil) + write_c_string ("nil", printcharfun); + else if (n == BT_UINT16_t) + write_c_string ("t", printcharfun); + else + { + char buf[7]; - write_c_string ("))", printcharfun); + sprintf (buf, "%hd", n); + write_c_string (buf, printcharfun); + } + } + UNGCPRO; + write_c_string (">", printcharfun); } static int -char_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) +uint16_byte_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) { - Lisp_Char_Table *ct1 = XCHAR_TABLE (obj1); - Lisp_Char_Table *ct2 = XCHAR_TABLE (obj2); + Lisp_Uint16_Byte_Table *te1 = XUINT16_BYTE_TABLE (obj1); + Lisp_Uint16_Byte_Table *te2 = XUINT16_BYTE_TABLE (obj2); int i; - if (CHAR_TABLE_TYPE (ct1) != CHAR_TABLE_TYPE (ct2)) - return 0; - - for (i = 0; i < NUM_ASCII_CHARS; i++) - if (!internal_equal (ct1->ascii[i], ct2->ascii[i], depth + 1)) - return 0; - -#ifdef MULE - for (i = 0; i < NUM_LEADING_BYTES; i++) - if (!internal_equal (ct1->level1[i], ct2->level1[i], depth + 1)) + for (i = 0; i < 256; i++) + if (te1->property[i] != te2->property[i]) return 0; -#endif /* MULE */ - return 1; } static unsigned long -char_table_hash (Lisp_Object obj, int depth) +uint16_byte_table_hash (Lisp_Object obj, int depth) { - Lisp_Char_Table *ct = XCHAR_TABLE (obj); - unsigned long hashval = internal_array_hash (ct->ascii, NUM_ASCII_CHARS, - depth); -#ifdef MULE - hashval = HASH2 (hashval, - internal_array_hash (ct->level1, NUM_LEADING_BYTES, depth)); -#endif /* MULE */ - return hashval; + Lisp_Uint16_Byte_Table *te = XUINT16_BYTE_TABLE (obj); + int i; + hashcode_t hash = 0; + + for (i = 0; i < 256; i++) + hash = HASH2 (hash, te->property[i]); + return hash; } -static const struct lrecord_description char_table_description[] = { - { XD_LISP_OBJECT_ARRAY, offsetof (Lisp_Char_Table, ascii), NUM_ASCII_CHARS }, -#ifdef MULE - { XD_LISP_OBJECT_ARRAY, offsetof (Lisp_Char_Table, level1), NUM_LEADING_BYTES }, -#endif - { XD_LISP_OBJECT, offsetof (Lisp_Char_Table, mirror_table) }, - { XD_LO_LINK, offsetof (Lisp_Char_Table, next_table) }, +static const struct lrecord_description uint16_byte_table_description[] = { { XD_END } }; -DEFINE_LRECORD_IMPLEMENTATION ("char-table", char_table, - mark_char_table, print_char_table, 0, - char_table_equal, char_table_hash, - char_table_description, - Lisp_Char_Table); - -DEFUN ("char-table-p", Fchar_table_p, 1, 1, 0, /* -Return non-nil if OBJECT is a char table. - -A char table is a table that maps characters (or ranges of characters) -to values. Char tables are specialized for characters, only allowing -particular sorts of ranges to be assigned values. Although this -loses in generality, it makes for extremely fast (constant-time) -lookups, and thus is feasible for applications that do an extremely -large number of lookups (e.g. scanning a buffer for a character in -a particular syntax, where a lookup in the syntax table must occur -once per character). - -When Mule support exists, the types of ranges that can be assigned -values are +DEFINE_LRECORD_IMPLEMENTATION ("uint16-byte-table", uint16_byte_table, + mark_uint16_byte_table, + print_uint16_byte_table, + 0, uint16_byte_table_equal, + uint16_byte_table_hash, + uint16_byte_table_description, + Lisp_Uint16_Byte_Table); --- all characters --- an entire charset --- a single row in a two-octet charset --- a single character +static Lisp_Object +make_uint16_byte_table (unsigned short initval) +{ + Lisp_Object obj; + int i; + Lisp_Uint16_Byte_Table *cte; -When Mule support is not present, the types of ranges that can be -assigned values are + cte = alloc_lcrecord_type (Lisp_Uint16_Byte_Table, + &lrecord_uint16_byte_table); --- all characters --- a single character + for (i = 0; i < 256; i++) + cte->property[i] = initval; -To create a char table, use `make-char-table'. -To modify a char table, use `put-char-table' or `remove-char-table'. -To retrieve the value for a particular character, use `get-char-table'. -See also `map-char-table', `clear-char-table', `copy-char-table', -`valid-char-table-type-p', `char-table-type-list', -`valid-char-table-value-p', and `check-char-table-value'. -*/ - (object)) -{ - return CHAR_TABLEP (object) ? Qt : Qnil; + XSETUINT16_BYTE_TABLE (obj, cte); + return obj; } -DEFUN ("char-table-type-list", Fchar_table_type_list, 0, 0, 0, /* -Return a list of the recognized char table types. -See `valid-char-table-type-p'. -*/ - ()) +static Lisp_Object +copy_uint16_byte_table (Lisp_Object entry) { -#ifdef MULE - return list5 (Qchar, Qcategory, Qdisplay, Qgeneric, Qsyntax); -#else - return list4 (Qchar, Qdisplay, Qgeneric, Qsyntax); -#endif -} - -DEFUN ("valid-char-table-type-p", Fvalid_char_table_type_p, 1, 1, 0, /* -Return t if TYPE if a recognized char table type. - -Each char table type is used for a different purpose and allows different -sorts of values. The different char table types are + Lisp_Uint16_Byte_Table *cte = XUINT16_BYTE_TABLE (entry); + Lisp_Object obj; + int i; + Lisp_Uint16_Byte_Table *ctenew + = alloc_lcrecord_type (Lisp_Uint16_Byte_Table, + &lrecord_uint16_byte_table); -`category' - Used for category tables, which specify the regexp categories - that a character is in. The valid values are nil or a - bit vector of 95 elements. Higher-level Lisp functions are - provided for working with category tables. Currently categories - and category tables only exist when Mule support is present. -`char' - A generalized char table, for mapping from one character to - another. Used for case tables, syntax matching tables, - `keyboard-translate-table', etc. The valid values are characters. -`generic' - An even more generalized char table, for mapping from a - character to anything. -`display' - Used for display tables, which specify how a particular character - is to appear when displayed. #### Not yet implemented. -`syntax' - Used for syntax tables, which specify the syntax of a particular - character. Higher-level Lisp functions are provided for - working with syntax tables. The valid values are integers. + for (i = 0; i < 256; i++) + { + ctenew->property[i] = cte->property[i]; + } -*/ - (type)) -{ - return (EQ (type, Qchar) || -#ifdef MULE - EQ (type, Qcategory) || -#endif - EQ (type, Qdisplay) || - EQ (type, Qgeneric) || - EQ (type, Qsyntax)) ? Qt : Qnil; + XSETUINT16_BYTE_TABLE (obj, ctenew); + return obj; } -DEFUN ("char-table-type", Fchar_table_type, 1, 1, 0, /* -Return the type of CHAR-TABLE. -See `valid-char-table-type-p'. -*/ - (char_table)) +static Lisp_Object +expand_uint8_byte_table_to_uint16 (Lisp_Object table) { - CHECK_CHAR_TABLE (char_table); - return char_table_type_to_symbol (XCHAR_TABLE (char_table)->type); + Lisp_Object obj; + int i; + Lisp_Uint8_Byte_Table* bte = XUINT8_BYTE_TABLE(table); + Lisp_Uint16_Byte_Table* cte; + + cte = alloc_lcrecord_type (Lisp_Uint16_Byte_Table, + &lrecord_uint16_byte_table); + for (i = 0; i < 256; i++) + { + cte->property[i] = UINT8_TO_UINT16 (bte->property[i]); + } + XSETUINT16_BYTE_TABLE (obj, cte); + return obj; } -void -fill_char_table (Lisp_Char_Table *ct, Lisp_Object value) +static int +uint16_byte_table_same_value_p (Lisp_Object obj) { + Lisp_Uint16_Byte_Table *bte = XUINT16_BYTE_TABLE (obj); + unsigned short v0 = bte->property[0]; int i; - for (i = 0; i < NUM_ASCII_CHARS; i++) - ct->ascii[i] = value; -#ifdef MULE - for (i = 0; i < NUM_LEADING_BYTES; i++) - ct->level1[i] = value; -#endif /* MULE */ - - if (ct->type == CHAR_TABLE_TYPE_SYNTAX) - update_syntax_table (ct); + for (i = 1; i < 256; i++) + { + if (bte->property[i] != v0) + return 0; + } + return -1; } -DEFUN ("reset-char-table", Freset_char_table, 1, 1, 0, /* -Reset CHAR-TABLE to its default state. -*/ - (char_table)) -{ - Lisp_Char_Table *ct; +static int +map_over_uint16_byte_table (Lisp_Uint16_Byte_Table *ct, Lisp_Char_Table* root, + Emchar ofs, int place, + int (*fn) (struct chartab_range *range, + Lisp_Object val, void *arg), + void *arg) +{ + struct chartab_range rainj; + int i, retval; + int unit = 1 << (8 * place); + Emchar c = ofs; + Emchar c1; - CHECK_CHAR_TABLE (char_table); - ct = XCHAR_TABLE (char_table); + rainj.type = CHARTAB_RANGE_CHAR; - switch (ct->type) + for (i = 0, retval = 0; i < 256 && retval == 0; i++) { - case CHAR_TABLE_TYPE_CHAR: - fill_char_table (ct, make_char (0)); - break; - case CHAR_TABLE_TYPE_DISPLAY: - case CHAR_TABLE_TYPE_GENERIC: -#ifdef MULE - case CHAR_TABLE_TYPE_CATEGORY: -#endif /* MULE */ - fill_char_table (ct, Qnil); - break; - - case CHAR_TABLE_TYPE_SYNTAX: - fill_char_table (ct, make_int (Sinherit)); - break; + if (ct->property[i] == BT_UINT16_unloaded) + { +#if 0 + c1 = c + unit; + for (; c < c1 && retval == 0; c++) + { + Lisp_Object ret = get_char_id_table (root, c); - default: - abort (); + if (!UNBOUNDP (ret)) + { + rainj.ch = c; + retval = (fn) (&rainj, ret, arg); + } + } +#else + ct->property[i] = BT_UINT16_unbound; + c += unit; +#endif + } + else if (ct->property[i] != BT_UINT16_unbound) + { + c1 = c + unit; + for (; c < c1 && retval == 0; c++) + { + rainj.ch = c; + retval = (fn) (&rainj, UINT16_DECODE (ct->property[i]), arg); + } + } + else + c += unit; } - - return Qnil; + return retval; } -DEFUN ("make-char-table", Fmake_char_table, 1, 1, 0, /* -Return a new, empty char table of type TYPE. -Currently recognized types are 'char, 'category, 'display, 'generic, -and 'syntax. See `valid-char-table-type-p'. -*/ - (type)) +#ifdef HAVE_CHISE +static void +save_uint16_byte_table (Lisp_Uint16_Byte_Table *ct, Lisp_Char_Table* root, +#ifdef HAVE_LIBCHISE + CHISE_Feature feature, +#else + Lisp_Object db, +#endif + Emchar ofs, int place, + Lisp_Object (*filter)(Lisp_Object value)) { - Lisp_Char_Table *ct; - Lisp_Object obj; - enum char_table_type ty = symbol_to_char_table_type (type); + struct chartab_range rainj; + int i, retval; + int unit = 1 << (8 * place); + Emchar c = ofs; + Emchar c1; - ct = alloc_lcrecord_type (Lisp_Char_Table, &lrecord_char_table); - ct->type = ty; - if (ty == CHAR_TABLE_TYPE_SYNTAX) - { - ct->mirror_table = Fmake_char_table (Qgeneric); - fill_char_table (XCHAR_TABLE (ct->mirror_table), - make_int (Spunct)); - } - else - ct->mirror_table = Qnil; - ct->next_table = Qnil; - XSETCHAR_TABLE (obj, ct); - if (ty == CHAR_TABLE_TYPE_SYNTAX) + rainj.type = CHARTAB_RANGE_CHAR; + + for (i = 0, retval = 0; i < 256 && retval == 0; i++) { - ct->next_table = Vall_syntax_tables; - Vall_syntax_tables = obj; + if (ct->property[i] == BT_UINT16_unloaded) + { + c1 = c + unit; + } + else if (ct->property[i] != BT_UINT16_unbound) + { + c1 = c + unit; + for (; c < c1 && retval == 0; c++) + { +#ifdef HAVE_LIBCHISE + chise_char_set_feature_value + (c, feature, + XSTRING_DATA + (Fprin1_to_string (UINT16_DECODE (ct->property[i]), + Qnil))); +#else + Fput_database (Fprin1_to_string (make_char (c), Qnil), + Fprin1_to_string (UINT16_DECODE (ct->property[i]), + Qnil), + db, Qt); +#endif + } + } + else + c += unit; } - Freset_char_table (obj); - return obj; } +#endif -#ifdef MULE static Lisp_Object -make_char_table_entry (Lisp_Object initval) +mark_byte_table (Lisp_Object obj) { - Lisp_Object obj; + Lisp_Byte_Table *cte = XBYTE_TABLE (obj); int i; - Lisp_Char_Table_Entry *cte = - alloc_lcrecord_type (Lisp_Char_Table_Entry, &lrecord_char_table_entry); - - for (i = 0; i < 96; i++) - cte->level2[i] = initval; - XSETCHAR_TABLE_ENTRY (obj, cte); - return obj; + for (i = 0; i < 256; i++) + { + mark_object (cte->property[i]); + } + return Qnil; } -static Lisp_Object -copy_char_table_entry (Lisp_Object entry) +static void +print_byte_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) { - Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (entry); - Lisp_Object obj; + Lisp_Byte_Table *bte = XBYTE_TABLE (obj); int i; - Lisp_Char_Table_Entry *ctenew = - alloc_lcrecord_type (Lisp_Char_Table_Entry, &lrecord_char_table_entry); + struct gcpro gcpro1, gcpro2; + GCPRO2 (obj, printcharfun); - for (i = 0; i < 96; i++) + write_c_string ("\n#level2[i]; - if (CHAR_TABLE_ENTRYP (new)) - ctenew->level2[i] = copy_char_table_entry (new); + Lisp_Object elt = bte->property[i]; + if ( (i & 15) == 0 ) + write_c_string ("\n ", printcharfun); + write_c_string (" ", printcharfun); + if (EQ (elt, Qunbound)) + write_c_string ("void", printcharfun); else - ctenew->level2[i] = new; + print_internal (elt, printcharfun, escapeflag); } + UNGCPRO; + write_c_string (">", printcharfun); +} - XSETCHAR_TABLE_ENTRY (obj, ctenew); - return obj; +static int +byte_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) +{ + Lisp_Byte_Table *cte1 = XBYTE_TABLE (obj1); + Lisp_Byte_Table *cte2 = XBYTE_TABLE (obj2); + int i; + + for (i = 0; i < 256; i++) + if (BYTE_TABLE_P (cte1->property[i])) + { + if (BYTE_TABLE_P (cte2->property[i])) + { + if (!byte_table_equal (cte1->property[i], + cte2->property[i], depth + 1)) + return 0; + } + else + return 0; + } + else + if (!internal_equal (cte1->property[i], cte2->property[i], depth + 1)) + return 0; + return 1; } -#endif /* MULE */ +static unsigned long +byte_table_hash (Lisp_Object obj, int depth) +{ + Lisp_Byte_Table *cte = XBYTE_TABLE (obj); -DEFUN ("copy-char-table", Fcopy_char_table, 1, 1, 0, /* -Return a new char table which is a copy of CHAR-TABLE. -It will contain the same values for the same characters and ranges -as CHAR-TABLE. The values will not themselves be copied. -*/ - (char_table)) + return internal_array_hash (cte->property, 256, depth); +} + +static const struct lrecord_description byte_table_description[] = { + { XD_LISP_OBJECT_ARRAY, offsetof(Lisp_Byte_Table, property), 256 }, + { XD_END } +}; + +DEFINE_LRECORD_IMPLEMENTATION ("byte-table", byte_table, + mark_byte_table, + print_byte_table, + 0, byte_table_equal, + byte_table_hash, + byte_table_description, + Lisp_Byte_Table); + +static Lisp_Object +make_byte_table (Lisp_Object initval) { - Lisp_Char_Table *ct, *ctnew; Lisp_Object obj; int i; + Lisp_Byte_Table *cte; - CHECK_CHAR_TABLE (char_table); - ct = XCHAR_TABLE (char_table); - ctnew = alloc_lcrecord_type (Lisp_Char_Table, &lrecord_char_table); - ctnew->type = ct->type; + cte = alloc_lcrecord_type (Lisp_Byte_Table, &lrecord_byte_table); - for (i = 0; i < NUM_ASCII_CHARS; i++) - { - Lisp_Object new = ct->ascii[i]; -#ifdef MULE - assert (! (CHAR_TABLE_ENTRYP (new))); -#endif /* MULE */ - ctnew->ascii[i] = new; - } + for (i = 0; i < 256; i++) + cte->property[i] = initval; -#ifdef MULE + XSETBYTE_TABLE (obj, cte); + return obj; +} - for (i = 0; i < NUM_LEADING_BYTES; i++) +static Lisp_Object +copy_byte_table (Lisp_Object entry) +{ + Lisp_Byte_Table *cte = XBYTE_TABLE (entry); + Lisp_Object obj; + int i; + Lisp_Byte_Table *ctnew + = alloc_lcrecord_type (Lisp_Byte_Table, &lrecord_byte_table); + + for (i = 0; i < 256; i++) { - Lisp_Object new = ct->level1[i]; - if (CHAR_TABLE_ENTRYP (new)) - ctnew->level1[i] = copy_char_table_entry (new); + if (UINT8_BYTE_TABLE_P (cte->property[i])) + { + ctnew->property[i] = copy_uint8_byte_table (cte->property[i]); + } + else if (UINT16_BYTE_TABLE_P (cte->property[i])) + { + ctnew->property[i] = copy_uint16_byte_table (cte->property[i]); + } + else if (BYTE_TABLE_P (cte->property[i])) + { + ctnew->property[i] = copy_byte_table (cte->property[i]); + } else - ctnew->level1[i] = new; + ctnew->property[i] = cte->property[i]; } -#endif /* MULE */ - - if (CHAR_TABLEP (ct->mirror_table)) - ctnew->mirror_table = Fcopy_char_table (ct->mirror_table); - else - ctnew->mirror_table = ct->mirror_table; - ctnew->next_table = Qnil; - XSETCHAR_TABLE (obj, ctnew); - if (ctnew->type == CHAR_TABLE_TYPE_SYNTAX) - { - ctnew->next_table = Vall_syntax_tables; - Vall_syntax_tables = obj; - } + XSETBYTE_TABLE (obj, ctnew); return obj; } -static void -decode_char_table_range (Lisp_Object range, struct chartab_range *outrange) +static int +byte_table_same_value_p (Lisp_Object obj) { - if (EQ (range, Qt)) - outrange->type = CHARTAB_RANGE_ALL; - else if (CHAR_OR_CHAR_INTP (range)) - { - outrange->type = CHARTAB_RANGE_CHAR; - outrange->ch = XCHAR_OR_CHAR_INT (range); - } -#ifndef MULE - else - signal_simple_error ("Range must be t or a character", range); -#else /* MULE */ - else if (VECTORP (range)) - { - Lisp_Vector *vec = XVECTOR (range); - Lisp_Object *elts = vector_data (vec); - if (vector_length (vec) != 2) - signal_simple_error ("Length of charset row vector must be 2", - range); - outrange->type = CHARTAB_RANGE_ROW; - outrange->charset = Fget_charset (elts[0]); - CHECK_INT (elts[1]); - outrange->row = XINT (elts[1]); - switch (XCHARSET_TYPE (outrange->charset)) - { - case CHARSET_TYPE_94: - case CHARSET_TYPE_96: - signal_simple_error ("Charset in row vector must be multi-byte", - outrange->charset); - case CHARSET_TYPE_94X94: - check_int_range (outrange->row, 33, 126); - break; - case CHARSET_TYPE_96X96: - check_int_range (outrange->row, 32, 127); - break; - default: - abort (); - } - } - else + Lisp_Byte_Table *bte = XBYTE_TABLE (obj); + Lisp_Object v0 = bte->property[0]; + int i; + + for (i = 1; i < 256; i++) { - if (!CHARSETP (range) && !SYMBOLP (range)) - signal_simple_error - ("Char table range must be t, charset, char, or vector", range); - outrange->type = CHARTAB_RANGE_CHARSET; - outrange->charset = Fget_charset (range); + if (!internal_equal (bte->property[i], v0, 0)) + return 0; } -#endif /* MULE */ + return -1; } -#ifdef MULE - -/* called from CHAR_TABLE_VALUE(). */ -Lisp_Object -get_non_ascii_char_table_value (Lisp_Char_Table *ct, int leading_byte, - Emchar c) +static int +map_over_byte_table (Lisp_Byte_Table *ct, Lisp_Char_Table* root, + Emchar ofs, int place, + int (*fn) (struct chartab_range *range, + Lisp_Object val, void *arg), + void *arg) { - Lisp_Object val; - Lisp_Object charset = CHARSET_BY_LEADING_BYTE (leading_byte); - int byte1, byte2; + int i, retval; + Lisp_Object v; + int unit = 1 << (8 * place); + Emchar c = ofs; - BREAKUP_CHAR_1_UNSAFE (c, charset, byte1, byte2); - val = ct->level1[leading_byte - MIN_LEADING_BYTE]; - if (CHAR_TABLE_ENTRYP (val)) + for (i = 0, retval = 0; i < 256 && retval == 0; i++) { - Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val); - val = cte->level2[byte1 - 32]; - if (CHAR_TABLE_ENTRYP (val)) + v = ct->property[i]; + if (UINT8_BYTE_TABLE_P (v)) { - cte = XCHAR_TABLE_ENTRY (val); - assert (byte2 >= 32); - val = cte->level2[byte2 - 32]; - assert (!CHAR_TABLE_ENTRYP (val)); + retval + = map_over_uint8_byte_table (XUINT8_BYTE_TABLE(v), root, + c, place - 1, fn, arg); + c += unit; } - } + else if (UINT16_BYTE_TABLE_P (v)) + { + retval + = map_over_uint16_byte_table (XUINT16_BYTE_TABLE(v), root, + c, place - 1, fn, arg); + c += unit; + } + else if (BYTE_TABLE_P (v)) + { + retval = map_over_byte_table (XBYTE_TABLE(v), root, + c, place - 1, fn, arg); + c += unit; + } + else if (EQ (v, Qunloaded)) + { +#if 0 + struct chartab_range rainj; + Emchar c1 = c + unit; - return val; -} + rainj.type = CHARTAB_RANGE_CHAR; -#endif /* MULE */ + for (; c < c1 && retval == 0; c++) + { + Lisp_Object ret = get_char_id_table (root, c); -Lisp_Object -get_char_table (Emchar ch, Lisp_Char_Table *ct) + if (!UNBOUNDP (ret)) + { + rainj.ch = c; + retval = (fn) (&rainj, ret, arg); + } + } +#else + ct->property[i] = Qunbound; + c += unit; +#endif + } + else if (!UNBOUNDP (v)) + { + struct chartab_range rainj; + Emchar c1 = c + unit; + + rainj.type = CHARTAB_RANGE_CHAR; + + for (; c < c1 && retval == 0; c++) + { + rainj.ch = c; + retval = (fn) (&rainj, v, arg); + } + } + else + c += unit; + } + return retval; +} + +#ifdef HAVE_CHISE +static void +save_byte_table (Lisp_Byte_Table *ct, Lisp_Char_Table* root, +#ifdef HAVE_LIBCHISE + CHISE_Feature feature, +#else + Lisp_Object db, +#endif + Emchar ofs, int place, + Lisp_Object (*filter)(Lisp_Object value)) +{ + int i, retval; + Lisp_Object v; + int unit = 1 << (8 * place); + Emchar c = ofs; + + for (i = 0, retval = 0; i < 256 && retval == 0; i++) + { + v = ct->property[i]; + if (UINT8_BYTE_TABLE_P (v)) + { + save_uint8_byte_table (XUINT8_BYTE_TABLE(v), root, +#ifdef HAVE_LIBCHISE + feature, +#else + db, +#endif + c, place - 1, filter); + c += unit; + } + else if (UINT16_BYTE_TABLE_P (v)) + { + save_uint16_byte_table (XUINT16_BYTE_TABLE(v), root, +#ifdef HAVE_LIBCHISE + feature, +#else + db, +#endif + c, place - 1, filter); + c += unit; + } + else if (BYTE_TABLE_P (v)) + { + save_byte_table (XBYTE_TABLE(v), root, +#ifdef HAVE_LIBCHISE + feature, +#else + db, +#endif + c, place - 1, filter); + c += unit; + } + else if (EQ (v, Qunloaded)) + { + c += unit; + } + else if (!UNBOUNDP (v)) + { + struct chartab_range rainj; + Emchar c1 = c + unit; + + if (filter != NULL) + v = (*filter)(v); + + rainj.type = CHARTAB_RANGE_CHAR; + + for (; c < c1 && retval == 0; c++) + { +#ifdef HAVE_LIBCHISE + chise_char_set_feature_value + (c, feature, XSTRING_DATA (Fprin1_to_string (v, Qnil))); +#else + Fput_database (Fprin1_to_string (make_char (c), Qnil), + Fprin1_to_string (v, Qnil), + db, Qt); +#endif + } + } + else + c += unit; + } +} +#endif + +Lisp_Object +get_byte_table (Lisp_Object table, unsigned char idx) +{ + if (UINT8_BYTE_TABLE_P (table)) + return UINT8_DECODE (XUINT8_BYTE_TABLE(table)->property[idx]); + else if (UINT16_BYTE_TABLE_P (table)) + return UINT16_DECODE (XUINT16_BYTE_TABLE(table)->property[idx]); + else if (BYTE_TABLE_P (table)) + return XBYTE_TABLE(table)->property[idx]; + else + return table; +} + +Lisp_Object +put_byte_table (Lisp_Object table, unsigned char idx, Lisp_Object value) +{ + if (UINT8_BYTE_TABLE_P (table)) + { + if (UINT8_VALUE_P (value)) + { + XUINT8_BYTE_TABLE(table)->property[idx] = UINT8_ENCODE (value); + if (!UINT8_BYTE_TABLE_P (value) && + !UINT16_BYTE_TABLE_P (value) && !BYTE_TABLE_P (value) + && uint8_byte_table_same_value_p (table)) + { + return value; + } + } + else if (UINT16_VALUE_P (value)) + { + Lisp_Object new = expand_uint8_byte_table_to_uint16 (table); + + XUINT16_BYTE_TABLE(new)->property[idx] = UINT16_ENCODE (value); + return new; + } + else + { + Lisp_Object new = make_byte_table (Qnil); + int i; + + for (i = 0; i < 256; i++) + { + XBYTE_TABLE(new)->property[i] + = UINT8_DECODE (XUINT8_BYTE_TABLE(table)->property[i]); + } + XBYTE_TABLE(new)->property[idx] = value; + return new; + } + } + else if (UINT16_BYTE_TABLE_P (table)) + { + if (UINT16_VALUE_P (value)) + { + XUINT16_BYTE_TABLE(table)->property[idx] = UINT16_ENCODE (value); + if (!UINT8_BYTE_TABLE_P (value) && + !UINT16_BYTE_TABLE_P (value) && !BYTE_TABLE_P (value) + && uint16_byte_table_same_value_p (table)) + { + return value; + } + } + else + { + Lisp_Object new = make_byte_table (Qnil); + int i; + + for (i = 0; i < 256; i++) + { + XBYTE_TABLE(new)->property[i] + = UINT16_DECODE (XUINT16_BYTE_TABLE(table)->property[i]); + } + XBYTE_TABLE(new)->property[idx] = value; + return new; + } + } + else if (BYTE_TABLE_P (table)) + { + XBYTE_TABLE(table)->property[idx] = value; + if (!UINT8_BYTE_TABLE_P (value) && + !UINT16_BYTE_TABLE_P (value) && !BYTE_TABLE_P (value) + && byte_table_same_value_p (table)) + { + return value; + } + } + else if (!internal_equal (table, value, 0)) + { + if (UINT8_VALUE_P (table) && UINT8_VALUE_P (value)) + { + table = make_uint8_byte_table (UINT8_ENCODE (table)); + XUINT8_BYTE_TABLE(table)->property[idx] = UINT8_ENCODE (value); + } + else if (UINT16_VALUE_P (table) && UINT16_VALUE_P (value)) + { + table = make_uint16_byte_table (UINT16_ENCODE (table)); + XUINT16_BYTE_TABLE(table)->property[idx] = UINT16_ENCODE (value); + } + else + { + table = make_byte_table (table); + XBYTE_TABLE(table)->property[idx] = value; + } + } + return table; +} + + +Lisp_Object +make_char_id_table (Lisp_Object initval) +{ + Lisp_Object obj; + obj = Fmake_char_table (Qgeneric); + fill_char_table (XCHAR_TABLE (obj), initval); + return obj; +} + + +#if defined(HAVE_CHISE) && !defined(HAVE_LIBCHISE_LIBCHISE) +Lisp_Object Qsystem_char_id; +#endif + +Lisp_Object Qcomposition; +Lisp_Object Q_decomposition; +Lisp_Object Qto_ucs; +Lisp_Object Q_ucs_unified; +Lisp_Object Qcompat; +Lisp_Object Qisolated; +Lisp_Object Qinitial; +Lisp_Object Qmedial; +Lisp_Object Qfinal; +Lisp_Object Qvertical; +Lisp_Object QnoBreak; +Lisp_Object Qfraction; +Lisp_Object Qsuper; +Lisp_Object Qsub; +Lisp_Object Qcircle; +Lisp_Object Qsquare; +Lisp_Object Qwide; +Lisp_Object Qnarrow; +Lisp_Object Qsmall; +Lisp_Object Qfont; + +Emchar to_char_id (Lisp_Object v, char* err_msg, Lisp_Object err_arg); + +Emchar +to_char_id (Lisp_Object v, char* err_msg, Lisp_Object err_arg) +{ + if (INTP (v)) + return XINT (v); + if (CHARP (v)) + return XCHAR (v); + else if (EQ (v, Qcompat)) + return -1; + else if (EQ (v, Qisolated)) + return -2; + else if (EQ (v, Qinitial)) + return -3; + else if (EQ (v, Qmedial)) + return -4; + else if (EQ (v, Qfinal)) + return -5; + else if (EQ (v, Qvertical)) + return -6; + else if (EQ (v, QnoBreak)) + return -7; + else if (EQ (v, Qfraction)) + return -8; + else if (EQ (v, Qsuper)) + return -9; + else if (EQ (v, Qsub)) + return -10; + else if (EQ (v, Qcircle)) + return -11; + else if (EQ (v, Qsquare)) + return -12; + else if (EQ (v, Qwide)) + return -13; + else if (EQ (v, Qnarrow)) + return -14; + else if (EQ (v, Qsmall)) + return -15; + else if (EQ (v, Qfont)) + return -16; + else + signal_simple_error (err_msg, err_arg); +} + +DEFUN ("get-composite-char", Fget_composite_char, 1, 1, 0, /* +Return character corresponding with list. +*/ + (list)) +{ + Lisp_Object base, modifier; + Lisp_Object rest; + + if (!CONSP (list)) + signal_simple_error ("Invalid value for composition", list); + base = Fcar (list); + rest = Fcdr (list); + while (!NILP (rest)) + { + if (!CHARP (base)) + return Qnil; + if (!CONSP (rest)) + signal_simple_error ("Invalid value for composition", list); + modifier = Fcar (rest); + rest = Fcdr (rest); + base = Fcdr (Fassq (modifier, + Fget_char_attribute (base, Qcomposition, Qnil))); + } + return base; +} + +DEFUN ("char-variants", Fchar_variants, 1, 1, 0, /* +Return variants of CHARACTER. +*/ + (character)) +{ + Lisp_Object ret; + + CHECK_CHAR (character); + ret = Fget_char_attribute (character, Q_ucs_unified, Qnil); + if (CONSP (ret)) + return Fcopy_list (ret); + else + return Qnil; +} + +#endif + + +/* A char table maps from ranges of characters to values. + + Implementing a general data structure that maps from arbitrary + ranges of numbers to values is tricky to do efficiently. As it + happens, it should suffice (and is usually more convenient, anyway) + when dealing with characters to restrict the sorts of ranges that + can be assigned values, as follows: + + 1) All characters. + 2) All characters in a charset. + 3) All characters in a particular row of a charset, where a "row" + means all characters with the same first byte. + 4) A particular character in a charset. + + We use char tables to generalize the 256-element vectors now + littering the Emacs code. + + Possible uses (all should be converted at some point): + + 1) category tables + 2) syntax tables + 3) display tables + 4) case tables + 5) keyboard-translate-table? + + We provide an + abstract type to generalize the Emacs vectors and Mule + vectors-of-vectors goo. + */ + +/************************************************************************/ +/* Char Table object */ +/************************************************************************/ + +#if defined(MULE)&&!defined(UTF2000) + +static Lisp_Object +mark_char_table_entry (Lisp_Object obj) +{ + Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (obj); + int i; + + for (i = 0; i < 96; i++) + { + mark_object (cte->level2[i]); + } + return Qnil; +} + +static int +char_table_entry_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) +{ + Lisp_Char_Table_Entry *cte1 = XCHAR_TABLE_ENTRY (obj1); + Lisp_Char_Table_Entry *cte2 = XCHAR_TABLE_ENTRY (obj2); + int i; + + for (i = 0; i < 96; i++) + if (!internal_equal (cte1->level2[i], cte2->level2[i], depth + 1)) + return 0; + + return 1; +} + +static unsigned long +char_table_entry_hash (Lisp_Object obj, int depth) +{ + Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (obj); + + return internal_array_hash (cte->level2, 96, depth); +} + +static const struct lrecord_description char_table_entry_description[] = { + { XD_LISP_OBJECT_ARRAY, offsetof (Lisp_Char_Table_Entry, level2), 96 }, + { XD_END } +}; + +DEFINE_LRECORD_IMPLEMENTATION ("char-table-entry", char_table_entry, + mark_char_table_entry, internal_object_printer, + 0, char_table_entry_equal, + char_table_entry_hash, + char_table_entry_description, + Lisp_Char_Table_Entry); +#endif /* MULE */ + +static Lisp_Object +mark_char_table (Lisp_Object obj) +{ + Lisp_Char_Table *ct = XCHAR_TABLE (obj); +#ifdef UTF2000 + + mark_object (ct->table); + mark_object (ct->name); +#ifndef HAVE_LIBCHISE + mark_object (ct->db); +#endif +#else + int i; + + for (i = 0; i < NUM_ASCII_CHARS; i++) + mark_object (ct->ascii[i]); +#ifdef MULE + for (i = 0; i < NUM_LEADING_BYTES; i++) + mark_object (ct->level1[i]); +#endif +#endif +#ifdef UTF2000 + return ct->default_value; +#else + return ct->mirror_table; +#endif +} + +/* WARNING: All functions of this nature need to be written extremely + carefully to avoid crashes during GC. Cf. prune_specifiers() + and prune_weak_hash_tables(). */ + +void +prune_syntax_tables (void) +{ + Lisp_Object rest, prev = Qnil; + + for (rest = Vall_syntax_tables; + !NILP (rest); + rest = XCHAR_TABLE (rest)->next_table) + { + if (! marked_p (rest)) + { + /* This table is garbage. Remove it from the list. */ + if (NILP (prev)) + Vall_syntax_tables = XCHAR_TABLE (rest)->next_table; + else + XCHAR_TABLE (prev)->next_table = + XCHAR_TABLE (rest)->next_table; + } + } +} + +static Lisp_Object +char_table_type_to_symbol (enum char_table_type type) +{ + switch (type) + { + default: abort(); + case CHAR_TABLE_TYPE_GENERIC: return Qgeneric; + case CHAR_TABLE_TYPE_SYNTAX: return Qsyntax; + case CHAR_TABLE_TYPE_DISPLAY: return Qdisplay; + case CHAR_TABLE_TYPE_CHAR: return Qchar; +#ifdef MULE + case CHAR_TABLE_TYPE_CATEGORY: return Qcategory; +#endif + } +} + +static enum char_table_type +symbol_to_char_table_type (Lisp_Object symbol) +{ + CHECK_SYMBOL (symbol); + + if (EQ (symbol, Qgeneric)) return CHAR_TABLE_TYPE_GENERIC; + if (EQ (symbol, Qsyntax)) return CHAR_TABLE_TYPE_SYNTAX; + if (EQ (symbol, Qdisplay)) return CHAR_TABLE_TYPE_DISPLAY; + if (EQ (symbol, Qchar)) return CHAR_TABLE_TYPE_CHAR; +#ifdef MULE + if (EQ (symbol, Qcategory)) return CHAR_TABLE_TYPE_CATEGORY; +#endif + + signal_simple_error ("Unrecognized char table type", symbol); + return CHAR_TABLE_TYPE_GENERIC; /* not reached */ +} + +#ifndef UTF2000 +static void +print_chartab_range (Emchar first, Emchar last, Lisp_Object val, + Lisp_Object printcharfun) +{ + if (first != last) + { + write_c_string (" (", printcharfun); + print_internal (make_char (first), printcharfun, 0); + write_c_string (" ", printcharfun); + print_internal (make_char (last), printcharfun, 0); + write_c_string (") ", printcharfun); + } + else + { + write_c_string (" ", printcharfun); + print_internal (make_char (first), printcharfun, 0); + write_c_string (" ", printcharfun); + } + print_internal (val, printcharfun, 1); +} +#endif + +#if defined(MULE)&&!defined(UTF2000) + +static void +print_chartab_charset_row (Lisp_Object charset, + int row, + Lisp_Char_Table_Entry *cte, + Lisp_Object printcharfun) +{ + int i; + Lisp_Object cat = Qunbound; + int first = -1; + + for (i = 32; i < 128; i++) + { + Lisp_Object pam = cte->level2[i - 32]; + + if (first == -1) + { + first = i; + cat = pam; + continue; + } + + if (!EQ (cat, pam)) + { + if (row == -1) + print_chartab_range (MAKE_CHAR (charset, first, 0), + MAKE_CHAR (charset, i - 1, 0), + cat, printcharfun); + else + print_chartab_range (MAKE_CHAR (charset, row, first), + MAKE_CHAR (charset, row, i - 1), + cat, printcharfun); + first = -1; + i--; + } + } + + if (first != -1) + { + if (row == -1) + print_chartab_range (MAKE_CHAR (charset, first, 0), + MAKE_CHAR (charset, i - 1, 0), + cat, printcharfun); + else + print_chartab_range (MAKE_CHAR (charset, row, first), + MAKE_CHAR (charset, row, i - 1), + cat, printcharfun); + } +} + +static void +print_chartab_two_byte_charset (Lisp_Object charset, + Lisp_Char_Table_Entry *cte, + Lisp_Object printcharfun) +{ + int i; + + for (i = 32; i < 128; i++) + { + Lisp_Object jen = cte->level2[i - 32]; + + if (!CHAR_TABLE_ENTRYP (jen)) + { + char buf[100]; + + write_c_string (" [", printcharfun); + print_internal (XCHARSET_NAME (charset), printcharfun, 0); + sprintf (buf, " %d] ", i); + write_c_string (buf, printcharfun); + print_internal (jen, printcharfun, 0); + } + else + print_chartab_charset_row (charset, i, XCHAR_TABLE_ENTRY (jen), + printcharfun); + } +} + +#endif /* MULE */ + +static void +print_char_table (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) +{ + Lisp_Char_Table *ct = XCHAR_TABLE (obj); +#ifdef UTF2000 + int i; + struct gcpro gcpro1, gcpro2; + GCPRO2 (obj, printcharfun); + + write_c_string ("#s(char-table ", printcharfun); + write_c_string (" ", printcharfun); + write_c_string (string_data + (symbol_name + (XSYMBOL (char_table_type_to_symbol (ct->type)))), + printcharfun); + write_c_string ("\n ", printcharfun); + print_internal (ct->default_value, printcharfun, escapeflag); + for (i = 0; i < 256; i++) + { + Lisp_Object elt = get_byte_table (ct->table, i); + if (i != 0) write_c_string ("\n ", printcharfun); + if (EQ (elt, Qunbound)) + write_c_string ("void", printcharfun); + else + print_internal (elt, printcharfun, escapeflag); + } + UNGCPRO; +#else /* non UTF2000 */ + char buf[200]; + + sprintf (buf, "#s(char-table type %s data (", + string_data (symbol_name (XSYMBOL + (char_table_type_to_symbol (ct->type))))); + write_c_string (buf, printcharfun); + + /* Now write out the ASCII/Control-1 stuff. */ + { + int i; + int first = -1; + Lisp_Object val = Qunbound; + + for (i = 0; i < NUM_ASCII_CHARS; i++) + { + if (first == -1) + { + first = i; + val = ct->ascii[i]; + continue; + } + + if (!EQ (ct->ascii[i], val)) + { + print_chartab_range (first, i - 1, val, printcharfun); + first = -1; + i--; + } + } + + if (first != -1) + print_chartab_range (first, i - 1, val, printcharfun); + } + +#ifdef MULE + { + Charset_ID i; + + for (i = MIN_LEADING_BYTE; i < MIN_LEADING_BYTE + NUM_LEADING_BYTES; + i++) + { + Lisp_Object ann = ct->level1[i - MIN_LEADING_BYTE]; + Lisp_Object charset = CHARSET_BY_LEADING_BYTE (i); + + if (!CHARSETP (charset) || i == LEADING_BYTE_ASCII + || i == LEADING_BYTE_CONTROL_1) + continue; + if (!CHAR_TABLE_ENTRYP (ann)) + { + write_c_string (" ", printcharfun); + print_internal (XCHARSET_NAME (charset), + printcharfun, 0); + write_c_string (" ", printcharfun); + print_internal (ann, printcharfun, 0); + } + else + { + Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (ann); + if (XCHARSET_DIMENSION (charset) == 1) + print_chartab_charset_row (charset, -1, cte, printcharfun); + else + print_chartab_two_byte_charset (charset, cte, printcharfun); + } + } + } +#endif /* MULE */ +#endif /* non UTF2000 */ + + write_c_string ("))", printcharfun); +} + +static int +char_table_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) +{ + Lisp_Char_Table *ct1 = XCHAR_TABLE (obj1); + Lisp_Char_Table *ct2 = XCHAR_TABLE (obj2); + int i; + + if (CHAR_TABLE_TYPE (ct1) != CHAR_TABLE_TYPE (ct2)) + return 0; + +#ifdef UTF2000 + for (i = 0; i < 256; i++) + { + if (!internal_equal (get_byte_table (ct1->table, i), + get_byte_table (ct2->table, i), 0)) + return 0; + } +#else + for (i = 0; i < NUM_ASCII_CHARS; i++) + if (!internal_equal (ct1->ascii[i], ct2->ascii[i], depth + 1)) + return 0; + +#ifdef MULE + for (i = 0; i < NUM_LEADING_BYTES; i++) + if (!internal_equal (ct1->level1[i], ct2->level1[i], depth + 1)) + return 0; +#endif /* MULE */ +#endif /* non UTF2000 */ + + return 1; +} + +static unsigned long +char_table_hash (Lisp_Object obj, int depth) +{ + Lisp_Char_Table *ct = XCHAR_TABLE (obj); +#ifdef UTF2000 + return byte_table_hash (ct->table, depth + 1); +#else + unsigned long hashval = internal_array_hash (ct->ascii, NUM_ASCII_CHARS, + depth); +#ifdef MULE + hashval = HASH2 (hashval, + internal_array_hash (ct->level1, NUM_LEADING_BYTES, depth)); +#endif /* MULE */ + return hashval; +#endif +} + +static const struct lrecord_description char_table_description[] = { +#ifdef UTF2000 + { XD_LISP_OBJECT, offsetof(Lisp_Char_Table, table) }, + { XD_LISP_OBJECT, offsetof(Lisp_Char_Table, default_value) }, + { XD_LISP_OBJECT, offsetof(Lisp_Char_Table, name) }, +#ifndef HAVE_LIBCHISE + { XD_LISP_OBJECT, offsetof(Lisp_Char_Table, db) }, +#endif +#else + { XD_LISP_OBJECT_ARRAY, offsetof (Lisp_Char_Table, ascii), NUM_ASCII_CHARS }, +#ifdef MULE + { XD_LISP_OBJECT_ARRAY, offsetof (Lisp_Char_Table, level1), NUM_LEADING_BYTES }, +#endif +#endif +#ifndef UTF2000 + { XD_LISP_OBJECT, offsetof (Lisp_Char_Table, mirror_table) }, +#endif + { XD_LO_LINK, offsetof (Lisp_Char_Table, next_table) }, + { XD_END } +}; + +DEFINE_LRECORD_IMPLEMENTATION ("char-table", char_table, + mark_char_table, print_char_table, 0, + char_table_equal, char_table_hash, + char_table_description, + Lisp_Char_Table); + +DEFUN ("char-table-p", Fchar_table_p, 1, 1, 0, /* +Return non-nil if OBJECT is a char table. + +A char table is a table that maps characters (or ranges of characters) +to values. Char tables are specialized for characters, only allowing +particular sorts of ranges to be assigned values. Although this +loses in generality, it makes for extremely fast (constant-time) +lookups, and thus is feasible for applications that do an extremely +large number of lookups (e.g. scanning a buffer for a character in +a particular syntax, where a lookup in the syntax table must occur +once per character). + +When Mule support exists, the types of ranges that can be assigned +values are + +-- all characters +-- an entire charset +-- a single row in a two-octet charset +-- a single character + +When Mule support is not present, the types of ranges that can be +assigned values are + +-- all characters +-- a single character + +To create a char table, use `make-char-table'. +To modify a char table, use `put-char-table' or `remove-char-table'. +To retrieve the value for a particular character, use `get-char-table'. +See also `map-char-table', `clear-char-table', `copy-char-table', +`valid-char-table-type-p', `char-table-type-list', +`valid-char-table-value-p', and `check-char-table-value'. +*/ + (object)) +{ + return CHAR_TABLEP (object) ? Qt : Qnil; +} + +DEFUN ("char-table-type-list", Fchar_table_type_list, 0, 0, 0, /* +Return a list of the recognized char table types. +See `valid-char-table-type-p'. +*/ + ()) +{ +#ifdef MULE + return list5 (Qchar, Qcategory, Qdisplay, Qgeneric, Qsyntax); +#else + return list4 (Qchar, Qdisplay, Qgeneric, Qsyntax); +#endif +} + +DEFUN ("valid-char-table-type-p", Fvalid_char_table_type_p, 1, 1, 0, /* +Return t if TYPE if a recognized char table type. + +Each char table type is used for a different purpose and allows different +sorts of values. The different char table types are + +`category' + Used for category tables, which specify the regexp categories + that a character is in. The valid values are nil or a + bit vector of 95 elements. Higher-level Lisp functions are + provided for working with category tables. Currently categories + and category tables only exist when Mule support is present. +`char' + A generalized char table, for mapping from one character to + another. Used for case tables, syntax matching tables, + `keyboard-translate-table', etc. The valid values are characters. +`generic' + An even more generalized char table, for mapping from a + character to anything. +`display' + Used for display tables, which specify how a particular character + is to appear when displayed. #### Not yet implemented. +`syntax' + Used for syntax tables, which specify the syntax of a particular + character. Higher-level Lisp functions are provided for + working with syntax tables. The valid values are integers. + +*/ + (type)) +{ + return (EQ (type, Qchar) || +#ifdef MULE + EQ (type, Qcategory) || +#endif + EQ (type, Qdisplay) || + EQ (type, Qgeneric) || + EQ (type, Qsyntax)) ? Qt : Qnil; +} + +DEFUN ("char-table-type", Fchar_table_type, 1, 1, 0, /* +Return the type of CHAR-TABLE. +See `valid-char-table-type-p'. +*/ + (char_table)) +{ + CHECK_CHAR_TABLE (char_table); + return char_table_type_to_symbol (XCHAR_TABLE (char_table)->type); +} + +void +fill_char_table (Lisp_Char_Table *ct, Lisp_Object value) +{ +#ifdef UTF2000 + ct->table = Qunbound; + ct->default_value = value; + ct->unloaded = 0; +#else + int i; + + for (i = 0; i < NUM_ASCII_CHARS; i++) + ct->ascii[i] = value; +#ifdef MULE + for (i = 0; i < NUM_LEADING_BYTES; i++) + ct->level1[i] = value; +#endif /* MULE */ +#endif + +#ifndef UTF2000 + if (ct->type == CHAR_TABLE_TYPE_SYNTAX) + update_syntax_table (ct); +#endif +} + +DEFUN ("reset-char-table", Freset_char_table, 1, 1, 0, /* +Reset CHAR-TABLE to its default state. +*/ + (char_table)) +{ + Lisp_Char_Table *ct; + + CHECK_CHAR_TABLE (char_table); + ct = XCHAR_TABLE (char_table); + + switch (ct->type) + { + case CHAR_TABLE_TYPE_CHAR: + fill_char_table (ct, make_char (0)); + break; + case CHAR_TABLE_TYPE_DISPLAY: + case CHAR_TABLE_TYPE_GENERIC: +#ifdef MULE + case CHAR_TABLE_TYPE_CATEGORY: +#endif /* MULE */ + fill_char_table (ct, Qnil); + break; + + case CHAR_TABLE_TYPE_SYNTAX: + fill_char_table (ct, make_int (Sinherit)); + break; + + default: + abort (); + } + + return Qnil; +} + +DEFUN ("make-char-table", Fmake_char_table, 1, 1, 0, /* +Return a new, empty char table of type TYPE. +Currently recognized types are 'char, 'category, 'display, 'generic, +and 'syntax. See `valid-char-table-type-p'. +*/ + (type)) +{ + Lisp_Char_Table *ct; + Lisp_Object obj; + enum char_table_type ty = symbol_to_char_table_type (type); + + ct = alloc_lcrecord_type (Lisp_Char_Table, &lrecord_char_table); + ct->type = ty; +#ifndef UTF2000 + if (ty == CHAR_TABLE_TYPE_SYNTAX) + { + ct->mirror_table = Fmake_char_table (Qgeneric); + fill_char_table (XCHAR_TABLE (ct->mirror_table), + make_int (Spunct)); + } + else + ct->mirror_table = Qnil; +#else + ct->name = Qnil; +#ifndef HAVE_LIBCHISE + ct->db = Qnil; +#endif +#endif + ct->next_table = Qnil; + XSETCHAR_TABLE (obj, ct); + if (ty == CHAR_TABLE_TYPE_SYNTAX) + { + ct->next_table = Vall_syntax_tables; + Vall_syntax_tables = obj; + } + Freset_char_table (obj); + return obj; +} + +#if defined(MULE)&&!defined(UTF2000) + +static Lisp_Object +make_char_table_entry (Lisp_Object initval) +{ + Lisp_Object obj; + int i; + Lisp_Char_Table_Entry *cte = + alloc_lcrecord_type (Lisp_Char_Table_Entry, &lrecord_char_table_entry); + + for (i = 0; i < 96; i++) + cte->level2[i] = initval; + + XSETCHAR_TABLE_ENTRY (obj, cte); + return obj; +} + +static Lisp_Object +copy_char_table_entry (Lisp_Object entry) +{ + Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (entry); + Lisp_Object obj; + int i; + Lisp_Char_Table_Entry *ctenew = + alloc_lcrecord_type (Lisp_Char_Table_Entry, &lrecord_char_table_entry); + + for (i = 0; i < 96; i++) + { + Lisp_Object new = cte->level2[i]; + if (CHAR_TABLE_ENTRYP (new)) + ctenew->level2[i] = copy_char_table_entry (new); + else + ctenew->level2[i] = new; + } + + XSETCHAR_TABLE_ENTRY (obj, ctenew); + return obj; +} + +#endif /* MULE */ + +DEFUN ("copy-char-table", Fcopy_char_table, 1, 1, 0, /* +Return a new char table which is a copy of CHAR-TABLE. +It will contain the same values for the same characters and ranges +as CHAR-TABLE. The values will not themselves be copied. +*/ + (char_table)) +{ + Lisp_Char_Table *ct, *ctnew; + Lisp_Object obj; +#ifndef UTF2000 + int i; +#endif + + CHECK_CHAR_TABLE (char_table); + ct = XCHAR_TABLE (char_table); + ctnew = alloc_lcrecord_type (Lisp_Char_Table, &lrecord_char_table); + ctnew->type = ct->type; +#ifdef UTF2000 + ctnew->default_value = ct->default_value; + /* [tomo:2002-01-21] Perhaps this code seems wrong */ + ctnew->name = ct->name; +#ifndef HAVE_LIBCHISE + ctnew->db = ct->db; +#endif + + if (UINT8_BYTE_TABLE_P (ct->table)) + { + ctnew->table = copy_uint8_byte_table (ct->table); + } + else if (UINT16_BYTE_TABLE_P (ct->table)) + { + ctnew->table = copy_uint16_byte_table (ct->table); + } + else if (BYTE_TABLE_P (ct->table)) + { + ctnew->table = copy_byte_table (ct->table); + } + else if (!UNBOUNDP (ct->table)) + ctnew->table = ct->table; +#else /* non UTF2000 */ + + for (i = 0; i < NUM_ASCII_CHARS; i++) + { + Lisp_Object new = ct->ascii[i]; +#ifdef MULE + assert (! (CHAR_TABLE_ENTRYP (new))); +#endif /* MULE */ + ctnew->ascii[i] = new; + } + +#ifdef MULE + + for (i = 0; i < NUM_LEADING_BYTES; i++) + { + Lisp_Object new = ct->level1[i]; + if (CHAR_TABLE_ENTRYP (new)) + ctnew->level1[i] = copy_char_table_entry (new); + else + ctnew->level1[i] = new; + } + +#endif /* MULE */ +#endif /* non UTF2000 */ + +#ifndef UTF2000 + if (CHAR_TABLEP (ct->mirror_table)) + ctnew->mirror_table = Fcopy_char_table (ct->mirror_table); + else + ctnew->mirror_table = ct->mirror_table; +#endif + ctnew->next_table = Qnil; + XSETCHAR_TABLE (obj, ctnew); + if (ctnew->type == CHAR_TABLE_TYPE_SYNTAX) + { + ctnew->next_table = Vall_syntax_tables; + Vall_syntax_tables = obj; + } + return obj; +} + +INLINE_HEADER int XCHARSET_CELL_RANGE (Lisp_Object ccs); +INLINE_HEADER int +XCHARSET_CELL_RANGE (Lisp_Object ccs) +{ + switch (XCHARSET_CHARS (ccs)) + { + case 94: + return (33 << 8) | 126; + case 96: + return (32 << 8) | 127; +#ifdef UTF2000 + case 128: + return (0 << 8) | 127; + case 256: + return (0 << 8) | 255; +#endif + default: + abort (); + return 0; + } +} + +#ifndef UTF2000 +static +#endif +void +decode_char_table_range (Lisp_Object range, struct chartab_range *outrange) +{ + if (EQ (range, Qt)) + outrange->type = CHARTAB_RANGE_ALL; +#ifdef UTF2000 + else if (EQ (range, Qnil)) + outrange->type = CHARTAB_RANGE_DEFAULT; +#endif + else if (CHAR_OR_CHAR_INTP (range)) + { + outrange->type = CHARTAB_RANGE_CHAR; + outrange->ch = XCHAR_OR_CHAR_INT (range); + } +#ifndef MULE + else + signal_simple_error ("Range must be t or a character", range); +#else /* MULE */ + else if (VECTORP (range)) + { + Lisp_Vector *vec = XVECTOR (range); + Lisp_Object *elts = vector_data (vec); + int cell_min, cell_max; + + outrange->type = CHARTAB_RANGE_ROW; + outrange->charset = Fget_charset (elts[0]); + CHECK_INT (elts[1]); + outrange->row = XINT (elts[1]); + if (XCHARSET_DIMENSION (outrange->charset) < 2) + signal_simple_error ("Charset in row vector must be multi-byte", + outrange->charset); + else + { + int ret = XCHARSET_CELL_RANGE (outrange->charset); + + cell_min = ret >> 8; + cell_max = ret & 0xFF; + } + if (XCHARSET_DIMENSION (outrange->charset) == 2) + check_int_range (outrange->row, cell_min, cell_max); +#ifdef UTF2000 + else if (XCHARSET_DIMENSION (outrange->charset) == 3) + { + check_int_range (outrange->row >> 8 , cell_min, cell_max); + check_int_range (outrange->row & 0xFF, cell_min, cell_max); + } + else if (XCHARSET_DIMENSION (outrange->charset) == 4) + { + check_int_range ( outrange->row >> 16 , cell_min, cell_max); + check_int_range ((outrange->row >> 8) & 0xFF, cell_min, cell_max); + check_int_range ( outrange->row & 0xFF, cell_min, cell_max); + } +#endif + else + abort (); + } + else + { + if (!CHARSETP (range) && !SYMBOLP (range)) + signal_simple_error + ("Char table range must be t, charset, char, or vector", range); + outrange->type = CHARTAB_RANGE_CHARSET; + outrange->charset = Fget_charset (range); + } +#endif /* MULE */ +} + +#if defined(MULE)&&!defined(UTF2000) + +/* called from CHAR_TABLE_VALUE(). */ +Lisp_Object +get_non_ascii_char_table_value (Lisp_Char_Table *ct, Charset_ID leading_byte, + Emchar c) +{ + Lisp_Object val; +#ifdef UTF2000 + Lisp_Object charset; +#else + Lisp_Object charset = CHARSET_BY_LEADING_BYTE (leading_byte); +#endif + int byte1, byte2; + +#ifdef UTF2000 + BREAKUP_CHAR (c, charset, byte1, byte2); +#else + BREAKUP_CHAR_1_UNSAFE (c, charset, byte1, byte2); +#endif + val = ct->level1[leading_byte - MIN_LEADING_BYTE]; + if (CHAR_TABLE_ENTRYP (val)) + { + Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val); + val = cte->level2[byte1 - 32]; + if (CHAR_TABLE_ENTRYP (val)) + { + cte = XCHAR_TABLE_ENTRY (val); + assert (byte2 >= 32); + val = cte->level2[byte2 - 32]; + assert (!CHAR_TABLE_ENTRYP (val)); + } + } + + return val; +} + +#endif /* MULE */ + +Lisp_Object +get_char_table (Emchar ch, Lisp_Char_Table *ct) +{ +#ifdef UTF2000 + { + Lisp_Object ret = get_char_id_table (ct, ch); + +#ifdef HAVE_CHISE + if (NILP (ret)) + { + if (EQ (CHAR_TABLE_NAME (ct), Qdowncase)) + ret = Fget_char_attribute (make_char (ch), Q_lowercase, Qnil); + else if (EQ (CHAR_TABLE_NAME (ct), Qflippedcase)) + ret = Fget_char_attribute (make_char (ch), Q_uppercase, Qnil); + if (CONSP (ret)) + { + ret = XCAR (ret); + if (CONSP (ret)) + ret = Ffind_char (ret); + } + } +#endif + return ret; + } +#elif defined(MULE) + { + Lisp_Object charset; + int byte1, byte2; + Lisp_Object val; + + BREAKUP_CHAR (ch, charset, byte1, byte2); + + if (EQ (charset, Vcharset_ascii)) + val = ct->ascii[byte1]; + else if (EQ (charset, Vcharset_control_1)) + val = ct->ascii[byte1 + 128]; + else + { + int lb = XCHARSET_LEADING_BYTE (charset) - MIN_LEADING_BYTE; + val = ct->level1[lb]; + if (CHAR_TABLE_ENTRYP (val)) + { + Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val); + val = cte->level2[byte1 - 32]; + if (CHAR_TABLE_ENTRYP (val)) + { + cte = XCHAR_TABLE_ENTRY (val); + assert (byte2 >= 32); + val = cte->level2[byte2 - 32]; + assert (!CHAR_TABLE_ENTRYP (val)); + } + } + } + + return val; + } +#else /* not MULE */ + return ct->ascii[(unsigned char)ch]; +#endif /* not MULE */ +} + + +DEFUN ("get-char-table", Fget_char_table, 2, 2, 0, /* +Find value for CHARACTER in CHAR-TABLE. +*/ + (character, char_table)) +{ + CHECK_CHAR_TABLE (char_table); + CHECK_CHAR_COERCE_INT (character); + + return get_char_table (XCHAR (character), XCHAR_TABLE (char_table)); +} + +DEFUN ("get-range-char-table", Fget_range_char_table, 2, 3, 0, /* +Find value for a range in CHAR-TABLE. +If there is more than one value, return MULTI (defaults to nil). +*/ + (range, char_table, multi)) +{ + Lisp_Char_Table *ct; + struct chartab_range rainj; + + if (CHAR_OR_CHAR_INTP (range)) + return Fget_char_table (range, char_table); + CHECK_CHAR_TABLE (char_table); + ct = XCHAR_TABLE (char_table); + + decode_char_table_range (range, &rainj); + switch (rainj.type) + { + case CHARTAB_RANGE_ALL: + { +#ifdef UTF2000 + if (UINT8_BYTE_TABLE_P (ct->table)) + return multi; + else if (UINT16_BYTE_TABLE_P (ct->table)) + return multi; + else if (BYTE_TABLE_P (ct->table)) + return multi; + else + return ct->table; +#else /* non UTF2000 */ + int i; + Lisp_Object first = ct->ascii[0]; + + for (i = 1; i < NUM_ASCII_CHARS; i++) + if (!EQ (first, ct->ascii[i])) + return multi; + +#ifdef MULE + for (i = MIN_LEADING_BYTE; i < MIN_LEADING_BYTE + NUM_LEADING_BYTES; + i++) + { + if (!CHARSETP (CHARSET_BY_LEADING_BYTE (i)) + || i == LEADING_BYTE_ASCII + || i == LEADING_BYTE_CONTROL_1) + continue; + if (!EQ (first, ct->level1[i - MIN_LEADING_BYTE])) + return multi; + } +#endif /* MULE */ + + return first; +#endif /* non UTF2000 */ + } + +#ifdef MULE + case CHARTAB_RANGE_CHARSET: +#ifdef UTF2000 + return multi; +#else + if (EQ (rainj.charset, Vcharset_ascii)) + { + int i; + Lisp_Object first = ct->ascii[0]; + + for (i = 1; i < 128; i++) + if (!EQ (first, ct->ascii[i])) + return multi; + return first; + } + + if (EQ (rainj.charset, Vcharset_control_1)) + { + int i; + Lisp_Object first = ct->ascii[128]; + + for (i = 129; i < 160; i++) + if (!EQ (first, ct->ascii[i])) + return multi; + return first; + } + + { + Lisp_Object val = ct->level1[XCHARSET_LEADING_BYTE (rainj.charset) - + MIN_LEADING_BYTE]; + if (CHAR_TABLE_ENTRYP (val)) + return multi; + return val; + } +#endif + + case CHARTAB_RANGE_ROW: +#ifdef UTF2000 + return multi; +#else + { + Lisp_Object val = ct->level1[XCHARSET_LEADING_BYTE (rainj.charset) - + MIN_LEADING_BYTE]; + if (!CHAR_TABLE_ENTRYP (val)) + return val; + val = XCHAR_TABLE_ENTRY (val)->level2[rainj.row - 32]; + if (CHAR_TABLE_ENTRYP (val)) + return multi; + return val; + } +#endif /* not UTF2000 */ +#endif /* not MULE */ + + default: + abort (); + } + + return Qnil; /* not reached */ +} + +static int +check_valid_char_table_value (Lisp_Object value, enum char_table_type type, + Error_behavior errb) { + switch (type) + { + case CHAR_TABLE_TYPE_SYNTAX: + if (!ERRB_EQ (errb, ERROR_ME)) + return INTP (value) || (CONSP (value) && INTP (XCAR (value)) + && CHAR_OR_CHAR_INTP (XCDR (value))); + if (CONSP (value)) + { + Lisp_Object cdr = XCDR (value); + CHECK_INT (XCAR (value)); + CHECK_CHAR_COERCE_INT (cdr); + } + else + CHECK_INT (value); + break; + #ifdef MULE - { - Lisp_Object charset; - int byte1, byte2; - Lisp_Object val; + case CHAR_TABLE_TYPE_CATEGORY: + if (!ERRB_EQ (errb, ERROR_ME)) + return CATEGORY_TABLE_VALUEP (value); + CHECK_CATEGORY_TABLE_VALUE (value); + break; +#endif /* MULE */ - BREAKUP_CHAR (ch, charset, byte1, byte2); + case CHAR_TABLE_TYPE_GENERIC: + return 1; - if (EQ (charset, Vcharset_ascii)) - val = ct->ascii[byte1]; - else if (EQ (charset, Vcharset_control_1)) - val = ct->ascii[byte1 + 128]; - else + case CHAR_TABLE_TYPE_DISPLAY: + /* #### fix this */ + maybe_signal_simple_error ("Display char tables not yet implemented", + value, Qchar_table, errb); + return 0; + + case CHAR_TABLE_TYPE_CHAR: + if (!ERRB_EQ (errb, ERROR_ME)) + return CHAR_OR_CHAR_INTP (value); + CHECK_CHAR_COERCE_INT (value); + break; + + default: + abort (); + } + + return 0; /* not reached */ +} + +static Lisp_Object +canonicalize_char_table_value (Lisp_Object value, enum char_table_type type) +{ + switch (type) + { + case CHAR_TABLE_TYPE_SYNTAX: + if (CONSP (value)) + { + Lisp_Object car = XCAR (value); + Lisp_Object cdr = XCDR (value); + CHECK_CHAR_COERCE_INT (cdr); + return Fcons (car, cdr); + } + break; + case CHAR_TABLE_TYPE_CHAR: + CHECK_CHAR_COERCE_INT (value); + break; + default: + break; + } + return value; +} + +DEFUN ("valid-char-table-value-p", Fvalid_char_table_value_p, 2, 2, 0, /* +Return non-nil if VALUE is a valid value for CHAR-TABLE-TYPE. +*/ + (value, char_table_type)) +{ + enum char_table_type type = symbol_to_char_table_type (char_table_type); + + return check_valid_char_table_value (value, type, ERROR_ME_NOT) ? Qt : Qnil; +} + +DEFUN ("check-valid-char-table-value", Fcheck_valid_char_table_value, 2, 2, 0, /* +Signal an error if VALUE is not a valid value for CHAR-TABLE-TYPE. +*/ + (value, char_table_type)) +{ + enum char_table_type type = symbol_to_char_table_type (char_table_type); + + check_valid_char_table_value (value, type, ERROR_ME); + return Qnil; +} + +#ifdef UTF2000 +Lisp_Char_Table* char_attribute_table_to_put; +Lisp_Object Qput_char_table_map_function; +Lisp_Object value_to_put; + +DEFUN ("put-char-table-map-function", + Fput_char_table_map_function, 2, 2, 0, /* +For internal use. Don't use it. +*/ + (c, value)) +{ + put_char_id_table_0 (char_attribute_table_to_put, + XCHAR (c), value_to_put); + return Qnil; +} +#endif + +/* Assign VAL to all characters in RANGE in char table CT. */ + +void +put_char_table (Lisp_Char_Table *ct, struct chartab_range *range, + Lisp_Object val) +{ + switch (range->type) + { + case CHARTAB_RANGE_ALL: + /* printf ("put-char-table: range = all\n"); */ + fill_char_table (ct, val); + return; /* avoid the duplicate call to update_syntax_table() below, + since fill_char_table() also did that. */ + +#ifdef UTF2000 + case CHARTAB_RANGE_DEFAULT: + ct->default_value = val; + return; +#endif + +#ifdef MULE + case CHARTAB_RANGE_CHARSET: +#ifdef UTF2000 { - int lb = XCHARSET_LEADING_BYTE (charset) - MIN_LEADING_BYTE; - val = ct->level1[lb]; - if (CHAR_TABLE_ENTRYP (val)) + Lisp_Object encoding_table = XCHARSET_ENCODING_TABLE (range->charset); + + /* printf ("put-char-table: range = charset: %d\n", + XCHARSET_LEADING_BYTE (range->charset)); + */ + if ( CHAR_TABLEP (encoding_table) ) { - Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val); - val = cte->level2[byte1 - 32]; - if (CHAR_TABLE_ENTRYP (val)) + Lisp_Object mother = XCHARSET_MOTHER (range->charset); + + char_attribute_table_to_put = ct; + value_to_put = val; + Fmap_char_attribute (Qput_char_table_map_function, + XCHAR_TABLE_NAME (encoding_table), + Qnil); + if ( CHARSETP (mother) ) { - cte = XCHAR_TABLE_ENTRY (val); - assert (byte2 >= 32); - val = cte->level2[byte2 - 32]; - assert (!CHAR_TABLE_ENTRYP (val)); + struct chartab_range r; + + r.type = CHARTAB_RANGE_CHARSET; + r.charset = mother; + put_char_table (ct, &r, val); + } + } +#if 0 + else + { + Emchar c; + + for (c = 0; c < 1 << 24; c++) + { + if ( charset_code_point (range->charset, c) >= 0 ) + put_char_id_table_0 (ct, c, val); + } + } +#endif + } +#else + if (EQ (range->charset, Vcharset_ascii)) + { + int i; + for (i = 0; i < 128; i++) + ct->ascii[i] = val; + } + else if (EQ (range->charset, Vcharset_control_1)) + { + int i; + for (i = 128; i < 160; i++) + ct->ascii[i] = val; + } + else + { + int lb = XCHARSET_LEADING_BYTE (range->charset) - MIN_LEADING_BYTE; + ct->level1[lb] = val; + } +#endif + break; + + case CHARTAB_RANGE_ROW: +#ifdef UTF2000 + { + int cell_min, cell_max, i; + + i = XCHARSET_CELL_RANGE (range->charset); + cell_min = i >> 8; + cell_max = i & 0xFF; + for (i = cell_min; i <= cell_max; i++) + { + Emchar ch = DECODE_CHAR (range->charset, (range->row << 8) | i); + + if ( charset_code_point (range->charset, ch, 0) >= 0 ) + put_char_id_table_0 (ct, ch, val); + } + } +#else + { + Lisp_Char_Table_Entry *cte; + int lb = XCHARSET_LEADING_BYTE (range->charset) - MIN_LEADING_BYTE; + /* make sure that there is a separate entry for the row. */ + if (!CHAR_TABLE_ENTRYP (ct->level1[lb])) + ct->level1[lb] = make_char_table_entry (ct->level1[lb]); + cte = XCHAR_TABLE_ENTRY (ct->level1[lb]); + cte->level2[range->row - 32] = val; + } +#endif /* not UTF2000 */ + break; +#endif /* MULE */ + + case CHARTAB_RANGE_CHAR: +#ifdef UTF2000 + /* printf ("put-char-table: range = char: 0x%x\n", range->ch); */ + put_char_id_table_0 (ct, range->ch, val); + break; +#elif defined(MULE) + { + Lisp_Object charset; + int byte1, byte2; + + BREAKUP_CHAR (range->ch, charset, byte1, byte2); + if (EQ (charset, Vcharset_ascii)) + ct->ascii[byte1] = val; + else if (EQ (charset, Vcharset_control_1)) + ct->ascii[byte1 + 128] = val; + else + { + Lisp_Char_Table_Entry *cte; + int lb = XCHARSET_LEADING_BYTE (charset) - MIN_LEADING_BYTE; + /* make sure that there is a separate entry for the row. */ + if (!CHAR_TABLE_ENTRYP (ct->level1[lb])) + ct->level1[lb] = make_char_table_entry (ct->level1[lb]); + cte = XCHAR_TABLE_ENTRY (ct->level1[lb]); + /* now CTE is a char table entry for the charset; + each entry is for a single row (or character of + a one-octet charset). */ + if (XCHARSET_DIMENSION (charset) == 1) + cte->level2[byte1 - 32] = val; + else + { + /* assigning to one character in a two-octet charset. */ + /* make sure that the charset row contains a separate + entry for each character. */ + if (!CHAR_TABLE_ENTRYP (cte->level2[byte1 - 32])) + cte->level2[byte1 - 32] = + make_char_table_entry (cte->level2[byte1 - 32]); + cte = XCHAR_TABLE_ENTRY (cte->level2[byte1 - 32]); + cte->level2[byte2 - 32] = val; } } } - - return val; - } #else /* not MULE */ - return ct->ascii[(unsigned char)ch]; + ct->ascii[(unsigned char) (range->ch)] = val; + break; #endif /* not MULE */ + } + +#ifndef UTF2000 + if (ct->type == CHAR_TABLE_TYPE_SYNTAX) + update_syntax_table (ct); +#endif } +DEFUN ("put-char-table", Fput_char_table, 3, 3, 0, /* +Set the value for chars in RANGE to be VALUE in CHAR-TABLE. -DEFUN ("get-char-table", Fget_char_table, 2, 2, 0, /* -Find value for CHARACTER in CHAR-TABLE. -*/ - (character, char_table)) -{ - CHECK_CHAR_TABLE (char_table); - CHECK_CHAR_COERCE_INT (character); +RANGE specifies one or more characters to be affected and should be +one of the following: - return get_char_table (XCHAR (character), XCHAR_TABLE (char_table)); -} +-- t (all characters are affected) +-- A charset (only allowed when Mule support is present) +-- A vector of two elements: a two-octet charset and a row number + (only allowed when Mule support is present) +-- A single character -DEFUN ("get-range-char-table", Fget_range_char_table, 2, 3, 0, /* -Find value for a range in CHAR-TABLE. -If there is more than one value, return MULTI (defaults to nil). +VALUE must be a value appropriate for the type of CHAR-TABLE. +See `valid-char-table-type-p'. */ - (range, char_table, multi)) + (range, value, char_table)) { Lisp_Char_Table *ct; struct chartab_range rainj; - if (CHAR_OR_CHAR_INTP (range)) - return Fget_char_table (range, char_table); CHECK_CHAR_TABLE (char_table); ct = XCHAR_TABLE (char_table); - + check_valid_char_table_value (value, ct->type, ERROR_ME); decode_char_table_range (range, &rainj); - switch (rainj.type) - { - case CHARTAB_RANGE_ALL: - { - int i; - Lisp_Object first = ct->ascii[0]; + value = canonicalize_char_table_value (value, ct->type); + put_char_table (ct, &rainj, value); + return Qnil; +} - for (i = 1; i < NUM_ASCII_CHARS; i++) - if (!EQ (first, ct->ascii[i])) - return multi; +#ifndef UTF2000 +/* Map FN over the ASCII chars in CT. */ +static int +map_over_charset_ascii (Lisp_Char_Table *ct, + int (*fn) (struct chartab_range *range, + Lisp_Object val, void *arg), + void *arg) +{ + struct chartab_range rainj; + int i, retval; + int start = 0; #ifdef MULE - for (i = MIN_LEADING_BYTE; i < MIN_LEADING_BYTE + NUM_LEADING_BYTES; - i++) - { - if (!CHARSETP (CHARSET_BY_LEADING_BYTE (i)) - || i == LEADING_BYTE_ASCII - || i == LEADING_BYTE_CONTROL_1) - continue; - if (!EQ (first, ct->level1[i - MIN_LEADING_BYTE])) - return multi; - } -#endif /* MULE */ + int stop = 128; +#else + int stop = 256; +#endif - return first; - } + rainj.type = CHARTAB_RANGE_CHAR; + + for (i = start, retval = 0; i < stop && retval == 0; i++) + { + rainj.ch = (Emchar) i; + retval = (fn) (&rainj, ct->ascii[i], arg); + } + + return retval; +} #ifdef MULE - case CHARTAB_RANGE_CHARSET: - if (EQ (rainj.charset, Vcharset_ascii)) - { - int i; - Lisp_Object first = ct->ascii[0]; - for (i = 1; i < 128; i++) - if (!EQ (first, ct->ascii[i])) - return multi; - return first; - } +/* Map FN over the Control-1 chars in CT. */ - if (EQ (rainj.charset, Vcharset_control_1)) - { - int i; - Lisp_Object first = ct->ascii[128]; +static int +map_over_charset_control_1 (Lisp_Char_Table *ct, + int (*fn) (struct chartab_range *range, + Lisp_Object val, void *arg), + void *arg) +{ + struct chartab_range rainj; + int i, retval; + int start = 128; + int stop = start + 32; - for (i = 129; i < 160; i++) - if (!EQ (first, ct->ascii[i])) - return multi; - return first; - } + rainj.type = CHARTAB_RANGE_CHAR; - { - Lisp_Object val = ct->level1[XCHARSET_LEADING_BYTE (rainj.charset) - - MIN_LEADING_BYTE]; - if (CHAR_TABLE_ENTRYP (val)) - return multi; - return val; - } + for (i = start, retval = 0; i < stop && retval == 0; i++) + { + rainj.ch = (Emchar) (i); + retval = (fn) (&rainj, ct->ascii[i], arg); + } - case CHARTAB_RANGE_ROW: - { - Lisp_Object val = ct->level1[XCHARSET_LEADING_BYTE (rainj.charset) - - MIN_LEADING_BYTE]; - if (!CHAR_TABLE_ENTRYP (val)) - return val; - val = XCHAR_TABLE_ENTRY (val)->level2[rainj.row - 32]; - if (CHAR_TABLE_ENTRYP (val)) - return multi; - return val; - } -#endif /* not MULE */ + return retval; +} - default: - abort (); +/* Map FN over the row ROW of two-byte charset CHARSET. + There must be a separate value for that row in the char table. + CTE specifies the char table entry for CHARSET. */ + +static int +map_over_charset_row (Lisp_Char_Table_Entry *cte, + Lisp_Object charset, int row, + int (*fn) (struct chartab_range *range, + Lisp_Object val, void *arg), + void *arg) +{ + Lisp_Object val = cte->level2[row - 32]; + + if (!CHAR_TABLE_ENTRYP (val)) + { + struct chartab_range rainj; + + rainj.type = CHARTAB_RANGE_ROW; + rainj.charset = charset; + rainj.row = row; + return (fn) (&rainj, val, arg); } + else + { + struct chartab_range rainj; + int i, retval; + int charset94_p = (XCHARSET_CHARS (charset) == 94); + int start = charset94_p ? 33 : 32; + int stop = charset94_p ? 127 : 128; - return Qnil; /* not reached */ + cte = XCHAR_TABLE_ENTRY (val); + + rainj.type = CHARTAB_RANGE_CHAR; + + for (i = start, retval = 0; i < stop && retval == 0; i++) + { + rainj.ch = MAKE_CHAR (charset, row, i); + retval = (fn) (&rainj, cte->level2[i - 32], arg); + } + return retval; + } } + static int -check_valid_char_table_value (Lisp_Object value, enum char_table_type type, - Error_behavior errb) +map_over_other_charset (Lisp_Char_Table *ct, Charset_ID lb, + int (*fn) (struct chartab_range *range, + Lisp_Object val, void *arg), + void *arg) { - switch (type) + Lisp_Object val = ct->level1[lb - MIN_LEADING_BYTE]; + Lisp_Object charset = CHARSET_BY_LEADING_BYTE (lb); + + if (!CHARSETP (charset) + || lb == LEADING_BYTE_ASCII + || lb == LEADING_BYTE_CONTROL_1) + return 0; + + if (!CHAR_TABLE_ENTRYP (val)) { - case CHAR_TABLE_TYPE_SYNTAX: - if (!ERRB_EQ (errb, ERROR_ME)) - return INTP (value) || (CONSP (value) && INTP (XCAR (value)) - && CHAR_OR_CHAR_INTP (XCDR (value))); - if (CONSP (value)) - { - Lisp_Object cdr = XCDR (value); - CHECK_INT (XCAR (value)); - CHECK_CHAR_COERCE_INT (cdr); - } - else - CHECK_INT (value); - break; + struct chartab_range rainj; + + rainj.type = CHARTAB_RANGE_CHARSET; + rainj.charset = charset; + return (fn) (&rainj, val, arg); + } + + { + Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val); + int charset94_p = (XCHARSET_CHARS (charset) == 94); + int start = charset94_p ? 33 : 32; + int stop = charset94_p ? 127 : 128; + int i, retval; + + if (XCHARSET_DIMENSION (charset) == 1) + { + struct chartab_range rainj; + rainj.type = CHARTAB_RANGE_CHAR; + + for (i = start, retval = 0; i < stop && retval == 0; i++) + { + rainj.ch = MAKE_CHAR (charset, i, 0); + retval = (fn) (&rainj, cte->level2[i - 32], arg); + } + } + else + { + for (i = start, retval = 0; i < stop && retval == 0; i++) + retval = map_over_charset_row (cte, charset, i, fn, arg); + } + + return retval; + } +} -#ifdef MULE - case CHAR_TABLE_TYPE_CATEGORY: - if (!ERRB_EQ (errb, ERROR_ME)) - return CATEGORY_TABLE_VALUEP (value); - CHECK_CATEGORY_TABLE_VALUE (value); - break; #endif /* MULE */ +#endif /* not UTF2000 */ - case CHAR_TABLE_TYPE_GENERIC: - return 1; +#ifdef UTF2000 +struct map_char_table_for_charset_arg +{ + int (*fn) (struct chartab_range *range, Lisp_Object val, void *arg); + Lisp_Char_Table *ct; + void *arg; +}; - case CHAR_TABLE_TYPE_DISPLAY: - /* #### fix this */ - maybe_signal_simple_error ("Display char tables not yet implemented", - value, Qchar_table, errb); - return 0; +static int +map_char_table_for_charset_fun (struct chartab_range *range, + Lisp_Object val, void *arg) +{ + struct map_char_table_for_charset_arg *closure = + (struct map_char_table_for_charset_arg *) arg; + Lisp_Object ret; - case CHAR_TABLE_TYPE_CHAR: - if (!ERRB_EQ (errb, ERROR_ME)) - return CHAR_OR_CHAR_INTP (value); - CHECK_CHAR_COERCE_INT (value); + switch (range->type) + { + case CHARTAB_RANGE_ALL: break; - default: - abort (); - } + case CHARTAB_RANGE_DEFAULT: + break; - return 0; /* not reached */ -} + case CHARTAB_RANGE_CHARSET: + break; -static Lisp_Object -canonicalize_char_table_value (Lisp_Object value, enum char_table_type type) -{ - switch (type) - { - case CHAR_TABLE_TYPE_SYNTAX: - if (CONSP (value)) - { - Lisp_Object car = XCAR (value); - Lisp_Object cdr = XCDR (value); - CHECK_CHAR_COERCE_INT (cdr); - return Fcons (car, cdr); - } + case CHARTAB_RANGE_ROW: break; - case CHAR_TABLE_TYPE_CHAR: - CHECK_CHAR_COERCE_INT (value); + + case CHARTAB_RANGE_CHAR: + ret = get_char_table (range->ch, closure->ct); + if (!UNBOUNDP (ret)) + return (closure->fn) (range, ret, closure->arg); break; + default: - break; + abort (); } - return value; -} -DEFUN ("valid-char-table-value-p", Fvalid_char_table_value_p, 2, 2, 0, /* -Return non-nil if VALUE is a valid value for CHAR-TABLE-TYPE. -*/ - (value, char_table_type)) -{ - enum char_table_type type = symbol_to_char_table_type (char_table_type); - - return check_valid_char_table_value (value, type, ERROR_ME_NOT) ? Qt : Qnil; + return 0; } -DEFUN ("check-valid-char-table-value", Fcheck_valid_char_table_value, 2, 2, 0, /* -Signal an error if VALUE is not a valid value for CHAR-TABLE-TYPE. -*/ - (value, char_table_type)) -{ - enum char_table_type type = symbol_to_char_table_type (char_table_type); - - check_valid_char_table_value (value, type, ERROR_ME); - return Qnil; -} +#endif -/* Assign VAL to all characters in RANGE in char table CT. */ +/* Map FN (with client data ARG) over range RANGE in char table CT. + Mapping stops the first time FN returns non-zero, and that value + becomes the return value of map_char_table(). */ -void -put_char_table (Lisp_Char_Table *ct, struct chartab_range *range, - Lisp_Object val) +int +map_char_table (Lisp_Char_Table *ct, + struct chartab_range *range, + int (*fn) (struct chartab_range *range, + Lisp_Object val, void *arg), + void *arg) { switch (range->type) { case CHARTAB_RANGE_ALL: - fill_char_table (ct, val); - return; /* avoid the duplicate call to update_syntax_table() below, - since fill_char_table() also did that. */ - -#ifdef MULE - case CHARTAB_RANGE_CHARSET: - if (EQ (range->charset, Vcharset_ascii)) +#ifdef UTF2000 + if (!UNBOUNDP (ct->default_value)) { - int i; - for (i = 0; i < 128; i++) - ct->ascii[i] = val; + struct chartab_range rainj; + int retval; + + rainj.type = CHARTAB_RANGE_DEFAULT; + retval = (fn) (&rainj, ct->default_value, arg); + if (retval != 0) + return retval; } - else if (EQ (range->charset, Vcharset_control_1)) + if (UINT8_BYTE_TABLE_P (ct->table)) + return map_over_uint8_byte_table (XUINT8_BYTE_TABLE(ct->table), ct, + 0, 3, fn, arg); + else if (UINT16_BYTE_TABLE_P (ct->table)) + return map_over_uint16_byte_table (XUINT16_BYTE_TABLE(ct->table), ct, + 0, 3, fn, arg); + else if (BYTE_TABLE_P (ct->table)) + return map_over_byte_table (XBYTE_TABLE(ct->table), ct, + 0, 3, fn, arg); + else if (EQ (ct->table, Qunloaded)) { - int i; - for (i = 128; i < 160; i++) - ct->ascii[i] = val; +#if 0 + struct chartab_range rainj; + int unit = 1 << 30; + Emchar c = 0; + Emchar c1 = c + unit; + int retval; + + rainj.type = CHARTAB_RANGE_CHAR; + + for (retval = 0; c < c1 && retval == 0; c++) + { + Lisp_Object ret = get_char_id_table (ct, c); + + if (!UNBOUNDP (ret)) + { + rainj.ch = c; + retval = (fn) (&rainj, ct->table, arg); + } + } + return retval; +#else + ct->table = Qunbound; +#endif } - else + else if (!UNBOUNDP (ct->table)) + return (fn) (range, ct->table, arg); + return 0; +#else + { + int retval; + + retval = map_over_charset_ascii (ct, fn, arg); + if (retval) + return retval; +#ifdef MULE + retval = map_over_charset_control_1 (ct, fn, arg); + if (retval) + return retval; { - int lb = XCHARSET_LEADING_BYTE (range->charset) - MIN_LEADING_BYTE; - ct->level1[lb] = val; + Charset_ID i; + Charset_ID start = MIN_LEADING_BYTE; + Charset_ID stop = start + NUM_LEADING_BYTES; + + for (i = start, retval = 0; i < stop && retval == 0; i++) + { + retval = map_over_other_charset (ct, i, fn, arg); + } } - break; +#endif /* MULE */ + return retval; + } +#endif + +#ifdef UTF2000 + case CHARTAB_RANGE_DEFAULT: + if (!UNBOUNDP (ct->default_value)) + return (fn) (range, ct->default_value, arg); + return 0; +#endif + +#ifdef MULE + case CHARTAB_RANGE_CHARSET: +#ifdef UTF2000 + { + Lisp_Object encoding_table + = XCHARSET_ENCODING_TABLE (range->charset); + + if (!NILP (encoding_table)) + { + struct chartab_range rainj; + struct map_char_table_for_charset_arg mcarg; + +#ifdef HAVE_CHISE + if (XCHAR_TABLE_UNLOADED(encoding_table)) + Fload_char_attribute_table (XCHAR_TABLE_NAME (encoding_table)); +#endif + mcarg.fn = fn; + mcarg.ct = ct; + mcarg.arg = arg; + rainj.type = CHARTAB_RANGE_ALL; + return map_char_table (XCHAR_TABLE(encoding_table), + &rainj, + &map_char_table_for_charset_fun, + &mcarg); + } + } + return 0; +#else + return map_over_other_charset (ct, + XCHARSET_LEADING_BYTE (range->charset), + fn, arg); +#endif case CHARTAB_RANGE_ROW: +#ifdef UTF2000 { - Lisp_Char_Table_Entry *cte; - int lb = XCHARSET_LEADING_BYTE (range->charset) - MIN_LEADING_BYTE; - /* make sure that there is a separate entry for the row. */ - if (!CHAR_TABLE_ENTRYP (ct->level1[lb])) - ct->level1[lb] = make_char_table_entry (ct->level1[lb]); - cte = XCHAR_TABLE_ENTRY (ct->level1[lb]); - cte->level2[range->row - 32] = val; + int cell_min, cell_max, i; + int retval; + struct chartab_range rainj; + + i = XCHARSET_CELL_RANGE (range->charset); + cell_min = i >> 8; + cell_max = i & 0xFF; + rainj.type = CHARTAB_RANGE_CHAR; + for (retval =0, i = cell_min; i <= cell_max && retval == 0; i++) + { + Emchar ch = DECODE_CHAR (range->charset, (range->row << 8) | i); + + if ( charset_code_point (range->charset, ch, 0) >= 0 ) + { + Lisp_Object val + = get_byte_table (get_byte_table + (get_byte_table + (get_byte_table + (ct->table, + (unsigned char)(ch >> 24)), + (unsigned char) (ch >> 16)), + (unsigned char) (ch >> 8)), + (unsigned char) ch); + + if (UNBOUNDP (val)) + val = ct->default_value; + rainj.ch = ch; + retval = (fn) (&rainj, val, arg); + } + } + return retval; } - break; +#else + { + Lisp_Object val = ct->level1[XCHARSET_LEADING_BYTE (range->charset) + - MIN_LEADING_BYTE]; + if (!CHAR_TABLE_ENTRYP (val)) + { + struct chartab_range rainj; + + rainj.type = CHARTAB_RANGE_ROW; + rainj.charset = range->charset; + rainj.row = range->row; + return (fn) (&rainj, val, arg); + } + else + return map_over_charset_row (XCHAR_TABLE_ENTRY (val), + range->charset, range->row, + fn, arg); + } +#endif /* not UTF2000 */ #endif /* MULE */ case CHARTAB_RANGE_CHAR: -#ifdef MULE { - Lisp_Object charset; - int byte1, byte2; + Emchar ch = range->ch; + Lisp_Object val = CHAR_TABLE_VALUE_UNSAFE (ct, ch); - BREAKUP_CHAR (range->ch, charset, byte1, byte2); - if (EQ (charset, Vcharset_ascii)) - ct->ascii[byte1] = val; - else if (EQ (charset, Vcharset_control_1)) - ct->ascii[byte1 + 128] = val; - else + if (!UNBOUNDP (val)) { - Lisp_Char_Table_Entry *cte; - int lb = XCHARSET_LEADING_BYTE (charset) - MIN_LEADING_BYTE; - /* make sure that there is a separate entry for the row. */ - if (!CHAR_TABLE_ENTRYP (ct->level1[lb])) - ct->level1[lb] = make_char_table_entry (ct->level1[lb]); - cte = XCHAR_TABLE_ENTRY (ct->level1[lb]); - /* now CTE is a char table entry for the charset; - each entry is for a single row (or character of - a one-octet charset). */ - if (XCHARSET_DIMENSION (charset) == 1) - cte->level2[byte1 - 32] = val; - else - { - /* assigning to one character in a two-octet charset. */ - /* make sure that the charset row contains a separate - entry for each character. */ - if (!CHAR_TABLE_ENTRYP (cte->level2[byte1 - 32])) - cte->level2[byte1 - 32] = - make_char_table_entry (cte->level2[byte1 - 32]); - cte = XCHAR_TABLE_ENTRY (cte->level2[byte1 - 32]); - cte->level2[byte2 - 32] = val; - } + struct chartab_range rainj; + + rainj.type = CHARTAB_RANGE_CHAR; + rainj.ch = ch; + return (fn) (&rainj, val, arg); } + return 0; } -#else /* not MULE */ - ct->ascii[(unsigned char) (range->ch)] = val; + + default: + abort (); + } + + return 0; +} + +struct slow_map_char_table_arg +{ + Lisp_Object function; + Lisp_Object retval; +}; + +static int +slow_map_char_table_fun (struct chartab_range *range, + Lisp_Object val, void *arg) +{ + Lisp_Object ranjarg = Qnil; + struct slow_map_char_table_arg *closure = + (struct slow_map_char_table_arg *) arg; + + switch (range->type) + { + case CHARTAB_RANGE_ALL: + ranjarg = Qt; break; -#endif /* not MULE */ - } - if (ct->type == CHAR_TABLE_TYPE_SYNTAX) - update_syntax_table (ct); -} +#ifdef UTF2000 + case CHARTAB_RANGE_DEFAULT: + ranjarg = Qnil; + break; +#endif -DEFUN ("put-char-table", Fput_char_table, 3, 3, 0, /* -Set the value for chars in RANGE to be VALUE in CHAR-TABLE. +#ifdef MULE + case CHARTAB_RANGE_CHARSET: + ranjarg = XCHARSET_NAME (range->charset); + break; -RANGE specifies one or more characters to be affected and should be -one of the following: + case CHARTAB_RANGE_ROW: + ranjarg = vector2 (XCHARSET_NAME (range->charset), + make_int (range->row)); + break; +#endif /* MULE */ + case CHARTAB_RANGE_CHAR: + ranjarg = make_char (range->ch); + break; + default: + abort (); + } --- t (all characters are affected) --- A charset (only allowed when Mule support is present) --- A vector of two elements: a two-octet charset and a row number - (only allowed when Mule support is present) --- A single character + closure->retval = call2 (closure->function, ranjarg, val); + return !NILP (closure->retval); +} -VALUE must be a value appropriate for the type of CHAR-TABLE. -See `valid-char-table-type-p'. +DEFUN ("map-char-table", Fmap_char_table, 2, 3, 0, /* +Map FUNCTION over entries in CHAR-TABLE, calling it with two args, +each key and value in the table. + +RANGE specifies a subrange to map over and is in the same format as +the RANGE argument to `put-range-table'. If omitted or t, it defaults to +the entire table. */ - (range, value, char_table)) + (function, char_table, range)) { Lisp_Char_Table *ct; + struct slow_map_char_table_arg slarg; + struct gcpro gcpro1, gcpro2; struct chartab_range rainj; CHECK_CHAR_TABLE (char_table); ct = XCHAR_TABLE (char_table); - check_valid_char_table_value (value, ct->type, ERROR_ME); + if (NILP (range)) + range = Qt; decode_char_table_range (range, &rainj); - value = canonicalize_char_table_value (value, ct->type); - put_char_table (ct, &rainj, value); - return Qnil; + slarg.function = function; + slarg.retval = Qnil; + GCPRO2 (slarg.function, slarg.retval); + map_char_table (ct, &rainj, slow_map_char_table_fun, &slarg); + UNGCPRO; + + return slarg.retval; } -/* Map FN over the ASCII chars in CT. */ + +/************************************************************************/ +/* Character Attributes */ +/************************************************************************/ + +#ifdef UTF2000 + +Lisp_Object Vchar_attribute_hash_table; + +/* We store the char-attributes in hash tables with the names as the + key and the actual char-id-table object as the value. Occasionally + we need to use them in a list format. These routines provide us + with that. */ +struct char_attribute_list_closure +{ + Lisp_Object *char_attribute_list; +}; static int -map_over_charset_ascii (Lisp_Char_Table *ct, - int (*fn) (struct chartab_range *range, - Lisp_Object val, void *arg), - void *arg) +add_char_attribute_to_list_mapper (Lisp_Object key, Lisp_Object value, + void *char_attribute_list_closure) { - struct chartab_range rainj; - int i, retval; - int start = 0; -#ifdef MULE - int stop = 128; -#else - int stop = 256; -#endif + /* This function can GC */ + struct char_attribute_list_closure *calcl + = (struct char_attribute_list_closure*) char_attribute_list_closure; + Lisp_Object *char_attribute_list = calcl->char_attribute_list; - rainj.type = CHARTAB_RANGE_CHAR; + *char_attribute_list = Fcons (key, *char_attribute_list); + return 0; +} - for (i = start, retval = 0; i < stop && retval == 0; i++) +#ifdef HAVE_LIBCHISE +static int +char_attribute_list_reset_map_func (CHISE_DS *ds, unsigned char *name) +{ + Fmount_char_attribute_table (intern (name)); + return 0; +} + +DEFUN ("char-attribute-list", Fchar_attribute_list, 0, 1, 0, /* +Return the list of all existing character attributes except coded-charsets. +*/ + (rehash)) +#else +DEFUN ("char-attribute-list", Fchar_attribute_list, 0, 0, 0, /* +Return the list of all existing character attributes except coded-charsets. +*/ + ()) +#endif +{ + Lisp_Object char_attribute_list = Qnil; + struct gcpro gcpro1; + struct char_attribute_list_closure char_attribute_list_closure; + +#ifdef HAVE_LIBCHISE + if (!NILP (rehash)) { - rainj.ch = (Emchar) i; - retval = (fn) (&rainj, ct->ascii[i], arg); + open_chise_data_source_maybe (); + chise_ds_foreach_char_feature_name + (default_chise_data_source, &char_attribute_list_reset_map_func); } +#endif + GCPRO1 (char_attribute_list); + char_attribute_list_closure.char_attribute_list = &char_attribute_list; + elisp_maphash (add_char_attribute_to_list_mapper, + Vchar_attribute_hash_table, + &char_attribute_list_closure); + UNGCPRO; + return char_attribute_list; +} - return retval; +DEFUN ("find-char-attribute-table", Ffind_char_attribute_table, 1, 1, 0, /* +Return char-id-table corresponding to ATTRIBUTE. +*/ + (attribute)) +{ + return Fgethash (attribute, Vchar_attribute_hash_table, Qnil); } -#ifdef MULE -/* Map FN over the Control-1 chars in CT. */ +/* We store the char-id-tables in hash tables with the attributes as + the key and the actual char-id-table object as the value. Each + char-id-table stores values of an attribute corresponding with + characters. Occasionally we need to get attributes of a character + in a association-list format. These routines provide us with + that. */ +struct char_attribute_alist_closure +{ + Emchar char_id; + Lisp_Object *char_attribute_alist; +}; static int -map_over_charset_control_1 (Lisp_Char_Table *ct, - int (*fn) (struct chartab_range *range, - Lisp_Object val, void *arg), - void *arg) +add_char_attribute_alist_mapper (Lisp_Object key, Lisp_Object value, + void *char_attribute_alist_closure) { - struct chartab_range rainj; - int i, retval; - int start = 128; - int stop = start + 32; + /* This function can GC */ + struct char_attribute_alist_closure *caacl = + (struct char_attribute_alist_closure*) char_attribute_alist_closure; + Lisp_Object ret + = get_char_id_table (XCHAR_TABLE(value), caacl->char_id); + if (!UNBOUNDP (ret)) + { + Lisp_Object *char_attribute_alist = caacl->char_attribute_alist; + *char_attribute_alist + = Fcons (Fcons (key, ret), *char_attribute_alist); + } + return 0; +} - rainj.type = CHARTAB_RANGE_CHAR; +DEFUN ("char-attribute-alist", Fchar_attribute_alist, 1, 1, 0, /* +Return the alist of attributes of CHARACTER. +*/ + (character)) +{ + struct gcpro gcpro1; + struct char_attribute_alist_closure char_attribute_alist_closure; + Lisp_Object alist = Qnil; - for (i = start, retval = 0; i < stop && retval == 0; i++) + CHECK_CHAR (character); + + GCPRO1 (alist); + char_attribute_alist_closure.char_id = XCHAR (character); + char_attribute_alist_closure.char_attribute_alist = &alist; + elisp_maphash (add_char_attribute_alist_mapper, + Vchar_attribute_hash_table, + &char_attribute_alist_closure); + UNGCPRO; + + return alist; +} + +DEFUN ("get-char-attribute", Fget_char_attribute, 2, 3, 0, /* +Return the value of CHARACTER's ATTRIBUTE. +Return DEFAULT-VALUE if the value is not exist. +*/ + (character, attribute, default_value)) +{ + Lisp_Object table; + + CHECK_CHAR (character); + + if (CHARSETP (attribute)) + attribute = XCHARSET_NAME (attribute); + + table = Fgethash (attribute, Vchar_attribute_hash_table, + Qunbound); + if (!UNBOUNDP (table)) { - rainj.ch = (Emchar) (i); - retval = (fn) (&rainj, ct->ascii[i], arg); + Lisp_Object ret = get_char_id_table (XCHAR_TABLE(table), + XCHAR (character)); + if (!UNBOUNDP (ret)) + return ret; } - - return retval; + return default_value; } -/* Map FN over the row ROW of two-byte charset CHARSET. - There must be a separate value for that row in the char table. - CTE specifies the char table entry for CHARSET. */ +void put_char_composition (Lisp_Object character, Lisp_Object value); +void +put_char_composition (Lisp_Object character, Lisp_Object value) +{ + if (!CONSP (value)) + signal_simple_error ("Invalid value for ->decomposition", + value); -static int -map_over_charset_row (Lisp_Char_Table_Entry *cte, - Lisp_Object charset, int row, - int (*fn) (struct chartab_range *range, - Lisp_Object val, void *arg), - void *arg) + if (CONSP (Fcdr (value))) + { + if (NILP (Fcdr (Fcdr (value)))) + { + Lisp_Object base = Fcar (value); + Lisp_Object modifier = Fcar (Fcdr (value)); + + if (INTP (base)) + { + base = make_char (XINT (base)); + Fsetcar (value, base); + } + if (INTP (modifier)) + { + modifier = make_char (XINT (modifier)); + Fsetcar (Fcdr (value), modifier); + } + if (CHARP (base)) + { + Lisp_Object alist + = Fget_char_attribute (base, Qcomposition, Qnil); + Lisp_Object ret = Fassq (modifier, alist); + + if (NILP (ret)) + Fput_char_attribute (base, Qcomposition, + Fcons (Fcons (modifier, character), + alist)); + else + Fsetcdr (ret, character); + } + } + } + else + { + Lisp_Object v = Fcar (value); + + if (INTP (v)) + { + Emchar c = XINT (v); + Lisp_Object ret + = Fget_char_attribute (make_char (c), Q_ucs_unified, Qnil); + + if (!CONSP (ret)) + { + Fput_char_attribute (make_char (c), Q_ucs_unified, + Fcons (character, Qnil)); + } + else if (NILP (Fmemq (character, ret))) + { + Fput_char_attribute (make_char (c), Q_ucs_unified, + Fcons (character, ret)); + } + } + } +} + +DEFUN ("put-char-attribute", Fput_char_attribute, 3, 3, 0, /* +Store CHARACTER's ATTRIBUTE with VALUE. +*/ + (character, attribute, value)) { - Lisp_Object val = cte->level2[row - 32]; + Lisp_Object ccs = Ffind_charset (attribute); - if (!CHAR_TABLE_ENTRYP (val)) + CHECK_CHAR (character); + + if (!NILP (ccs)) { - struct chartab_range rainj; + value = put_char_ccs_code_point (character, ccs, value); + attribute = XCHARSET_NAME (ccs); + } + else if (EQ (attribute, Q_decomposition)) + put_char_composition (character, value); + else if (EQ (attribute, Qto_ucs)) + { + Lisp_Object ret; + Emchar c; - rainj.type = CHARTAB_RANGE_ROW; - rainj.charset = charset; - rainj.row = row; - return (fn) (&rainj, val, arg); + if (!INTP (value)) + signal_simple_error ("Invalid value for =>ucs", value); + + c = XINT (value); + + ret = Fget_char_attribute (make_char (c), Q_ucs_unified, Qnil); + if (!CONSP (ret)) + { + Fput_char_attribute (make_char (c), Q_ucs_unified, + Fcons (character, Qnil)); + } + else if (NILP (Fmemq (character, ret))) + { + Fput_char_attribute (make_char (c), Q_ucs_unified, + Fcons (character, ret)); + } + } +#if 0 + else if (EQ (attribute, Qideographic_structure)) + value = Fcopy_sequence (Fchar_refs_simplify_char_specs (value)); +#endif + { + Lisp_Object table = Fgethash (attribute, + Vchar_attribute_hash_table, + Qnil); + + if (NILP (table)) + { + table = make_char_id_table (Qunbound); + Fputhash (attribute, table, Vchar_attribute_hash_table); +#ifdef HAVE_CHISE + XCHAR_TABLE_NAME (table) = attribute; +#endif + } + put_char_id_table (XCHAR_TABLE(table), character, value); + return value; + } +} + +DEFUN ("remove-char-attribute", Fremove_char_attribute, 2, 2, 0, /* +Remove CHARACTER's ATTRIBUTE. +*/ + (character, attribute)) +{ + Lisp_Object ccs; + + CHECK_CHAR (character); + ccs = Ffind_charset (attribute); + if (!NILP (ccs)) + { + return remove_char_ccs (character, ccs); } else { - struct chartab_range rainj; - int i, retval; - int charset94_p = (XCHARSET_CHARS (charset) == 94); - int start = charset94_p ? 33 : 32; - int stop = charset94_p ? 127 : 128; + Lisp_Object table = Fgethash (attribute, + Vchar_attribute_hash_table, + Qunbound); + if (!UNBOUNDP (table)) + { + put_char_id_table (XCHAR_TABLE(table), character, Qunbound); + return Qt; + } + } + return Qnil; +} - cte = XCHAR_TABLE_ENTRY (val); +#ifdef HAVE_CHISE - rainj.type = CHARTAB_RANGE_CHAR; +int char_table_open_db_maybe (Lisp_Char_Table* cit); +void char_table_close_db_maybe (Lisp_Char_Table* cit); +Lisp_Object char_table_get_db (Lisp_Char_Table* cit, Emchar ch); - for (i = start, retval = 0; i < stop && retval == 0; i++) +#ifdef HAVE_LIBCHISE +int +open_chise_data_source_maybe () +{ + if (default_chise_data_source == NULL) + { + Lisp_Object db_dir = Vexec_directory; + int modemask = 0755; /* rwxr-xr-x */ + + if (NILP (db_dir)) + db_dir = build_string ("../lib-src"); + db_dir = Fexpand_file_name (build_string ("chise-db"), db_dir); + + default_chise_data_source + = CHISE_DS_open (CHISE_DS_Berkeley_DB, XSTRING_DATA (db_dir), + 0 /* DB_HASH */, modemask); + if (default_chise_data_source == NULL) + return -1; + } + return 0; +} +#endif /* HAVE_LIBCHISE */ + +DEFUN ("close-char-data-source", Fclose_char_data_source, 0, 0, 0, /* +Close data-source of CHISE. +*/ + ()) +{ +#ifdef HAVE_LIBCHISE + int status = CHISE_DS_close (default_chise_data_source); + + default_chise_data_source = NULL; + if (status) + return Qt; +#endif /* HAVE_LIBCHISE */ + return Qnil; +} + +int +char_table_open_db_maybe (Lisp_Char_Table* cit) +{ + Lisp_Object attribute = CHAR_TABLE_NAME (cit); + + if (!NILP (attribute)) + { +#ifdef HAVE_LIBCHISE + if ( open_chise_data_source_maybe () ) + return -1; +#else /* HAVE_LIBCHISE */ + if (NILP (Fdatabase_live_p (cit->db))) { - rainj.ch = MAKE_CHAR (charset, row, i); - retval = (fn) (&rainj, cte->level2[i - 32], arg); + Lisp_Object db_file + = char_attribute_system_db_file (Qsystem_char_id, attribute, 0); + + cit->db = Fopen_database (db_file, Qnil, Qnil, + build_string ("r"), Qnil); + if (NILP (cit->db)) + return -1; } - return retval; +#endif /* not HAVE_LIBCHISE */ + return 0; + } + else + return -1; +} + +void +char_table_close_db_maybe (Lisp_Char_Table* cit) +{ +#ifndef HAVE_LIBCHISE + if (!NILP (cit->db)) + { + if (!NILP (Fdatabase_live_p (cit->db))) + Fclose_database (cit->db); + cit->db = Qnil; + } +#endif /* not HAVE_LIBCHISE */ +} + +Lisp_Object +char_table_get_db (Lisp_Char_Table* cit, Emchar ch) +{ + Lisp_Object val; +#ifdef HAVE_LIBCHISE + CHISE_Value value; + int status + = chise_ds_load_char_feature_value (default_chise_data_source, ch, + XSTRING_DATA(Fsymbol_name + (cit->name)), + &value); + + if (!status) + { + val = Fread (make_string (chise_value_data (&value), + chise_value_size (&value) )); } + else + val = Qunbound; +#else /* HAVE_LIBCHISE */ + val = Fget_database (Fprin1_to_string (make_char (ch), Qnil), + cit->db, Qunbound); + if (!UNBOUNDP (val)) + val = Fread (val); + else + val = Qunbound; +#endif /* not HAVE_LIBCHISE */ + return val; } - -static int -map_over_other_charset (Lisp_Char_Table *ct, int lb, - int (*fn) (struct chartab_range *range, - Lisp_Object val, void *arg), - void *arg) +#ifndef HAVE_LIBCHISE +Lisp_Object +char_attribute_system_db_file (Lisp_Object key_type, Lisp_Object attribute, + int writing_mode) { - Lisp_Object val = ct->level1[lb - MIN_LEADING_BYTE]; - Lisp_Object charset = CHARSET_BY_LEADING_BYTE (lb); + Lisp_Object db_dir = Vexec_directory; - if (!CHARSETP (charset) - || lb == LEADING_BYTE_ASCII - || lb == LEADING_BYTE_CONTROL_1) - return 0; + if (NILP (db_dir)) + db_dir = build_string ("../lib-src"); - if (!CHAR_TABLE_ENTRYP (val)) - { - struct chartab_range rainj; + db_dir = Fexpand_file_name (build_string ("chise-db"), db_dir); + if (writing_mode && NILP (Ffile_exists_p (db_dir))) + Fmake_directory_internal (db_dir); - rainj.type = CHARTAB_RANGE_CHARSET; - rainj.charset = charset; - return (fn) (&rainj, val, arg); - } + db_dir = Fexpand_file_name (Fsymbol_name (key_type), db_dir); + if (writing_mode && NILP (Ffile_exists_p (db_dir))) + Fmake_directory_internal (db_dir); { - Lisp_Char_Table_Entry *cte = XCHAR_TABLE_ENTRY (val); - int charset94_p = (XCHARSET_CHARS (charset) == 94); - int start = charset94_p ? 33 : 32; - int stop = charset94_p ? 127 : 128; - int i, retval; + Lisp_Object attribute_name = Fsymbol_name (attribute); + Lisp_Object dest = Qnil, ret; + int base = 0; + struct gcpro gcpro1, gcpro2; + int len = XSTRING_CHAR_LENGTH (attribute_name); + int i; - if (XCHARSET_DIMENSION (charset) == 1) + GCPRO2 (dest, ret); + for (i = 0; i < len; i++) { - struct chartab_range rainj; - rainj.type = CHARTAB_RANGE_CHAR; + Emchar c = string_char (XSTRING (attribute_name), i); - for (i = start, retval = 0; i < stop && retval == 0; i++) + if ( (c == '/') || (c == '%') ) { - rainj.ch = MAKE_CHAR (charset, i, 0); - retval = (fn) (&rainj, cte->level2[i - 32], arg); + char str[4]; + + sprintf (str, "%%%02X", c); + dest = concat3 (dest, + Fsubstring (attribute_name, + make_int (base), make_int (i)), + build_string (str)); + base = i + 1; } } - else - { - for (i = start, retval = 0; i < stop && retval == 0; i++) - retval = map_over_charset_row (cte, charset, i, fn, arg); - } - - return retval; + ret = Fsubstring (attribute_name, make_int (base), make_int (len)); + dest = concat2 (dest, ret); + UNGCPRO; + return Fexpand_file_name (dest, db_dir); } } +#endif /* not HAVE_LIBCHISE */ -#endif /* MULE */ +DEFUN ("save-char-attribute-table", Fsave_char_attribute_table, 1, 1, 0, /* +Save values of ATTRIBUTE into database file. +*/ + (attribute)) +{ + Lisp_Object table = Fgethash (attribute, + Vchar_attribute_hash_table, Qunbound); + Lisp_Char_Table *ct; +#ifdef HAVE_LIBCHISE + CHISE_Feature feature; +#else /* HAVE_LIBCHISE */ + Lisp_Object db_file; + Lisp_Object db; +#endif /* not HAVE_LIBCHISE */ + + if (CHAR_TABLEP (table)) + ct = XCHAR_TABLE (table); + else + return Qnil; + +#ifdef HAVE_LIBCHISE + if ( open_chise_data_source_maybe () ) + return -1; + feature + = chise_ds_get_feature (default_chise_data_source, + XSTRING_DATA (Fsymbol_name (attribute))); +#else /* HAVE_LIBCHISE */ + db_file = char_attribute_system_db_file (Qsystem_char_id, attribute, 1); + db = Fopen_database (db_file, Qnil, Qnil, build_string ("w+"), Qnil); +#endif /* not HAVE_LIBCHISE */ + if ( +#ifdef HAVE_LIBCHISE + feature != NULL +#else /* HAVE_LIBCHISE */ + !NILP (db) +#endif /* not HAVE_LIBCHISE */ + ) + { + Lisp_Object (*filter)(Lisp_Object value); -/* Map FN (with client data ARG) over range RANGE in char table CT. - Mapping stops the first time FN returns non-zero, and that value - becomes the return value of map_char_table(). */ + if (EQ (attribute, Qideographic_structure)) + filter = &Fchar_refs_simplify_char_specs; + else + filter = NULL; + + if (UINT8_BYTE_TABLE_P (ct->table)) + save_uint8_byte_table (XUINT8_BYTE_TABLE(ct->table), ct, +#ifdef HAVE_LIBCHISE + feature, +#else /* HAVE_LIBCHISE */ + db, +#endif /* not HAVE_LIBCHISE */ + 0, 3, filter); + else if (UINT16_BYTE_TABLE_P (ct->table)) + save_uint16_byte_table (XUINT16_BYTE_TABLE(ct->table), ct, +#ifdef HAVE_LIBCHISE + feature, +#else /* HAVE_LIBCHISE */ + db, +#endif /* not HAVE_LIBCHISE */ + 0, 3, filter); + else if (BYTE_TABLE_P (ct->table)) + save_byte_table (XBYTE_TABLE(ct->table), ct, +#ifdef HAVE_LIBCHISE + feature, +#else /* HAVE_LIBCHISE */ + db, +#endif /* not HAVE_LIBCHISE */ + 0, 3, filter); +#ifdef HAVE_LIBCHISE + chise_feature_sync (feature); +#else /* HAVE_LIBCHISE */ + Fclose_database (db); +#endif /* not HAVE_LIBCHISE */ + return Qt; + } + else + return Qnil; +} -int -map_char_table (Lisp_Char_Table *ct, - struct chartab_range *range, - int (*fn) (struct chartab_range *range, - Lisp_Object val, void *arg), - void *arg) +DEFUN ("mount-char-attribute-table", Fmount_char_attribute_table, 1, 1, 0, /* +Mount database file on char-attribute-table ATTRIBUTE. +*/ + (attribute)) { - switch (range->type) + Lisp_Object table = Fgethash (attribute, + Vchar_attribute_hash_table, Qunbound); + + if (UNBOUNDP (table)) { - case CHARTAB_RANGE_ALL: - { - int retval; + Lisp_Char_Table *ct; + + table = make_char_id_table (Qunbound); + Fputhash (attribute, table, Vchar_attribute_hash_table); + XCHAR_TABLE_NAME(table) = attribute; + ct = XCHAR_TABLE (table); + ct->table = Qunloaded; + XCHAR_TABLE_UNLOADED(table) = 1; +#ifndef HAVE_LIBCHISE + ct->db = Qnil; +#endif /* not HAVE_LIBCHISE */ + return Qt; + } + return Qnil; +} - retval = map_over_charset_ascii (ct, fn, arg); - if (retval) - return retval; -#ifdef MULE - retval = map_over_charset_control_1 (ct, fn, arg); - if (retval) - return retval; +DEFUN ("close-char-attribute-table", Fclose_char_attribute_table, 1, 1, 0, /* +Close database of ATTRIBUTE. +*/ + (attribute)) +{ + Lisp_Object table = Fgethash (attribute, + Vchar_attribute_hash_table, Qunbound); + Lisp_Char_Table *ct; + + if (CHAR_TABLEP (table)) + ct = XCHAR_TABLE (table); + else + return Qnil; + char_table_close_db_maybe (ct); + return Qnil; +} + +DEFUN ("reset-char-attribute-table", Freset_char_attribute_table, 1, 1, 0, /* +Reset values of ATTRIBUTE with database file. +*/ + (attribute)) +{ +#ifdef HAVE_LIBCHISE + CHISE_Feature feature + = chise_ds_get_feature (default_chise_data_source, + XSTRING_DATA (Fsymbol_name + (attribute))); + + if (feature == NULL) + return Qnil; + + if (chise_feature_setup_db (feature, 0) == 0) + { + Lisp_Object table = Fgethash (attribute, + Vchar_attribute_hash_table, Qunbound); + Lisp_Char_Table *ct; + + chise_feature_sync (feature); + if (UNBOUNDP (table)) { - int i; - int start = MIN_LEADING_BYTE; - int stop = start + NUM_LEADING_BYTES; + table = make_char_id_table (Qunbound); + Fputhash (attribute, table, Vchar_attribute_hash_table); + XCHAR_TABLE_NAME(table) = attribute; + } + ct = XCHAR_TABLE (table); + ct->table = Qunloaded; + char_table_close_db_maybe (ct); + XCHAR_TABLE_UNLOADED(table) = 1; + return Qt; + } +#else + Lisp_Object table = Fgethash (attribute, + Vchar_attribute_hash_table, Qunbound); + Lisp_Char_Table *ct; + Lisp_Object db_file + = char_attribute_system_db_file (Qsystem_char_id, attribute, 0); - for (i = start, retval = 0; i < stop && retval == 0; i++) - { - retval = map_over_other_charset (ct, i, fn, arg); - } + if (!NILP (Ffile_exists_p (db_file))) + { + if (UNBOUNDP (table)) + { + table = make_char_id_table (Qunbound); + Fputhash (attribute, table, Vchar_attribute_hash_table); + XCHAR_TABLE_NAME(table) = attribute; } -#endif /* MULE */ - return retval; - } + ct = XCHAR_TABLE (table); + ct->table = Qunloaded; + char_table_close_db_maybe (ct); + XCHAR_TABLE_UNLOADED(table) = 1; + return Qt; + } +#endif + return Qnil; +} -#ifdef MULE - case CHARTAB_RANGE_CHARSET: - return map_over_other_charset (ct, - XCHARSET_LEADING_BYTE (range->charset), - fn, arg); +Lisp_Object +load_char_attribute_maybe (Lisp_Char_Table* cit, Emchar ch) +{ + Lisp_Object attribute = CHAR_TABLE_NAME (cit); - case CHARTAB_RANGE_ROW: - { - Lisp_Object val = ct->level1[XCHARSET_LEADING_BYTE (range->charset) - MIN_LEADING_BYTE]; - if (!CHAR_TABLE_ENTRYP (val)) - { - struct chartab_range rainj; + if (!NILP (attribute)) + { + Lisp_Object val; - rainj.type = CHARTAB_RANGE_ROW; - rainj.charset = range->charset; - rainj.row = range->row; - return (fn) (&rainj, val, arg); - } - else - return map_over_charset_row (XCHAR_TABLE_ENTRY (val), - range->charset, range->row, - fn, arg); - } -#endif /* MULE */ + if (char_table_open_db_maybe (cit)) + return Qunbound; - case CHARTAB_RANGE_CHAR: - { - Emchar ch = range->ch; - Lisp_Object val = CHAR_TABLE_VALUE_UNSAFE (ct, ch); - struct chartab_range rainj; + val = char_table_get_db (cit, ch); - rainj.type = CHARTAB_RANGE_CHAR; - rainj.ch = ch; - return (fn) (&rainj, val, arg); - } + if (!NILP (Vchar_db_stingy_mode)) + char_table_close_db_maybe (cit); - default: - abort (); + return val; } + return Qunbound; +} +Lisp_Char_Table* char_attribute_table_to_load; + +#ifdef HAVE_LIBCHISE +int +load_char_attribute_table_map_func (CHISE_Char_ID cid, + CHISE_Feature feature, + CHISE_Value *value); +int +load_char_attribute_table_map_func (CHISE_Char_ID cid, + CHISE_Feature feature, + CHISE_Value *value) +{ + Emchar code = cid; + Lisp_Object ret = get_char_id_table_0 (char_attribute_table_to_load, code); + + if (EQ (ret, Qunloaded)) + put_char_id_table_0 (char_attribute_table_to_load, code, + Fread (make_string ((Bufbyte *) value->data, + value->size))); return 0; } +#else /* HAVE_LIBCHISE */ +Lisp_Object Qload_char_attribute_table_map_function; -struct slow_map_char_table_arg +DEFUN ("load-char-attribute-table-map-function", + Fload_char_attribute_table_map_function, 2, 2, 0, /* +For internal use. Don't use it. +*/ + (key, value)) { - Lisp_Object function; - Lisp_Object retval; -}; + Lisp_Object c = Fread (key); + Emchar code = XCHAR (c); + Lisp_Object ret = get_char_id_table_0 (char_attribute_table_to_load, code); -static int -slow_map_char_table_fun (struct chartab_range *range, - Lisp_Object val, void *arg) -{ - Lisp_Object ranjarg = Qnil; - struct slow_map_char_table_arg *closure = - (struct slow_map_char_table_arg *) arg; + if (EQ (ret, Qunloaded)) + put_char_id_table_0 (char_attribute_table_to_load, code, Fread (value)); + return Qnil; +} +#endif /* not HAVE_LIBCHISE */ - switch (range->type) +DEFUN ("load-char-attribute-table", Fload_char_attribute_table, 1, 1, 0, /* +Load values of ATTRIBUTE into database file. +*/ + (attribute)) +{ + Lisp_Object table = Fgethash (attribute, + Vchar_attribute_hash_table, + Qunbound); + if (CHAR_TABLEP (table)) { - case CHARTAB_RANGE_ALL: - ranjarg = Qt; - break; + Lisp_Char_Table *cit = XCHAR_TABLE (table); -#ifdef MULE - case CHARTAB_RANGE_CHARSET: - ranjarg = XCHARSET_NAME (range->charset); - break; + if (char_table_open_db_maybe (cit)) + return Qnil; - case CHARTAB_RANGE_ROW: - ranjarg = vector2 (XCHARSET_NAME (range->charset), - make_int (range->row)); - break; -#endif /* MULE */ - case CHARTAB_RANGE_CHAR: - ranjarg = make_char (range->ch); - break; - default: - abort (); + char_attribute_table_to_load = XCHAR_TABLE (table); + { + struct gcpro gcpro1; + + GCPRO1 (table); +#ifdef HAVE_LIBCHISE + chise_feature_foreach_char_with_value + (chise_ds_get_feature (default_chise_data_source, + XSTRING_DATA (Fsymbol_name (cit->name))), + &load_char_attribute_table_map_func); +#else /* HAVE_LIBCHISE */ + Fmap_database (Qload_char_attribute_table_map_function, cit->db); +#endif /* not HAVE_LIBCHISE */ + UNGCPRO; + } + char_table_close_db_maybe (cit); + XCHAR_TABLE_UNLOADED(table) = 0; + return Qt; } - - closure->retval = call2 (closure->function, ranjarg, val); - return !NILP (closure->retval); + return Qnil; } +#endif /* HAVE_CHISE */ -DEFUN ("map-char-table", Fmap_char_table, 2, 3, 0, /* -Map FUNCTION over entries in CHAR-TABLE, calling it with two args, +DEFUN ("map-char-attribute", Fmap_char_attribute, 2, 3, 0, /* +Map FUNCTION over entries in ATTRIBUTE, calling it with two args, each key and value in the table. RANGE specifies a subrange to map over and is in the same format as the RANGE argument to `put-range-table'. If omitted or t, it defaults to the entire table. */ - (function, char_table, range)) + (function, attribute, range)) { + Lisp_Object ccs; Lisp_Char_Table *ct; struct slow_map_char_table_arg slarg; struct gcpro gcpro1, gcpro2; struct chartab_range rainj; - CHECK_CHAR_TABLE (char_table); - ct = XCHAR_TABLE (char_table); + if (!NILP (ccs = Ffind_charset (attribute))) + { + Lisp_Object encoding_table = XCHARSET_ENCODING_TABLE (ccs); + + if (CHAR_TABLEP (encoding_table)) + ct = XCHAR_TABLE (encoding_table); + else + return Qnil; + } + else + { + Lisp_Object table = Fgethash (attribute, + Vchar_attribute_hash_table, + Qunbound); + if (CHAR_TABLEP (table)) + ct = XCHAR_TABLE (table); + else + return Qnil; + } if (NILP (range)) range = Qt; decode_char_table_range (range, &rainj); +#ifdef HAVE_CHISE + if (CHAR_TABLE_UNLOADED(ct)) + Fload_char_attribute_table (attribute); +#endif slarg.function = function; slarg.retval = Qnil; GCPRO2 (slarg.function, slarg.retval); @@ -1465,6 +3916,107 @@ the entire table. return slarg.retval; } +DEFUN ("define-char", Fdefine_char, 1, 1, 0, /* +Store character's ATTRIBUTES. +*/ + (attributes)) +{ + Lisp_Object rest = attributes; + Lisp_Object code = Fcdr (Fassq (Qmap_ucs, attributes)); + Lisp_Object character; + + if (NILP (code)) + code = Fcdr (Fassq (Qucs, attributes)); + if (NILP (code)) + { + while (CONSP (rest)) + { + Lisp_Object cell = Fcar (rest); + Lisp_Object ccs; + + if (!LISTP (cell)) + signal_simple_error ("Invalid argument", attributes); + if (!NILP (ccs = Ffind_charset (Fcar (cell))) + && ((XCHARSET_FINAL (ccs) != 0) || + (XCHARSET_MAX_CODE (ccs) > 0) || + (EQ (ccs, Vcharset_chinese_big5))) ) + { + cell = Fcdr (cell); + if (CONSP (cell)) + character = Fmake_char (ccs, Fcar (cell), Fcar (Fcdr (cell))); + else + character = Fdecode_char (ccs, cell, Qnil); + if (!NILP (character)) + goto setup_attributes; + } + rest = Fcdr (rest); + } + if ( (!NILP (code = Fcdr (Fassq (Qto_ucs, attributes)))) ) + { + if (!INTP (code)) + signal_simple_error ("Invalid argument", attributes); + else + character = make_char (XINT (code) + 0x100000); + goto setup_attributes; + } + return Qnil; + } + else if (!INTP (code)) + signal_simple_error ("Invalid argument", attributes); + else + character = make_char (XINT (code)); + + setup_attributes: + rest = attributes; + while (CONSP (rest)) + { + Lisp_Object cell = Fcar (rest); + + if (!LISTP (cell)) + signal_simple_error ("Invalid argument", attributes); + + Fput_char_attribute (character, Fcar (cell), Fcdr (cell)); + rest = Fcdr (rest); + } + return character; +} + +DEFUN ("find-char", Ffind_char, 1, 1, 0, /* +Retrieve the character of the given ATTRIBUTES. +*/ + (attributes)) +{ + Lisp_Object rest = attributes; + Lisp_Object code; + + while (CONSP (rest)) + { + Lisp_Object cell = Fcar (rest); + Lisp_Object ccs; + + if (!LISTP (cell)) + signal_simple_error ("Invalid argument", attributes); + if (!NILP (ccs = Ffind_charset (Fcar (cell)))) + { + cell = Fcdr (cell); + if (CONSP (cell)) + return Fmake_char (ccs, Fcar (cell), Fcar (Fcdr (cell))); + else + return Fdecode_char (ccs, cell, Qnil); + } + rest = Fcdr (rest); + } + if ( (!NILP (code = Fcdr (Fassq (Qto_ucs, attributes)))) ) + { + if (!INTP (code)) + signal_simple_error ("Invalid argument", attributes); + else + return make_char (XINT (code) + 0x100000); + } + return Qnil; +} + +#endif /************************************************************************/ @@ -1764,16 +4316,20 @@ word_boundary_p (Emchar c1, Emchar c2) c2 = cmpchar_component (c2, 0, 1); #endif +#ifndef UTF2000 if (EQ (CHAR_CHARSET (c1), CHAR_CHARSET (c2))) +#endif { tail = Vword_separating_categories; default_result = 0; } +#ifndef UTF2000 else { tail = Vword_combining_categories; default_result = 1; } +#endif category_set1 = CATEGORY_SET (c1); if (NILP (category_set1)) @@ -1801,10 +4357,71 @@ word_boundary_p (Emchar c1, Emchar c2) void syms_of_chartab (void) { +#ifdef UTF2000 + INIT_LRECORD_IMPLEMENTATION (uint8_byte_table); + INIT_LRECORD_IMPLEMENTATION (uint16_byte_table); + INIT_LRECORD_IMPLEMENTATION (byte_table); + +#if defined(HAVE_CHISE) && !defined(HAVE_LIBCHISE_LIBCHISE) + defsymbol (&Qsystem_char_id, "system-char-id"); +#endif + + defsymbol (&Qto_ucs, "=>ucs"); + defsymbol (&Q_ucs_unified, "->ucs-unified"); + defsymbol (&Qcomposition, "composition"); + defsymbol (&Q_decomposition, "->decomposition"); + defsymbol (&Qcompat, "compat"); + defsymbol (&Qisolated, "isolated"); + defsymbol (&Qinitial, "initial"); + defsymbol (&Qmedial, "medial"); + defsymbol (&Qfinal, "final"); + defsymbol (&Qvertical, "vertical"); + defsymbol (&QnoBreak, "noBreak"); + defsymbol (&Qfraction, "fraction"); + defsymbol (&Qsuper, "super"); + defsymbol (&Qsub, "sub"); + defsymbol (&Qcircle, "circle"); + defsymbol (&Qsquare, "square"); + defsymbol (&Qwide, "wide"); + defsymbol (&Qnarrow, "narrow"); + defsymbol (&Qsmall, "small"); + defsymbol (&Qfont, "font"); + + DEFSUBR (Fchar_attribute_list); + DEFSUBR (Ffind_char_attribute_table); + defsymbol (&Qput_char_table_map_function, "put-char-table-map-function"); + DEFSUBR (Fput_char_table_map_function); +#ifdef HAVE_CHISE + DEFSUBR (Fsave_char_attribute_table); + DEFSUBR (Fmount_char_attribute_table); + DEFSUBR (Freset_char_attribute_table); + DEFSUBR (Fclose_char_attribute_table); + DEFSUBR (Fclose_char_data_source); +#ifndef HAVE_LIBCHISE + defsymbol (&Qload_char_attribute_table_map_function, + "load-char-attribute-table-map-function"); + DEFSUBR (Fload_char_attribute_table_map_function); +#endif + DEFSUBR (Fload_char_attribute_table); +#endif + DEFSUBR (Fchar_attribute_alist); + DEFSUBR (Fget_char_attribute); + DEFSUBR (Fput_char_attribute); + DEFSUBR (Fremove_char_attribute); + DEFSUBR (Fmap_char_attribute); + DEFSUBR (Fdefine_char); + DEFSUBR (Ffind_char); + DEFSUBR (Fchar_variants); + + DEFSUBR (Fget_composite_char); +#endif + INIT_LRECORD_IMPLEMENTATION (char_table); #ifdef MULE +#ifndef UTF2000 INIT_LRECORD_IMPLEMENTATION (char_table_entry); +#endif defsymbol (&Qcategory_table_p, "category-table-p"); defsymbol (&Qcategory_designator_p, "category-designator-p"); @@ -1845,6 +4462,24 @@ syms_of_chartab (void) void vars_of_chartab (void) { +#ifdef HAVE_CHISE + DEFVAR_LISP ("char-db-stingy-mode", &Vchar_db_stingy_mode /* +*/ ); + Vchar_db_stingy_mode = Qt; + +#ifdef HAVE_LIBCHISE + Vchise_db_directory = build_string(chise_db_dir); + DEFVAR_LISP ("chise-db-directory", &Vchise_db_directory /* +Directory of CHISE character databases. +*/ ); + + Vchise_system_db_directory = build_string(chise_system_db_dir); + DEFVAR_LISP ("chise-system-db-directory", &Vchise_system_db_directory /* +Directory of system character database of CHISE. +*/ ); +#endif + +#endif /* HAVE_CHISE */ /* DO NOT staticpro this. It works just like Vweak_hash_tables. */ Vall_syntax_tables = Qnil; dump_add_weak_object_chain (&Vall_syntax_tables); @@ -1864,6 +4499,11 @@ structure_type_create_chartab (void) void complex_vars_of_chartab (void) { +#ifdef UTF2000 + staticpro (&Vchar_attribute_hash_table); + Vchar_attribute_hash_table + = make_lisp_hash_table (16, HASH_TABLE_NON_WEAK, HASH_TABLE_EQ); +#endif /* UTF2000 */ #ifdef MULE /* Set this now, so first buffer creation can refer to it. */ /* Make it nil before calling copy-category-table diff --git a/src/chartab.h b/src/chartab.h index f96aa7d..4a49b0c 100644 --- a/src/chartab.h +++ b/src/chartab.h @@ -1,6 +1,7 @@ /* Declarations having to do with Mule char tables. Copyright (C) 1992 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. + Copyright (C) 1999,2000,2001,2002,2003 MORIOKA Tomohiko This file is part of XEmacs. @@ -27,6 +28,99 @@ Boston, MA 02111-1307, USA. */ #ifndef INCLUDED_chartab_h_ #define INCLUDED_chartab_h_ + +#ifdef UTF2000 + +#ifdef HAVE_CHISE +# ifdef HAVE_LIBCHISE +# include +# else /* HAVE_LIBCHISE */ +# include "database.h" +# endif /* not HAVE_LIBCHISE */ +#endif + +EXFUN (Fmake_char, 3); +EXFUN (Fdecode_char, 3); + +EXFUN (Fput_char_attribute, 3); + +EXFUN (Ffind_char, 1); + +extern Lisp_Object Qdowncase, Qflippedcase, Q_lowercase, Q_uppercase; + +#ifdef HAVE_LIBCHISE +extern CHISE_DS *default_chise_data_source; + +int open_chise_data_source_maybe (void); +#endif + +/************************************************************************/ +/* Char-ID Tables */ +/************************************************************************/ + +struct Lisp_Uint8_Byte_Table +{ + struct lcrecord_header header; + + unsigned char property[256]; +}; +typedef struct Lisp_Uint8_Byte_Table Lisp_Uint8_Byte_Table; + +DECLARE_LRECORD (uint8_byte_table, Lisp_Uint8_Byte_Table); +#define XUINT8_BYTE_TABLE(x) \ + XRECORD (x, uint8_byte_table, Lisp_Uint8_Byte_Table) +#define XSETUINT8_BYTE_TABLE(x, p) XSETRECORD (x, p, uint8_byte_table) +#define UINT8_BYTE_TABLE_P(x) RECORDP (x, uint8_byte_table) +#define GC_UINT8_BYTE_TABLE_P(x) GC_RECORDP (x, uint8_byte_table) +/* #define CHECK_UINT8_BYTE_TABLE(x) CHECK_RECORD (x, uint8_byte_table) + char table entries should never escape to Lisp */ + + +struct Lisp_Uint16_Byte_Table +{ + struct lcrecord_header header; + + unsigned short property[256]; +}; +typedef struct Lisp_Uint16_Byte_Table Lisp_Uint16_Byte_Table; + +DECLARE_LRECORD (uint16_byte_table, Lisp_Uint16_Byte_Table); +#define XUINT16_BYTE_TABLE(x) \ + XRECORD (x, uint16_byte_table, Lisp_Uint16_Byte_Table) +#define XSETUINT16_BYTE_TABLE(x, p) XSETRECORD (x, p, uint16_byte_table) +#define UINT16_BYTE_TABLE_P(x) RECORDP (x, uint16_byte_table) +#define GC_UINT16_BYTE_TABLE_P(x) GC_RECORDP (x, uint16_byte_table) +/* #define CHECK_UINT16_BYTE_TABLE(x) CHECK_RECORD (x, uint16_byte_table) + char table entries should never escape to Lisp */ + + +struct Lisp_Byte_Table +{ + struct lcrecord_header header; + + Lisp_Object property[256]; +}; +typedef struct Lisp_Byte_Table Lisp_Byte_Table; + +DECLARE_LRECORD (byte_table, Lisp_Byte_Table); +#define XBYTE_TABLE(x) XRECORD (x, byte_table, Lisp_Byte_Table) +#define XSETBYTE_TABLE(x, p) XSETRECORD (x, p, byte_table) +#define BYTE_TABLE_P(x) RECORDP (x, byte_table) +#define GC_BYTE_TABLE_P(x) GC_RECORDP (x, byte_table) +/* #define CHECK_BYTE_TABLE(x) CHECK_RECORD (x, byte_table) + char table entries should never escape to Lisp */ + +Lisp_Object get_byte_table (Lisp_Object table, unsigned char idx); + +Lisp_Object put_byte_table (Lisp_Object table, unsigned char idx, + Lisp_Object value); + + +Lisp_Object make_char_id_table (Lisp_Object initval); + +#endif + + /************************************************************************/ /* Char Tables */ /************************************************************************/ @@ -35,7 +129,7 @@ Boston, MA 02111-1307, USA. */ When not under Mule, there are only 256 possible characters so we just represent them directly. */ -#ifdef MULE +#if defined(MULE)&&!defined(UTF2000) struct Lisp_Char_Table_Entry { @@ -69,16 +163,27 @@ enum char_table_type CHAR_TABLE_TYPE_CHAR }; +#ifndef UTF2000 #ifdef MULE #define NUM_ASCII_CHARS 160 #else #define NUM_ASCII_CHARS 256 #endif +#endif struct Lisp_Char_Table { struct lcrecord_header header; +#ifdef UTF2000 + Lisp_Object table; + Lisp_Object default_value; + Lisp_Object name; +#ifndef HAVE_LIBCHISE + Lisp_Object db; +#endif + unsigned char unloaded; +#else Lisp_Object ascii[NUM_ASCII_CHARS]; #ifdef MULE @@ -110,11 +215,14 @@ struct Lisp_Char_Table Lisp_Object level1[NUM_LEADING_BYTES]; #endif /* MULE */ +#endif /* non UTF2000 */ enum char_table_type type; +#ifndef UTF2000 /* stuff used for syntax tables */ Lisp_Object mirror_table; +#endif Lisp_Object next_table; /* DO NOT mark through this. */ }; typedef struct Lisp_Char_Table Lisp_Char_Table; @@ -129,10 +237,37 @@ DECLARE_LRECORD (char_table, Lisp_Char_Table); #define CHAR_TABLE_TYPE(ct) ((ct)->type) #define XCHAR_TABLE_TYPE(ct) CHAR_TABLE_TYPE (XCHAR_TABLE (ct)) -#ifdef MULE +#ifdef UTF2000 + +#define CHAR_TABLE_NAME(ct) ((ct)->name) +#define XCHAR_TABLE_NAME(ct) CHAR_TABLE_NAME (XCHAR_TABLE (ct)) + +#define CHAR_TABLE_UNLOADED(ct) ((ct)->unloaded) +#define XCHAR_TABLE_UNLOADED(ct) CHAR_TABLE_UNLOADED (XCHAR_TABLE (ct)) + +INLINE_HEADER Lisp_Object +CHAR_TABLE_VALUE_UNSAFE (Lisp_Char_Table *ct, Emchar ch); +INLINE_HEADER Lisp_Object +CHAR_TABLE_VALUE_UNSAFE (Lisp_Char_Table *ct, Emchar ch) +{ + Lisp_Object val = get_byte_table (get_byte_table + (get_byte_table + (get_byte_table + (ct->table, + (unsigned char)(ch >> 24)), + (unsigned char) (ch >> 16)), + (unsigned char) (ch >> 8)), + (unsigned char) ch); + if (UNBOUNDP (val)) + return ct->default_value; + else + return val; +} + +#elif defined(MULE) Lisp_Object get_non_ascii_char_table_value (Lisp_Char_Table *ct, - int leading_byte, + Charset_ID leading_byte, Emchar c); INLINE_HEADER Lisp_Object @@ -140,7 +275,11 @@ CHAR_TABLE_NON_ASCII_VALUE_UNSAFE (Lisp_Char_Table *ct, Emchar ch); INLINE_HEADER Lisp_Object CHAR_TABLE_NON_ASCII_VALUE_UNSAFE (Lisp_Char_Table *ct, Emchar ch) { - unsigned char lb = CHAR_LEADING_BYTE (ch); +#ifdef UTF2000 + Charset_ID lb = CHAR_CHARSET_ID (ch); +#else + Charset_ID lb = CHAR_LEADING_BYTE (ch); +#endif if (!CHAR_TABLE_ENTRYP ((ct)->level1[lb - MIN_LEADING_BYTE])) return (ct)->level1[lb - MIN_LEADING_BYTE]; else @@ -164,6 +303,9 @@ CHAR_TABLE_NON_ASCII_VALUE_UNSAFE (Lisp_Char_Table *ct, Emchar ch) enum chartab_range_type { CHARTAB_RANGE_ALL, +#ifdef UTF2000 + CHARTAB_RANGE_DEFAULT, +#endif #ifdef MULE CHARTAB_RANGE_CHARSET, CHARTAB_RANGE_ROW, @@ -198,6 +340,94 @@ EXFUN (Fget_char_table, 2); extern Lisp_Object Vall_syntax_tables; +#ifdef UTF2000 + +INLINE_HEADER void +put_char_id_table_0 (Lisp_Char_Table* cit, Emchar code, Lisp_Object value); +INLINE_HEADER void +put_char_id_table_0 (Lisp_Char_Table* cit, Emchar code, Lisp_Object value) +{ + Lisp_Object table1, table2, table3, table4; + + table1 = cit->table; + table2 = get_byte_table (table1, (unsigned char)(code >> 24)); + table3 = get_byte_table (table2, (unsigned char)(code >> 16)); + table4 = get_byte_table (table3, (unsigned char)(code >> 8)); + + table4 = put_byte_table (table4, (unsigned char) code, value); + table3 = put_byte_table (table3, (unsigned char)(code >> 8), table4); + table2 = put_byte_table (table2, (unsigned char)(code >> 16), table3); + cit->table = put_byte_table (table1, (unsigned char)(code >> 24), table2); +} + +#ifdef HAVE_CHISE +Lisp_Object load_char_attribute_maybe (Lisp_Char_Table* cit, Emchar ch); + +#ifndef HAVE_LIBCHISE +extern Lisp_Object Qsystem_char_id; + +Lisp_Object +char_attribute_system_db_file (Lisp_Object key_type, Lisp_Object attribute, + int writing_mode); +#endif /* not HAVE_LIBCHISE */ +#endif /* HAVE_CHISE */ + +INLINE_HEADER Lisp_Object +get_char_id_table_0 (Lisp_Char_Table* cit, Emchar ch); +INLINE_HEADER Lisp_Object +get_char_id_table_0 (Lisp_Char_Table* cit, Emchar ch) +{ + return get_byte_table (get_byte_table + (get_byte_table + (get_byte_table + (cit->table, + (unsigned char)(ch >> 24)), + (unsigned char) (ch >> 16)), + (unsigned char) (ch >> 8)), + (unsigned char) ch); +} + +INLINE_HEADER Lisp_Object +get_char_id_table (Lisp_Char_Table* cit, Emchar ch); +INLINE_HEADER Lisp_Object +get_char_id_table (Lisp_Char_Table* cit, Emchar ch) +{ + Lisp_Object val = get_char_id_table_0 (cit, ch); + +#ifdef HAVE_CHISE + if (EQ (val, Qunloaded)) + { + val = load_char_attribute_maybe (cit, ch); + put_char_id_table_0 (cit, ch, val); + } +#endif /* HAVE_CHISE */ + if (UNBOUNDP (val)) + return cit->default_value; + else + return val; +} + +void +decode_char_table_range (Lisp_Object range, struct chartab_range *outrange); + +INLINE_HEADER void +put_char_id_table (Lisp_Char_Table* table, + Lisp_Object character, Lisp_Object value); +INLINE_HEADER void +put_char_id_table (Lisp_Char_Table* table, + Lisp_Object character, Lisp_Object value) +{ + struct chartab_range range; + + decode_char_table_range (character, &range); + put_char_table (table, &range, value); +} + + +EXFUN (Fget_char_attribute, 3); + +#endif + #ifdef MULE int check_category_char(Emchar ch, Lisp_Object ctbl, diff --git a/src/cmds.c b/src/cmds.c index 82a0675..ec8d39e 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -1,5 +1,6 @@ /* Simple built-in editing commands. Copyright (C) 1985, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. + Copyright (C) 2001 MORIOKA Tomohiko This file is part of XEmacs. @@ -375,7 +376,11 @@ internal_self_insert (Emchar c1, int noautofill) int tab_width; overwrite = buf->overwrite_mode; +#ifdef UTF2000 + syntax_table = XCHAR_TABLE (buf->syntax_table); +#else syntax_table = XCHAR_TABLE (buf->mirror_syntax_table); +#endif #if 0 /* No, this is very bad, it makes undo *always* undo a character at a time @@ -549,6 +554,11 @@ A char-table for characters which invoke auto-filling. Such characters have value t in this table. */); Vauto_fill_chars = Fmake_char_table (Qgeneric); +#ifdef UTF2000 + put_char_id_table_0 (XCHAR_TABLE (Vauto_fill_chars), ' ', Qt); + put_char_id_table_0 (XCHAR_TABLE (Vauto_fill_chars), '\n', Qt); +#else XCHAR_TABLE (Vauto_fill_chars)->ascii[' '] = Qt; XCHAR_TABLE (Vauto_fill_chars)->ascii['\n'] = Qt; +#endif } diff --git a/src/config.h.in b/src/config.h.in index f32e890..2d0e21a 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -573,6 +573,19 @@ void *alloca (); if you're working with ASCII files. */ #undef MULE +/* Define this if you want CHISE support + (CHaracter Information Service Environment) */ +#undef HAVE_CHISE + +/* Define if you are using libchise */ +#undef HAVE_LIBCHISE + +/* Define this if you want UTF-2000 support (character representation + based on character object model). */ +#undef UTF2000 + +#undef CHAR_IS_UCS4 + /* Define this if you want file coding support */ #undef FILE_CODING diff --git a/src/console-stream.c b/src/console-stream.c index a02f7f4..5e099b2 100644 --- a/src/console-stream.c +++ b/src/console-stream.c @@ -173,7 +173,7 @@ stream_init_frame_1 (struct frame *f, Lisp_Object props) static int stream_text_width (struct frame *f, struct face_cachel *cachel, - const Emchar *str, Charcount len) + const Charc *str, Charcount len) { return len; } diff --git a/src/console-x.h b/src/console-x.h index 31252dd..d664360 100644 --- a/src/console-x.h +++ b/src/console-x.h @@ -405,7 +405,7 @@ int x_IO_error_handler (Display *disp); void x_redraw_exposed_area (struct frame *f, int x, int y, int width, int height); void x_output_string (struct window *w, struct display_line *dl, - Emchar_dynarr *buf, int xpos, int xoffset, + Charc_dynarr *buf, int xpos, int xoffset, int start_pixpos, int width, face_index findex, int cursor, int cursor_start, int cursor_width, int cursor_height); diff --git a/src/console.h b/src/console.h index 9d9d65c..214e8c2 100644 --- a/src/console.h +++ b/src/console.h @@ -25,6 +25,8 @@ Boston, MA 02111-1307, USA. */ #ifndef INCLUDED_console_h_ #define INCLUDED_console_h_ +#include "character.h" + /* Devices and consoles are similar entities. The idea is that a console represents a physical keyboard/mouse/other-input-source while a device represents a display where frames appear on. @@ -175,7 +177,7 @@ struct console_methods int (*left_margin_width_method) (struct window *); int (*right_margin_width_method) (struct window *); int (*text_width_method) (struct frame *f, struct face_cachel *cachel, - const Emchar *str, Charcount len); + const Charc *str, Charcount len); void (*output_display_block_method) (struct window *, struct display_line *, int, int, int, int, int, int, int); int (*divider_height_method) (void); @@ -202,7 +204,7 @@ struct console_methods face_index findex, int cursor_start, int cursor_width, int cursor_height, int offset_bitmap); void (*output_string_method) (struct window *w, struct display_line *dl, - Emchar_dynarr *buf, int xpos, int xoffset, + Charc_dynarr *buf, int xpos, int xoffset, int start_pixpos, int width, face_index findex, int cursor, int cursor_start, int cursor_width, int cursor_height); diff --git a/src/data.c b/src/data.c index b90b3ca..6769058 100644 --- a/src/data.c +++ b/src/data.c @@ -39,6 +39,9 @@ Boston, MA 02111-1307, USA. */ #endif /* LISP_FLOAT_TYPE */ Lisp_Object Qnil, Qt, Qquote, Qlambda, Qunbound; +#ifdef UTF2000 +Lisp_Object Qunloaded; +#endif Lisp_Object Qerror_conditions, Qerror_message; Lisp_Object Qerror, Qquit, Qsyntax_error, Qinvalid_read_syntax; Lisp_Object Qlist_formation_error; @@ -458,6 +461,14 @@ confoundedness in older versions of E-Lisp. { return CHAR_OR_CHAR_INTP (object) || STRINGP (object) ? Qt : Qnil; } + +DEFUN ("char-ref-p", Fchar_ref_p, 1, 1, 0, /* +Return t if OBJECT is a character-reference. +*/ + (object)) +{ + return CONSP (object) && KEYWORDP (XCAR (object)) ? Qt : Qnil; +} DEFUN ("integerp", Fintegerp, 1, 1, 0, /* Return t if OBJECT is an integer. @@ -2156,6 +2167,7 @@ syms_of_data (void) DEFSUBR (Fchar_to_int); DEFSUBR (Fint_to_char); DEFSUBR (Fchar_or_char_int_p); + DEFSUBR (Fchar_ref_p); DEFSUBR (Fintegerp); DEFSUBR (Finteger_or_marker_p); DEFSUBR (Finteger_or_char_p); diff --git a/src/database.c b/src/database.c index 2e07885..3e70dc3 100644 --- a/src/database.c +++ b/src/database.c @@ -784,7 +784,7 @@ If there is no corresponding value, return DEFAULT (defaults to nil). } } -DEFUN ("map-database", Fmapdatabase, 2, 2, 0, /* +DEFUN ("map-database", Fmap_database, 2, 2, 0, /* Map FUNCTION over entries in DATABASE, calling it with two args, each key and value in the database. */ @@ -819,7 +819,7 @@ syms_of_database (void) DEFSUBR (Fopen_database); DEFSUBR (Fdatabasep); - DEFSUBR (Fmapdatabase); + DEFSUBR (Fmap_database); DEFSUBR (Fput_database); DEFSUBR (Fget_database); DEFSUBR (Fremove_database); diff --git a/src/database.h b/src/database.h index aad2ca5..b212791 100644 --- a/src/database.h +++ b/src/database.h @@ -27,4 +27,11 @@ Boston, MA 02111-1307, USA. */ typedef struct Lisp_Database Lisp_Database; DECLARE_LRECORD (database, Lisp_Database); +EXFUN (Fopen_database, 5); +EXFUN (Fput_database, 4); +EXFUN (Fget_database, 3); +EXFUN (Fclose_database, 1); +EXFUN (Fdatabase_live_p, 1); +EXFUN (Fmap_database, 2); + #endif /* INCLUDED_database_h_ */ diff --git a/src/doprnt.c b/src/doprnt.c index b9951ae..a2b047b 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -34,7 +34,7 @@ Boston, MA 02111-1307, USA. */ static const char * const valid_flags = "-+ #0"; static const char * const valid_converters = "dic" "ouxX" "feEgG" "sS"; static const char * const int_converters = "dic"; -static const char * const unsigned_int_converters = "ouxX"; +static const char * const unsigned_int_converters = "ouxXc"; static const char * const double_converters = "feEgG"; static const char * const string_converters = "sS"; @@ -569,7 +569,7 @@ emacs_doprnt_1 (Lisp_Object stream, const Bufbyte *format_nonreloc, obj = Ftruncate (obj); if (strchr (unsigned_int_converters, ch)) - arg.ul = (unsigned long) XINT (obj); + arg.ul = (unsigned long) XUINT (obj); else arg.l = XINT (obj); } diff --git a/src/dumper.c b/src/dumper.c index b60496c..a884710 100644 --- a/src/dumper.c +++ b/src/dumper.c @@ -282,7 +282,11 @@ static int pdump_fd; static void *pdump_buf; static FILE *pdump_out; +#ifdef UTF2000 +#define PDUMP_HASHSIZE 20000001 +#else #define PDUMP_HASHSIZE 200001 +#endif static pdump_entry_list_elt **pdump_hash; diff --git a/src/emacs.c b/src/emacs.c index ea67ffc..6a01ca6 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -3,6 +3,7 @@ Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. Copyright (C) 2000, 2002 Ben Wing. + Copyright (C) 2000,2002 MORIOKA Tomohiko. This file is part of XEmacs. @@ -292,6 +293,7 @@ Lisp_Object Vexec_path; Lisp_Object Vexec_directory, Vconfigure_exec_directory; Lisp_Object Vlisp_directory, Vconfigure_lisp_directory; Lisp_Object Vmule_lisp_directory, Vconfigure_mule_lisp_directory; +Lisp_Object Vutf_2000_lisp_directory, Vconfigure_utf_2000_lisp_directory; Lisp_Object Vmodule_directory, Vconfigure_module_directory; Lisp_Object Vsite_module_directory, Vconfigure_site_module_directory; Lisp_Object Vconfigure_package_path; @@ -3617,7 +3619,34 @@ Codename of this version of Emacs (a string). #ifndef XEMACS_CODENAME #define XEMACS_CODENAME "Noname" #endif +#ifdef MULE + { + char dest[129]; + char src[64] = XEMACS_CODENAME; + unsigned char* sp = (unsigned char*)src; + int i = 0, chr; + + while ( (chr = *sp++) && (i < 128) ) + { + if (chr <= 0x7F) + dest[i++] = chr; + else + { +#ifdef UTF2000 + dest[i++] = (chr >> 6) | 0xC0; + dest[i++] = (chr & 0x3F) | 0x80; +#else + dest[i++] = LEADING_BYTE_LATIN_ISO8859_1; + dest[i++] = chr; +#endif + } + } + dest[i] = 0; + Vxemacs_codename = build_string (dest); + } +#else Vxemacs_codename = build_string (XEMACS_CODENAME); +#endif /* Lisp variables which contain command line flags. @@ -3826,6 +3855,23 @@ configure's idea of what `mule-lisp-directory' will be. Vconfigure_mule_lisp_directory = Qnil; #endif + DEFVAR_LISP ("utf-2000-lisp-directory", &Vutf_2000_lisp_directory /* +*Directory of UTF-2000 Lisp files that come with XEmacs. +*/ ); + Vutf_2000_lisp_directory = Qnil; + + DEFVAR_LISP ("configure-utf-2000-lisp-directory", + &Vconfigure_utf_2000_lisp_directory /* +For internal use by the build procedure only. +configure's idea of what `utf-2000-lisp-directory' will be. +*/ ); +#ifdef PATH_UTF2000LOADSEARCH + Vconfigure_utf_2000_lisp_directory = Ffile_name_as_directory + (build_string ((char *) PATH_UTF2000LOADSEARCH)); +#else + Vconfigure_utf_2000_lisp_directory = Qnil; +#endif + DEFVAR_LISP ("module-directory", &Vmodule_directory /* *Directory of core dynamic modules that come with XEmacs. */ ); diff --git a/src/faces.c b/src/faces.c index 551415e..ab8648e 100644 --- a/src/faces.c +++ b/src/faces.c @@ -1107,7 +1107,7 @@ ensure_face_cachel_contains_charset (struct face_cachel *cachel, void ensure_face_cachel_complete (struct face_cachel *cachel, - Lisp_Object domain, unsigned char *charsets) + Lisp_Object domain, Charset_ID *charsets) { int i; @@ -1122,7 +1122,7 @@ ensure_face_cachel_complete (struct face_cachel *cachel, void face_cachel_charset_font_metric_info (struct face_cachel *cachel, - unsigned char *charsets, + Charset_ID *charsets, struct font_metric_info *fm) { int i; diff --git a/src/faces.h b/src/faces.h index 1969fe0..cf0be04 100644 --- a/src/faces.h +++ b/src/faces.h @@ -233,12 +233,12 @@ Lisp_Object ensure_face_cachel_contains_charset (struct face_cachel *cachel, Lisp_Object charset); void ensure_face_cachel_complete (struct face_cachel *cachel, Lisp_Object domain, - unsigned char *charsets); + Charset_ID *charsets); void update_face_cachel_data (struct face_cachel *cachel, Lisp_Object domain, Lisp_Object face); void face_cachel_charset_font_metric_info (struct face_cachel *cachel, - unsigned char *charsets, + Charset_ID *charsets, struct font_metric_info *fm); void mark_face_cachels (face_cachel_dynarr *elements); void mark_face_cachels_as_clean (struct window *w); @@ -279,7 +279,7 @@ void default_face_height_and_width_1 (Lisp_Object domain, int *height, int *width); #define FACE_CACHEL_FONT(cachel, charset) \ - (cachel->font[XCHARSET_LEADING_BYTE (charset) - 128]) + (cachel->font[XCHARSET_LEADING_BYTE (charset) - MIN_LEADING_BYTE]) #define WINDOW_FACE_CACHEL(window, index) \ Dynarr_atp ((window)->face_cachels, index) diff --git a/src/file-coding.c b/src/file-coding.c index fe42ebd..b4ff9c8 100644 --- a/src/file-coding.c +++ b/src/file-coding.c @@ -58,14 +58,14 @@ struct file_coding_dump { This describes a permutation of the possible coding categories. */ int coding_category_by_priority[CODING_CATEGORY_LAST]; -#ifdef MULE +#if defined(MULE) && !defined(UTF2000) Lisp_Object ucs_to_mule_table[65536]; #endif } *fcd; static const struct lrecord_description fcd_description_1[] = { { XD_LISP_OBJECT_ARRAY, offsetof (struct file_coding_dump, coding_category_system), CODING_CATEGORY_LAST }, -#ifdef MULE +#if defined(MULE) && !defined(UTF2000) { XD_LISP_OBJECT_ARRAY, offsetof (struct file_coding_dump, ucs_to_mule_table), countof (fcd->ucs_to_mule_table) }, #endif { XD_END } @@ -2043,6 +2043,62 @@ do { \ /* C should be a binary character in the range 0 - 255; convert to internal format and add to Dynarr DST. */ +#ifdef UTF2000 +#define DECODE_ADD_BINARY_CHAR(c, dst) \ +do { \ + if (BYTE_ASCII_P (c)) \ + Dynarr_add (dst, c); \ + else \ + { \ + Dynarr_add (dst, (c >> 6) | 0xc0); \ + Dynarr_add (dst, (c & 0x3f) | 0x80); \ + } \ +} while (0) + +INLINE void +DECODE_ADD_UCS_CHAR(Emchar c, unsigned_char_dynarr* dst) +{ + if ( c <= 0x7f ) + { + Dynarr_add (dst, c); + } + else if ( c <= 0x7ff ) + { + Dynarr_add (dst, (c >> 6) | 0xc0); + Dynarr_add (dst, (c & 0x3f) | 0x80); + } + else if ( c <= 0xffff ) + { + Dynarr_add (dst, (c >> 12) | 0xe0); + Dynarr_add (dst, ((c >> 6) & 0x3f) | 0x80); + Dynarr_add (dst, (c & 0x3f) | 0x80); + } + else if ( c <= 0x1fffff ) + { + Dynarr_add (dst, (c >> 18) | 0xf0); + Dynarr_add (dst, ((c >> 12) & 0x3f) | 0x80); + Dynarr_add (dst, ((c >> 6) & 0x3f) | 0x80); + Dynarr_add (dst, (c & 0x3f) | 0x80); + } + else if ( c <= 0x3ffffff ) + { + Dynarr_add (dst, (c >> 24) | 0xf8); + Dynarr_add (dst, ((c >> 18) & 0x3f) | 0x80); + Dynarr_add (dst, ((c >> 12) & 0x3f) | 0x80); + Dynarr_add (dst, ((c >> 6) & 0x3f) | 0x80); + Dynarr_add (dst, (c & 0x3f) | 0x80); + } + else + { + Dynarr_add (dst, (c >> 30) | 0xfc); + Dynarr_add (dst, ((c >> 24) & 0x3f) | 0x80); + Dynarr_add (dst, ((c >> 18) & 0x3f) | 0x80); + Dynarr_add (dst, ((c >> 12) & 0x3f) | 0x80); + Dynarr_add (dst, ((c >> 6) & 0x3f) | 0x80); + Dynarr_add (dst, (c & 0x3f) | 0x80); + } +} +#else #define DECODE_ADD_BINARY_CHAR(c, dst) \ do { \ if (BYTE_ASCII_P (c)) \ @@ -2058,6 +2114,7 @@ do { \ Dynarr_add (dst, c); \ } \ } while (0) +#endif #define DECODE_OUTPUT_PARTIAL_CHAR(ch) \ do { \ @@ -2727,7 +2784,11 @@ reset_encoding_stream (struct encoding_stream *str) str->iso2022.register_right = 1; str->iso2022.current_charset = Qnil; str->iso2022.current_half = 0; +#ifdef UTF2000 + str->iso2022.current_char_boundary = 0; +#else str->iso2022.current_char_boundary = 1; +#endif break; } case CODESYS_CCL: @@ -3020,10 +3081,16 @@ decode_coding_sjis (Lstream *decoding, const Extbyte *src, { unsigned char e1, e2; - Dynarr_add (dst, LEADING_BYTE_JAPANESE_JISX0208); DECODE_SJIS (ch, c, e1, e2); +#ifdef UTF2000 + DECODE_ADD_UCS_CHAR(MAKE_CHAR(Vcharset_japanese_jisx0208, + e1 & 0x7F, + e2 & 0x7F), dst); +#else + Dynarr_add (dst, LEADING_BYTE_JAPANESE_JISX0208); Dynarr_add (dst, e1); Dynarr_add (dst, e2); +#endif } else { @@ -3039,8 +3106,13 @@ decode_coding_sjis (Lstream *decoding, const Extbyte *src, ch = c; else if (BYTE_SJIS_KATAKANA_P (c)) { +#ifdef UTF2000 + DECODE_ADD_UCS_CHAR(MAKE_CHAR(Vcharset_katakana_jisx0201, + c & 0x7F, 0), dst); +#else Dynarr_add (dst, LEADING_BYTE_KATAKANA_JISX0201); Dynarr_add (dst, c); +#endif } else DECODE_ADD_BINARY_CHAR (c, dst); @@ -3064,10 +3136,82 @@ encode_coding_sjis (Lstream *encoding, const Bufbyte *src, unsigned int flags = str->flags; unsigned int ch = str->ch; eol_type_t eol_type = CODING_SYSTEM_EOL_TYPE (str->codesys); +#ifdef UTF2000 + unsigned char char_boundary = str->iso2022.current_char_boundary; +#endif while (n--) { Bufbyte c = *src++; +#ifdef UTF2000 + switch (char_boundary) + { + case 0: + if ( c >= 0xfc ) + { + ch = c & 0x01; + char_boundary = 5; + } + else if ( c >= 0xf8 ) + { + ch = c & 0x03; + char_boundary = 4; + } + else if ( c >= 0xf0 ) + { + ch = c & 0x07; + char_boundary = 3; + } + else if ( c >= 0xe0 ) + { + ch = c & 0x0f; + char_boundary = 2; + } + else if ( c >= 0xc0 ) + { + ch = c & 0x1f; + char_boundary = 1; + } + else + { + ch = 0; + if (c == '\n') + { + if (eol_type != EOL_LF && eol_type != EOL_AUTODETECT) + Dynarr_add (dst, '\r'); + if (eol_type != EOL_CR) + Dynarr_add (dst, c); + } + else + Dynarr_add (dst, c); + char_boundary = 0; + } + break; + case 1: + ch = ( ch << 6 ) | ( c & 0x3f ); + { + Lisp_Object charset; + unsigned int c1, c2, s1, s2; + + BREAKUP_CHAR (ch, charset, c1, c2); + if (EQ(charset, Vcharset_katakana_jisx0201)) + { + Dynarr_add (dst, c1 | 0x80); + } + else if (EQ(charset, Vcharset_japanese_jisx0208)) + { + ENCODE_SJIS (c1 | 0x80, c2 | 0x80, s1, s2); + Dynarr_add (dst, s1); + Dynarr_add (dst, s2); + } + } + char_boundary = 0; + break; + default: + ch = ( ch << 6 ) | ( c & 0x3f ); + char_boundary--; + } +#else if (c == '\n') { if (eol_type != EOL_LF && eol_type != EOL_AUTODETECT) @@ -3104,10 +3248,14 @@ encode_coding_sjis (Lstream *encoding, const Bufbyte *src, ch = 0; } } +#endif } str->flags = flags; str->ch = ch; +#ifdef UTF2000 + str->iso2022.current_char_boundary = char_boundary; +#endif } DEFUN ("decode-shift-jis-char", Fdecode_shift_jis_char, 1, 1, 0, /* @@ -3335,6 +3483,7 @@ static void encode_coding_big5 (Lstream *encoding, const Bufbyte *src, unsigned_char_dynarr *dst, Lstream_data_count n) { +#ifndef UTF2000 unsigned char c; struct encoding_stream *str = ENCODING_STREAM_DATA (encoding); unsigned int flags = str->flags; @@ -3389,6 +3538,7 @@ encode_coding_big5 (Lstream *encoding, const Bufbyte *src, str->flags = flags; str->ch = ch; +#endif } @@ -3409,7 +3559,7 @@ Return the corresponding character. if (BYTE_BIG5_TWO_BYTE_1_P (b1) && BYTE_BIG5_TWO_BYTE_2_P (b2)) { - int leading_byte; + Charset_ID leading_byte; Lisp_Object charset; DECODE_BIG5 (b1, b2, leading_byte, c1, c2); charset = CHARSET_BY_LEADING_BYTE (leading_byte); @@ -3449,7 +3599,7 @@ Return the corresponding character code in Big5. /* */ /************************************************************************/ - +#ifndef UTF2000 DEFUN ("set-ucs-char", Fset_ucs_char, 2, 2, 0, /* Map UCS-4 code CODE to Mule character CHARACTER. @@ -3487,7 +3637,7 @@ ucs_to_char (unsigned long code) c = code % (94 * 94); return make_char (MAKE_CHAR (CHARSET_BY_ATTRIBUTES - (CHARSET_TYPE_94X94, code / (94 * 94) + '@', + (94, 2, code / (94 * 94) + '@', CHARSET_LEFT_TO_RIGHT), c / 94 + 33, c % 94 + 33)); } @@ -3524,7 +3674,11 @@ Return the UCS code (a positive integer) corresponding to CHARACTER. { return Fget_char_table (character, mule_to_ucs_table); } +#endif +#ifdef UTF2000 +#define decode_ucs4 DECODE_ADD_UCS_CHAR +#else /* Decode a UCS-4 character into a buffer. If the lookup fails, use (U+3013) of JIS X 0208, which means correct character is not found, instead. @@ -3553,7 +3707,9 @@ decode_ucs4 (unsigned long ch, unsigned_char_dynarr *dst) Dynarr_add (dst, 46 + 128); } } +#endif +#ifndef UTF2000 static unsigned long mule_char_to_ucs4 (Lisp_Object charset, unsigned char h, unsigned char l) @@ -3597,6 +3753,7 @@ encode_ucs4 (Lisp_Object charset, Dynarr_add (dst, (code >> 8) & 255); Dynarr_add (dst, code & 255); } +#endif static int detect_coding_ucs4 (struct detection_state *st, const Extbyte *src, Lstream_data_count n) @@ -3662,6 +3819,7 @@ static void encode_coding_ucs4 (Lstream *encoding, const Bufbyte *src, unsigned_char_dynarr *dst, Lstream_data_count n) { +#ifndef UTF2000 struct encoding_stream *str = ENCODING_STREAM_DATA (encoding); unsigned int flags = str->flags; unsigned int ch = str->ch; @@ -3790,6 +3948,7 @@ encode_coding_ucs4 (Lstream *encoding, const Bufbyte *src, str->iso2022.current_charset = charset; /* Verbum caro factum est! */ +#endif } @@ -3899,6 +4058,7 @@ decode_coding_utf8 (Lstream *decoding, const Extbyte *src, str->counter = counter; } +#ifndef UTF2000 static void encode_utf8 (Lisp_Object charset, unsigned char h, unsigned char l, unsigned_char_dynarr *dst) @@ -3944,6 +4104,7 @@ encode_utf8 (Lisp_Object charset, Dynarr_add (dst, (code & 0x3f) | 0x80); } } +#endif static void encode_coding_utf8 (Lstream *encoding, const Bufbyte *src, @@ -3954,6 +4115,63 @@ encode_coding_utf8 (Lstream *encoding, const Bufbyte *src, unsigned int ch = str->ch; eol_type_t eol_type = CODING_SYSTEM_EOL_TYPE (str->codesys); unsigned char char_boundary = str->iso2022.current_char_boundary; +#ifdef UTF2000 + + while (n--) + { + unsigned char c = *src++; + switch (char_boundary) + { + case 0: + if ( c >= 0xfc ) + { + Dynarr_add (dst, c); + char_boundary = 5; + } + else if ( c >= 0xf8 ) + { + Dynarr_add (dst, c); + char_boundary = 4; + } + else if ( c >= 0xf0 ) + { + Dynarr_add (dst, c); + char_boundary = 3; + } + else if ( c >= 0xe0 ) + { + Dynarr_add (dst, c); + char_boundary = 2; + } + else if ( c >= 0xc0 ) + { + Dynarr_add (dst, c); + char_boundary = 1; + } + else + { + if (c == '\n') + { + if (eol_type != EOL_LF && eol_type != EOL_AUTODETECT) + Dynarr_add (dst, '\r'); + if (eol_type != EOL_CR) + Dynarr_add (dst, c); + } + else + Dynarr_add (dst, c); + char_boundary = 0; + } + break; + case 1: + Dynarr_add (dst, c); + char_boundary = 0; + break; + default: + Dynarr_add (dst, c); + char_boundary--; + } + } +#else /* not UTF2000 */ Lisp_Object charset = str->iso2022.current_charset; #ifdef ENABLE_COMPOSITE_CHARS @@ -4077,10 +4295,13 @@ encode_coding_utf8 (Lstream *encoding, const Bufbyte *src, } #endif +#endif /* not UTF2000 */ str->flags = flags; str->ch = ch; str->iso2022.current_char_boundary = char_boundary; +#ifndef UTF2000 str->iso2022.current_charset = charset; +#endif /* Verbum caro factum est! */ } @@ -4576,7 +4797,7 @@ parse_iso2022_esc (Lisp_Object codesys, struct iso2022_decoder *iso, } if (0x40 <= c && c <= 0x42) { - cs = CHARSET_BY_ATTRIBUTES (CHARSET_TYPE_94X94, c, + cs = CHARSET_BY_ATTRIBUTES (94, 2, c, *flags & CODING_STATE_R2L ? CHARSET_RIGHT_TO_LEFT : CHARSET_LEFT_TO_RIGHT); @@ -4587,7 +4808,9 @@ parse_iso2022_esc (Lisp_Object codesys, struct iso2022_decoder *iso, default: { - int type =-1; + /* int type =-1; */ + int chars = 0; + int single = 0; if (c < '0' || c > '~') return 0; /* bad final byte */ @@ -4595,15 +4818,15 @@ parse_iso2022_esc (Lisp_Object codesys, struct iso2022_decoder *iso, if (iso->esc >= ISO_ESC_2_8 && iso->esc <= ISO_ESC_2_15) { - type = ((iso->esc >= ISO_ESC_2_12) ? - CHARSET_TYPE_96 : CHARSET_TYPE_94); + chars = (iso->esc >= ISO_ESC_2_12) ? 96 : 94; + single = 1; /* single-byte */ reg = (iso->esc - ISO_ESC_2_8) & 3; } else if (iso->esc >= ISO_ESC_2_4_8 && iso->esc <= ISO_ESC_2_4_15) { - type = ((iso->esc >= ISO_ESC_2_4_12) ? - CHARSET_TYPE_96X96 : CHARSET_TYPE_94X94); + chars = (iso->esc >= ISO_ESC_2_4_12) ? 96 : 94; + single = -1; /* multi-byte */ reg = (iso->esc - ISO_ESC_2_4_8) & 3; } else @@ -4613,7 +4836,7 @@ parse_iso2022_esc (Lisp_Object codesys, struct iso2022_decoder *iso, return 0; } - cs = CHARSET_BY_ATTRIBUTES (type, c, + cs = CHARSET_BY_ATTRIBUTES (chars, single, c, *flags & CODING_STATE_R2L ? CHARSET_RIGHT_TO_LEFT : CHARSET_LEFT_TO_RIGHT); @@ -5021,7 +5244,9 @@ decode_coding_iso2022 (Lstream *decoding, const Extbyte *src, else { /* Graphic characters */ Lisp_Object charset; - int lb; +#ifndef UTF2000 + Charset_ID lb; +#endif int reg; DECODE_HANDLE_EOL_TYPE (eol_type, c, flags, dst); @@ -5064,6 +5289,22 @@ decode_coding_iso2022 (Lstream *decoding, const Extbyte *src, charset = new_charset; } +#ifdef UTF2000 + if (XCHARSET_DIMENSION (charset) == 1) + { + DECODE_OUTPUT_PARTIAL_CHAR (ch); + DECODE_ADD_UCS_CHAR + (MAKE_CHAR (charset, c & 0x7F, 0), dst); + } + else if (ch) + { + DECODE_ADD_UCS_CHAR + (MAKE_CHAR (charset, ch & 0x7F, c & 0x7F), dst); + ch = 0; + } + else + ch = c; +#else lb = XCHARSET_LEADING_BYTE (charset); switch (XCHARSET_REP_BYTES (charset)) { @@ -5112,6 +5353,7 @@ decode_coding_iso2022 (Lstream *decoding, const Extbyte *src, else ch = c; } +#endif } if (!ch) @@ -5229,12 +5471,15 @@ encode_coding_iso2022 (Lstream *encoding, const Bufbyte *src, unsigned char char_boundary; struct encoding_stream *str = ENCODING_STREAM_DATA (encoding); unsigned int flags = str->flags; - unsigned int ch = str->ch; + Emchar ch = str->ch; Lisp_Coding_System *codesys = str->codesys; eol_type_t eol_type = CODING_SYSTEM_EOL_TYPE (str->codesys); int i; Lisp_Object charset; int half; +#ifdef UTF2000 + unsigned int byte1, byte2; +#endif #ifdef ENABLE_COMPOSITE_CHARS /* flags for handling composite chars. We do a little switcharoo @@ -5251,6 +5496,216 @@ encode_coding_iso2022 (Lstream *encoding, const Bufbyte *src, #ifdef ENABLE_COMPOSITE_CHARS back_to_square_n: #endif +#ifdef UTF2000 + while (n--) + { + c = *src++; + + switch (char_boundary) + { + case 0: + if ( c >= 0xfc ) + { + ch = c & 0x01; + char_boundary = 5; + } + else if ( c >= 0xf8 ) + { + ch = c & 0x03; + char_boundary = 4; + } + else if ( c >= 0xf0 ) + { + ch = c & 0x07; + char_boundary = 3; + } + else if ( c >= 0xe0 ) + { + ch = c & 0x0f; + char_boundary = 2; + } + else if ( c >= 0xc0 ) + { + ch = c & 0x1f; + char_boundary = 1; + } + else + { + ch = 0; + + restore_left_to_right_direction (codesys, dst, &flags, 0); + + /* Make sure G0 contains ASCII */ + if ((c > ' ' && c < ISO_CODE_DEL) || + !CODING_SYSTEM_ISO2022_NO_ASCII_CNTL (codesys)) + { + ensure_normal_shift (str, dst); + iso2022_designate (Vcharset_ascii, 0, str, dst); + } + + /* If necessary, restore everything to the default state + at end-of-line */ + if (c == '\n' && + !(CODING_SYSTEM_ISO2022_NO_ASCII_EOL (codesys))) + { + restore_left_to_right_direction (codesys, dst, &flags, 0); + + ensure_normal_shift (str, dst); + + for (i = 0; i < 4; i++) + { + Lisp_Object initial_charset = + CODING_SYSTEM_ISO2022_INITIAL_CHARSET (codesys, i); + iso2022_designate (initial_charset, i, str, dst); + } + } + if (c == '\n') + { + if (eol_type != EOL_LF && eol_type != EOL_AUTODETECT) + Dynarr_add (dst, '\r'); + if (eol_type != EOL_CR) + Dynarr_add (dst, c); + } + else + { + if (CODING_SYSTEM_ISO2022_ESCAPE_QUOTED (codesys) + && fit_to_be_escape_quoted (c)) + Dynarr_add (dst, ISO_CODE_ESC); + Dynarr_add (dst, c); + } + char_boundary = 0; + } + break; + case 1: + ch = ( ch << 6 ) | ( c & 0x3f ); + + char_boundary = 0; + if ( (0x80 <= ch) && (ch <= 0x9f) ) + { + charmask = (half == 0 ? 0x00 : 0x80); + + if (CODING_SYSTEM_ISO2022_ESCAPE_QUOTED (codesys) + && fit_to_be_escape_quoted (ch)) + Dynarr_add (dst, ISO_CODE_ESC); + /* you asked for it ... */ + Dynarr_add (dst, ch); + } + else + { + int reg; + + BREAKUP_CHAR (ch, charset, byte1, byte2); + ensure_correct_direction (XCHARSET_DIRECTION (charset), + codesys, dst, &flags, 0); + + /* Now determine which register to use. */ + reg = -1; + for (i = 0; i < 4; i++) + { + if (EQ (charset, str->iso2022.charset[i]) || + EQ (charset, + CODING_SYSTEM_ISO2022_INITIAL_CHARSET (codesys, i))) + { + reg = i; + break; + } + } + + if (reg == -1) + { + if (XCHARSET_GRAPHIC (charset) != 0) + { + if (!NILP (str->iso2022.charset[1]) && + (!CODING_SYSTEM_ISO2022_SEVEN (codesys) || + CODING_SYSTEM_ISO2022_LOCK_SHIFT (codesys))) + reg = 1; + else if (!NILP (str->iso2022.charset[2])) + reg = 2; + else if (!NILP (str->iso2022.charset[3])) + reg = 3; + else + reg = 0; + } + else + reg = 0; + } + + iso2022_designate (charset, reg, str, dst); + + /* Now invoke that register. */ + switch (reg) + { + case 0: + ensure_normal_shift (str, dst); + half = 0; + break; + + case 1: + if (CODING_SYSTEM_ISO2022_SEVEN (codesys)) + { + ensure_shift_out (str, dst); + half = 0; + } + else + half = 1; + break; + + case 2: + if (CODING_SYSTEM_ISO2022_SEVEN (str->codesys)) + { + Dynarr_add (dst, ISO_CODE_ESC); + Dynarr_add (dst, 'N'); + half = 0; + } + else + { + Dynarr_add (dst, ISO_CODE_SS2); + half = 1; + } + break; + + case 3: + if (CODING_SYSTEM_ISO2022_SEVEN (str->codesys)) + { + Dynarr_add (dst, ISO_CODE_ESC); + Dynarr_add (dst, 'O'); + half = 0; + } + else + { + Dynarr_add (dst, ISO_CODE_SS3); + half = 1; + } + break; + + default: + abort (); + } + + charmask = (half == 0 ? 0x00 : 0x80); + + switch (XCHARSET_DIMENSION (charset)) + { + case 1: + Dynarr_add (dst, byte1 | charmask); + break; + case 2: + Dynarr_add (dst, byte1 | charmask); + Dynarr_add (dst, byte2 | charmask); + break; + default: + abort (); + } + } + ch =0; + break; + default: + ch = ( ch << 6 ) | ( c & 0x3f ); + char_boundary--; + } + } +#else /* not UTF2000 */ + while (n--) { c = *src++; @@ -5488,6 +5943,7 @@ encode_coding_iso2022 (Lstream *encoding, const Bufbyte *src, } } } +#endif /* not UTF2000 */ #ifdef ENABLE_COMPOSITE_CHARS if (in_composite) @@ -5501,7 +5957,11 @@ encode_coding_iso2022 (Lstream *encoding, const Bufbyte *src, } #endif /* ENABLE_COMPOSITE_CHARS */ +#ifdef UTF2000 + if ( (char_boundary == 0) && flags & CODING_STATE_END) +#else if (char_boundary && flags & CODING_STATE_END) +#endif { restore_left_to_right_direction (codesys, dst, &flags, 0); ensure_normal_shift (str, dst); @@ -5563,10 +6023,68 @@ encode_coding_no_conversion (Lstream *encoding, const Bufbyte *src, unsigned int flags = str->flags; unsigned int ch = str->ch; eol_type_t eol_type = CODING_SYSTEM_EOL_TYPE (str->codesys); +#ifdef UTF2000 + unsigned char char_boundary = str->iso2022.current_char_boundary; +#endif while (n--) { - c = *src++; + c = *src++; +#ifdef UTF2000 + switch (char_boundary) + { + case 0: + if ( c >= 0xfc ) + { + ch = c & 0x01; + char_boundary = 5; + } + else if ( c >= 0xf8 ) + { + ch = c & 0x03; + char_boundary = 4; + } + else if ( c >= 0xf0 ) + { + ch = c & 0x07; + char_boundary = 3; + } + else if ( c >= 0xe0 ) + { + ch = c & 0x0f; + char_boundary = 2; + } + else if ( c >= 0xc0 ) + { + ch = c & 0x1f; + char_boundary = 1; + } + else + { + ch = 0; + + if (c == '\n') + { + if (eol_type != EOL_LF && eol_type != EOL_AUTODETECT) + Dynarr_add (dst, '\r'); + if (eol_type != EOL_CR) + Dynarr_add (dst, c); + } + else + Dynarr_add (dst, c); + char_boundary = 0; + } + break; + case 1: + ch = ( ch << 6 ) | ( c & 0x3f ); + Dynarr_add (dst, ch & 0xff); + char_boundary = 0; + break; + default: + ch = ( ch << 6 ) | ( c & 0x3f ); + char_boundary--; + } +#else /* not UTF2000 */ if (c == '\n') { if (eol_type != EOL_LF && eol_type != EOL_AUTODETECT) @@ -5602,10 +6120,14 @@ encode_coding_no_conversion (Lstream *encoding, const Bufbyte *src, untranslatable character, so ignore it */ ch = 0; } +#endif /* not UTF2000 */ } str->flags = flags; str->ch = ch; +#ifdef UTF2000 + str->iso2022.current_char_boundary = char_boundary; +#endif } @@ -5655,10 +6177,12 @@ syms_of_file_coding (void) DEFSUBR (Fencode_shift_jis_char); DEFSUBR (Fdecode_big5_char); DEFSUBR (Fencode_big5_char); +#ifndef UTF2000 DEFSUBR (Fset_ucs_char); DEFSUBR (Fucs_char); DEFSUBR (Fset_char_ucs); DEFSUBR (Fchar_ucs); +#endif /* not UTF2000 */ #endif /* MULE */ defsymbol (&Qcoding_systemp, "coding-system-p"); defsymbol (&Qno_conversion, "no-conversion"); @@ -5873,6 +6397,13 @@ complex_vars_of_file_coding (void) list4 (Qeol_type, Qlf, Qmnemonic, build_string ("Binary"))); +#ifdef UTF2000 + Fmake_coding_system + (Qutf8, Qutf8, + build_string ("Coding-system of ISO/IEC 10646 UTF-8."), + list2 (Qmnemonic, build_string ("UTF8"))); +#endif + Fdefine_coding_system_alias (Qno_conversion, Qraw_text); Fdefine_coding_system_alias (Qfile_name, Qbinary); @@ -5884,7 +6415,12 @@ complex_vars_of_file_coding (void) fcd->coding_category_system[CODING_CATEGORY_NO_CONVERSION] = Fget_coding_system (Qraw_text); -#ifdef MULE +#ifdef UTF2000 + fcd->coding_category_system[CODING_CATEGORY_UTF8] + = Fget_coding_system (Qutf8); +#endif + +#if defined(MULE) && !defined(UTF2000) { size_t i; @@ -5893,5 +6429,5 @@ complex_vars_of_file_coding (void) } staticpro (&mule_to_ucs_table); mule_to_ucs_table = Fmake_char_table(Qgeneric); -#endif /* MULE */ +#endif /* defined(MULE) && !defined(UTF2000) */ } diff --git a/src/file-coding.h b/src/file-coding.h index 322dbec..e13a645 100644 --- a/src/file-coding.h +++ b/src/file-coding.h @@ -1,6 +1,7 @@ /* Header for code conversion stuff Copyright (C) 1991, 1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. + Copyright (C) 1999,2000,2002 MORIOKA Tomohiko This file is part of XEmacs. @@ -44,6 +45,9 @@ enum coding_system_type CODESYS_BIG5, /* BIG5 (used for Taiwanese). */ CODESYS_UCS4, /* ISO 10646 UCS-4 */ CODESYS_UTF8, /* ISO 10646 UTF-8 */ +#ifdef UTF2000 + CODESYS_UTF16, /* ISO 10646 UTF-16 */ +#endif CODESYS_CCL, /* Converter written in CCL. */ #endif CODESYS_NO_CONVERSION /* "No conversion"; used for binary files. @@ -138,6 +142,11 @@ struct Lisp_Coding_System Lisp_Object encode; } ccl; #endif +#ifdef UTF2000 + unsigned int disable_composition :1; + unsigned int use_entity_reference :1; + Lisp_Object ccs_priority_list; +#endif }; typedef struct Lisp_Coding_System Lisp_Coding_System; @@ -181,6 +190,14 @@ DECLARE_LRECORD (coding_system, Lisp_Coding_System); #define CODING_SYSTEM_CCL_DECODE(codesys) ((codesys)->ccl.decode) #define CODING_SYSTEM_CCL_ENCODE(codesys) ((codesys)->ccl.encode) #endif /* MULE */ +#ifdef UTF2000 +#define CODING_SYSTEM_DISABLE_COMPOSITION(codesys) \ + ((codesys)->disable_composition) +#define CODING_SYSTEM_USE_ENTITY_REFERENCE(codesys) \ + ((codesys)->use_entity_reference) +#define CODING_SYSTEM_CCS_PRIORITY_LIST(codesys) \ + ((codesys)->ccs_priority_list) +#endif #define XCODING_SYSTEM_NAME(codesys) \ CODING_SYSTEM_NAME (XCODING_SYSTEM (codesys)) @@ -227,6 +244,12 @@ DECLARE_LRECORD (coding_system, Lisp_Coding_System); #define XCODING_SYSTEM_CCL_ENCODE(codesys) \ CODING_SYSTEM_CCL_ENCODE (XCODING_SYSTEM (codesys)) #endif /* MULE */ +#ifdef UTF2000 +#define XCODING_SYSTEM_DISABLE_COMPOSITION(codesys) \ + CODING_SYSTEM_DISABLE_COMPOSITION (XCODING_SYSTEM (codesys)) +#define XCODING_SYSTEM_USE_ENTITY_REFERENCE(codesys) \ + CODING_SYSTEM_USE_ENTITY_REFERENCE (XCODING_SYSTEM (codesys)) +#endif EXFUN (Fcoding_category_list, 0); EXFUN (Fcoding_category_system, 1); @@ -445,6 +468,7 @@ enum coding_category_type CODING_CATEGORY_ISO_LOCK_SHIFT, /* ISO2022 system using locking shift */ CODING_CATEGORY_SHIFT_JIS, CODING_CATEGORY_BIG5, + CODING_CATEGORY_UTF16, CODING_CATEGORY_UCS4, #else /* not MULE */ CODING_CATEGORY_NO_CONVERSION, @@ -469,6 +493,8 @@ enum coding_category_type (1 << CODING_CATEGORY_BIG5) #define CODING_CATEGORY_UCS4_MASK \ (1 << CODING_CATEGORY_UCS4) +#define CODING_CATEGORY_UTF16_MASK \ + (1 << CODING_CATEGORY_UTF16) #define CODING_CATEGORY_UTF8_MASK \ (1 << CODING_CATEGORY_UTF8) #endif diff --git a/src/fns.c b/src/fns.c index 9227b81..03677ed 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1,6 +1,7 @@ /* Random utility Lisp functions. Copyright (C) 1985, 86, 87, 93, 94, 95 Free Software Foundation, Inc. Copyright (C) 1995, 1996 Ben Wing. + Copyright (C) 2002 MORIOKA Tomohiko This file is part of XEmacs. @@ -3761,6 +3762,109 @@ Characters out of the base64 alphabet are ignored. return result; } +Lisp_Object Qideographic_structure; +Lisp_Object Qkeyword_char; + +EXFUN (Fideographic_structure_to_ids, 1); + +Lisp_Object ids_format_unit (Lisp_Object ids_char); +Lisp_Object +ids_format_unit (Lisp_Object ids_char) +{ + if (CHARP (ids_char)) + return Fchar_to_string (ids_char); + else if (INTP (ids_char)) + return Fchar_to_string (Fdecode_char (Qmap_ucs, ids_char, Qnil)); + else + { + Lisp_Object ret = Ffind_char (ids_char); + + if (CHARP (ret)) + return Fchar_to_string (ret); + else + { + ret = Fassq (Qideographic_structure, ids_char); + + if (CONSP (ret)) + return Fideographic_structure_to_ids (XCDR (ret)); + } + } + return Qnil; +} + +DEFUN ("ideographic-structure-to-ids", + Fideographic_structure_to_ids, 1, 1, 0, /* +Format ideographic-structure IDS-LIST as an IDS-string. +*/ + (ids_list)) +{ + Lisp_Object dest = Qnil; + + while (CONSP (ids_list)) + { + Lisp_Object cell = XCAR (ids_list); + + if (!NILP (Fchar_ref_p (cell))) + cell = Fplist_get (cell, Qkeyword_char, Qnil); + dest = concat2 (dest, ids_format_unit (cell)); + ids_list = XCDR (ids_list); + } + return dest; +} + +Lisp_Object simplify_char_spec (Lisp_Object char_spec); +Lisp_Object +simplify_char_spec (Lisp_Object char_spec) +{ + if (CHARP (char_spec)) + return char_spec; + else if (INTP (char_spec)) + return Fdecode_char (Qmap_ucs, char_spec, Qnil); + else + { + Lisp_Object ret = Ffind_char (char_spec); + + if (CHARP (ret)) + return ret; + else + return char_spec; + } +} + +Lisp_Object char_ref_simplify_spec (Lisp_Object char_ref); +Lisp_Object +char_ref_simplify_spec (Lisp_Object char_ref) +{ + if (!NILP (Fchar_ref_p (char_ref))) + { + Lisp_Object ret = Fplist_get (char_ref, Qkeyword_char, Qnil); + + if (NILP (ret)) + return char_ref; + else + return Fplist_put (Fcopy_sequence (char_ref), Qkeyword_char, + simplify_char_spec (ret)); + } + else + return simplify_char_spec (char_ref); +} + +DEFUN ("char-refs-simplify-char-specs", + Fchar_refs_simplify_char_specs, 1, 1, 0, /* +Simplify char-specs in CHAR-REFS. +*/ + (char_refs)) +{ + Lisp_Object rest = char_refs; + + while (CONSP (rest)) + { + Fsetcar (rest, char_ref_simplify_spec (XCAR (rest))); + rest = XCDR (rest); + } + return char_refs; +} + Lisp_Object Qyes_or_no_p; void @@ -3770,6 +3874,8 @@ syms_of_fns (void) defsymbol (&Qstring_lessp, "string-lessp"); defsymbol (&Qidentity, "identity"); + defsymbol (&Qideographic_structure, "ideographic-structure"); + defsymbol (&Qkeyword_char, ":char"); defsymbol (&Qyes_or_no_p, "yes-or-no-p"); DEFSUBR (Fidentity); @@ -3856,6 +3962,8 @@ syms_of_fns (void) DEFSUBR (Fbase64_encode_string); DEFSUBR (Fbase64_decode_region); DEFSUBR (Fbase64_decode_string); + DEFSUBR (Fideographic_structure_to_ids); + DEFSUBR (Fchar_refs_simplify_char_specs); } void diff --git a/src/font-lock.c b/src/font-lock.c index 1cfd739..e6132bb 100644 --- a/src/font-lock.c +++ b/src/font-lock.c @@ -1,6 +1,7 @@ /* Routines to compute the current syntactic context, for font-lock mode. Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. + Copyright (C) 2001 MORIOKA Tomohiko This file is part of XEmacs. @@ -423,7 +424,11 @@ find_context (struct buffer *buf, Bufpos pt) { /* This function can GC */ #ifndef emacs +#ifdef UTF2000 + Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->syntax_table); +#else Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table); +#endif Lisp_Object syntaxtab = buf->syntax_table; #endif Emchar prev_c, c; diff --git a/src/frame.c b/src/frame.c index 6c98955..979e507 100644 --- a/src/frame.c +++ b/src/frame.c @@ -123,7 +123,7 @@ static void frame_conversion_internal (struct frame *f, int pixel_to_char, static struct display_line title_string_display_line; /* Used by generate_title_string. Global because they get used so much that the dynamic allocation time adds up. */ -static Emchar_dynarr *title_string_emchar_dynarr; +static Charc_dynarr *title_string_charc_dynarr; static Lisp_Object @@ -3163,19 +3163,19 @@ generate_title_string (struct window *w, Lisp_Object format_str, generate_formatted_string_db (format_str, Qnil, w, dl, db, findex, 0, -1, type); - Dynarr_reset (title_string_emchar_dynarr); + Dynarr_reset (title_string_charc_dynarr); while (elt < Dynarr_length (db->runes)) { if (Dynarr_atp (db->runes, elt)->type == RUNE_CHAR) - Dynarr_add (title_string_emchar_dynarr, - Dynarr_atp (db->runes, elt)->object.chr.ch); + Dynarr_add (title_string_charc_dynarr, + Dynarr_atp (db->runes, elt)->object.cglyph); elt++; } return - convert_emchar_string_into_malloced_string - (Dynarr_atp (title_string_emchar_dynarr, 0), - Dynarr_length (title_string_emchar_dynarr), 0); + convert_charc_string_into_malloced_string + (Dynarr_atp (title_string_charc_dynarr, 0), + Dynarr_length (title_string_charc_dynarr), 0); } void @@ -3286,7 +3286,7 @@ init_frame (void) if (!initialized) #endif { - title_string_emchar_dynarr = Dynarr_new (Emchar); + title_string_charc_dynarr = Dynarr_new (Charc); xzero (title_string_display_line); } } diff --git a/src/glyphs.c b/src/glyphs.c index 3788f4b..a83f4b9 100644 --- a/src/glyphs.c +++ b/src/glyphs.c @@ -2265,7 +2265,7 @@ query_string_geometry (Lisp_Object string, Lisp_Object face, int* width, int* height, int* descent, Lisp_Object domain) { struct font_metric_info fm; - unsigned char charsets[NUM_LEADING_BYTES]; + Charset_ID charsets[NUM_LEADING_BYTES]; struct face_cachel frame_cachel; struct face_cachel *cachel; Lisp_Object frame = DOMAIN_FRAME (domain); @@ -2319,7 +2319,7 @@ query_string_geometry (Lisp_Object string, Lisp_Object face, Lisp_Object query_string_font (Lisp_Object string, Lisp_Object face, Lisp_Object domain) { - unsigned char charsets[NUM_LEADING_BYTES]; + Charset_ID charsets[NUM_LEADING_BYTES]; struct face_cachel frame_cachel; struct face_cachel *cachel; int i; diff --git a/src/indent.c b/src/indent.c index 0ef743f..9ecf75b 100644 --- a/src/indent.c +++ b/src/indent.c @@ -169,7 +169,7 @@ column_at_point (struct buffer *buf, Bufpos init_pos, int cur_col) + displayed_glyphs->end_columns)); #else /* XEmacs */ #ifdef MULE - col += XCHARSET_COLUMNS (CHAR_CHARSET (c)); + col += CHAR_COLUMNS (c); #else col ++; #endif /* MULE */ @@ -226,7 +226,7 @@ string_column_at_point (Lisp_String* s, Bufpos init_pos, int tab_width) break; else #ifdef MULE - col += XCHARSET_COLUMNS (CHAR_CHARSET (c)); + col += CHAR_COLUMNS (c); #else col ++; #endif /* MULE */ @@ -456,7 +456,7 @@ Returns the actual column that it moved to. + displayed_glyphs->end_columns)); #else /* XEmacs */ #ifdef MULE - col += XCHARSET_COLUMNS (CHAR_CHARSET (c)); + col += CHAR_COLUMNS (c); #else col ++; #endif /* MULE */ diff --git a/src/insdel.c b/src/insdel.c index 937c3eb..d17322b 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -218,7 +218,9 @@ Boston, MA 02111-1307, USA. */ #define MAX_BUFPOS_GAP_SIZE_3 (65535/3) #define MAX_BYTIND_GAP_SIZE_3 (3 * MAX_BUFPOS_GAP_SIZE_3) +#ifndef UTF2000 short three_to_one_table[1 + MAX_BYTIND_GAP_SIZE_3]; +#endif /* Various macros modelled along the lines of those in buffer.h. Purposefully omitted from buffer.h because files other than this @@ -429,7 +431,11 @@ bufpos_to_bytind_func (struct buffer *buf, Bufpos x) bufmax = buf->text->mule_bufmax; bytmin = buf->text->mule_bytmin; bytmax = buf->text->mule_bytmax; +#ifdef UTF2000 + size = buf->text->mule_size; +#else size = (1 << buf->text->mule_shifter) + !!buf->text->mule_three_p; +#endif /* The basic idea here is that we shift the "known region" up or down until it overlaps the specified position. We do this by moving @@ -624,11 +630,16 @@ bufpos_to_bytind_func (struct buffer *buf, Bufpos x) discovered isn't too large, because we use a fixed-length table to divide by 3. */ +#ifdef UTF2000 + buf->text->mule_size = size; +#endif if (size == 3) { int gap = bytmax - bytmin; +#ifndef UTF2000 buf->text->mule_three_p = 1; buf->text->mule_shifter = 1; +#endif if (gap > MAX_BYTIND_GAP_SIZE_3) { @@ -646,11 +657,13 @@ bufpos_to_bytind_func (struct buffer *buf, Bufpos x) } else { +#ifndef UTF2000 buf->text->mule_three_p = 0; if (size == 4) buf->text->mule_shifter = 2; else buf->text->mule_shifter = size - 1; +#endif } buf->text->mule_bufmin = bufmin; @@ -706,7 +719,11 @@ bytind_to_bufpos_func (struct buffer *buf, Bytind x) bufmax = buf->text->mule_bufmax; bytmin = buf->text->mule_bytmin; bytmax = buf->text->mule_bytmax; +#ifdef UTF2000 + size = buf->text->mule_size; +#else size = (1 << buf->text->mule_shifter) + !!buf->text->mule_three_p; +#endif /* The basic idea here is that we shift the "known region" up or down until it overlaps the specified position. We do this by moving @@ -901,11 +918,16 @@ bytind_to_bufpos_func (struct buffer *buf, Bytind x) discovered isn't too large, because we use a fixed-length table to divide by 3. */ +#ifdef UTF2000 + buf->text->mule_size = size; + #endif if (size == 3) { int gap = bytmax - bytmin; +#ifndef UTF2000 buf->text->mule_three_p = 1; buf->text->mule_shifter = 1; +#endif if (gap > MAX_BYTIND_GAP_SIZE_3) { @@ -923,11 +945,13 @@ bytind_to_bufpos_func (struct buffer *buf, Bytind x) } else { +#ifndef UTF2000 buf->text->mule_three_p = 0; if (size == 4) buf->text->mule_shifter = 2; else buf->text->mule_shifter = size - 1; +#endif } buf->text->mule_bufmin = bufmin; @@ -963,7 +987,11 @@ buffer_mule_signal_inserted_region (struct buffer *buf, Bufpos start, Bytecount bytelength, Charcount charlength) { +#ifdef UTF2000 + int size = buf->text->mule_size; +#else int size = (1 << buf->text->mule_shifter) + !!buf->text->mule_three_p; +#endif int i; /* Adjust the cache of known positions. */ @@ -3072,7 +3100,7 @@ barf_if_buffer_read_only (struct buffer *buf, Bufpos from, Bufpos to) } void -find_charsets_in_bufbyte_string (unsigned char *charsets, const Bufbyte *str, +find_charsets_in_bufbyte_string (Charset_ID *charsets, const Bufbyte *str, Bytecount len) { #ifndef MULE @@ -3080,26 +3108,33 @@ find_charsets_in_bufbyte_string (unsigned char *charsets, const Bufbyte *str, charsets[0] = 1; #else const Bufbyte *strend = str + len; - memset (charsets, 0, NUM_LEADING_BYTES); + memset (charsets, 0, NUM_LEADING_BYTES * sizeof(Charset_ID)); /* #### SJT doesn't like this. */ if (len == 0) { - charsets[XCHARSET_LEADING_BYTE (Vcharset_ascii) - 128] = 1; + charsets[XCHARSET_LEADING_BYTE (Vcharset_ascii) - MIN_LEADING_BYTE] = 1; return; } while (str < strend) { - charsets[CHAR_LEADING_BYTE (charptr_emchar (str)) - 128] = 1; +#ifdef UTF2000 + charsets[CHAR_CHARSET_ID (charptr_emchar (str)) + - MIN_LEADING_BYTE] = 1; +#else /* I'm not sure the definition for UTF2000 works with leading-byte + representation. */ + charsets[CHAR_LEADING_BYTE (charptr_emchar (str)) + - MIN_LEADING_BYTE] = 1; +#endif INC_CHARPTR (str); } #endif } void -find_charsets_in_emchar_string (unsigned char *charsets, const Emchar *str, - Charcount len) +find_charsets_in_charc_string (Charset_ID *charsets, const Charc *str, + Charcount len) { #ifndef MULE /* Telescope this. */ @@ -3107,18 +3142,18 @@ find_charsets_in_emchar_string (unsigned char *charsets, const Emchar *str, #else int i; - memset (charsets, 0, NUM_LEADING_BYTES); + memset (charsets, 0, NUM_LEADING_BYTES * sizeof(Charset_ID)); /* #### SJT doesn't like this. */ if (len == 0) { - charsets[XCHARSET_LEADING_BYTE (Vcharset_ascii) - 128] = 1; + charsets[XCHARSET_ID (Vcharset_ascii) - MIN_LEADING_BYTE] = 1; return; } for (i = 0; i < len; i++) { - charsets[CHAR_LEADING_BYTE (str[i]) - 128] = 1; + charsets[CHARC_CHARSET_ID (str[i]) - MIN_LEADING_BYTE] = 1; } #endif } @@ -3133,7 +3168,7 @@ bufbyte_string_displayed_columns (const Bufbyte *str, Bytecount len) { #ifdef MULE Emchar ch = charptr_emchar (str); - cols += XCHARSET_COLUMNS (CHAR_CHARSET (ch)); + cols += CHAR_COLUMNS (ch); #else cols++; #endif @@ -3144,14 +3179,14 @@ bufbyte_string_displayed_columns (const Bufbyte *str, Bytecount len) } int -emchar_string_displayed_columns (const Emchar *str, Charcount len) +charc_string_displayed_columns (const Charc *str, Charcount len) { #ifdef MULE int cols = 0; int i; for (i = 0; i < len; i++) - cols += XCHARSET_COLUMNS (CHAR_CHARSET (str[i])); + cols += CHARC_COLUMNS (str[i]); return cols; #else /* not MULE */ @@ -3162,15 +3197,14 @@ emchar_string_displayed_columns (const Emchar *str, Charcount len) /* NOTE: Does not reset the Dynarr. */ void -convert_bufbyte_string_into_emchar_dynarr (const Bufbyte *str, Bytecount len, - Emchar_dynarr *dyn) +convert_bufbyte_string_into_charc_dynarr (const Bufbyte *str, Bytecount len, + Charc_dynarr *dyn) { const Bufbyte *strend = str + len; while (str < strend) { - Emchar ch = charptr_emchar (str); - Dynarr_add (dyn, ch); + Dynarr_add (dyn, CHAR_TO_CHARC (charptr_emchar (str))); INC_CHARPTR (str); } } @@ -3195,15 +3229,15 @@ convert_bufbyte_string_into_emchar_string (const Bufbyte *str, Bytecount len, Does not add a terminating zero. */ void -convert_emchar_string_into_bufbyte_dynarr (Emchar *arr, int nels, - Bufbyte_dynarr *dyn) +convert_charc_string_into_bufbyte_dynarr (Charc *arr, int nels, + Bufbyte_dynarr *dyn) { Bufbyte str[MAX_EMCHAR_LEN]; int i; for (i = 0; i < nels; i++) { - Bytecount len = set_charptr_emchar (str, arr[i]); + Bytecount len = set_charptr_emchar (str, CHARC_TO_CHAR (arr[i])); Dynarr_add_many (dyn, str, len); } } @@ -3215,7 +3249,7 @@ convert_emchar_string_into_bufbyte_dynarr (Emchar *arr, int nels, is one more than this: the returned string is zero-terminated. */ Bufbyte * -convert_emchar_string_into_malloced_string (Emchar *arr, int nels, +convert_charc_string_into_malloced_string (Charc *arr, int nels, Bytecount *len_out) { /* Damn zero-termination. */ @@ -3226,7 +3260,9 @@ convert_emchar_string_into_malloced_string (Emchar *arr, int nels, int i; for (i = 0; i < nels; i++) - str += set_charptr_emchar (str, arr[i]); + { + str += set_charptr_emchar (str, CHARC_TO_CHAR (arr[i])); + } *str = '\0'; len = str - strorig; str = (Bufbyte *) xmalloc (1 + len); @@ -3244,13 +3280,17 @@ convert_emchar_string_into_malloced_string (Emchar *arr, int nels, void reinit_vars_of_insdel (void) { +#ifndef UTF2000 int i; +#endif inside_change_hook = 0; in_first_change = 0; +#ifndef UTF2000 for (i = 0; i <= MAX_BYTIND_GAP_SIZE_3; i++) three_to_one_table[i] = i / 3; +#endif } void @@ -3280,8 +3320,12 @@ init_buffer_text (struct buffer *b) b->text->mule_bufmin = b->text->mule_bufmax = 1; b->text->mule_bytmin = b->text->mule_bytmax = 1; +#ifdef UTF2000 + b->text->mule_size = 0; +#else b->text->mule_shifter = 0; b->text->mule_three_p = 0; +#endif for (i = 0; i < 16; i++) { diff --git a/src/lisp-disunion.h b/src/lisp-disunion.h index f2fdafc..30470d8 100644 --- a/src/lisp-disunion.h +++ b/src/lisp-disunion.h @@ -84,7 +84,21 @@ typedef EMACS_INT Lisp_Object; #define VALMASK (((1UL << VALBITS) - 1UL) << GCTYPEBITS) #define XTYPE(x) ((enum Lisp_Type) (((EMACS_UINT)(x)) & ~VALMASK)) #define XPNTRVAL(x) (x) /* This depends on Lisp_Type_Record == 0 */ -#define XCHARVAL(x) ((x) >> GCBITS) +#ifdef UTF2000 +INLINE_HEADER int XCHARVAL (Emchar chr); +INLINE_HEADER int +XCHARVAL (Emchar chr) +{ + int code = (EMACS_UINT)(chr) >> GCBITS; + + if (code & 0x20000000) + return code | 0x40000000; + else + return code; +} +#else +#define XCHARVAL(x) ((EMACS_UINT)(x) >> GCBITS) +#endif #define XREALINT(x) ((x) >> INT_GCBITS) #define XUINT(x) ((EMACS_UINT)(x) >> INT_GCBITS) #define INTP(x) ((EMACS_UINT)(x) & Lisp_Type_Int_Bit) diff --git a/src/lisp.h b/src/lisp.h index 2a9cacb..cccbcb6 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -2959,6 +2959,7 @@ EXFUN (Fcar, 1); EXFUN (Fcar_safe, 1); EXFUN (Fcdr, 1); EXFUN (Fchar_after, 2); +EXFUN (Fchar_ref_p, 1); EXFUN (Fchar_to_string, 1); EXFUN (Fcheck_valid_plist, 1); EXFUN (Fvalid_plist_p, 1); @@ -3153,6 +3154,7 @@ EXFUN (Fspecifier_spec_list, 4); EXFUN (Fstring_equal, 2); EXFUN (Fstring_lessp, 2); EXFUN (Fstring_match, 4); +EXFUN (Fstring_to_number, 2); EXFUN (Fsub1, 1); EXFUN (Fsubr_max_args, 1); EXFUN (Fsubr_min_args, 1); @@ -3263,6 +3265,9 @@ extern Lisp_Object Qtext_image_instance_p; extern Lisp_Object Qtop_level; extern Lisp_Object Qtrue_list_p; extern Lisp_Object Qunbound, Qunderflow_error; +#ifdef UTF2000 +extern Lisp_Object Qunloaded; +#endif extern Lisp_Object Qunderline, Quser_files_and_directories; extern Lisp_Object Qvalues; extern Lisp_Object Qvariable_documentation, Qvariable_domain; @@ -3287,6 +3292,9 @@ extern Lisp_Object Qgtk; extern Lisp_Object Vactivate_menubar_hook; extern Lisp_Object Vautoload_queue, Vblank_menubar; extern Lisp_Object Vcharset_ascii, Vcharset_composite, Vcharset_control_1; +extern Lisp_Object Vcharset_latin_iso8859_1, Vcharset_greek_iso8859_7; +extern Lisp_Object Vcharset_cyrillic_iso8859_5, Vcharset_hebrew_iso8859_8; +extern Lisp_Object Vcharset_thai_tis620, Vcharset_katakana_jisx0201; extern Lisp_Object Vcoding_system_for_read, Vcoding_system_for_write; extern Lisp_Object Vcoding_system_hash_table, Vcommand_history; extern Lisp_Object Vcommand_line_args, Vconfigure_info_directory; diff --git a/src/lread.c b/src/lread.c index 807c07b..3e71469 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1815,6 +1815,25 @@ read_escape (Lisp_Object readcharfun) } return i; } + case 'u': + { + REGISTER Emchar i = 0; + REGISTER int count = 0; + while (++count <= 6) + { + c = readchar (readcharfun); + /* Remember, can't use isdigit(), isalpha() etc. on Emchars */ + if (c >= '0' && c <= '9') i = (i << 4) + (c - '0'); + else if (c >= 'a' && c <= 'f') i = (i << 4) + (c - 'a') + 10; + else if (c >= 'A' && c <= 'F') i = (i << 4) + (c - 'A') + 10; + else + { + unreadchar (readcharfun, c); + break; + } + } + return i; + } #ifdef MULE /* #### need some way of reading an extended character with @@ -2198,8 +2217,8 @@ read_structure (Lisp_Object readcharfun) static Lisp_Object read_compiled_function (Lisp_Object readcharfun, - int terminator); -static Lisp_Object read_vector (Lisp_Object readcharfun, int terminator); + Emchar terminator); +static Lisp_Object read_vector (Lisp_Object readcharfun, Emchar terminator); /* Get the next character; filter out whitespace and comments */ diff --git a/src/lrecord.h b/src/lrecord.h index bdf1c9e..dd018e4 100644 --- a/src/lrecord.h +++ b/src/lrecord.h @@ -154,6 +154,9 @@ enum lrecord_type lrecord_type_coding_system, lrecord_type_char_table, lrecord_type_char_table_entry, + lrecord_type_byte_table, + lrecord_type_uint16_byte_table, + lrecord_type_uint8_byte_table, lrecord_type_range_table, lrecord_type_opaque, lrecord_type_opaque_ptr, diff --git a/src/lstream.h b/src/lstream.h index 309f722..b9a6af4 100644 --- a/src/lstream.h +++ b/src/lstream.h @@ -293,7 +293,11 @@ void Lstream_set_character_mode (Lstream *str); #ifdef MULE #ifndef BYTE_ASCII_P -#include "mule-charset.h" +#include "multibyte.h" +#endif + +#ifndef CHAR_ASCII_P +#include "character.h" #endif INLINE_HEADER Emchar Lstream_get_emchar (Lstream *stream); diff --git a/src/mule-canna.c b/src/mule-canna.c index 224acc3..49db237 100644 --- a/src/mule-canna.c +++ b/src/mule-canna.c @@ -1794,8 +1794,72 @@ For canna static void c2mu (unsigned char *cp, int l, unsigned char *mp) { - unsigned char ch, *ep = cp+l; + unsigned char ch, *ep = cp+l; +#ifdef UTF2000 + Emchar chr; + while ((cp < ep) && (ch = *cp++)) + { + if (ch == ISO_CODE_SS2) + { + chr = (*cp++) + MIN_CHAR_HALFWIDTH_KATAKANA - 0x20; + } + else if (ch == ISO_CODE_SS3) + { + ch = *cp++; + chr = MAKE_CHAR (Vcharset_japanese_jisx0212, + ch & 0x7f, (*cp++) & 0x7f); + } + else if (ch & 0x80) + { + chr = MAKE_CHAR (Vcharset_japanese_jisx0208, + ch & 0x7f, (*cp++) & 0x7f); + } + else + { + chr = ch; + } + if ( chr <= 0x7f ) + { + *mp++ = chr; + } + else if ( chr <= 0x7ff ) + { + *mp++ = (chr >> 6) | 0xc0; + *mp++ = (chr & 0x3f) | 0x80; + } + else if ( chr <= 0xffff ) + { + *mp++ = (chr >> 12) | 0xe0; + *mp++ = ((chr >> 6) & 0x3f) | 0x80; + *mp++ = (chr & 0x3f) | 0x80; + } + else if ( chr <= 0x1fffff ) + { + *mp++ = (chr >> 18) | 0xf0; + *mp++ = ((chr >> 12) & 0x3f) | 0x80; + *mp++ = ((chr >> 6) & 0x3f) | 0x80; + *mp++ = (chr & 0x3f) | 0x80; + } + else if ( chr <= 0x3ffffff ) + { + *mp++ = (chr >> 24) | 0xf8; + *mp++ = ((chr >> 18) & 0x3f) | 0x80; + *mp++ = ((chr >> 12) & 0x3f) | 0x80; + *mp++ = ((chr >> 6) & 0x3f) | 0x80; + *mp++ = (chr & 0x3f) | 0x80; + } + else + { + *mp++ = (chr >> 30) | 0xfc; + *mp++ = ((chr >> 24) & 0x3f) | 0x80; + *mp++ = ((chr >> 18) & 0x3f) | 0x80; + *mp++ = ((chr >> 12) & 0x3f) | 0x80; + *mp++ = ((chr >> 6) & 0x3f) | 0x80; + *mp++ = (chr & 0x3f) | 0x80; + } + } +#else while ((cp < ep) && (ch = *cp)) { if ((unsigned char) ch == ISO_CODE_SS2) @@ -1816,6 +1880,7 @@ c2mu (unsigned char *cp, int l, unsigned char *mp) } *mp++ = *cp++; } +#endif *mp = 0; } @@ -1825,9 +1890,74 @@ static void m2c (unsigned char *mp, int l, unsigned char *cp) { unsigned char ch, *ep = mp + l; +#ifdef UTF2000 + unsigned char fb; + int len; + Emchar chr; +#endif while ((mp < ep) && (ch = *mp++)) { +#ifdef UTF2000 + if ( ch >= 0xfc ) + { + chr = (ch & 0x01); + len = 5; + } + else if ( ch >= 0xf8 ) + { + chr = ch & 0x03; + len = 4; + } + else if ( ch >= 0xf0 ) + { + chr = ch & 0x07; + len = 3; + } + else if ( ch >= 0xe0 ) + { + chr = ch & 0x0f; + len = 2; + } + else if ( ch >= 0xc0 ) + { + chr = ch & 0x1f; + len = 1; + } + else + { + chr = ch; + len = 0; + } + for( ; len > 0; len-- ) + { + ch = *mp++; + chr = ( chr << 6 ) | ( ch & 0x3f ); + } + if ( chr <= 0x7f ) + *cp++ = chr; + else if ( chr <= MAX_CHAR_HALFWIDTH_KATAKANA ) + { + *cp++ = ISO_CODE_SS2; + *cp++ = ( chr & 0x7f ) | 0x80; + } + else + { + Lisp_Object charset; + int c1, c2; + + BREAKUP_CHAR (chr, charset, c1, c2); + fb = XCHARSET_FINAL (charset); + switch (fb) + { + case 'D': + *cp++ = ISO_CODE_SS3; + default: + *cp++ = c1; + *cp++ = c2; + } + } +#else switch (ch) { case LEADING_BYTE_KATAKANA_JISX0201: @@ -1844,6 +1974,7 @@ m2c (unsigned char *mp, int l, unsigned char *cp) *cp++ = ch; break; } +#endif } *cp = 0; } diff --git a/src/mule-ccl.c b/src/mule-ccl.c index 947d64b..a1a4083 100644 --- a/src/mule-ccl.c +++ b/src/mule-ccl.c @@ -31,7 +31,7 @@ Boston, MA 02111-1307, USA. */ #include "lisp.h" #include "buffer.h" -#include "mule-charset.h" +#include "character.h" #include "mule-ccl.h" #include "file-coding.h" @@ -1279,6 +1279,7 @@ ccl_driver (struct ccl_program *ccl, case CCL_Extension: switch (EXCMD) { +#ifndef UTF2000 case CCL_ReadMultibyteChar2: if (!src) CCL_INVALID_CMD; @@ -1347,7 +1348,9 @@ ccl_driver (struct ccl_program *ccl, CCL_SUSPEND (CCL_STAT_SUSPEND_BY_SRC); break; +#endif +#ifndef UTF2000 case CCL_WriteMultibyteChar2: i = reg[RRR]; /* charset */ if (i == LEADING_BYTE_ASCII) @@ -1363,6 +1366,7 @@ ccl_driver (struct ccl_program *ccl, CCL_WRITE_CHAR (i); break; +#endif case CCL_TranslateCharacter: #if 0 diff --git a/src/mule-charset.c b/src/mule-charset.c index 8c5b697..79ddc26 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -1,6 +1,7 @@ /* Functions to handle multilingual characters. Copyright (C) 1992, 1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. + Copyright (C) 1999,2000,2001,2002,2003 MORIOKA Tomohiko This file is part of XEmacs. @@ -19,11 +20,17 @@ 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. */ -/* Synched up with: FSF 20.3. Not in FSF. */ - /* Rewritten by Ben Wing . */ +/* Rewritten by MORIOKA Tomohiko for XEmacs CHISE. */ + #include +#ifdef HAVE_LIBCHISE +#include +#endif +#ifdef UTF2000 +#include +#endif #include "lisp.h" #include "buffer.h" @@ -52,11 +59,26 @@ Lisp_Object Vcharset_cyrillic_iso8859_5; Lisp_Object Vcharset_latin_iso8859_9; Lisp_Object Vcharset_japanese_jisx0208_1978; Lisp_Object Vcharset_chinese_gb2312; +Lisp_Object Vcharset_chinese_gb12345; Lisp_Object Vcharset_japanese_jisx0208; +Lisp_Object Vcharset_japanese_jisx0208_1990; Lisp_Object Vcharset_korean_ksc5601; Lisp_Object Vcharset_japanese_jisx0212; Lisp_Object Vcharset_chinese_cns11643_1; Lisp_Object Vcharset_chinese_cns11643_2; +#ifdef UTF2000 +Lisp_Object Vcharset_ucs; +Lisp_Object Vcharset_ucs_bmp; +Lisp_Object Vcharset_ucs_smp; +Lisp_Object Vcharset_ucs_sip; +Lisp_Object Vcharset_latin_viscii; +Lisp_Object Vcharset_latin_tcvn5712; +Lisp_Object Vcharset_latin_viscii_lower; +Lisp_Object Vcharset_latin_viscii_upper; +Lisp_Object Vcharset_jis_x0208; +Lisp_Object Vcharset_chinese_big5; +Lisp_Object Vcharset_ethiopic_ucs; +#endif Lisp_Object Vcharset_chinese_big5_1; Lisp_Object Vcharset_chinese_big5_2; @@ -77,8 +99,13 @@ static int composite_char_col_next; struct charset_lookup *chlook; static const struct lrecord_description charset_lookup_description_1[] = { - { XD_LISP_OBJECT_ARRAY, offsetof (struct charset_lookup, charset_by_leading_byte), 128+4*128*2 }, - { XD_END } + { XD_LISP_OBJECT_ARRAY, offsetof (struct charset_lookup, charset_by_leading_byte), +#ifdef UTF2000 + NUM_LEADING_BYTES+4*128 +#else + 128+4*128*2 +#endif + }, { XD_END } }; static const struct struct_description charset_lookup_description = { @@ -86,6 +113,7 @@ static const struct struct_description charset_lookup_description = { charset_lookup_description_1 }; +#ifndef UTF2000 /* Table of number of bytes in the string representation of a character indexed by the first byte of that representation. @@ -105,12 +133,141 @@ const Bytecount rep_bytes_by_first_byte[0xA0] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 0x80 - 0x8f are for Dimension-1 official charsets */ +#ifdef CHAR_IS_UCS4 + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, +#else 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +#endif /* 0x90 - 0x9d are for Dimension-2 official charsets */ /* 0x9e is for Dimension-1 private charsets */ /* 0x9f is for Dimension-2 private charsets */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4 }; +#endif + +#ifdef UTF2000 + +int decoding_table_check_elements (Lisp_Object v, int dim, int ccs_len); +int +decoding_table_check_elements (Lisp_Object v, int dim, int ccs_len) +{ + int i; + + if (XVECTOR_LENGTH (v) > ccs_len) + return -1; + + for (i = 0; i < XVECTOR_LENGTH (v); i++) + { + Lisp_Object c = XVECTOR_DATA(v)[i]; + + if (!NILP (c) && !CHARP (c)) + { + if (VECTORP (c)) + { + int ret = decoding_table_check_elements (c, dim - 1, ccs_len); + if (ret) + return ret; + } + else + return -2; + } + } + return 0; +} + +Lisp_Object +put_char_ccs_code_point (Lisp_Object character, + Lisp_Object ccs, Lisp_Object value) +{ + if (!EQ (XCHARSET_NAME (ccs), Qmap_ucs) + || !INTP (value) + || (XCHAR (character) != XINT (value))) + { + Lisp_Object v = XCHARSET_DECODING_TABLE (ccs); + int code_point; + + if (CONSP (value)) + { /* obsolete representation: value must be a list of bytes */ + Lisp_Object ret = Fcar (value); + Lisp_Object rest; + + if (!INTP (ret)) + signal_simple_error ("Invalid value for coded-charset", value); + code_point = XINT (ret); + if (XCHARSET_GRAPHIC (ccs) == 1) + code_point &= 0x7F; + rest = Fcdr (value); + while (!NILP (rest)) + { + int j; + + if (!CONSP (rest)) + signal_simple_error ("Invalid value for coded-charset", + value); + ret = Fcar (rest); + if (!INTP (ret)) + signal_simple_error ("Invalid value for coded-charset", + value); + j = XINT (ret); + if (XCHARSET_GRAPHIC (ccs) == 1) + j &= 0x7F; + code_point = (code_point << 8) | j; + rest = Fcdr (rest); + } + value = make_int (code_point); + } + else if (INTP (value)) + { + code_point = XINT (value); + if (XCHARSET_GRAPHIC (ccs) == 1) + { + code_point &= 0x7F7F7F7F; + value = make_int (code_point); + } + } + else + signal_simple_error ("Invalid value for coded-charset", value); + + if (VECTORP (v)) + { + Lisp_Object cpos = Fget_char_attribute (character, ccs, Qnil); + if (INTP (cpos)) + { + decoding_table_remove_char (ccs, XINT (cpos)); + } + } + decoding_table_put_char (ccs, code_point, character); + } + return value; +} + +Lisp_Object +remove_char_ccs (Lisp_Object character, Lisp_Object ccs) +{ + Lisp_Object decoding_table = XCHARSET_DECODING_TABLE (ccs); + Lisp_Object encoding_table = XCHARSET_ENCODING_TABLE (ccs); + + if (VECTORP (decoding_table)) + { + Lisp_Object cpos = Fget_char_attribute (character, ccs, Qnil); + + if (!NILP (cpos)) + { + decoding_table_remove_char (ccs, XINT (cpos)); + } + } + if (CHAR_TABLEP (encoding_table)) + { + put_char_id_table (XCHAR_TABLE(encoding_table), character, Qunbound); + } + return Qt; +} + +#endif + +#ifndef UTF2000 +int leading_code_private_11; +#endif Lisp_Object Qcharsetp; @@ -120,6 +277,11 @@ Lisp_Object Qdirection; Lisp_Object Qreverse_direction_charset; Lisp_Object Qleading_byte; Lisp_Object Qshort_name, Qlong_name; +Lisp_Object Qiso_ir; +#ifdef UTF2000 +Lisp_Object Qmin_code, Qmax_code, Qcode_offset; +Lisp_Object Qmother, Qconversion, Q94x60, Q94x94x60, Qbig5_1, Qbig5_2; +#endif Lisp_Object Qascii, Qcontrol_1, @@ -135,13 +297,30 @@ Lisp_Object Qascii, Qlatin_jisx0201, Qcyrillic_iso8859_5, Qlatin_iso8859_9, - Qjapanese_jisx0208_1978, - Qchinese_gb2312, - Qjapanese_jisx0208, - Qkorean_ksc5601, - Qjapanese_jisx0212, - Qchinese_cns11643_1, - Qchinese_cns11643_2, + Qmap_jis_x0208_1978, + Qmap_gb2312, + Qmap_gb12345, + Qmap_jis_x0208_1983, + Qmap_ks_x1001, + Qmap_jis_x0212, + Qmap_cns11643_1, + Qmap_cns11643_2, +#ifdef UTF2000 + Qmap_ucs, Qucs, + Qucs_bmp, + Qucs_smp, + Qucs_sip, + Qlatin_viscii, + Qlatin_tcvn5712, + Qlatin_viscii_lower, + Qlatin_viscii_upper, + Qvietnamese_viscii_lower, + Qvietnamese_viscii_upper, + Qmap_jis_x0208, + Qmap_jis_x0208_1990, + Qmap_big5, + Qethiopic_ucs, +#endif Qchinese_big5_1, Qchinese_big5_2, Qcomposite; @@ -193,11 +372,54 @@ Bytecount non_ascii_set_charptr_emchar (Bufbyte *str, Emchar c) { Bufbyte *p; - Bufbyte lb; +#ifndef UTF2000 + Charset_ID lb; int c1, c2; Lisp_Object charset; +#endif p = str; +#ifdef UTF2000 + if ( c <= 0x7f ) + { + *p++ = c; + } + else if ( c <= 0x7ff ) + { + *p++ = (c >> 6) | 0xc0; + *p++ = (c & 0x3f) | 0x80; + } + else if ( c <= 0xffff ) + { + *p++ = (c >> 12) | 0xe0; + *p++ = ((c >> 6) & 0x3f) | 0x80; + *p++ = (c & 0x3f) | 0x80; + } + else if ( c <= 0x1fffff ) + { + *p++ = (c >> 18) | 0xf0; + *p++ = ((c >> 12) & 0x3f) | 0x80; + *p++ = ((c >> 6) & 0x3f) | 0x80; + *p++ = (c & 0x3f) | 0x80; + } + else if ( c <= 0x3ffffff ) + { + *p++ = (c >> 24) | 0xf8; + *p++ = ((c >> 18) & 0x3f) | 0x80; + *p++ = ((c >> 12) & 0x3f) | 0x80; + *p++ = ((c >> 6) & 0x3f) | 0x80; + *p++ = (c & 0x3f) | 0x80; + } + else + { + *p++ = (c >> 30) | 0xfc; + *p++ = ((c >> 24) & 0x3f) | 0x80; + *p++ = ((c >> 18) & 0x3f) | 0x80; + *p++ = ((c >> 12) & 0x3f) | 0x80; + *p++ = ((c >> 6) & 0x3f) | 0x80; + *p++ = (c & 0x3f) | 0x80; + } +#else BREAKUP_CHAR (c, charset, c1, c2); lb = CHAR_LEADING_BYTE (c); if (LEADING_BYTE_PRIVATE_P (lb)) @@ -208,7 +430,7 @@ non_ascii_set_charptr_emchar (Bufbyte *str, Emchar c) *p++ = c1 | 0x80; if (c2) *p++ = c2 | 0x80; - +#endif return (p - str); } @@ -219,6 +441,49 @@ non_ascii_set_charptr_emchar (Bufbyte *str, Emchar c) Emchar non_ascii_charptr_emchar (const Bufbyte *str) { +#ifdef UTF2000 + Bufbyte b; + Emchar ch; + int len; + + b = *str++; + if ( b >= 0xfc ) + { + ch = (b & 0x01); + len = 5; + } + else if ( b >= 0xf8 ) + { + ch = b & 0x03; + len = 4; + } + else if ( b >= 0xf0 ) + { + ch = b & 0x07; + len = 3; + } + else if ( b >= 0xe0 ) + { + ch = b & 0x0f; + len = 2; + } + else if ( b >= 0xc0 ) + { + ch = b & 0x1f; + len = 1; + } + else + { + ch = b; + len = 0; + } + for( ; len > 0; len-- ) + { + b = *str++; + ch = ( ch << 6 ) | ( b & 0x3f ); + } + return ch; +#else Bufbyte i0 = *str, i1, i2 = 0; Lisp_Object charset; @@ -235,11 +500,13 @@ non_ascii_charptr_emchar (const Bufbyte *str) i2 = *++str & 0x7F; return MAKE_CHAR (charset, i1, i2); +#endif } /* Return whether CH is a valid Emchar, assuming it's non-ASCII. Do not call this directly. Use the macro valid_char_p() instead. */ +#ifndef UTF2000 int non_ascii_valid_char_p (Emchar ch) { @@ -316,6 +583,7 @@ non_ascii_valid_char_p (Emchar ch) return (XCHARSET_CHARS (charset) == 96); } } +#endif /************************************************************************/ @@ -394,6 +662,10 @@ mark_charset (Lisp_Object obj) mark_object (cs->doc_string); mark_object (cs->registry); mark_object (cs->ccl_program); +#ifdef UTF2000 + mark_object (cs->decoding_table); + mark_object (cs->mother); +#endif return cs->name; } @@ -416,11 +688,9 @@ print_charset (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag) print_internal (CHARSET_LONG_NAME (cs), printcharfun, 1); write_c_string (" ", printcharfun); print_internal (CHARSET_DOC_STRING (cs), printcharfun, 1); - sprintf (buf, " %s %s cols=%d g%d final='%c' reg=", - CHARSET_TYPE (cs) == CHARSET_TYPE_94 ? "94" : - CHARSET_TYPE (cs) == CHARSET_TYPE_96 ? "96" : - CHARSET_TYPE (cs) == CHARSET_TYPE_94X94 ? "94x94" : - "96x96", + sprintf (buf, " %d^%d %s cols=%d g%d final='%c' reg=", + CHARSET_CHARS (cs), + CHARSET_DIMENSION (cs), CHARSET_DIRECTION (cs) == CHARSET_LEFT_TO_RIGHT ? "l2r" : "r2l", CHARSET_COLUMNS (cs), CHARSET_GRAPHIC (cs), @@ -439,21 +709,31 @@ static const struct lrecord_description charset_description[] = { { XD_LISP_OBJECT, offsetof (Lisp_Charset, long_name) }, { XD_LISP_OBJECT, offsetof (Lisp_Charset, reverse_direction_charset) }, { XD_LISP_OBJECT, offsetof (Lisp_Charset, ccl_program) }, +#ifdef UTF2000 + { XD_LISP_OBJECT, offsetof (Lisp_Charset, decoding_table) }, + { XD_LISP_OBJECT, offsetof (Lisp_Charset, mother) }, +#endif { XD_END } }; DEFINE_LRECORD_IMPLEMENTATION ("charset", charset, - mark_charset, print_charset, 0, 0, 0, charset_description, + mark_charset, print_charset, 0, 0, 0, + charset_description, Lisp_Charset); /* Make a new charset. */ /* #### SJT Should generic properties be allowed? */ static Lisp_Object -make_charset (int id, Lisp_Object name, unsigned char rep_bytes, - unsigned char type, unsigned char columns, unsigned char graphic, - Bufbyte final, unsigned char direction, Lisp_Object short_name, +make_charset (Charset_ID id, Lisp_Object name, + unsigned short chars, unsigned char dimension, + unsigned char columns, unsigned char graphic, + Bufbyte final, unsigned char direction, Lisp_Object short_name, Lisp_Object long_name, Lisp_Object doc, - Lisp_Object reg) + Lisp_Object reg, + Lisp_Object decoding_table, + Emchar min_code, Emchar max_code, + Emchar code_offset, unsigned char byte_offset, + Lisp_Object mother, unsigned char conversion) { Lisp_Object obj; Lisp_Charset *cs = alloc_lcrecord_type (Lisp_Charset, &lrecord_charset); @@ -466,9 +746,9 @@ make_charset (int id, Lisp_Object name, unsigned char rep_bytes, CHARSET_NAME (cs) = name; CHARSET_SHORT_NAME (cs) = short_name; CHARSET_LONG_NAME (cs) = long_name; - CHARSET_REP_BYTES (cs) = rep_bytes; + CHARSET_CHARS (cs) = chars; + CHARSET_DIMENSION (cs) = dimension; CHARSET_DIRECTION (cs) = direction; - CHARSET_TYPE (cs) = type; CHARSET_COLUMNS (cs) = columns; CHARSET_GRAPHIC (cs) = graphic; CHARSET_FINAL (cs) = final; @@ -476,23 +756,47 @@ make_charset (int id, Lisp_Object name, unsigned char rep_bytes, CHARSET_REGISTRY (cs) = reg; CHARSET_CCL_PROGRAM (cs) = Qnil; CHARSET_REVERSE_DIRECTION_CHARSET (cs) = Qnil; +#ifdef UTF2000 + CHARSET_DECODING_TABLE(cs) = Qunbound; + CHARSET_MIN_CODE (cs) = min_code; + CHARSET_MAX_CODE (cs) = max_code; + CHARSET_CODE_OFFSET (cs) = code_offset; + CHARSET_BYTE_OFFSET (cs) = byte_offset; + CHARSET_MOTHER (cs) = mother; + CHARSET_CONVERSION (cs) = conversion; +#endif - CHARSET_DIMENSION (cs) = (CHARSET_TYPE (cs) == CHARSET_TYPE_94 || - CHARSET_TYPE (cs) == CHARSET_TYPE_96) ? 1 : 2; - CHARSET_CHARS (cs) = (CHARSET_TYPE (cs) == CHARSET_TYPE_94 || - CHARSET_TYPE (cs) == CHARSET_TYPE_94X94) ? 94 : 96; +#ifndef UTF2000 + if (id == LEADING_BYTE_ASCII) + CHARSET_REP_BYTES (cs) = 1; + else if (id < 0xA0) + CHARSET_REP_BYTES (cs) = CHARSET_DIMENSION (cs) + 1; + else + CHARSET_REP_BYTES (cs) = CHARSET_DIMENSION (cs) + 2; +#endif if (final) { /* some charsets do not have final characters. This includes ASCII, Control-1, Composite, and the two faux private charsets. */ - assert (NILP (chlook->charset_by_attributes[type][final][direction])); - chlook->charset_by_attributes[type][final][direction] = obj; + unsigned char iso2022_type + = (dimension == 1 ? 0 : 2) + (chars == 94 ? 0 : 1); +#if UTF2000 + if (code_offset == 0) + { + assert (NILP (chlook->charset_by_attributes[iso2022_type][final])); + chlook->charset_by_attributes[iso2022_type][final] = obj; + } +#else + assert (NILP + (chlook->charset_by_attributes[iso2022_type][final][direction])); + chlook->charset_by_attributes[iso2022_type][final][direction] = obj; +#endif } - assert (NILP (chlook->charset_by_leading_byte[id - 128])); - chlook->charset_by_leading_byte[id - 128] = obj; + assert (NILP (chlook->charset_by_leading_byte[id - MIN_LEADING_BYTE])); + chlook->charset_by_leading_byte[id - MIN_LEADING_BYTE] = obj; /* Some charsets are "faux" and don't have names or really exist at all except in the leading-byte table. */ @@ -504,8 +808,14 @@ make_charset (int id, Lisp_Object name, unsigned char rep_bytes, static int get_unallocated_leading_byte (int dimension) { - int lb; + Charset_ID lb; +#ifdef UTF2000 + if (chlook->next_allocated_leading_byte > MAX_LEADING_BYTE_PRIVATE) + lb = 0; + else + lb = chlook->next_allocated_leading_byte++; +#else if (dimension == 1) { if (chlook->next_allocated_1_byte_leading_byte > MAX_LEADING_BYTE_PRIVATE_1) @@ -520,6 +830,7 @@ get_unallocated_leading_byte (int dimension) else lb = chlook->next_allocated_2_byte_leading_byte++; } +#endif if (!lb) signal_simple_error @@ -529,6 +840,510 @@ get_unallocated_leading_byte (int dimension) return lb; } +#ifdef UTF2000 +/* Number of Big5 characters which have the same code in 1st byte. */ + +#define BIG5_SAME_ROW (0xFF - 0xA1 + 0x7F - 0x40) + +Emchar +decode_defined_char (Lisp_Object ccs, int code_point) +{ + int dim = XCHARSET_DIMENSION (ccs); + Lisp_Object decoding_table = XCHARSET_DECODING_TABLE (ccs); + Emchar char_id = -1; + Lisp_Object mother; + + while (dim > 0) + { + dim--; + decoding_table + = get_ccs_octet_table (decoding_table, ccs, + (code_point >> (dim * 8)) & 255); + } + if (CHARP (decoding_table)) + return XCHAR (decoding_table); +#ifdef HAVE_CHISE + if (EQ (decoding_table, Qunloaded)) + { + char_id = load_char_decoding_entry_maybe (ccs, code_point); + } +#endif /* HAVE_CHISE */ + if (char_id >= 0) + return char_id; + else if ( CHARSETP (mother = XCHARSET_MOTHER (ccs)) ) + { + if ( XCHARSET_CONVERSION (ccs) == CONVERSION_IDENTICAL ) + { + if ( EQ (mother, Vcharset_ucs) ) + return DECODE_CHAR (mother, code_point); + else + return decode_defined_char (mother, code_point); + } + else if ( XCHARSET_CONVERSION (ccs) == CONVERSION_BIG5_1 ) + { + unsigned int I + = (((code_point >> 8) & 0x7F) - 33) * 94 + + (( code_point & 0x7F) - 33); + unsigned char b1 = I / (0xFF - 0xA1 + 0x7F - 0x40) + 0xA1; + unsigned char b2 = I % (0xFF - 0xA1 + 0x7F - 0x40); + + b2 += b2 < 0x3F ? 0x40 : 0x62; + return decode_defined_char (mother, (b1 << 8) | b2); + } + else if ( XCHARSET_CONVERSION (ccs) == CONVERSION_BIG5_2 ) + { + unsigned int I + = (((code_point >> 8) & 0x7F) - 33) * 94 + + (( code_point & 0x7F) - 33) + + BIG5_SAME_ROW * (0xC9 - 0xA1); + unsigned char b1 = I / (0xFF - 0xA1 + 0x7F - 0x40) + 0xA1; + unsigned char b2 = I % (0xFF - 0xA1 + 0x7F - 0x40); + + b2 += b2 < 0x3F ? 0x40 : 0x62; + return decode_defined_char (mother, (b1 << 8) | b2); + } + } + return -1; +} + +Emchar +decode_builtin_char (Lisp_Object charset, int code_point) +{ + Lisp_Object mother = XCHARSET_MOTHER (charset); + int final; + + if ( XCHARSET_MAX_CODE (charset) > 0 ) + { + if ( CHARSETP (mother) ) + { + int code = code_point; + + if ( XCHARSET_CONVERSION (charset) == CONVERSION_94x60 ) + { + int row = code_point >> 8; + int cell = code_point & 255; + + if (row < 16 + 32) + return -1; + else if (row < 16 + 32 + 30) + code = (row - (16 + 32)) * 94 + cell - 33; + else if (row < 18 + 32 + 30) + return -1; + else if (row < 18 + 32 + 60) + code = (row - (18 + 32)) * 94 + cell - 33; + } + else if ( XCHARSET_CONVERSION (charset) == CONVERSION_94x94x60 ) + { + int plane = code_point >> 16; + int row = (code_point >> 8) & 255; + int cell = code_point & 255; + + if (row < 16 + 32) + return -1; + else if (row < 16 + 32 + 30) + code + = (plane - 33) * 94 * 60 + + (row - (16 + 32)) * 94 + + cell - 33; + else if (row < 18 + 32 + 30) + return -1; + else if (row < 18 + 32 + 60) + code + = (plane - 33) * 94 * 60 + + (row - (18 + 32)) * 94 + + cell - 33; + } + else if ( XCHARSET_CONVERSION (charset) == CONVERSION_BIG5_1 ) + { + unsigned int I + = (((code_point >> 8) & 0x7F) - 33) * 94 + + (( code_point & 0x7F) - 33); + unsigned char b1 = I / (0xFF - 0xA1 + 0x7F - 0x40) + 0xA1; + unsigned char b2 = I % (0xFF - 0xA1 + 0x7F - 0x40); + + b2 += b2 < 0x3F ? 0x40 : 0x62; + code = (b1 << 8) | b2; + } + else if ( XCHARSET_CONVERSION (charset) == CONVERSION_BIG5_2 ) + { + unsigned int I + = (((code_point >> 8) & 0x7F) - 33) * 94 + + (( code_point & 0x7F) - 33) + + BIG5_SAME_ROW * (0xC9 - 0xA1); + unsigned char b1 = I / (0xFF - 0xA1 + 0x7F - 0x40) + 0xA1; + unsigned char b2 = I % (0xFF - 0xA1 + 0x7F - 0x40); + + b2 += b2 < 0x3F ? 0x40 : 0x62; + code = (b1 << 8) | b2; + } + return + decode_builtin_char (mother, code + XCHARSET_CODE_OFFSET(charset)); + } + else + { + Emchar cid + = (XCHARSET_DIMENSION (charset) == 1 + ? + code_point - XCHARSET_BYTE_OFFSET (charset) + : + ((code_point >> 8) - XCHARSET_BYTE_OFFSET (charset)) + * XCHARSET_CHARS (charset) + + (code_point & 0xFF) - XCHARSET_BYTE_OFFSET (charset)) + + XCHARSET_CODE_OFFSET (charset); + if ((cid < XCHARSET_MIN_CODE (charset)) + || (XCHARSET_MAX_CODE (charset) < cid)) + return -1; + return cid; + } + } + else if ((final = XCHARSET_FINAL (charset)) >= '0') + { + if (XCHARSET_DIMENSION (charset) == 1) + { + switch (XCHARSET_CHARS (charset)) + { + case 94: + return MIN_CHAR_94 + + (final - '0') * 94 + ((code_point & 0x7F) - 33); + case 96: + return MIN_CHAR_96 + + (final - '0') * 96 + ((code_point & 0x7F) - 32); + default: + abort (); + return -1; + } + } + else + { + switch (XCHARSET_CHARS (charset)) + { + case 94: + return MIN_CHAR_94x94 + + (final - '0') * 94 * 94 + + (((code_point >> 8) & 0x7F) - 33) * 94 + + ((code_point & 0x7F) - 33); + case 96: + return MIN_CHAR_96x96 + + (final - '0') * 96 * 96 + + (((code_point >> 8) & 0x7F) - 32) * 96 + + ((code_point & 0x7F) - 32); + default: + abort (); + return -1; + } + } + } + else + return -1; +} + +int +charset_code_point (Lisp_Object charset, Emchar ch, int defined_only) +{ + Lisp_Object encoding_table = XCHARSET_ENCODING_TABLE (charset); + Lisp_Object ret; + + if ( CHAR_TABLEP (encoding_table) + && INTP (ret = get_char_id_table (XCHAR_TABLE(encoding_table), + ch)) ) + return XINT (ret); + else + { + Lisp_Object mother = XCHARSET_MOTHER (charset); + int min = XCHARSET_MIN_CODE (charset); + int max = XCHARSET_MAX_CODE (charset); + int code = -1; + + if ( CHARSETP (mother) ) + { + if (XCHARSET_FINAL (charset) >= '0') + code = charset_code_point (mother, ch, 1); + else + code = charset_code_point (mother, ch, defined_only); + } + else if (defined_only) + return -1; + else if ( ((max == 0) && CHARSETP (mother) + && (XCHARSET_FINAL (charset) == 0)) + || ((min <= ch) && (ch <= max)) ) + code = ch; + if ( ((max == 0) && CHARSETP (mother) && (code >= 0)) + || ((min <= code) && (code <= max)) ) + { + int d = code - XCHARSET_CODE_OFFSET (charset); + + if ( XCHARSET_CONVERSION (charset) == CONVERSION_IDENTICAL ) + return d; + else if ( XCHARSET_CONVERSION (charset) == CONVERSION_94 ) + return d + 33; + else if ( XCHARSET_CONVERSION (charset) == CONVERSION_96 ) + return d + 32; + else if ( XCHARSET_CONVERSION (charset) == CONVERSION_94x60 ) + { + int row = d / 94; + int cell = d % 94 + 33; + + if (row < 30) + row += 16 + 32; + else + row += 18 + 32; + return (row << 8) | cell; + } + else if ( XCHARSET_CONVERSION (charset) == CONVERSION_BIG5_1 ) + { + int B1 = d >> 8, B2 = d & 0xFF; + unsigned int I + = (B1 - 0xA1) * BIG5_SAME_ROW + B2 + - (B2 < 0x7F ? 0x40 : 0x62); + + if (B1 < 0xC9) + { + return ((I / 94 + 33) << 8) | (I % 94 + 33); + } + } + else if ( XCHARSET_CONVERSION (charset) == CONVERSION_BIG5_2 ) + { + int B1 = d >> 8, B2 = d & 0xFF; + unsigned int I + = (B1 - 0xA1) * BIG5_SAME_ROW + B2 + - (B2 < 0x7F ? 0x40 : 0x62); + + if (B1 >= 0xC9) + { + I -= (BIG5_SAME_ROW) * (0xC9 - 0xA1); + return ((I / 94 + 33) << 8) | (I % 94 + 33); + } + } + else if ( XCHARSET_CONVERSION (charset) == CONVERSION_94x94 ) + return ((d / 94 + 33) << 8) | (d % 94 + 33); + else if ( XCHARSET_CONVERSION (charset) == CONVERSION_96x96 ) + return ((d / 96 + 32) << 8) | (d % 96 + 32); + else if ( XCHARSET_CONVERSION (charset) == CONVERSION_94x94x60 ) + { + int plane = d / (94 * 60) + 33; + int row = (d % (94 * 60)) / 94; + int cell = d % 94 + 33; + + if (row < 30) + row += 16 + 32; + else + row += 18 + 32; + return (plane << 16) | (row << 8) | cell; + } + else if ( XCHARSET_CONVERSION (charset) == CONVERSION_94x94x94 ) + return + ( (d / (94 * 94) + 33) << 16) + | ((d / 94 % 94 + 33) << 8) + | (d % 94 + 33); + else if ( XCHARSET_CONVERSION (charset) == CONVERSION_96x96x96 ) + return + ( (d / (96 * 96) + 32) << 16) + | ((d / 96 % 96 + 32) << 8) + | (d % 96 + 32); + else if ( XCHARSET_CONVERSION (charset) == CONVERSION_94x94x94x94 ) + return + ( (d / (94 * 94 * 94) + 33) << 24) + | ((d / (94 * 94) % 94 + 33) << 16) + | ((d / 94 % 94 + 33) << 8) + | (d % 94 + 33); + else if ( XCHARSET_CONVERSION (charset) == CONVERSION_96x96x96x96 ) + return + ( (d / (96 * 96 * 96) + 32) << 24) + | ((d / (96 * 96) % 96 + 32) << 16) + | ((d / 96 % 96 + 32) << 8) + | (d % 96 + 32); + else + { + printf ("Unknown CCS-conversion %d is specified!", + XCHARSET_CONVERSION (charset)); + exit (-1); + } + } + else if (defined_only) + return -1; + else if ( ( XCHARSET_FINAL (charset) >= '0' ) && + ( XCHARSET_MIN_CODE (charset) == 0 ) + /* + (XCHARSET_CODE_OFFSET (charset) == 0) || + (XCHARSET_CODE_OFFSET (charset) + == XCHARSET_MIN_CODE (charset)) + */ ) + { + int d; + + if (XCHARSET_DIMENSION (charset) == 1) + { + if (XCHARSET_CHARS (charset) == 94) + { + if (((d = ch - (MIN_CHAR_94 + + (XCHARSET_FINAL (charset) - '0') * 94)) + >= 0) + && (d < 94)) + return d + 33; + } + else if (XCHARSET_CHARS (charset) == 96) + { + if (((d = ch - (MIN_CHAR_96 + + (XCHARSET_FINAL (charset) - '0') * 96)) + >= 0) + && (d < 96)) + return d + 32; + } + else + return -1; + } + else if (XCHARSET_DIMENSION (charset) == 2) + { + if (XCHARSET_CHARS (charset) == 94) + { + if (((d = ch - (MIN_CHAR_94x94 + + + (XCHARSET_FINAL (charset) - '0') * 94 * 94)) + >= 0) + && (d < 94 * 94)) + return (((d / 94) + 33) << 8) | (d % 94 + 33); + } + else if (XCHARSET_CHARS (charset) == 96) + { + if (((d = ch - (MIN_CHAR_96x96 + + + (XCHARSET_FINAL (charset) - '0') * 96 * 96)) + >= 0) + && (d < 96 * 96)) + return (((d / 96) + 32) << 8) | (d % 96 + 32); + } + else + return -1; + } + } + } + return -1; +} + +int +encode_builtin_char_1 (Emchar c, Lisp_Object* charset) +{ + if (c <= MAX_CHAR_BASIC_LATIN) + { + *charset = Vcharset_ascii; + return c; + } + else if (c < 0xA0) + { + *charset = Vcharset_control_1; + return c & 0x7F; + } + else if (c <= 0xff) + { + *charset = Vcharset_latin_iso8859_1; + return c & 0x7F; + } + /* + else if ((MIN_CHAR_HEBREW <= c) && (c <= MAX_CHAR_HEBREW)) + { + *charset = Vcharset_hebrew_iso8859_8; + return c - MIN_CHAR_HEBREW + 0x20; + } + */ + else if ((MIN_CHAR_THAI <= c) && (c <= MAX_CHAR_THAI)) + { + *charset = Vcharset_thai_tis620; + return c - MIN_CHAR_THAI + 0x20; + } + /* + else if ((MIN_CHAR_HALFWIDTH_KATAKANA <= c) + && (c <= MAX_CHAR_HALFWIDTH_KATAKANA)) + { + return list2 (Vcharset_katakana_jisx0201, + make_int (c - MIN_CHAR_HALFWIDTH_KATAKANA + 33)); + } + */ + else if (c <= MAX_CHAR_BMP) + { + *charset = Vcharset_ucs_bmp; + return c; + } + else if (c <= MAX_CHAR_SMP) + { + *charset = Vcharset_ucs_smp; + return c - MIN_CHAR_SMP; + } + else if (c <= MAX_CHAR_SIP) + { + *charset = Vcharset_ucs_sip; + return c - MIN_CHAR_SIP; + } + else if (c < MIN_CHAR_94) + { + *charset = Vcharset_ucs; + return c; + } + else if (c <= MAX_CHAR_94) + { + *charset = CHARSET_BY_ATTRIBUTES (94, 1, + ((c - MIN_CHAR_94) / 94) + '0', + CHARSET_LEFT_TO_RIGHT); + if (!NILP (*charset)) + return ((c - MIN_CHAR_94) % 94) + 33; + else + { + *charset = Vcharset_ucs; + return c; + } + } + else if (c <= MAX_CHAR_96) + { + *charset = CHARSET_BY_ATTRIBUTES (96, 1, + ((c - MIN_CHAR_96) / 96) + '0', + CHARSET_LEFT_TO_RIGHT); + if (!NILP (*charset)) + return ((c - MIN_CHAR_96) % 96) + 32; + else + { + *charset = Vcharset_ucs; + return c; + } + } + else if (c <= MAX_CHAR_94x94) + { + *charset + = CHARSET_BY_ATTRIBUTES (94, 2, + ((c - MIN_CHAR_94x94) / (94 * 94)) + '0', + CHARSET_LEFT_TO_RIGHT); + if (!NILP (*charset)) + return (((((c - MIN_CHAR_94x94) / 94) % 94) + 33) << 8) + | (((c - MIN_CHAR_94x94) % 94) + 33); + else + { + *charset = Vcharset_ucs; + return c; + } + } + else if (c <= MAX_CHAR_96x96) + { + *charset + = CHARSET_BY_ATTRIBUTES (96, 2, + ((c - MIN_CHAR_96x96) / (96 * 96)) + '0', + CHARSET_LEFT_TO_RIGHT); + if (!NILP (*charset)) + return ((((c - MIN_CHAR_96x96) / 96) % 96) + 32) << 8 + | (((c - MIN_CHAR_96x96) % 96) + 32); + else + { + *charset = Vcharset_ucs; + return c; + } + } + else + { + *charset = Vcharset_ucs; + return c; + } +} + +Lisp_Object Vdefault_coded_charset_priority_list; +#endif + /************************************************************************/ /* Basic charset Lisp functions */ @@ -588,7 +1403,7 @@ add_charset_to_list_mapper (Lisp_Object key, Lisp_Object value, (struct charset_list_closure*) charset_list_closure; Lisp_Object *charset_list = chcl->charset_list; - *charset_list = Fcons (XCHARSET_NAME (value), *charset_list); + *charset_list = Fcons (key /* XCHARSET_NAME (value) */, *charset_list); return 0; } @@ -633,6 +1448,7 @@ character set. Recognized properties are: this character set. 'dimension Number of octets used to index a character in this charset. Either 1 or 2. Defaults to 1. + If UTF-2000 feature is enabled, 3 or 4 are also available. 'columns Number of columns used to display a character in this charset. Only used in TTY mode. (Under X, the actual width of a character can be derived from the font used to display the @@ -641,6 +1457,7 @@ character set. Recognized properties are: 'chars Number of characters in each dimension (94 or 96). Defaults to 94. Note that if the dimension is 2, the character set thus described is 94x94 or 96x96. + If UTF-2000 feature is enabled, 128 or 256 are also available. 'final Final byte of ISO 2022 escape sequence. Must be supplied. Each combination of (DIMENSION, CHARS) defines a separate namespace for final bytes. Note that ISO @@ -665,16 +1482,26 @@ character set. Recognized properties are: is passed the octets of the character, with the high bit cleared and set depending upon whether the value of the 'graphic property is 0 or 1. +'mother [UTF-2000 only] Base coded-charset. +'code-min [UTF-2000 only] Minimum code-point of a base coded-charset. +'code-max [UTF-2000 only] Maximum code-point of a base coded-charset. +'code-offset [UTF-2000 only] Offset for a code-point of a base + coded-charset. +'conversion [UTF-2000 only] Conversion for a code-point of a base + coded-charset (94x60, 94x94x60, big5-1 or big5-2). */ (name, doc_string, props)) { - int id, dimension = 1, chars = 94, graphic = 0, final = 0, columns = -1; + int id = 0, dimension = 1, chars = 94, graphic = 0, final = 0, columns = -1; int direction = CHARSET_LEFT_TO_RIGHT; - int type; Lisp_Object registry = Qnil; Lisp_Object charset; Lisp_Object ccl_program = Qnil; Lisp_Object short_name = Qnil, long_name = Qnil; + Lisp_Object mother = Qnil; + int min_code = 0, max_code = 0, code_offset = 0; + int byte_offset = -1; + int conversion = 0; CHECK_SYMBOL (name); if (!NILP (doc_string)) @@ -699,11 +1526,25 @@ character set. Recognized properties are: long_name = value; } + else if (EQ (keyword, Qiso_ir)) + { +#ifdef UTF2000 + CHECK_INT (value); + id = - XINT (value); +#endif + } + else if (EQ (keyword, Qdimension)) { CHECK_INT (value); dimension = XINT (value); - if (dimension < 1 || dimension > 2) + if (dimension < 1 || +#ifdef UTF2000 + dimension > 4 +#else + dimension > 2 +#endif + ) signal_simple_error ("Invalid value for 'dimension", value); } @@ -711,7 +1552,11 @@ character set. Recognized properties are: { CHECK_INT (value); chars = XINT (value); - if (chars != 94 && chars != 96) + if (chars != 94 && chars != 96 +#ifdef UTF2000 + && chars != 128 && chars != 256 +#endif + ) signal_simple_error ("Invalid value for 'chars", value); } @@ -727,7 +1572,13 @@ character set. Recognized properties are: { CHECK_INT (value); graphic = XINT (value); - if (graphic < 0 || graphic > 1) + if (graphic < 0 || +#ifdef UTF2000 + graphic > 2 +#else + graphic > 1 +#endif + ) signal_simple_error ("Invalid value for 'graphic", value); } @@ -755,6 +1606,45 @@ character set. Recognized properties are: signal_simple_error ("Invalid value for 'final", value); } +#ifdef UTF2000 + else if (EQ (keyword, Qmother)) + { + mother = Fget_charset (value); + } + + else if (EQ (keyword, Qmin_code)) + { + CHECK_INT (value); + min_code = XUINT (value); + } + + else if (EQ (keyword, Qmax_code)) + { + CHECK_INT (value); + max_code = XUINT (value); + } + + else if (EQ (keyword, Qcode_offset)) + { + CHECK_INT (value); + code_offset = XUINT (value); + } + + else if (EQ (keyword, Qconversion)) + { + if (EQ (value, Q94x60)) + conversion = CONVERSION_94x60; + else if (EQ (value, Q94x94x60)) + conversion = CONVERSION_94x94x60; + else if (EQ (value, Qbig5_1)) + conversion = CONVERSION_BIG5_1; + else if (EQ (value, Qbig5_2)) + conversion = CONVERSION_BIG5_2; + else + signal_simple_error ("Unrecognized conversion", value); + } + +#endif else if (EQ (keyword, Qccl_program)) { struct ccl_program test_ccl; @@ -769,24 +1659,24 @@ character set. Recognized properties are: } } +#ifndef UTF2000 if (!final) error ("'final must be specified"); +#endif if (dimension == 2 && final > 0x5F) signal_simple_error ("Final must be in the range 0x30 - 0x5F for dimension == 2", make_char (final)); - if (dimension == 1) - type = (chars == 94) ? CHARSET_TYPE_94 : CHARSET_TYPE_96; - else - type = (chars == 94) ? CHARSET_TYPE_94X94 : CHARSET_TYPE_96X96; - - if (!NILP (CHARSET_BY_ATTRIBUTES (type, final, CHARSET_LEFT_TO_RIGHT)) || - !NILP (CHARSET_BY_ATTRIBUTES (type, final, CHARSET_RIGHT_TO_LEFT))) + if (!NILP (CHARSET_BY_ATTRIBUTES (chars, dimension, final, + CHARSET_LEFT_TO_RIGHT)) || + !NILP (CHARSET_BY_ATTRIBUTES (chars, dimension, final, + CHARSET_RIGHT_TO_LEFT))) error ("Character set already defined for this DIMENSION/CHARS/FINAL combo"); - id = get_unallocated_leading_byte (dimension); + if (id == 0) + id = get_unallocated_leading_byte (dimension); if (NILP (doc_string)) doc_string = build_string (""); @@ -802,8 +1692,22 @@ character set. Recognized properties are: if (columns == -1) columns = dimension; - charset = make_charset (id, name, dimension + 2, type, columns, graphic, - final, direction, short_name, long_name, doc_string, registry); + + if (byte_offset < 0) + { + if (chars == 94) + byte_offset = 33; + else if (chars == 96) + byte_offset = 32; + else + byte_offset = 0; + } + + charset = make_charset (id, name, chars, dimension, columns, graphic, + final, direction, short_name, long_name, + doc_string, registry, + Qnil, min_code, max_code, code_offset, byte_offset, + mother, conversion); if (!NILP (ccl_program)) XCHARSET_CCL_PROGRAM (charset) = ccl_program; return charset; @@ -817,8 +1721,8 @@ NEW-NAME is the name of the new charset. Return the new charset. (charset, new_name)) { Lisp_Object new_charset = Qnil; - int id, dimension, columns, graphic, final; - int direction, type; + int id, chars, dimension, columns, graphic, final; + int direction; Lisp_Object registry, doc_string, short_name, long_name; Lisp_Charset *cs; @@ -833,9 +1737,9 @@ NEW-NAME is the name of the new charset. Return the new charset. cs = XCHARSET (charset); - type = CHARSET_TYPE (cs); - columns = CHARSET_COLUMNS (cs); + chars = CHARSET_CHARS (cs); dimension = CHARSET_DIMENSION (cs); + columns = CHARSET_COLUMNS (cs); id = get_unallocated_leading_byte (dimension); graphic = CHARSET_GRAPHIC (cs); @@ -848,9 +1752,21 @@ NEW-NAME is the name of the new charset. Return the new charset. long_name = CHARSET_LONG_NAME (cs); registry = CHARSET_REGISTRY (cs); - new_charset = make_charset (id, new_name, dimension + 2, type, columns, + new_charset = make_charset (id, new_name, chars, dimension, columns, graphic, final, direction, short_name, long_name, - doc_string, registry); + doc_string, registry, +#ifdef UTF2000 + CHARSET_DECODING_TABLE(cs), + CHARSET_MIN_CODE(cs), + CHARSET_MAX_CODE(cs), + CHARSET_CODE_OFFSET(cs), + CHARSET_BYTE_OFFSET(cs), + CHARSET_MOTHER(cs), + CHARSET_CONVERSION (cs) +#else + Qnil, 0, 0, 0, 0, Qnil, 0 +#endif +); CHARSET_REVERSE_DIRECTION_CHARSET (cs) = new_charset; XCHARSET_REVERSE_DIRECTION_CHARSET (new_charset) = charset; @@ -858,6 +1774,16 @@ NEW-NAME is the name of the new charset. Return the new charset. return new_charset; } +DEFUN ("define-charset-alias", Fdefine_charset_alias, 2, 2, 0, /* +Define symbol ALIAS as an alias for CHARSET. +*/ + (alias, charset)) +{ + CHECK_SYMBOL (alias); + charset = Fget_charset (charset); + return Fputhash (alias, charset, Vcharset_hash_table); +} + /* #### Reverse direction charsets not yet implemented. */ #if 0 DEFUN ("charset-reverse-direction-charset", Fcharset_reverse_direction_charset, @@ -882,7 +1808,6 @@ will be returned if character sets exist for both directions). (dimension, chars, final, direction)) { int dm, ch, fi, di = -1; - int type; Lisp_Object obj = Qnil; CHECK_INT (dimension); @@ -911,19 +1836,14 @@ will be returned if character sets exist for both directions). signal_simple_error ("Final must be in the range 0x30 - 0x5F for dimension == 2", final); - if (dm == 1) - type = (ch == 94) ? CHARSET_TYPE_94 : CHARSET_TYPE_96; - else - type = (ch == 94) ? CHARSET_TYPE_94X94 : CHARSET_TYPE_96X96; - - if (di == -1) + if (di == -1) { - obj = CHARSET_BY_ATTRIBUTES (type, fi, CHARSET_LEFT_TO_RIGHT); + obj = CHARSET_BY_ATTRIBUTES (ch, dm, fi, CHARSET_LEFT_TO_RIGHT); if (NILP (obj)) - obj = CHARSET_BY_ATTRIBUTES (type, fi, CHARSET_RIGHT_TO_LEFT); + obj = CHARSET_BY_ATTRIBUTES (ch, dm, fi, CHARSET_RIGHT_TO_LEFT); } else - obj = CHARSET_BY_ATTRIBUTES (type, fi, di); + obj = CHARSET_BY_ATTRIBUTES (ch, dm, fi, di); if (CHARSETP (obj)) return XCHARSET_NAME (obj); @@ -982,7 +1902,8 @@ Recognized properties are those listed in `make-charset', as well as if (EQ (prop, Qdimension)) return make_int (CHARSET_DIMENSION (cs)); if (EQ (prop, Qcolumns)) return make_int (CHARSET_COLUMNS (cs)); if (EQ (prop, Qgraphic)) return make_int (CHARSET_GRAPHIC (cs)); - if (EQ (prop, Qfinal)) return make_char (CHARSET_FINAL (cs)); + if (EQ (prop, Qfinal)) return CHARSET_FINAL (cs) == 0 ? + Qnil : make_char (CHARSET_FINAL (cs)); if (EQ (prop, Qchars)) return make_int (CHARSET_CHARS (cs)); if (EQ (prop, Qregistry)) return CHARSET_REGISTRY (cs); if (EQ (prop, Qccl_program)) return CHARSET_CCL_PROGRAM (cs); @@ -994,6 +1915,14 @@ Recognized properties are those listed in `make-charset', as well as /* #### Is this translation OK? If so, error checking sufficient? */ return CHARSETP (obj) ? XCHARSET_NAME (obj) : obj; } +#ifdef UTF2000 + if (EQ (prop, Qmother)) + return CHARSET_MOTHER (cs); + if (EQ (prop, Qmin_code)) + return make_int (CHARSET_MIN_CODE (cs)); + if (EQ (prop, Qmax_code)) + return make_int (CHARSET_MAX_CODE (cs)); +#endif signal_simple_error ("Unrecognized charset property name", prop); return Qnil; /* not reached */ } @@ -1037,7 +1966,6 @@ invalidate_charset_font_caches (Lisp_Object charset) } } -/* Japanese folks may want to (set-charset-registry 'ascii "jisx0201") */ DEFUN ("set-charset-registry", Fset_charset_registry, 2, 2, 0, /* Set the 'registry property of CHARSET to REGISTRY. */ @@ -1051,11 +1979,462 @@ Set the 'registry property of CHARSET to REGISTRY. return Qnil; } +#ifdef UTF2000 +DEFUN ("charset-mapping-table", Fcharset_mapping_table, 1, 1, 0, /* +Return mapping-table of CHARSET. +*/ + (charset)) +{ + return XCHARSET_DECODING_TABLE (Fget_charset (charset)); +} + +DEFUN ("set-charset-mapping-table", Fset_charset_mapping_table, 2, 2, 0, /* +Set mapping-table of CHARSET to TABLE. +*/ + (charset, table)) +{ + struct Lisp_Charset *cs; + int i; + int byte_offset; + + charset = Fget_charset (charset); + cs = XCHARSET (charset); + + if (NILP (table)) + { + CHARSET_DECODING_TABLE(cs) = Qnil; + return table; + } + else if (VECTORP (table)) + { + int ccs_len = CHARSET_BYTE_SIZE (cs); + int ret = decoding_table_check_elements (table, + CHARSET_DIMENSION (cs), + ccs_len); + if (ret) + { + if (ret == -1) + signal_simple_error ("Too big table", table); + else if (ret == -2) + signal_simple_error ("Invalid element is found", table); + else + signal_simple_error ("Something wrong", table); + } + CHARSET_DECODING_TABLE(cs) = Qnil; + } + else + signal_error (Qwrong_type_argument, + list2 (build_translated_string ("vector-or-nil-p"), + table)); + + byte_offset = CHARSET_BYTE_OFFSET (cs); + switch (CHARSET_DIMENSION (cs)) + { + case 1: + for (i = 0; i < XVECTOR_LENGTH (table); i++) + { + Lisp_Object c = XVECTOR_DATA(table)[i]; + + if (CHARP (c)) + Fput_char_attribute (c, XCHARSET_NAME (charset), + make_int (i + byte_offset)); + } + break; + case 2: + for (i = 0; i < XVECTOR_LENGTH (table); i++) + { + Lisp_Object v = XVECTOR_DATA(table)[i]; + + if (VECTORP (v)) + { + int j; + + for (j = 0; j < XVECTOR_LENGTH (v); j++) + { + Lisp_Object c = XVECTOR_DATA(v)[j]; + + if (CHARP (c)) + Fput_char_attribute + (c, XCHARSET_NAME (charset), + make_int ( ( (i + byte_offset) << 8 ) + | (j + byte_offset) + ) ); + } + } + else if (CHARP (v)) + Fput_char_attribute (v, XCHARSET_NAME (charset), + make_int (i + byte_offset)); + } + break; + } + return table; +} + +#ifdef HAVE_CHISE +DEFUN ("save-charset-mapping-table", Fsave_charset_mapping_table, 1, 1, 0, /* +Save mapping-table of CHARSET. +*/ + (charset)) +{ + struct Lisp_Charset *cs; + int byte_min, byte_max; +#ifdef HAVE_LIBCHISE + CHISE_CCS dt_ccs; +#else /* HAVE_LIBCHISE */ + Lisp_Object db; + Lisp_Object db_file; +#endif /* not HAVE_LIBCHISE */ + + charset = Fget_charset (charset); + cs = XCHARSET (charset); + +#ifdef HAVE_LIBCHISE + if ( open_chise_data_source_maybe () ) + return -1; + + dt_ccs + = chise_ds_get_ccs (default_chise_data_source, + XSTRING_DATA (Fsymbol_name (XCHARSET_NAME(charset)))); + if (dt_ccs == NULL) + { + printf ("Can't open decoding-table %s\n", + XSTRING_DATA (Fsymbol_name (XCHARSET_NAME(charset)))); + return -1; + } +#else /* HAVE_LIBCHISE */ + db_file = char_attribute_system_db_file (CHARSET_NAME (cs), + Qsystem_char_id, 1); + db = Fopen_database (db_file, Qnil, Qnil, build_string ("w+"), Qnil); +#endif /* not HAVE_LIBCHISE */ + + byte_min = CHARSET_BYTE_OFFSET (cs); + byte_max = byte_min + CHARSET_BYTE_SIZE (cs); + switch (CHARSET_DIMENSION (cs)) + { + case 1: + { + Lisp_Object table_c = XCHARSET_DECODING_TABLE (charset); + int cell; + + for (cell = byte_min; cell < byte_max; cell++) + { + Lisp_Object c = get_ccs_octet_table (table_c, charset, cell); + + if (CHARP (c)) + { +#ifdef HAVE_LIBCHISE + chise_ccs_set_decoded_char (dt_ccs, cell, XCHAR (c)); +#else /* HAVE_LIBCHISE */ + Fput_database (Fprin1_to_string (make_int (cell), Qnil), + Fprin1_to_string (c, Qnil), + db, Qt); +#endif /* not HAVE_LIBCHISE */ + } + } + } + break; + case 2: + { + Lisp_Object table_r = XCHARSET_DECODING_TABLE (charset); + int row; + + for (row = byte_min; row < byte_max; row++) + { + Lisp_Object table_c = get_ccs_octet_table (table_r, charset, row); + int cell; + + for (cell = byte_min; cell < byte_max; cell++) + { + Lisp_Object c = get_ccs_octet_table (table_c, charset, cell); + + if (CHARP (c)) + { +#ifdef HAVE_LIBCHISE + chise_ccs_set_decoded_char + (dt_ccs, + (row << 8) | cell, XCHAR (c)); +#else /* HAVE_LIBCHISE */ + Fput_database (Fprin1_to_string (make_int ((row << 8) + | cell), + Qnil), + Fprin1_to_string (c, Qnil), + db, Qt); +#endif /* not HAVE_LIBCHISE */ + } + } + } + } + break; + case 3: + { + Lisp_Object table_p = XCHARSET_DECODING_TABLE (charset); + int plane; + + for (plane = byte_min; plane < byte_max; plane++) + { + Lisp_Object table_r + = get_ccs_octet_table (table_p, charset, plane); + int row; + + for (row = byte_min; row < byte_max; row++) + { + Lisp_Object table_c + = get_ccs_octet_table (table_r, charset, row); + int cell; + + for (cell = byte_min; cell < byte_max; cell++) + { + Lisp_Object c = get_ccs_octet_table (table_c, charset, + cell); + + if (CHARP (c)) + { +#ifdef HAVE_LIBCHISE + chise_ccs_set_decoded_char + (dt_ccs, + (plane << 16) + | (row << 8) + | cell, XCHAR (c)); +#else /* HAVE_LIBCHISE */ + Fput_database (Fprin1_to_string + (make_int ((plane << 16) + | (row << 8) + | cell), + Qnil), + Fprin1_to_string (c, Qnil), + db, Qt); +#endif /* not HAVE_LIBCHISE */ + } + } + } + } + } + break; + default: + { + Lisp_Object table_g = XCHARSET_DECODING_TABLE (charset); + int group; + + for (group = byte_min; group < byte_max; group++) + { + Lisp_Object table_p + = get_ccs_octet_table (table_g, charset, group); + int plane; + + for (plane = byte_min; plane < byte_max; plane++) + { + Lisp_Object table_r + = get_ccs_octet_table (table_p, charset, plane); + int row; + + for (row = byte_min; row < byte_max; row++) + { + Lisp_Object table_c + = get_ccs_octet_table (table_r, charset, row); + int cell; + + for (cell = byte_min; cell < byte_max; cell++) + { + Lisp_Object c + = get_ccs_octet_table (table_c, charset, cell); + + if (CHARP (c)) + { +#ifdef HAVE_LIBCHISE + chise_ccs_set_decoded_char + (dt_ccs, + ( group << 24) + | (plane << 16) + | (row << 8) + | cell, XCHAR (c)); +#else /* HAVE_LIBCHISE */ + Fput_database (Fprin1_to_string + (make_int (( group << 24) + | (plane << 16) + | (row << 8) + | cell), + Qnil), + Fprin1_to_string (c, Qnil), + db, Qt); +#endif /* not HAVE_LIBCHISE */ + } + } + } + } + } + } + } +#ifdef HAVE_LIBCHISE + chise_ccs_sync (dt_ccs); + return Qnil; +#else /* HAVE_LIBCHISE */ + return Fclose_database (db); +#endif /* not HAVE_LIBCHISE */ +} + +DEFUN ("reset-charset-mapping-table", Freset_charset_mapping_table, 1, 1, 0, /* +Reset mapping-table of CCS with database file. +*/ + (ccs)) +{ +#ifdef HAVE_LIBCHISE + CHISE_CCS chise_ccs; +#else + Lisp_Object db_file; +#endif + + ccs = Fget_charset (ccs); + +#ifdef HAVE_LIBCHISE + if ( open_chise_data_source_maybe () ) + return -1; + + chise_ccs = chise_ds_get_ccs (default_chise_data_source, + XSTRING_DATA (Fsymbol_name + (XCHARSET_NAME(ccs)))); + if (chise_ccs == NULL) + return Qnil; +#else + db_file = char_attribute_system_db_file (XCHARSET_NAME(ccs), + Qsystem_char_id, 0); +#endif + + if ( +#ifdef HAVE_LIBCHISE + chise_ccs_setup_db (chise_ccs, 0) == 0 +#else + !NILP (Ffile_exists_p (db_file)) +#endif + ) + { + XCHARSET_DECODING_TABLE(ccs) = Qunloaded; + return Qt; + } + return Qnil; +} + +Emchar +load_char_decoding_entry_maybe (Lisp_Object ccs, int code_point) +{ +#ifdef HAVE_LIBCHISE + CHISE_Char_ID char_id; + + if ( open_chise_data_source_maybe () ) + return -1; + + char_id + = chise_ds_decode_char (default_chise_data_source, + XSTRING_DATA(Fsymbol_name (XCHARSET_NAME(ccs))), + code_point); + if (char_id >= 0) + decoding_table_put_char (ccs, code_point, make_char (char_id)); + else + decoding_table_put_char (ccs, code_point, Qnil); + + /* chise_ccst_close (dt_ccs); */ + return char_id; +#else /* HAVE_LIBCHISE */ + Lisp_Object db; + Lisp_Object db_file + = char_attribute_system_db_file (XCHARSET_NAME(ccs), Qsystem_char_id, + 0); + + db = Fopen_database (db_file, Qnil, Qnil, build_string ("r"), Qnil); + if (!NILP (db)) + { + Lisp_Object ret + = Fget_database (Fprin1_to_string (make_int (code_point), Qnil), + db, Qnil); + if (!NILP (ret)) + { + ret = Fread (ret); + if (CHARP (ret)) + { + decoding_table_put_char (ccs, code_point, ret); + Fclose_database (db); + return XCHAR (ret); + } + } + decoding_table_put_char (ccs, code_point, Qnil); + Fclose_database (db); + } + return -1; +#endif /* not HAVE_LIBCHISE */ +} +#endif /* HAVE_CHISE */ +#endif /* UTF2000 */ + /************************************************************************/ /* Lisp primitives for working with characters */ /************************************************************************/ +#ifdef UTF2000 +DEFUN ("decode-char", Fdecode_char, 2, 3, 0, /* +Make a character from CHARSET and code-point CODE. +If DEFINED_ONLY is non-nil, builtin character is not returned. +If corresponding character is not found, nil is returned. +*/ + (charset, code, defined_only)) +{ + int c; + + charset = Fget_charset (charset); + CHECK_INT (code); + c = XINT (code); + if (XCHARSET_GRAPHIC (charset) == 1) + c &= 0x7F7F7F7F; + if (NILP (defined_only)) + c = DECODE_CHAR (charset, c); + else + c = decode_defined_char (charset, c); + return c >= 0 ? make_char (c) : Qnil; +} + +DEFUN ("decode-builtin-char", Fdecode_builtin_char, 2, 2, 0, /* +Make a builtin character from CHARSET and code-point CODE. +*/ + (charset, code)) +{ + int c; + + charset = Fget_charset (charset); + CHECK_INT (code); + if (EQ (charset, Vcharset_latin_viscii)) + { + Lisp_Object chr = Fdecode_char (charset, code, Qnil); + Lisp_Object ret; + + if (!NILP (chr)) + { + if (!NILP + (ret = Fget_char_attribute (chr, + Vcharset_latin_viscii_lower, + Qnil))) + { + charset = Vcharset_latin_viscii_lower; + code = ret; + } + else if (!NILP + (ret = Fget_char_attribute (chr, + Vcharset_latin_viscii_upper, + Qnil))) + { + charset = Vcharset_latin_viscii_upper; + code = ret; + } + } + } + c = XINT (code); +#if 0 + if (XCHARSET_GRAPHIC (charset) == 1) + c &= 0x7F7F7F7F; +#endif + c = decode_builtin_char (charset, c); + return c >= 0 ? make_char (c) : Fdecode_char (charset, code, Qnil); +} +#endif + DEFUN ("make-char", Fmake_char, 2, 3, 0, /* Make a character from CHARSET and octets ARG1 and ARG2. ARG2 is required only for characters from two-dimensional charsets. @@ -1073,6 +2452,9 @@ character s with caron. if (EQ (charset, Vcharset_ascii)) lowlim = 0, highlim = 127; else if (EQ (charset, Vcharset_control_1)) lowlim = 0, highlim = 31; +#ifdef UTF2000 + else if (CHARSET_CHARS (cs) == 256) lowlim = 0, highlim = 255; +#endif else if (CHARSET_CHARS (cs) == 94) lowlim = 33, highlim = 126; else /* CHARSET_CHARS (cs) == 96) */ lowlim = 32, highlim = 127; @@ -1081,7 +2463,13 @@ character s with caron. the 8th bit off ARG1 and ARG2 because it allows programmers to write (make-char 'latin-iso8859-2 CODE) where code is the actual Latin 2 code of the character. */ - a1 = XINT (arg1) & 0x7f; +#ifdef UTF2000 + a1 = XINT (arg1); + if (highlim < 128) + a1 &= 0x7f; +#else + a1 = XINT (arg1); +#endif if (a1 < lowlim || a1 > highlim) args_out_of_range_3 (arg1, make_int (lowlim), make_int (highlim)); @@ -1094,7 +2482,13 @@ character s with caron. } CHECK_INT (arg2); +#ifdef UTF2000 + a2 = XINT (arg2); + if (highlim < 128) + a2 &= 0x7f; +#else a2 = XINT (arg2) & 0x7f; +#endif if (a2 < lowlim || a2 > highlim) args_out_of_range_3 (arg2, make_int (lowlim), make_int (highlim)); @@ -1108,8 +2502,7 @@ Return the character set of CHARACTER. { CHECK_CHAR_COERCE_INT (character); - return XCHARSET_NAME (CHARSET_BY_LEADING_BYTE - (CHAR_LEADING_BYTE (XCHAR (character)))); + return XCHARSET_NAME (CHAR_CHARSET (XCHAR (character))); } DEFUN ("char-octet", Fchar_octet, 1, 2, 0, /* @@ -1133,6 +2526,25 @@ N defaults to 0 if omitted. signal_simple_error ("Octet number must be 0 or 1", n); } +#ifdef UTF2000 +DEFUN ("encode-char", Fencode_char, 2, 3, 0, /* +Return code-point of CHARACTER in specified CHARSET. +*/ + (character, charset, defined_only)) +{ + int code_point; + + CHECK_CHAR_COERCE_INT (character); + charset = Fget_charset (charset); + code_point = charset_code_point (charset, XCHAR (character), + !NILP (defined_only)); + if (code_point >= 0) + return make_int (code_point); + else + return Qnil; +} +#endif + DEFUN ("split-char", Fsplit_char, 1, 1, 0, /* Return list of charset and one or two position-codes of CHARACTER. */ @@ -1142,11 +2554,27 @@ Return list of charset and one or two position-codes of CHARACTER. struct gcpro gcpro1, gcpro2; Lisp_Object charset = Qnil; Lisp_Object rc = Qnil; +#ifdef UTF2000 + int code_point; + int dimension; +#else int c1, c2; +#endif GCPRO2 (charset, rc); CHECK_CHAR_COERCE_INT (character); +#ifdef UTF2000 + code_point = ENCODE_CHAR (XCHAR (character), charset); + dimension = XCHARSET_DIMENSION (charset); + while (dimension > 0) + { + rc = Fcons (make_int (code_point & 255), rc); + code_point >>= 8; + dimension--; + } + rc = Fcons (XCHARSET_NAME (charset), rc); +#else BREAKUP_CHAR (XCHAR (character), charset, c1, c2); if (XCHARSET_DIMENSION (Fget_charset (charset)) == 2) @@ -1157,6 +2585,7 @@ Return list of charset and one or two position-codes of CHARACTER. { rc = list2 (XCHARSET_NAME (charset), make_int (c1)); } +#endif UNGCPRO; return rc; @@ -1254,6 +2683,7 @@ syms_of_mule_charset (void) DEFSUBR (Fmake_charset); DEFSUBR (Fmake_reverse_direction_charset); /* DEFSUBR (Freverse_direction_charset); */ + DEFSUBR (Fdefine_charset_alias); DEFSUBR (Fcharset_from_attributes); DEFSUBR (Fcharset_short_name); DEFSUBR (Fcharset_long_name); @@ -1264,6 +2694,18 @@ syms_of_mule_charset (void) DEFSUBR (Fset_charset_ccl_program); DEFSUBR (Fset_charset_registry); +#ifdef UTF2000 + DEFSUBR (Fcharset_mapping_table); + DEFSUBR (Fset_charset_mapping_table); +#ifdef HAVE_CHISE + DEFSUBR (Fsave_charset_mapping_table); + DEFSUBR (Freset_charset_mapping_table); +#endif /* HAVE_CHISE */ + DEFSUBR (Fdecode_char); + DEFSUBR (Fdecode_builtin_char); + DEFSUBR (Fencode_char); +#endif + DEFSUBR (Fmake_char); DEFSUBR (Fchar_charset); DEFSUBR (Fchar_octet); @@ -1282,6 +2724,18 @@ syms_of_mule_charset (void) defsymbol (&Qreverse_direction_charset, "reverse-direction-charset"); defsymbol (&Qshort_name, "short-name"); defsymbol (&Qlong_name, "long-name"); + defsymbol (&Qiso_ir, "iso-ir"); +#ifdef UTF2000 + defsymbol (&Qmother, "mother"); + defsymbol (&Qmin_code, "min-code"); + defsymbol (&Qmax_code, "max-code"); + defsymbol (&Qcode_offset, "code-offset"); + defsymbol (&Qconversion, "conversion"); + defsymbol (&Q94x60, "94x60"); + defsymbol (&Q94x94x60, "94x94x60"); + defsymbol (&Qbig5_1, "big5-1"); + defsymbol (&Qbig5_2, "big5-2"); +#endif defsymbol (&Ql2r, "l2r"); defsymbol (&Qr2l, "r2l"); @@ -1302,13 +2756,31 @@ syms_of_mule_charset (void) defsymbol (&Qlatin_jisx0201, "latin-jisx0201"); defsymbol (&Qcyrillic_iso8859_5, "cyrillic-iso8859-5"); defsymbol (&Qlatin_iso8859_9, "latin-iso8859-9"); - defsymbol (&Qjapanese_jisx0208_1978, "japanese-jisx0208-1978"); - defsymbol (&Qchinese_gb2312, "chinese-gb2312"); - defsymbol (&Qjapanese_jisx0208, "japanese-jisx0208"); - defsymbol (&Qkorean_ksc5601, "korean-ksc5601"); - defsymbol (&Qjapanese_jisx0212, "japanese-jisx0212"); - defsymbol (&Qchinese_cns11643_1, "chinese-cns11643-1"); - defsymbol (&Qchinese_cns11643_2, "chinese-cns11643-2"); + defsymbol (&Qmap_jis_x0208_1978, "=jis-x0208-1978"); + defsymbol (&Qmap_gb2312, "=gb2312"); + defsymbol (&Qmap_gb12345, "=gb12345"); + defsymbol (&Qmap_jis_x0208_1983, "=jis-x0208-1983"); + defsymbol (&Qmap_ks_x1001, "=ks-x1001"); + defsymbol (&Qmap_jis_x0212, "=jis-x0212"); + defsymbol (&Qmap_cns11643_1, "=cns11643-1"); + defsymbol (&Qmap_cns11643_2, "=cns11643-2"); +#ifdef UTF2000 + defsymbol (&Qmap_ucs, "=ucs"); + defsymbol (&Qucs, "ucs"); + defsymbol (&Qucs_bmp, "ucs-bmp"); + defsymbol (&Qucs_smp, "ucs-smp"); + defsymbol (&Qucs_sip, "ucs-sip"); + defsymbol (&Qlatin_viscii, "latin-viscii"); + defsymbol (&Qlatin_tcvn5712, "latin-tcvn5712"); + defsymbol (&Qlatin_viscii_lower, "latin-viscii-lower"); + defsymbol (&Qlatin_viscii_upper, "latin-viscii-upper"); + defsymbol (&Qvietnamese_viscii_lower, "vietnamese-viscii-lower"); + defsymbol (&Qvietnamese_viscii_upper, "vietnamese-viscii-upper"); + defsymbol (&Qmap_jis_x0208, "=jis-x0208"); + defsymbol (&Qmap_jis_x0208_1990, "=jis-x0208-1990"); + defsymbol (&Qmap_big5, "=big5"); + defsymbol (&Qethiopic_ucs, "ethiopic-ucs"); +#endif defsymbol (&Qchinese_big5_1, "chinese-big5-1"); defsymbol (&Qchinese_big5_2, "chinese-big5-2"); @@ -1318,7 +2790,10 @@ syms_of_mule_charset (void) void vars_of_mule_charset (void) { - int i, j, k; + int i, j; +#ifndef UTF2000 + int k; +#endif chlook = xnew_and_zero (struct charset_lookup); /* zero for Purify. */ dump_add_root_struct_ptr (&chlook, &charset_lookup_description); @@ -1327,14 +2802,41 @@ vars_of_mule_charset (void) for (i = 0; i < countof (chlook->charset_by_leading_byte); i++) chlook->charset_by_leading_byte[i] = Qnil; +#ifdef UTF2000 + /* Table of charsets indexed by type/final-byte. */ + for (i = 0; i < countof (chlook->charset_by_attributes); i++) + for (j = 0; j < countof (chlook->charset_by_attributes[0]); j++) + chlook->charset_by_attributes[i][j] = Qnil; +#else /* Table of charsets indexed by type/final-byte/direction. */ for (i = 0; i < countof (chlook->charset_by_attributes); i++) for (j = 0; j < countof (chlook->charset_by_attributes[0]); j++) for (k = 0; k < countof (chlook->charset_by_attributes[0][0]); k++) chlook->charset_by_attributes[i][j][k] = Qnil; +#endif +#ifdef UTF2000 + chlook->next_allocated_leading_byte = MIN_LEADING_BYTE_PRIVATE; +#else chlook->next_allocated_1_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_1; chlook->next_allocated_2_byte_leading_byte = MIN_LEADING_BYTE_PRIVATE_2; +#endif + +#ifndef UTF2000 + leading_code_private_11 = PRE_LEADING_BYTE_PRIVATE_1; + DEFVAR_INT ("leading-code-private-11", &leading_code_private_11 /* +Leading-code of private TYPE9N charset of column-width 1. +*/ ); + leading_code_private_11 = PRE_LEADING_BYTE_PRIVATE_1; +#endif + +#ifdef UTF2000 + Vdefault_coded_charset_priority_list = Qnil; + DEFVAR_LISP ("default-coded-charset-priority-list", + &Vdefault_coded_charset_priority_list /* +Default order of preferred coded-character-sets. +*/ ); +#endif } void @@ -1347,221 +2849,387 @@ complex_vars_of_mule_charset (void) /* Predefined character sets. We store them into variables for ease of access. */ +#ifdef UTF2000 + staticpro (&Vcharset_ucs); + Vcharset_ucs = + make_charset (LEADING_BYTE_UCS, Qmap_ucs, 256, 4, + 1, 2, 0, CHARSET_LEFT_TO_RIGHT, + build_string ("UCS"), + build_string ("UCS"), + build_string ("ISO/IEC 10646"), + build_string (""), + Qnil, 0, 0x7FFFFFFF, 0, 0, Qnil, CONVERSION_IDENTICAL); + staticpro (&Vcharset_ucs_bmp); + Vcharset_ucs_bmp = + make_charset (LEADING_BYTE_UCS_BMP, Qucs_bmp, 256, 2, + 1, 2, 0, CHARSET_LEFT_TO_RIGHT, + build_string ("BMP"), + build_string ("UCS-BMP"), + build_string ("ISO/IEC 10646 Group 0 Plane 0 (BMP)"), + build_string + ("\\(ISO10646.*-[01]\\|UCS00-0\\|UNICODE[23]?-0\\)"), + Qnil, 0, 0xFFFF, 0, 0, Qnil, CONVERSION_IDENTICAL); + staticpro (&Vcharset_ucs_smp); + Vcharset_ucs_smp = + make_charset (LEADING_BYTE_UCS_SMP, Qucs_smp, 256, 2, + 1, 2, 0, CHARSET_LEFT_TO_RIGHT, + build_string ("SMP"), + build_string ("UCS-SMP"), + build_string ("ISO/IEC 10646 Group 0 Plane 1 (SMP)"), + build_string ("UCS00-1"), + Qnil, MIN_CHAR_SMP, MAX_CHAR_SMP, + MIN_CHAR_SMP, 0, Qnil, CONVERSION_IDENTICAL); + staticpro (&Vcharset_ucs_sip); + Vcharset_ucs_sip = + make_charset (LEADING_BYTE_UCS_SIP, Qucs_sip, 256, 2, + 2, 2, 0, CHARSET_LEFT_TO_RIGHT, + build_string ("SIP"), + build_string ("UCS-SIP"), + build_string ("ISO/IEC 10646 Group 0 Plane 2 (SIP)"), + build_string ("\\(ISO10646.*-2\\|UCS00-2\\)"), + Qnil, MIN_CHAR_SIP, MAX_CHAR_SIP, + MIN_CHAR_SIP, 0, Qnil, CONVERSION_IDENTICAL); +#else +# define MIN_CHAR_THAI 0 +# define MAX_CHAR_THAI 0 + /* # define MIN_CHAR_HEBREW 0 */ + /* # define MAX_CHAR_HEBREW 0 */ +# define MIN_CHAR_HALFWIDTH_KATAKANA 0 +# define MAX_CHAR_HALFWIDTH_KATAKANA 0 +#endif staticpro (&Vcharset_ascii); Vcharset_ascii = - make_charset (LEADING_BYTE_ASCII, Qascii, 1, - CHARSET_TYPE_94, 1, 0, 'B', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_ASCII, Qascii, 94, 1, + 1, 0, 'B', CHARSET_LEFT_TO_RIGHT, build_string ("ASCII"), build_string ("ASCII)"), build_string ("ASCII (ISO646 IRV)"), - build_string ("\\(iso8859-[0-9]*\\|-ascii\\)")); + build_string ("\\(iso8859-[0-9]*\\|-ascii\\)"), + Qnil, 0, 0x7F, 0, 0, Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_control_1); Vcharset_control_1 = - make_charset (LEADING_BYTE_CONTROL_1, Qcontrol_1, 2, - CHARSET_TYPE_94, 1, 1, 0, - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_CONTROL_1, Qcontrol_1, 94, 1, + 1, 1, 0, CHARSET_LEFT_TO_RIGHT, build_string ("C1"), build_string ("Control characters"), build_string ("Control characters 128-191"), - build_string ("")); + build_string (""), + Qnil, 0x80, 0x9F, 0x80, 0, Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_latin_iso8859_1); Vcharset_latin_iso8859_1 = - make_charset (LEADING_BYTE_LATIN_ISO8859_1, Qlatin_iso8859_1, 2, - CHARSET_TYPE_96, 1, 1, 'A', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_LATIN_ISO8859_1, Qlatin_iso8859_1, 96, 1, + 1, 1, 'A', CHARSET_LEFT_TO_RIGHT, build_string ("Latin-1"), build_string ("ISO8859-1 (Latin-1)"), build_string ("ISO8859-1 (Latin-1)"), - build_string ("iso8859-1")); + build_string ("iso8859-1"), + Qnil, 0, 0, 0, 32, Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_latin_iso8859_2); Vcharset_latin_iso8859_2 = - make_charset (LEADING_BYTE_LATIN_ISO8859_2, Qlatin_iso8859_2, 2, - CHARSET_TYPE_96, 1, 1, 'B', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_LATIN_ISO8859_2, Qlatin_iso8859_2, 96, 1, + 1, 1, 'B', CHARSET_LEFT_TO_RIGHT, build_string ("Latin-2"), build_string ("ISO8859-2 (Latin-2)"), build_string ("ISO8859-2 (Latin-2)"), - build_string ("iso8859-2")); + build_string ("iso8859-2"), + Qnil, 0, 0, 0, 32, Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_latin_iso8859_3); Vcharset_latin_iso8859_3 = - make_charset (LEADING_BYTE_LATIN_ISO8859_3, Qlatin_iso8859_3, 2, - CHARSET_TYPE_96, 1, 1, 'C', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_LATIN_ISO8859_3, Qlatin_iso8859_3, 96, 1, + 1, 1, 'C', CHARSET_LEFT_TO_RIGHT, build_string ("Latin-3"), build_string ("ISO8859-3 (Latin-3)"), build_string ("ISO8859-3 (Latin-3)"), - build_string ("iso8859-3")); + build_string ("iso8859-3"), + Qnil, 0, 0, 0, 32, Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_latin_iso8859_4); Vcharset_latin_iso8859_4 = - make_charset (LEADING_BYTE_LATIN_ISO8859_4, Qlatin_iso8859_4, 2, - CHARSET_TYPE_96, 1, 1, 'D', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_LATIN_ISO8859_4, Qlatin_iso8859_4, 96, 1, + 1, 1, 'D', CHARSET_LEFT_TO_RIGHT, build_string ("Latin-4"), build_string ("ISO8859-4 (Latin-4)"), build_string ("ISO8859-4 (Latin-4)"), - build_string ("iso8859-4")); + build_string ("iso8859-4"), + Qnil, 0, 0, 0, 32, Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_thai_tis620); Vcharset_thai_tis620 = - make_charset (LEADING_BYTE_THAI_TIS620, Qthai_tis620, 2, - CHARSET_TYPE_96, 1, 1, 'T', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_THAI_TIS620, Qthai_tis620, 96, 1, + 1, 1, 'T', CHARSET_LEFT_TO_RIGHT, build_string ("TIS620"), build_string ("TIS620 (Thai)"), build_string ("TIS620.2529 (Thai)"), - build_string ("tis620")); + build_string ("tis620"), + Qnil, 0, 0, 0, 32, Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_greek_iso8859_7); Vcharset_greek_iso8859_7 = - make_charset (LEADING_BYTE_GREEK_ISO8859_7, Qgreek_iso8859_7, 2, - CHARSET_TYPE_96, 1, 1, 'F', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_GREEK_ISO8859_7, Qgreek_iso8859_7, 96, 1, + 1, 1, 'F', CHARSET_LEFT_TO_RIGHT, build_string ("ISO8859-7"), build_string ("ISO8859-7 (Greek)"), build_string ("ISO8859-7 (Greek)"), - build_string ("iso8859-7")); + build_string ("iso8859-7"), + Qnil, 0, 0, 0, 32, Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_arabic_iso8859_6); Vcharset_arabic_iso8859_6 = - make_charset (LEADING_BYTE_ARABIC_ISO8859_6, Qarabic_iso8859_6, 2, - CHARSET_TYPE_96, 1, 1, 'G', - CHARSET_RIGHT_TO_LEFT, + make_charset (LEADING_BYTE_ARABIC_ISO8859_6, Qarabic_iso8859_6, 96, 1, + 1, 1, 'G', CHARSET_RIGHT_TO_LEFT, build_string ("ISO8859-6"), build_string ("ISO8859-6 (Arabic)"), build_string ("ISO8859-6 (Arabic)"), - build_string ("iso8859-6")); + build_string ("iso8859-6"), + Qnil, 0, 0, 0, 32, Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_hebrew_iso8859_8); Vcharset_hebrew_iso8859_8 = - make_charset (LEADING_BYTE_HEBREW_ISO8859_8, Qhebrew_iso8859_8, 2, - CHARSET_TYPE_96, 1, 1, 'H', - CHARSET_RIGHT_TO_LEFT, + make_charset (LEADING_BYTE_HEBREW_ISO8859_8, Qhebrew_iso8859_8, 96, 1, + 1, 1, 'H', CHARSET_RIGHT_TO_LEFT, build_string ("ISO8859-8"), build_string ("ISO8859-8 (Hebrew)"), build_string ("ISO8859-8 (Hebrew)"), - build_string ("iso8859-8")); + build_string ("iso8859-8"), + Qnil, + 0 /* MIN_CHAR_HEBREW */, + 0 /* MAX_CHAR_HEBREW */, 0, 32, + Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_katakana_jisx0201); Vcharset_katakana_jisx0201 = - make_charset (LEADING_BYTE_KATAKANA_JISX0201, Qkatakana_jisx0201, 2, - CHARSET_TYPE_94, 1, 1, 'I', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_KATAKANA_JISX0201, Qkatakana_jisx0201, 94, 1, + 1, 1, 'I', CHARSET_LEFT_TO_RIGHT, build_string ("JISX0201 Kana"), build_string ("JISX0201.1976 (Japanese Kana)"), build_string ("JISX0201.1976 Japanese Kana"), - build_string ("jisx0201.1976")); + build_string ("jisx0201\\.1976"), + Qnil, 0, 0, 0, 33, Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_latin_jisx0201); Vcharset_latin_jisx0201 = - make_charset (LEADING_BYTE_LATIN_JISX0201, Qlatin_jisx0201, 2, - CHARSET_TYPE_94, 1, 0, 'J', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_LATIN_JISX0201, Qlatin_jisx0201, 94, 1, + 1, 0, 'J', CHARSET_LEFT_TO_RIGHT, build_string ("JISX0201 Roman"), build_string ("JISX0201.1976 (Japanese Roman)"), build_string ("JISX0201.1976 Japanese Roman"), - build_string ("jisx0201.1976")); + build_string ("jisx0201\\.1976"), + Qnil, 0, 0, 0, 33, Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_cyrillic_iso8859_5); Vcharset_cyrillic_iso8859_5 = - make_charset (LEADING_BYTE_CYRILLIC_ISO8859_5, Qcyrillic_iso8859_5, 2, - CHARSET_TYPE_96, 1, 1, 'L', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_CYRILLIC_ISO8859_5, Qcyrillic_iso8859_5, 96, 1, + 1, 1, 'L', CHARSET_LEFT_TO_RIGHT, build_string ("ISO8859-5"), build_string ("ISO8859-5 (Cyrillic)"), build_string ("ISO8859-5 (Cyrillic)"), - build_string ("iso8859-5")); + build_string ("iso8859-5"), + Qnil, 0, 0, 0, 32, Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_latin_iso8859_9); Vcharset_latin_iso8859_9 = - make_charset (LEADING_BYTE_LATIN_ISO8859_9, Qlatin_iso8859_9, 2, - CHARSET_TYPE_96, 1, 1, 'M', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_LATIN_ISO8859_9, Qlatin_iso8859_9, 96, 1, + 1, 1, 'M', CHARSET_LEFT_TO_RIGHT, build_string ("Latin-5"), build_string ("ISO8859-9 (Latin-5)"), build_string ("ISO8859-9 (Latin-5)"), - build_string ("iso8859-9")); + build_string ("iso8859-9"), + Qnil, 0, 0, 0, 32, Qnil, CONVERSION_IDENTICAL); +#ifdef UTF2000 + staticpro (&Vcharset_jis_x0208); + Vcharset_jis_x0208 = + make_charset (LEADING_BYTE_JIS_X0208, + Qmap_jis_x0208, 94, 2, + 2, 0, 'B', CHARSET_LEFT_TO_RIGHT, + build_string ("JIS X0208"), + build_string ("JIS X0208 Common"), + build_string ("JIS X0208 Common part"), + build_string ("jisx0208\\.1990"), + Qnil, + MIN_CHAR_JIS_X0208_1990, + MAX_CHAR_JIS_X0208_1990, MIN_CHAR_JIS_X0208_1990, 33, + Qnil, CONVERSION_94x94); +#endif staticpro (&Vcharset_japanese_jisx0208_1978); Vcharset_japanese_jisx0208_1978 = - make_charset (LEADING_BYTE_JAPANESE_JISX0208_1978, Qjapanese_jisx0208_1978, 3, - CHARSET_TYPE_94X94, 2, 0, '@', - CHARSET_LEFT_TO_RIGHT, - build_string ("JISX0208.1978"), - build_string ("JISX0208.1978 (Japanese)"), + make_charset (LEADING_BYTE_JAPANESE_JISX0208_1978, + Qmap_jis_x0208_1978, 94, 2, + 2, 0, '@', CHARSET_LEFT_TO_RIGHT, + build_string ("JIS X0208:1978"), + build_string ("JIS X0208:1978 (Japanese)"), build_string - ("JISX0208.1978 Japanese Kanji (so called \"old JIS\")"), - build_string ("\\(jisx0208\\|jisc6226\\)\\.1978")); + ("JIS X0208:1978 Japanese Kanji (so called \"old JIS\")"), + build_string ("\\(jisx0208\\|jisc6226\\)\\.1978"), + Qnil, 0, 0, 0, 33, +#ifdef UTF2000 + Vcharset_jis_x0208, +#else + Qnil, +#endif + CONVERSION_IDENTICAL); staticpro (&Vcharset_chinese_gb2312); Vcharset_chinese_gb2312 = - make_charset (LEADING_BYTE_CHINESE_GB2312, Qchinese_gb2312, 3, - CHARSET_TYPE_94X94, 2, 0, 'A', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_CHINESE_GB2312, Qmap_gb2312, 94, 2, + 2, 0, 'A', CHARSET_LEFT_TO_RIGHT, build_string ("GB2312"), build_string ("GB2312)"), build_string ("GB2312 Chinese simplified"), - build_string ("gb2312")); + build_string ("gb2312"), + Qnil, 0, 0, 0, 33, Qnil, CONVERSION_IDENTICAL); + staticpro (&Vcharset_chinese_gb12345); + Vcharset_chinese_gb12345 = + make_charset (LEADING_BYTE_CHINESE_GB12345, Qmap_gb12345, 94, 2, + 2, 0, 0, CHARSET_LEFT_TO_RIGHT, + build_string ("G1"), + build_string ("GB 12345)"), + build_string ("GB 12345-1990"), + build_string ("GB12345\\(\\.1990\\)?-0"), + Qnil, 0, 0, 0, 33, Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_japanese_jisx0208); Vcharset_japanese_jisx0208 = - make_charset (LEADING_BYTE_JAPANESE_JISX0208, Qjapanese_jisx0208, 3, - CHARSET_TYPE_94X94, 2, 0, 'B', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_JAPANESE_JISX0208, Qmap_jis_x0208_1983, 94, 2, + 2, 0, 'B', CHARSET_LEFT_TO_RIGHT, build_string ("JISX0208"), - build_string ("JISX0208.1983/1990 (Japanese)"), - build_string ("JISX0208.1983/1990 Japanese Kanji"), - build_string ("jisx0208.19\\(83\\|90\\)")); + build_string ("JIS X0208:1983 (Japanese)"), + build_string ("JIS X0208:1983 Japanese Kanji"), + build_string ("jisx0208\\.1983"), + Qnil, 0, 0, 0, 33, +#ifdef UTF2000 + Vcharset_jis_x0208, +#else + Qnil, +#endif + CONVERSION_IDENTICAL); +#ifdef UTF2000 + staticpro (&Vcharset_japanese_jisx0208_1990); + Vcharset_japanese_jisx0208_1990 = + make_charset (LEADING_BYTE_JAPANESE_JISX0208_1990, + Qmap_jis_x0208_1990, 94, 2, + 2, 0, 0, CHARSET_LEFT_TO_RIGHT, + build_string ("JISX0208-1990"), + build_string ("JIS X0208:1990 (Japanese)"), + build_string ("JIS X0208:1990 Japanese Kanji"), + build_string ("jisx0208\\.1990"), + Qnil, + 0x2121 /* MIN_CHAR_JIS_X0208_1990 */, + 0x7426 /* MAX_CHAR_JIS_X0208_1990 */, + 0 /* MIN_CHAR_JIS_X0208_1990 */, 33, + Vcharset_jis_x0208 /* Qnil */, + CONVERSION_IDENTICAL /* CONVERSION_94x94 */); +#endif staticpro (&Vcharset_korean_ksc5601); Vcharset_korean_ksc5601 = - make_charset (LEADING_BYTE_KOREAN_KSC5601, Qkorean_ksc5601, 3, - CHARSET_TYPE_94X94, 2, 0, 'C', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_KOREAN_KSC5601, Qmap_ks_x1001, 94, 2, + 2, 0, 'C', CHARSET_LEFT_TO_RIGHT, build_string ("KSC5601"), build_string ("KSC5601 (Korean"), build_string ("KSC5601 Korean Hangul and Hanja"), - build_string ("ksc5601")); + build_string ("ksc5601"), + Qnil, 0, 0, 0, 33, Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_japanese_jisx0212); Vcharset_japanese_jisx0212 = - make_charset (LEADING_BYTE_JAPANESE_JISX0212, Qjapanese_jisx0212, 3, - CHARSET_TYPE_94X94, 2, 0, 'D', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_JAPANESE_JISX0212, Qmap_jis_x0212, 94, 2, + 2, 0, 'D', CHARSET_LEFT_TO_RIGHT, build_string ("JISX0212"), build_string ("JISX0212 (Japanese)"), build_string ("JISX0212 Japanese Supplement"), - build_string ("jisx0212")); + build_string ("jisx0212"), + Qnil, 0, 0, 0, 33, Qnil, CONVERSION_IDENTICAL); #define CHINESE_CNS_PLANE_RE(n) "cns11643[.-]\\(.*[.-]\\)?" n "$" staticpro (&Vcharset_chinese_cns11643_1); Vcharset_chinese_cns11643_1 = - make_charset (LEADING_BYTE_CHINESE_CNS11643_1, Qchinese_cns11643_1, 3, - CHARSET_TYPE_94X94, 2, 0, 'G', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_CHINESE_CNS11643_1, Qmap_cns11643_1, 94, 2, + 2, 0, 'G', CHARSET_LEFT_TO_RIGHT, build_string ("CNS11643-1"), build_string ("CNS11643-1 (Chinese traditional)"), build_string ("CNS 11643 Plane 1 Chinese traditional"), - build_string (CHINESE_CNS_PLANE_RE("1"))); + build_string (CHINESE_CNS_PLANE_RE("1")), + Qnil, 0, 0, 0, 33, Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_chinese_cns11643_2); Vcharset_chinese_cns11643_2 = - make_charset (LEADING_BYTE_CHINESE_CNS11643_2, Qchinese_cns11643_2, 3, - CHARSET_TYPE_94X94, 2, 0, 'H', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_CHINESE_CNS11643_2, Qmap_cns11643_2, 94, 2, + 2, 0, 'H', CHARSET_LEFT_TO_RIGHT, build_string ("CNS11643-2"), build_string ("CNS11643-2 (Chinese traditional)"), build_string ("CNS 11643 Plane 2 Chinese traditional"), - build_string (CHINESE_CNS_PLANE_RE("2"))); + build_string (CHINESE_CNS_PLANE_RE("2")), + Qnil, 0, 0, 0, 33, Qnil, CONVERSION_IDENTICAL); +#ifdef UTF2000 + staticpro (&Vcharset_latin_tcvn5712); + Vcharset_latin_tcvn5712 = + make_charset (LEADING_BYTE_LATIN_TCVN5712, Qlatin_tcvn5712, 96, 1, + 1, 1, 'Z', CHARSET_LEFT_TO_RIGHT, + build_string ("TCVN 5712"), + build_string ("TCVN 5712 (VSCII-2)"), + build_string ("Vietnamese TCVN 5712:1983 (VSCII-2)"), + build_string ("tcvn5712\\(\\.1993\\)?-1"), + Qnil, 0, 0, 0, 32, Qnil, CONVERSION_IDENTICAL); + staticpro (&Vcharset_latin_viscii_lower); + Vcharset_latin_viscii_lower = + make_charset (LEADING_BYTE_LATIN_VISCII_LOWER, Qlatin_viscii_lower, 96, 1, + 1, 1, '1', CHARSET_LEFT_TO_RIGHT, + build_string ("VISCII lower"), + build_string ("VISCII lower (Vietnamese)"), + build_string ("VISCII lower (Vietnamese)"), + build_string ("MULEVISCII-LOWER"), + Qnil, 0, 0, 0, 32, Qnil, CONVERSION_IDENTICAL); + staticpro (&Vcharset_latin_viscii_upper); + Vcharset_latin_viscii_upper = + make_charset (LEADING_BYTE_LATIN_VISCII_UPPER, Qlatin_viscii_upper, 96, 1, + 1, 1, '2', CHARSET_LEFT_TO_RIGHT, + build_string ("VISCII upper"), + build_string ("VISCII upper (Vietnamese)"), + build_string ("VISCII upper (Vietnamese)"), + build_string ("MULEVISCII-UPPER"), + Qnil, 0, 0, 0, 32, Qnil, CONVERSION_IDENTICAL); + staticpro (&Vcharset_latin_viscii); + Vcharset_latin_viscii = + make_charset (LEADING_BYTE_LATIN_VISCII, Qlatin_viscii, 256, 1, + 1, 2, 0, CHARSET_LEFT_TO_RIGHT, + build_string ("VISCII"), + build_string ("VISCII 1.1 (Vietnamese)"), + build_string ("VISCII 1.1 (Vietnamese)"), + build_string ("VISCII1\\.1"), + Qnil, 0, 0, 0, 0, Qnil, CONVERSION_IDENTICAL); + staticpro (&Vcharset_chinese_big5); + Vcharset_chinese_big5 = + make_charset (LEADING_BYTE_CHINESE_BIG5, Qmap_big5, 256, 2, + 2, 2, 0, CHARSET_LEFT_TO_RIGHT, + build_string ("Big5"), + build_string ("Big5"), + build_string ("Big5 Chinese traditional"), + build_string ("big5-0"), + Qnil, + MIN_CHAR_BIG5_CDP, MAX_CHAR_BIG5_CDP, + MIN_CHAR_BIG5_CDP, 0, Qnil, CONVERSION_IDENTICAL); + + staticpro (&Vcharset_ethiopic_ucs); + Vcharset_ethiopic_ucs = + make_charset (LEADING_BYTE_ETHIOPIC_UCS, Qethiopic_ucs, 256, 2, + 2, 2, 0, CHARSET_LEFT_TO_RIGHT, + build_string ("Ethiopic (UCS)"), + build_string ("Ethiopic (UCS)"), + build_string ("Ethiopic of UCS"), + build_string ("Ethiopic-Unicode"), + Qnil, 0x1200, 0x137F, 0, 0, + Qnil, CONVERSION_IDENTICAL); +#endif staticpro (&Vcharset_chinese_big5_1); Vcharset_chinese_big5_1 = - make_charset (LEADING_BYTE_CHINESE_BIG5_1, Qchinese_big5_1, 3, - CHARSET_TYPE_94X94, 2, 0, '0', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_CHINESE_BIG5_1, Qchinese_big5_1, 94, 2, + 2, 0, '0', CHARSET_LEFT_TO_RIGHT, build_string ("Big5"), build_string ("Big5 (Level-1)"), build_string ("Big5 Level-1 Chinese traditional"), - build_string ("big5")); + build_string ("big5"), + Qnil, 0, 0, 0, 33, /* Qnil, CONVERSION_IDENTICAL */ + Vcharset_chinese_big5, CONVERSION_BIG5_1); staticpro (&Vcharset_chinese_big5_2); Vcharset_chinese_big5_2 = - make_charset (LEADING_BYTE_CHINESE_BIG5_2, Qchinese_big5_2, 3, - CHARSET_TYPE_94X94, 2, 0, '1', - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_CHINESE_BIG5_2, Qchinese_big5_2, 94, 2, + 2, 0, '1', CHARSET_LEFT_TO_RIGHT, build_string ("Big5"), build_string ("Big5 (Level-2)"), build_string ("Big5 Level-2 Chinese traditional"), - build_string ("big5")); - + build_string ("big5"), + Qnil, 0, 0, 0, 33, /* Qnil, CONVERSION_IDENTICAL */ + Vcharset_chinese_big5, CONVERSION_BIG5_2); #ifdef ENABLE_COMPOSITE_CHARS /* #### For simplicity, we put composite chars into a 96x96 charset. @@ -1569,9 +3237,8 @@ complex_vars_of_mule_charset (void) room, esp. as we don't yet recycle numbers. */ staticpro (&Vcharset_composite); Vcharset_composite = - make_charset (LEADING_BYTE_COMPOSITE, Qcomposite, 3, - CHARSET_TYPE_96X96, 2, 0, 0, - CHARSET_LEFT_TO_RIGHT, + make_charset (LEADING_BYTE_COMPOSITE, Qcomposite, 96, 2, + 2, 0, 0, CHARSET_LEFT_TO_RIGHT, build_string ("Composite"), build_string ("Composite characters"), build_string ("Composite characters"), diff --git a/src/mule-charset.h b/src/mule-charset.h index 46cd3a0..95ee6f2 100644 --- a/src/mule-charset.h +++ b/src/mule-charset.h @@ -324,6 +324,8 @@ Boston, MA 02111-1307, USA. */ /* Definition of leading bytes */ /************************************************************************/ +typedef unsigned char Charset_ID; + #define MIN_LEADING_BYTE 0x80 /* These need special treatment in a string and/or character */ #define LEADING_BYTE_ASCII 0x8E /* Omitted in a buffer */ @@ -551,13 +553,14 @@ DECLARE_LRECORD (charset, Lisp_Charset); CHARSET_REVERSE_DIRECTION_CHARSET (XCHARSET (cs)) struct charset_lookup { - /* Table of charsets indexed by leading byte. */ - Lisp_Object charset_by_leading_byte[128]; + /* Table of charsets indexed by (leading byte - MIN_LEADING_BYTE). */ + Lisp_Object charset_by_leading_byte[NUM_LEADING_BYTES]; /* Table of charsets indexed by type/final-byte/direction. */ Lisp_Object charset_by_attributes[4][128][2]; - Bufbyte next_allocated_1_byte_leading_byte; - Bufbyte next_allocated_2_byte_leading_byte; + + Charset_ID next_allocated_1_byte_leading_byte; + Charset_ID next_allocated_2_byte_leading_byte; }; INLINE_HEADER Lisp_Object CHARSET_BY_LEADING_BYTE (Bufbyte lb); @@ -570,9 +573,10 @@ CHARSET_BY_LEADING_BYTE (Bufbyte lb) /* When error-checking is on, x86 GCC 2.95.2 -O3 miscompiles the following unless we introduce `tem'. */ int tem = lb; - type_checking_assert (tem >= 0x80 && tem <= 0xFF); + type_checking_assert (tem >= MIN_LEADING_BYTE && + tem < (MIN_LEADING_BYTE + NUM_LEADING_BYTES)); #endif - return chlook->charset_by_leading_byte[lb - 128]; + return chlook->charset_by_leading_byte[lb - MIN_LEADING_BYTE]; } INLINE_HEADER Lisp_Object @@ -610,11 +614,7 @@ REP_BYTES_BY_FIRST_BYTE (Bufbyte fb) /* Dealing with characters */ /************************************************************************/ -/* Is this character represented by more than one byte in a string? */ - -#define CHAR_MULTIBYTE_P(c) ((c) >= 0x80) - -#define CHAR_ASCII_P(c) (!CHAR_MULTIBYTE_P (c)) +#define CHAR_ASCII_P(ch) ((ch) <= 0x7F) /* The bit fields of character are divided into 3 parts: FIELD1(5bits):FIELD2(7bits):FIELD3(7bits) */ diff --git a/src/mule-wnnfns.c b/src/mule-wnnfns.c index a393b25..dc71e64 100644 --- a/src/mule-wnnfns.c +++ b/src/mule-wnnfns.c @@ -271,7 +271,7 @@ Boston, MA 02111-1307, USA. */ #include "sysdep.h" #include "wnn/commonhd.h" -#include "mule-charset.h" +#include "character.h" #include "wnn/jllib.h" #include "wnn/cplib.h" diff --git a/src/mule.c b/src/mule.c index 9f4cdef..624d174 100644 --- a/src/mule.c +++ b/src/mule.c @@ -1,4 +1,5 @@ /* Copyright (C) 1995 Free Software Foundation. + Copyright (C) 1999,2000,2001,2002,2003 MORIOKA Tomohiko This file is part of XEmacs. @@ -93,6 +94,10 @@ accept a pattern compiled by 'regexp-compile' with word-option t. #endif /* MULE_REGEXP */ +#ifdef UTF2000 +Lisp_Object Vxemacs_chise_version; +#endif + void syms_of_mule (void) @@ -114,6 +119,22 @@ vars_of_mule (void) Fprovide (intern ("mule")); +#ifdef UTF2000 + Fprovide (intern ("utf-2000")); + + Vxemacs_chise_version = build_string("0.21 (Narayama)"); + DEFVAR_LISP ("xemacs-chise-version", &Vxemacs_chise_version /* +Version number of XEmacs CHISE. +*/ ); + DEFVAR_LISP ("utf-2000-version", &Vxemacs_chise_version /* +Version number of XEmacs CHISE. +*/ ); +#endif + +#ifdef HAVE_CHISE + Fprovide (intern ("chise")); +#endif + #ifdef HAVE_EGG Fprovide (intern ("egg")); #endif diff --git a/src/objects-msw.c b/src/objects-msw.c index 3621a12..a1a5e52 100644 --- a/src/objects-msw.c +++ b/src/objects-msw.c @@ -42,7 +42,7 @@ Boston, MA 02111-1307, USA. */ #include "objects-msw.h" #ifdef MULE -#include "mule-charset.h" +#include "character.h" #endif #include "buffer.h" diff --git a/src/objects-tty.c b/src/objects-tty.c index b598c8d..ea76e6f 100644 --- a/src/objects-tty.c +++ b/src/objects-tty.c @@ -29,7 +29,7 @@ Boston, MA 02111-1307, USA. */ #include "objects-tty.h" #ifdef MULE #include "device.h" -#include "mule-charset.h" +#include "character.h" #endif /* An alist mapping from color names to a cons of (FG-STRING, BG-STRING). */ @@ -242,7 +242,7 @@ tty_initialize_font_instance (Lisp_Font_Instance *f, Lisp_Object name, FONT_INSTANCE_TTY_CHARSET (f) = charset; #ifdef MULE if (CHARSETP (charset)) - f->width = XCHARSET_COLUMNS (charset); + f->width = CHARSET_COLUMNS (XCHARSET (charset)); else #endif f->width = 1; diff --git a/src/redisplay-msw.c b/src/redisplay-msw.c index 8098d0e..62ddceb 100644 --- a/src/redisplay-msw.c +++ b/src/redisplay-msw.c @@ -49,7 +49,7 @@ Boston, MA 02111-1307, USA. */ #ifdef MULE #include "mule-ccl.h" -#include "mule-charset.h" +#include "character.h" #endif #define MSWINDOWS_EOL_CURSOR_WIDTH 5 diff --git a/src/redisplay-output.c b/src/redisplay-output.c index b19d74f..fc0b5c3 100644 --- a/src/redisplay-output.c +++ b/src/redisplay-output.c @@ -221,7 +221,7 @@ compare_runes (struct window *w, struct rune *crb, struct rune *drb) else if (crb->type != drb->type) return 0; else if (crb->type == RUNE_CHAR && - (crb->object.chr.ch != drb->object.chr.ch)) + !CHARC_EQ (crb->object.cglyph, drb->object.cglyph)) return 0; else if (crb->type == RUNE_HLINE && (crb->object.hline.thickness != drb->object.hline.thickness || @@ -1317,7 +1317,7 @@ redisplay_output_layout (Lisp_Object domain, { Lisp_Image_Instance *p = XIMAGE_INSTANCE (image_instance); Lisp_Object rest, window = DOMAIN_WINDOW (domain); - Emchar_dynarr *buf = Dynarr_new (Emchar); + Charc_dynarr *buf = Dynarr_new (Charc); struct window *w = XWINDOW (window); struct device *d = DOMAIN_XDEVICE (domain); int layout_height, layout_width; @@ -1457,7 +1457,7 @@ redisplay_output_layout (Lisp_Object domain, struct display_line dl; /* this is fake */ Lisp_Object string = IMAGE_INSTANCE_TEXT_STRING (childii); - unsigned char charsets[NUM_LEADING_BYTES]; + Charset_ID charsets[NUM_LEADING_BYTES]; struct face_cachel *cachel = WINDOW_FACE_CACHEL (w, findex); find_charsets_in_bufbyte_string (charsets, @@ -1465,8 +1465,9 @@ redisplay_output_layout (Lisp_Object domain, XSTRING_LENGTH (string)); ensure_face_cachel_complete (cachel, window, charsets); - convert_bufbyte_string_into_emchar_dynarr - (XSTRING_DATA (string), XSTRING_LENGTH (string), buf); + convert_bufbyte_string_into_charc_dynarr + (XSTRING_DATA (string), XSTRING_LENGTH (string), + buf); redisplay_normalize_display_box (&cdb, &cdga); /* Offsets are now +ve again so be careful diff --git a/src/redisplay-tty.c b/src/redisplay-tty.c index 187cd47..80bdcc4 100644 --- a/src/redisplay-tty.c +++ b/src/redisplay-tty.c @@ -76,11 +76,11 @@ EXTERN_C void tputs (const char *, int, void (*)(int)); } while (0) #define OUTPUT1_IF(c, a) OUTPUTN_IF (c, a, 1) -static void tty_output_emchar_dynarr (struct window *w, - struct display_line *dl, - Emchar_dynarr *buf, int xpos, - face_index findex, - int cursor); +static void tty_output_charc_dynarr (struct window *w, + struct display_line *dl, + Charc_dynarr *buf, int xpos, + face_index findex, + int cursor); static void tty_output_bufbyte_string (struct window *w, struct display_line *dl, Bufbyte *str, Bytecount len, @@ -99,13 +99,13 @@ static void term_get_fkeys (Lisp_Object keymap, char **address); Non-Mule tty's don't have fonts (that we use at least), so everything is considered to be fixed width -- in other words, we return LEN. Under Mule, however, a character can still cover more than one - column, so we use emchar_string_displayed_columns(). + column, so we use charc_string_displayed_columns(). ****************************************************************************/ static int -tty_text_width (struct frame *f, struct face_cachel *cachel, const Emchar *str, - Charcount len) +tty_text_width (struct frame *f, struct face_cachel *cachel, + const Charc *str, Charcount len) { - return emchar_string_displayed_columns (str, len); + return charc_string_displayed_columns (str, len); } /***************************************************************************** @@ -196,7 +196,7 @@ tty_output_display_block (struct window *w, struct display_line *dl, int block, int cursor_height) { struct frame *f = XFRAME (w->frame); - Emchar_dynarr *buf = Dynarr_new (Emchar); + Charc_dynarr *buf = Dynarr_new (Charc); struct display_block *db = Dynarr_atp (dl->display_blocks, block); rune_dynarr *rba = db->runes; @@ -236,18 +236,18 @@ tty_output_display_block (struct window *w, struct display_line *dl, int block, rb = Dynarr_atp (rba, elt); if (rb->findex == findex && rb->type == RUNE_CHAR - && rb->object.chr.ch != '\n' + && (!CHARC_ASCII_EQ (rb->object.cglyph, '\n')) && (rb->cursor_type != CURSOR_ON || NILP (w->text_cursor_visible_p))) { - Dynarr_add (buf, rb->object.chr.ch); + Dynarr_add (buf, rb->object.cglyph); elt++; } else { if (Dynarr_length (buf)) { - tty_output_emchar_dynarr (w, dl, buf, xpos, findex, 0); + tty_output_charc_dynarr (w, dl, buf, xpos, findex, 0); xpos = rb->xpos; } Dynarr_reset (buf); @@ -257,13 +257,12 @@ tty_output_display_block (struct window *w, struct display_line *dl, int block, findex = rb->findex; xpos = rb->xpos; - if (rb->object.chr.ch == '\n') + if (CHARC_ASCII_EQ (rb->object.cglyph, '\n')) { /* Clear in case a cursor was formerly here. */ - - Dynarr_add (buf, ' '); - tty_output_emchar_dynarr (w, dl, buf, rb->xpos, - DEFAULT_INDEX, 0); + Dynarr_add (buf, ASCII_TO_CHARC (' ')); + tty_output_charc_dynarr (w, dl, buf, rb->xpos, + DEFAULT_INDEX, 0); Dynarr_reset (buf); cmgoto (f, dl->ypos - 1, rb->xpos); @@ -274,8 +273,8 @@ tty_output_display_block (struct window *w, struct display_line *dl, int block, { /* There is not a distinct eol cursor on tty's. */ - Dynarr_add (buf, rb->object.chr.ch); - tty_output_emchar_dynarr (w, dl, buf, xpos, findex, 0); + Dynarr_add (buf, rb->object.cglyph); + tty_output_charc_dynarr (w, dl, buf, xpos, findex, 0); Dynarr_reset (buf); cmgoto (f, dl->ypos - 1, xpos); @@ -289,17 +288,17 @@ tty_output_display_block (struct window *w, struct display_line *dl, int block, modeline and this will suffice for that. */ else if (rb->type == RUNE_BLANK || rb->type == RUNE_HLINE) { - Emchar ch_to_add; + Charc ec_to_add; int size = rb->width; if (rb->type == RUNE_BLANK) - ch_to_add = ' '; + ec_to_add = ASCII_TO_CHARC (' '); else - ch_to_add = '-'; + ec_to_add = ASCII_TO_CHARC ('-'); while (size--) - Dynarr_add (buf, ch_to_add); - tty_output_emchar_dynarr (w, dl, buf, rb->xpos, findex, 0); + Dynarr_add (buf, ec_to_add); + tty_output_charc_dynarr (w, dl, buf, rb->xpos, findex, 0); if (xpos >= cursor_start && cursor_start < xpos + Dynarr_length (buf)) @@ -360,7 +359,7 @@ tty_output_display_block (struct window *w, struct display_line *dl, int block, } if (Dynarr_length (buf)) - tty_output_emchar_dynarr (w, dl, buf, xpos, findex, 0); + tty_output_charc_dynarr (w, dl, buf, xpos, findex, 0); Dynarr_free (buf); } @@ -537,31 +536,31 @@ tty_output_bufbyte_string (struct window *w, struct display_line *dl, tty_turn_off_face (w, findex); } -static Bufbyte_dynarr *tty_output_emchar_dynarr_dynarr; +static Bufbyte_dynarr *tty_output_charc_dynarr_dynarr; /***************************************************************************** - tty_output_emchar_dynarr + tty_output_charc_dynarr Given a string and a starting position, output that string in the given face. If cursor is true, draw a cursor around the string. ****************************************************************************/ static void -tty_output_emchar_dynarr (struct window *w, struct display_line *dl, - Emchar_dynarr *buf, int xpos, face_index findex, - int cursor) +tty_output_charc_dynarr (struct window *w, struct display_line *dl, + Charc_dynarr *buf, int xpos, face_index findex, + int cursor) { - if (!tty_output_emchar_dynarr_dynarr) - tty_output_emchar_dynarr_dynarr = Dynarr_new (Bufbyte); + if (!tty_output_charc_dynarr_dynarr) + tty_output_charc_dynarr_dynarr = Dynarr_new (Bufbyte); else - Dynarr_reset (tty_output_emchar_dynarr_dynarr); + Dynarr_reset (tty_output_charc_dynarr_dynarr); - convert_emchar_string_into_bufbyte_dynarr (Dynarr_atp (buf, 0), + convert_charc_string_into_bufbyte_dynarr (Dynarr_atp (buf, 0), Dynarr_length (buf), - tty_output_emchar_dynarr_dynarr); + tty_output_charc_dynarr_dynarr); tty_output_bufbyte_string (w, dl, - Dynarr_atp (tty_output_emchar_dynarr_dynarr, 0), - Dynarr_length (tty_output_emchar_dynarr_dynarr), + Dynarr_atp (tty_output_charc_dynarr_dynarr, 0), + Dynarr_length (tty_output_charc_dynarr_dynarr), xpos, findex, cursor); } diff --git a/src/redisplay-x.c b/src/redisplay-x.c index ff49eb5..711638b 100644 --- a/src/redisplay-x.c +++ b/src/redisplay-x.c @@ -123,7 +123,7 @@ struct textual_run static int separate_textual_runs (unsigned char *text_storage, struct textual_run *run_storage, - const Emchar *str, Charcount len) + const Charc *str, Charcount len) { Lisp_Object prev_charset = Qunbound; /* not Qnil because that is a possible valid charset when @@ -137,16 +137,25 @@ separate_textual_runs (unsigned char *text_storage, for (i = 0; i < len; i++) { - Emchar ch = str[i]; - Lisp_Object charset; + Charc cc = str[i]; + Lisp_Object charset = CHARC_CHARSET (cc); + int code_point = CHARC_CODE_POINT (cc); int byte1, byte2; int dimension; int graphic; - BREAKUP_CHAR (ch, charset, byte1, byte2); dimension = XCHARSET_DIMENSION (charset); graphic = XCHARSET_GRAPHIC (charset); - + if (dimension == 1) + { + byte1 = code_point; + byte2 = 0; + } + else + { + byte1 = code_point >> 8; + byte2 = code_point & 0xFF; + } if (!EQ (charset, prev_charset)) { run_storage[runs_so_far].ptr = text_storage; @@ -241,7 +250,7 @@ x_text_width_single_run (struct face_cachel *cachel, struct textual_run *run) */ static int -x_text_width (struct frame *f, struct face_cachel *cachel, const Emchar *str, +x_text_width (struct frame *f, struct face_cachel *cachel, const Charc *str, Charcount len) { int width_so_far = 0; @@ -318,7 +327,7 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, int cursor_width, int cursor_height) { struct frame *f = XFRAME (w->frame); - Emchar_dynarr *buf = Dynarr_new (Emchar); + Charc_dynarr *buf = Dynarr_new (Charc); Lisp_Object window; struct display_block *db = Dynarr_atp (dl->display_blocks, block); @@ -341,7 +350,7 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, findex = rb->findex; xpos = rb->xpos; if (rb->type == RUNE_CHAR) - charset = CHAR_CHARSET (rb->object.chr.ch); + charset = CHARC_CHARSET (rb->object.cglyph); if (end < 0) end = Dynarr_length (rba); @@ -352,10 +361,11 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, rb = Dynarr_atp (rba, elt); if (rb->findex == findex && rb->type == RUNE_CHAR - && rb->object.chr.ch != '\n' && rb->cursor_type != CURSOR_ON - && EQ (charset, CHAR_CHARSET (rb->object.chr.ch))) + && (!CHARC_ASCII_EQ (rb->object.cglyph, '\n')) + && rb->cursor_type != CURSOR_ON + && EQ (charset, CHARC_CHARSET (rb->object.cglyph))) { - Dynarr_add (buf, rb->object.chr.ch); + Dynarr_add (buf, rb->object.cglyph); width += rb->width; elt++; } @@ -376,17 +386,17 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, { findex = rb->findex; xpos = rb->xpos; - charset = CHAR_CHARSET (rb->object.chr.ch); + charset = CHARC_CHARSET (rb->object.cglyph); if (rb->cursor_type == CURSOR_ON) { - if (rb->object.chr.ch == '\n') + if (CHARC_ASCII_EQ (rb->object.cglyph, '\n')) { x_output_eol_cursor (w, dl, xpos, findex); } else { - Dynarr_add (buf, rb->object.chr.ch); + Dynarr_add (buf, rb->object.cglyph); x_output_string (w, dl, buf, xpos, 0, start_pixpos, rb->width, findex, 1, cursor_start, cursor_width, @@ -397,7 +407,7 @@ x_output_display_block (struct window *w, struct display_line *dl, int block, xpos += rb->width; elt++; } - else if (rb->object.chr.ch == '\n') + else if (CHARC_ASCII_EQ (rb->object.cglyph, '\n')) { /* Clear in case a cursor was formerly here. */ redisplay_clear_region (window, findex, xpos, @@ -765,7 +775,7 @@ x_get_gc (struct device *d, Lisp_Object font, Lisp_Object fg, Lisp_Object bg, ****************************************************************************/ void x_output_string (struct window *w, struct display_line *dl, - Emchar_dynarr *buf, int xpos, int xoffset, int clip_start, + Charc_dynarr *buf, int xpos, int xoffset, int clip_start, int width, face_index findex, int cursor, int cursor_start, int cursor_width, int cursor_height) { diff --git a/src/redisplay.c b/src/redisplay.c index e664075..e40c348 100644 --- a/src/redisplay.c +++ b/src/redisplay.c @@ -501,13 +501,13 @@ Lisp_Object Qtop_bottom; /***************************************************************************/ static int -redisplay_text_width_emchar_string (struct window *w, int findex, - Emchar *str, Charcount len) +redisplay_text_width_charc_string (struct window *w, int findex, + Charc *str, Charcount len) { - unsigned char charsets[NUM_LEADING_BYTES]; + Charset_ID charsets[NUM_LEADING_BYTES]; Lisp_Object window; - find_charsets_in_emchar_string (charsets, str, len); + find_charsets_in_charc_string (charsets, str, len); XSETWINDOW (window, w); ensure_face_cachel_complete (WINDOW_FACE_CACHEL (w, findex), window, charsets); @@ -516,24 +516,24 @@ redisplay_text_width_emchar_string (struct window *w, int findex, WINDOW_FACE_CACHEL (w, findex), str, len)); } -static Emchar_dynarr *rtw_emchar_dynarr; +static Charc_dynarr *rtw_charc_dynarr; int redisplay_text_width_string (struct window *w, int findex, Bufbyte *nonreloc, Lisp_Object reloc, Bytecount offset, Bytecount len) { - if (!rtw_emchar_dynarr) - rtw_emchar_dynarr = Dynarr_new (Emchar); - Dynarr_reset (rtw_emchar_dynarr); + if (!rtw_charc_dynarr) + rtw_charc_dynarr = Dynarr_new (Charc); + Dynarr_reset (rtw_charc_dynarr); fixup_internal_substring (nonreloc, reloc, offset, &len); if (STRINGP (reloc)) nonreloc = XSTRING_DATA (reloc); - convert_bufbyte_string_into_emchar_dynarr (nonreloc, len, rtw_emchar_dynarr); - return redisplay_text_width_emchar_string - (w, findex, Dynarr_atp (rtw_emchar_dynarr, 0), - Dynarr_length (rtw_emchar_dynarr)); + convert_bufbyte_string_into_charc_dynarr (nonreloc, len, rtw_charc_dynarr); + return redisplay_text_width_charc_string + (w, findex, Dynarr_atp (rtw_charc_dynarr, 0), + Dynarr_length (rtw_charc_dynarr)); } int @@ -541,26 +541,26 @@ redisplay_frame_text_width_string (struct frame *f, Lisp_Object face, Bufbyte *nonreloc, Lisp_Object reloc, Bytecount offset, Bytecount len) { - unsigned char charsets[NUM_LEADING_BYTES]; + Charset_ID charsets[NUM_LEADING_BYTES]; Lisp_Object frame; struct face_cachel cachel; - if (!rtw_emchar_dynarr) - rtw_emchar_dynarr = Dynarr_new (Emchar); - Dynarr_reset (rtw_emchar_dynarr); + if (!rtw_charc_dynarr) + rtw_charc_dynarr = Dynarr_new (Charc); + Dynarr_reset (rtw_charc_dynarr); fixup_internal_substring (nonreloc, reloc, offset, &len); if (STRINGP (reloc)) nonreloc = XSTRING_DATA (reloc); - convert_bufbyte_string_into_emchar_dynarr (nonreloc, len, rtw_emchar_dynarr); + convert_bufbyte_string_into_charc_dynarr (nonreloc, len, rtw_charc_dynarr); find_charsets_in_bufbyte_string (charsets, nonreloc, len); reset_face_cachel (&cachel); cachel.face = face; XSETFRAME (frame, f); ensure_face_cachel_complete (&cachel, frame, charsets); return DEVMETH (XDEVICE (FRAME_DEVICE (f)), - text_width, (f, &cachel, Dynarr_atp (rtw_emchar_dynarr, 0), - Dynarr_length (rtw_emchar_dynarr))); + text_width, (f, &cachel, Dynarr_atp (rtw_charc_dynarr, 0), + Dynarr_length (rtw_charc_dynarr))); } /* Return the display block from DL of the given TYPE. A display line @@ -950,6 +950,7 @@ add_emchar_rune_1 (pos_data *data, int no_contribute_to_line_height) { struct rune rb, *crb; int width, local; + Charc char_glyph; if (data->start_col) { @@ -966,13 +967,17 @@ add_emchar_rune_1 (pos_data *data, int no_contribute_to_line_height) if (data->ch == '\n') { + char_glyph = ASCII_TO_CHARC ('\n'); data->font_is_bogus = 0; /* Cheesy end-of-line pseudo-character. */ width = data->blank_width; } else { - Lisp_Object charset = CHAR_CHARSET (data->ch); + Lisp_Object charset; + + char_glyph = CHAR_TO_CHARC (data->ch); + charset = CHARC_CHARSET (char_glyph); if (!EQ (charset, data->last_charset) || data->findex != data->last_findex) { @@ -1013,9 +1018,9 @@ add_emchar_rune_1 (pos_data *data, int no_contribute_to_line_height) if (width < 0) { /* bummer. Proportional fonts. */ - width = redisplay_text_width_emchar_string (XWINDOW (data->window), - data->findex, - &data->ch, 1); + width = redisplay_text_width_charc_string (XWINDOW (data->window), + data->findex, + &char_glyph, 1); } } @@ -1046,7 +1051,8 @@ add_emchar_rune_1 (pos_data *data, int no_contribute_to_line_height) data->bi_bufpos); else crb->bufpos = - bytecount_to_charcount (XSTRING_DATA (data->string), data->bi_bufpos); + bytecount_to_charcount (XSTRING_DATA (data->string), + data->bi_bufpos); } else if (data->is_modeline) crb->bufpos = data->modeline_charpos; @@ -1054,7 +1060,9 @@ add_emchar_rune_1 (pos_data *data, int no_contribute_to_line_height) /* Text but not in buffer */ crb->bufpos = 0; crb->type = RUNE_CHAR; - crb->object.chr.ch = data->font_is_bogus ? '~' : data->ch; + crb->object.cglyph = data->font_is_bogus + ? ASCII_TO_CHARC ('~') + : char_glyph; crb->endpos = 0; if (data->cursor_type == CURSOR_ON) @@ -2768,7 +2776,7 @@ done: { struct rune *rb = Dynarr_atp (db->runes, elt); - if ((rb->type == RUNE_CHAR && rb->object.chr.ch == ' ') + if ((rb->type == RUNE_CHAR && CHARC_ASCII_EQ (rb->object.cglyph, ' ')) || rb->type == RUNE_BLANK) { dl->bounds.left_white += rb->width; @@ -2788,8 +2796,7 @@ done: { struct rune *rb = Dynarr_atp (db->runes, elt); - if (!(rb->type == RUNE_CHAR && rb->object.chr.ch < 0x100 - && isspace (rb->object.chr.ch)) + if (!(rb->type == RUNE_CHAR && CHARC_IS_SPACE (rb->object.cglyph)) && !rb->type == RUNE_BLANK) { dl->bounds.right_white = rb->xpos + rb->width; @@ -3755,8 +3762,9 @@ generate_formatted_string_db (Lisp_Object format_str, Lisp_Object result_str, if (Dynarr_atp (db->runes, elt)->type == RUNE_CHAR) { len += (set_charptr_emchar - (strdata + len, Dynarr_atp (db->runes, - elt)->object.chr.ch)); + (strdata + len, + CHARC_TO_CHAR (Dynarr_atp (db->runes, + elt)->object.cglyph))); } } @@ -4992,7 +5000,7 @@ create_string_text_block (struct window *w, Lisp_Object disp_string, { struct rune *rb = Dynarr_atp (db->runes, elt); - if ((rb->type == RUNE_CHAR && rb->object.chr.ch == ' ') + if ((rb->type == RUNE_CHAR && CHARC_ASCII_EQ (rb->object.cglyph, ' ')) || rb->type == RUNE_BLANK) { dl->bounds.left_white += rb->width; @@ -5012,8 +5020,7 @@ create_string_text_block (struct window *w, Lisp_Object disp_string, { struct rune *rb = Dynarr_atp (db->runes, elt); - if (!(rb->type == RUNE_CHAR && rb->object.chr.ch < 0x100 - && isspace (rb->object.chr.ch)) + if (!(rb->type == RUNE_CHAR && CHARC_IS_SPACE (rb->object.cglyph)) && !rb->type == RUNE_BLANK) { dl->bounds.right_white = rb->xpos + rb->width; @@ -8914,7 +8921,7 @@ pixel_to_glyph_translation (struct frame *f, int x_coord, int y_coord, } else if (past_end || (rb->type == RUNE_CHAR - && rb->object.chr.ch == '\n')) + && CHARC_ASCII_EQ (rb->object.cglyph, '\n'))) { (*row)--; /* At this point we may have glyphs in the right diff --git a/src/redisplay.h b/src/redisplay.h index b93dfb0..88d272f 100644 --- a/src/redisplay.h +++ b/src/redisplay.h @@ -25,6 +25,8 @@ Boston, MA 02111-1307, USA. */ #ifndef INCLUDED_redisplay_h_ #define INCLUDED_redisplay_h_ +#include "character.h" + /* Redisplay DASSERT types */ #define DB_DISP_POS 1 #define DB_DISP_TEXT_LAYOUT 2 @@ -158,10 +160,7 @@ struct rune } dglyph; /* CHAR */ - struct - { - Emchar ch; /* Character of this rune. */ - } chr; + struct Charc cglyph; /* Character of this rune. */ /* HLINE */ struct diff --git a/src/regex.c b/src/regex.c index f5897a2..44e8e0b 100644 --- a/src/regex.c +++ b/src/regex.c @@ -6,6 +6,7 @@ Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. Copyright (C) 1995 Ben Wing. + Copyright (C) 1999,2000,2001 MORIOKA Tomohiko This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -3362,8 +3363,12 @@ compile_extended_range (re_char **p_ptr, re_char *pend, ranges entirely within the first 256 chars. */ if ((range_start >= 0x100 || range_end >= 0x100) - && CHAR_LEADING_BYTE (range_start) != - CHAR_LEADING_BYTE (range_end)) +#ifdef UTF2000 + && CHAR_CHARSET_ID (range_start) != CHAR_CHARSET_ID (range_end) +#else + && CHAR_LEADING_BYTE (range_start) != CHAR_LEADING_BYTE (range_end) +#endif + ) return REG_ERANGESPAN; /* As advertised, translations only work over the 0 - 0x7F range. @@ -3655,19 +3660,30 @@ re_compile_fastmap (struct re_pattern_buffer *bufp) #endif matchsyntax: #ifdef MULE +#ifdef UTF2000 + for (j = 0; j < 0x80; j++) + if (SYNTAX_UNSAFE + (XCHAR_TABLE + (regex_emacs_buffer->syntax_table), j) == + (enum syntaxcode) k) + fastmap[j] = 1; +#else for (j = 0; j < 0x80; j++) if (SYNTAX_UNSAFE (XCHAR_TABLE (regex_emacs_buffer->mirror_syntax_table), j) == (enum syntaxcode) k) fastmap[j] = 1; +#endif for (j = 0x80; j < 0xA0; j++) { +#ifndef UTF2000 if (LEADING_BYTE_PREFIX_P(j)) /* too complicated to calculate this right */ fastmap[j] = 1; else { +#endif int multi_p; Lisp_Object cset; @@ -3679,7 +3695,9 @@ re_compile_fastmap (struct re_pattern_buffer *bufp) == Sword || multi_p) fastmap[j] = 1; } +#ifndef UTF2000 } +#endif } #else /* not MULE */ for (j = 0; j < (1 << BYTEWIDTH); j++) @@ -3698,19 +3716,30 @@ re_compile_fastmap (struct re_pattern_buffer *bufp) #endif matchnotsyntax: #ifdef MULE +#ifdef UTF2000 + for (j = 0; j < 0x80; j++) + if (SYNTAX_UNSAFE + (XCHAR_TABLE + (regex_emacs_buffer->syntax_table), j) != + (enum syntaxcode) k) + fastmap[j] = 1; +#else for (j = 0; j < 0x80; j++) if (SYNTAX_UNSAFE (XCHAR_TABLE (regex_emacs_buffer->mirror_syntax_table), j) != (enum syntaxcode) k) fastmap[j] = 1; +#endif for (j = 0x80; j < 0xA0; j++) { +#ifndef UTF2000 if (LEADING_BYTE_PREFIX_P(j)) /* too complicated to calculate this right */ fastmap[j] = 1; else { +#endif int multi_p; Lisp_Object cset; @@ -3722,7 +3751,9 @@ re_compile_fastmap (struct re_pattern_buffer *bufp) != Sword || multi_p) fastmap[j] = 1; } +#ifndef UTF2000 } +#endif } #else /* not MULE */ for (j = 0; j < (1 << BYTEWIDTH); j++) @@ -4242,9 +4273,15 @@ re_search_2 (struct re_pattern_buffer *bufp, const char *str1, #define POS_AFTER_GAP_UNSAFE(d) ((d) == end1 ? string2 : (d)) /* Test if CH is a word-constituent character. (XEmacs change) */ +#ifdef UTF2000 +#define WORDCHAR_P_UNSAFE(ch) \ + (SYNTAX_UNSAFE (XCHAR_TABLE (regex_emacs_buffer->syntax_table), \ + ch) == Sword) +#else #define WORDCHAR_P_UNSAFE(ch) \ (SYNTAX_UNSAFE (XCHAR_TABLE (regex_emacs_buffer->mirror_syntax_table), \ ch) == Sword) +#endif /* Free everything we malloc. */ #ifdef MATCH_MAY_ALLOCATE @@ -5743,8 +5780,13 @@ re_match_2_internal (struct re_pattern_buffer *bufp, re_char *string1, #endif emch = charptr_emchar ((const Bufbyte *) d); +#ifdef UTF2000 + matches = (SYNTAX_FROM_CACHE (XCHAR_TABLE (regex_emacs_buffer->syntax_table), + emch) == (enum syntaxcode) mcnt); +#else matches = (SYNTAX_FROM_CACHE (XCHAR_TABLE (regex_emacs_buffer->mirror_syntax_table), emch) == (enum syntaxcode) mcnt); +#endif INC_CHARPTR (d); if (matches != should_succeed) goto fail; diff --git a/src/search.c b/src/search.c index 7c5f447..dcfefee 100644 --- a/src/search.c +++ b/src/search.c @@ -1,6 +1,7 @@ /* String search routines for XEmacs. Copyright (C) 1985, 1986, 1987, 1992-1995 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. + Copyright (C) 1999,2000,2001 MORIOKA Tomohiko This file is part of XEmacs. @@ -788,8 +789,12 @@ skip_chars (struct buffer *buf, int forwardp, int syntaxp, int negate = 0; REGISTER int i; #ifndef emacs +#ifdef UTF2000 + Lisp_Char_Table *syntax_table = XCHAR_TABLE (buf->syntax_table); +#else Lisp_Char_Table *syntax_table = XCHAR_TABLE (buf->mirror_syntax_table); #endif +#endif Bufpos limit; if (NILP (lim)) @@ -1318,7 +1323,11 @@ search_buffer (struct buffer *buf, Lisp_Object string, Bufpos bufpos, { /* Keep track of which character set row contains the characters that need translation. */ +#ifdef UTF2000 + int charset_base_code = c >> 6; +#else int charset_base_code = c & ~CHAR_FIELD3_MASK; +#endif if (charset_base == -1) charset_base = charset_base_code; else if (charset_base != charset_base_code) @@ -1618,7 +1627,11 @@ boyer_moore (struct buffer *buf, Bufbyte *base_pat, Bytecount len, while (!BUFBYTE_FIRST_BYTE_P (*charstart)) charstart--; untranslated = charptr_emchar (charstart); +#ifdef UTF2000 + if (charset_base == (untranslated >> 6)) +#else if (charset_base == (untranslated & ~CHAR_FIELD3_MASK)) +#endif { ch = TRANSLATE (trt, untranslated); if (!BUFBYTE_FIRST_BYTE_P (*ptr)) @@ -1988,7 +2001,11 @@ wordify (Lisp_Object buffer, Lisp_Object string) Charcount i, len; EMACS_INT punct_count = 0, word_count = 0; struct buffer *buf = decode_buffer (buffer, 0); +#ifdef UTF2000 + Lisp_Char_Table *syntax_table = XCHAR_TABLE (buf->syntax_table); +#else Lisp_Char_Table *syntax_table = XCHAR_TABLE (buf->mirror_syntax_table); +#endif CHECK_STRING (string); len = XSTRING_CHAR_LENGTH (string); @@ -2357,7 +2374,11 @@ match since only regular expressions have distinguished subexpressions. buf = XBUFFER (buffer); } +#ifdef UTF2000 + syntax_table = XCHAR_TABLE (buf->syntax_table); +#else syntax_table = XCHAR_TABLE (buf->mirror_syntax_table); +#endif case_action = nochange; /* We tried an initialization */ /* but some C compilers blew it */ diff --git a/src/select-x.c b/src/select-x.c index 05c71a1..835c7a5 100644 --- a/src/select-x.c +++ b/src/select-x.c @@ -1628,6 +1628,14 @@ Set the value of the named CUTBUFFER (typically CUT_BUFFER0) to STRING. continue; } +#ifdef UTF2000 + if ((*ptr) <= 0xC3) + { + chartypes = LATIN_1; + ptr += 2; + continue; + } +#else if ((*ptr) == LEADING_BYTE_LATIN_ISO8859_1 || (*ptr) == LEADING_BYTE_CONTROL_1) { @@ -1635,6 +1643,7 @@ Set the value of the named CUTBUFFER (typically CUT_BUFFER0) to STRING. ptr += 2; continue; } +#endif chartypes = WORLD; break; diff --git a/src/symbols.c b/src/symbols.c index b147805..9604bfa 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -3264,6 +3264,11 @@ init_symbols_once_early (void) XSYMBOL (Qnil)->function = Qunbound; +#ifdef UTF2000 + /* [tomo:2002-01-22] We should not define Qunloaded as a normal symbol */ + defsymbol (&Qunloaded, "#"); +#endif + defsymbol (&Qt, "t"); XSYMBOL (Qt)->value = Qt; /* Veritas aeterna */ Vquit_flag = Qnil; diff --git a/src/syntax.c b/src/syntax.c index db3faba..5e495b7 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -1,6 +1,7 @@ /* XEmacs routines to deal with syntax tables; also word and list parsing. Copyright (C) 1985-1994 Free Software Foundation, Inc. Copyright (C) 1995 Sun Microsystems, Inc. + Copyright (C) 2001 MORIOKA Tomohiko This file is part of XEmacs. @@ -232,7 +233,9 @@ BUFFER defaults to the current buffer if omitted. struct buffer *buf = decode_buffer (buffer, 0); syntax_table = check_syntax_table (syntax_table, Qnil); buf->syntax_table = syntax_table; +#ifndef UTF2000 buf->mirror_syntax_table = XCHAR_TABLE (syntax_table)->mirror_table; +#endif /* Indicate that this buffer now has a specified syntax table. */ buf->local_var_flags |= XINT (buffer_local_flags.syntax_table); return syntax_table; @@ -420,8 +423,12 @@ update_syntax_cache (int pos, int count) if (EQ (Fsyntax_table_p (tmp_table), Qt)) { syntax_cache.use_code = 0; +#ifdef UTF2000 + syntax_cache.current_syntax_table = tmp_table; +#else syntax_cache.current_syntax_table = XCHAR_TABLE (tmp_table)->mirror_table; +#endif } else if (CONSP (tmp_table) && INTP (XCAR (tmp_table))) { @@ -431,8 +438,13 @@ update_syntax_cache (int pos, int count) else { syntax_cache.use_code = 0; +#ifdef UTF2000 + syntax_cache.current_syntax_table = + syntax_cache.buffer->syntax_table; +#else syntax_cache.current_syntax_table = syntax_cache.buffer->mirror_syntax_table; +#endif } #ifdef SYNTAX_CACHE_STATISTICS @@ -543,7 +555,9 @@ syntax table. */ (character, syntax_table)) { +#ifndef UTF2000 Lisp_Char_Table *mirrortab; +#endif if (NILP (character)) { @@ -551,8 +565,13 @@ syntax table. } CHECK_CHAR_COERCE_INT (character); syntax_table = check_syntax_table (syntax_table, current_buffer->syntax_table); +#ifdef UTF2000 + return make_char (syntax_code_spec[(int) SYNTAX (XCHAR_TABLE(syntax_table), + XCHAR (character))]); +#else mirrortab = XCHAR_TABLE (XCHAR_TABLE (syntax_table)->mirror_table); return make_char (syntax_code_spec[(int) SYNTAX (mirrortab, XCHAR (character))]); +#endif } #ifdef MULE @@ -588,13 +607,19 @@ syntax table. */ (character, syntax_table)) { +#ifndef UTF2000 Lisp_Char_Table *mirrortab; +#endif int code; CHECK_CHAR_COERCE_INT (character); syntax_table = check_syntax_table (syntax_table, current_buffer->syntax_table); +#ifdef UTF2000 + code = SYNTAX (XCHAR_TABLE (syntax_table), XCHAR (character)); +#else mirrortab = XCHAR_TABLE (XCHAR_TABLE (syntax_table)->mirror_table); code = SYNTAX (mirrortab, XCHAR (character)); +#endif if (code == Sopen || code == Sclose || code == Sstring) return syntax_match (syntax_table, XCHAR (character)); return Qnil; @@ -1698,8 +1723,12 @@ Optional arg BUFFER defaults to the current buffer. Bufpos beg = BUF_BEGV (buf); Bufpos pos = BUF_PT (buf); #ifndef emacs +#ifdef UTF2000 + Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->syntax_table); +#else Lisp_Char_Table *mirrortab = XCHAR_TABLE (buf->mirror_syntax_table); #endif +#endif Emchar c = '\0'; /* initialize to avoid compiler warnings */ @@ -2187,6 +2216,7 @@ cmst_mapfun (struct chartab_range *range, Lisp_Object val, void *arg) return 0; } +#ifndef UTF2000 static void update_just_this_syntax_table (Lisp_Char_Table *ct) { @@ -2221,6 +2251,7 @@ update_syntax_table (Lisp_Char_Table *ct) else update_just_this_syntax_table (ct); } +#endif /************************************************************************/ diff --git a/src/syntax.h b/src/syntax.h index 3502cfb..4a5bffe 100644 --- a/src/syntax.h +++ b/src/syntax.h @@ -1,5 +1,6 @@ /* Declarations having to do with XEmacs syntax tables. Copyright (C) 1985, 1992, 1993 Free Software Foundation, Inc. + Copyright (C) 2001,2003 MORIOKA Tomohiko This file is part of XEmacs. @@ -45,6 +46,10 @@ integers. We can do this successfully because syntax tables are now an abstract type, where we control all access. */ +/* The standard syntax table is stored where it will automatically + be used in all new buffers. */ +extern Lisp_Object Vstandard_syntax_table; + enum syntaxcode { Swhitespace, /* whitespace character */ @@ -73,8 +78,34 @@ enum syntaxcode charset_syntax (struct buffer *buf, Lisp_Object charset, /* Return the syntax code for a particular character and mirror table. */ +#ifdef UTF2000 +INLINE_HEADER enum syntaxcode +SYNTAX_CODE_UNSAFE (Lisp_Char_Table *table, Emchar c); +INLINE_HEADER enum syntaxcode +SYNTAX_CODE_UNSAFE (Lisp_Char_Table *table, Emchar c) +{ + int code = CHAR_TABLE_VALUE_UNSAFE (table, c); + int ret = Spunct; + + if (CONSP (code)) + code = XCAR (code); + ret = XINT (code); + + if (ret == Sinherit) + { + code = CHAR_TABLE_VALUE_UNSAFE (XCHAR_TABLE + (Vstandard_syntax_table), c); + if (CONSP (code)) + code = XCAR (code); + return XINT (code); + } + else + return ret; +} +#else #define SYNTAX_CODE_UNSAFE(table, c) \ ((enum syntaxcode) XINT (CHAR_TABLE_VALUE_UNSAFE (table, c))) +#endif INLINE_HEADER enum syntaxcode SYNTAX_CODE (Lisp_Char_Table *table, Emchar c); INLINE_HEADER enum syntaxcode @@ -257,10 +288,6 @@ determine that no second character is needed to terminate the comment. EXFUN (Fchar_syntax, 2); EXFUN (Fforward_word, 2); -/* The standard syntax table is stored where it will automatically - be used in all new buffers. */ -extern Lisp_Object Vstandard_syntax_table; - /* This array, indexed by a character, contains the syntax code which that character signifies (as a char). For example, (enum syntaxcode) syntax_spec_code['w'] is Sword. */ @@ -285,7 +312,9 @@ extern struct buffer *regex_emacs_buffer; /* Target text (string or buffer), used for syntax-table properties. */ extern Lisp_Object regex_match_object; +#ifndef UTF2000 void update_syntax_table (Lisp_Char_Table *ct); +#endif /* The syntax table cache */ @@ -488,6 +517,42 @@ void update_syntax_cache (int pos, int count); #define SETUP_SYNTAX_CACHE_FOR_BUFFER(BUFFER, FROM, COUNT) \ SETUP_SYNTAX_CACHE_FOR_OBJECT (Qnil, (BUFFER), (FROM), (COUNT)) +#ifdef UTF2000 +#define SETUP_SYNTAX_CACHE_FOR_OBJECT(OBJECT, BUFFER, FROM, COUNT) \ + do { \ + syntax_cache.buffer = (BUFFER); \ + syntax_cache.object = (OBJECT); \ + if (NILP (syntax_cache.object)) \ + { \ + XSETBUFFER (syntax_cache.object, syntax_cache.buffer); \ + } \ + else if (EQ (syntax_cache.object, Qt)) \ + { \ + XSETBUFFER (syntax_cache.object, syntax_cache.buffer); \ + } \ + else if (STRINGP (syntax_cache.object)) \ + { \ + /* do nothing */; \ + } \ + else if (BUFFERP (syntax_cache.object)) \ + { \ + syntax_cache.buffer = XBUFFER (syntax_cache.object); \ + } \ + else \ + { \ + /* OBJECT must be buffer/string/t/nil */ \ + assert(0); \ + } \ + syntax_cache.current_syntax_table \ + = syntax_cache.buffer->syntax_table; \ + syntax_cache.use_code = 0; \ + if (lookup_syntax_properties) \ + { \ + SYNTAX_CACHE_STATISTICS_COUNT_INIT; \ + update_syntax_cache ((FROM) + ((COUNT) > 0 ? 0 : -1), (COUNT)); \ + } \ + } while (0) +#else #define SETUP_SYNTAX_CACHE_FOR_OBJECT(OBJECT, BUFFER, FROM, COUNT) \ do { \ syntax_cache.buffer = (BUFFER); \ @@ -522,6 +587,7 @@ void update_syntax_cache (int pos, int count); update_syntax_cache ((FROM) + ((COUNT) > 0 ? 0 : -1), (COUNT)); \ } \ } while (0) +#endif #define SYNTAX_CODE_PREFIX(c) \ ((c >> 7) & 1) diff --git a/src/toolbar-x.c b/src/toolbar-x.c index 0e5a731..ed6c280 100644 --- a/src/toolbar-x.c +++ b/src/toolbar-x.c @@ -225,8 +225,8 @@ x_output_toolbar_button (struct frame *f, Lisp_Object button) WINDOW_FACE_CACHEL (w, DEFAULT_INDEX); struct display_line dl; Lisp_Object string = IMAGE_INSTANCE_TEXT_STRING (p); - unsigned char charsets[NUM_LEADING_BYTES]; - Emchar_dynarr *buf; + Charset_ID charsets[NUM_LEADING_BYTES]; + Charc_dynarr *buf; struct font_metric_info fm; /* This could be true if we were called via the Expose event @@ -238,11 +238,11 @@ x_output_toolbar_button (struct frame *f, Lisp_Object button) MARK_TOOLBAR_CHANGED; return; } - buf = Dynarr_new (Emchar); - convert_bufbyte_string_into_emchar_dynarr + buf = Dynarr_new (Charc); + convert_bufbyte_string_into_charc_dynarr (XSTRING_DATA (string), XSTRING_LENGTH (string), buf); - find_charsets_in_emchar_string (charsets, Dynarr_atp (buf, 0), - Dynarr_length (buf)); + find_charsets_in_charc_string (charsets, Dynarr_atp (buf, 0), + Dynarr_length (buf)); ensure_face_cachel_complete (cachel, window, charsets); face_cachel_charset_font_metric_info (cachel, charsets, &fm);