Contents of release-21-2 in 1999-06-17-23.
authortomo <tomo>
Thu, 17 Jun 1999 14:20:01 +0000 (14:20 +0000)
committertomo <tomo>
Thu, 17 Jun 1999 14:20:01 +0000 (14:20 +0000)
49 files changed:
CHANGES-beta
dynodump/_dynodump.h
dynodump/dynodump.c
dynodump/i386/_relocate.c
dynodump/i386/machdep.h
dynodump/ppc/_relocate.c
dynodump/ppc/machdep.h
dynodump/sparc/_relocate.c
dynodump/sparc/machdep.h
dynodump/syms.c
etc/NEWS
lib-src/rcs2log
lisp/ChangeLog
lisp/help-nomule.el
lisp/ldap.el
lisp/lib-complete.el
lisp/mule/cyrillic.el
lisp/mule/mule-misc.el
lisp/mule/thai-xtis.el
lisp/mule/vietnamese.el
lisp/select.el
lisp/subr.el
man/info.texi
man/texinfo.tex
man/texinfo.texi
man/xemacs-faq.texi
nt/ChangeLog
nt/xemacs.mak
src/ChangeLog
src/dialog-msw.c
src/event-msw.c
src/file-coding.c
src/glyphs-msw.c
src/glyphs-widget.c
src/glyphs.c
src/glyphs.h
src/gui.c
src/gui.h
src/lisp.h
src/menubar-msw.c
src/menubar.c
src/menubar.h
src/mule-ccl.c
src/mule-ccl.h
src/mule-charset.c
src/redisplay-msw.c
src/redisplay-x.c
src/unexsol2.c
tests/glyph-test.el

index 401605d..295d3d1 100644 (file)
@@ -1,5 +1,13 @@
                                                        -*- indented-text -*-
                                                        -*- indented-text -*-
+to 21.2.17 "Chiyoda"
+-- CCL engine fix from MORIOKA Tomohiko
+-- mswindows build fixes from Norbert Koch
+-- miscellaneous fixes from Andy Piper
+-- automated tests for mswindows from Adrian Aichner
+-- tree-view and tab-control widget glyph support from Andy Piper
+
 to 21.2.16 "Sumida"
 to 21.2.16 "Sumida"
+-- miscellaneous fixes from Hrvoje Niksic and Olivier Galibert
 -- make selection more mswindows conformant.
 -- Make customize use specifiers from Jan Vroonhof
 -- Cyrillic CCL crash fix from MORIOKA Tomohiko
 -- make selection more mswindows conformant.
 -- Make customize use specifiers from Jan Vroonhof
 -- Cyrillic CCL crash fix from MORIOKA Tomohiko
index c09bd7f..847c4eb 100644 (file)
@@ -32,7 +32,7 @@
  * Mountain View, California 94043
  */
 
  * Mountain View, California 94043
  */
 
-#pragma ident  "@(#) $Id: _dynodump.h,v 1.5 1996/05/23 18:39:07 georgn Exp $ - SMI"
+#pragma ident  "@(#) $Id: _dynodump.h,v 1.3 1997/05/29 04:22:29 steve Exp $ - SMI"
 
 #ifndef        _DYNODUMP_DOT_H
 #define        _DYNODUMP_DOT_H
 
 #ifndef        _DYNODUMP_DOT_H
 #define        _DYNODUMP_DOT_H
index b684813..ff4477d 100644 (file)
@@ -73,7 +73,7 @@
  * N.B. The above commentary is not quite correct in the flags have been hardwired
  *      to RTLD_SAVREL.
  */
  * N.B. The above commentary is not quite correct in the flags have been hardwired
  *      to RTLD_SAVREL.
  */
-#pragma ident  "@(#) $Id: dynodump.c,v 1.8 1996/05/23 18:39:21 georgn Exp $ - SMI"
+#pragma ident  "@(#) $Id: dynodump.c,v 1.6 1998/03/31 20:10:55 steve Exp $ - SMI"
 
 #define __EXTENSIONS__ 1
 
 
 #define __EXTENSIONS__ 1
 
index d3ec59c..f97dd1b 100644 (file)
@@ -32,7 +32,7 @@
  * Mountain View, California 94043
  */
 
  * Mountain View, California 94043
  */
 
-#pragma ident  "@(#) $Id: _relocate.c,v 1.4 1995/06/26 20:12:41 georgn Exp $ - SMI"
+#pragma ident  "@(#) $Id: _relocate.c,v 1.3 1997/05/29 04:23:02 steve Exp $ - SMI"
 
 /* LINTLIBRARY */
 
 
 /* LINTLIBRARY */
 
index c90e29c..4dc66fe 100644 (file)
@@ -32,7 +32,7 @@
  * Mountain View, California 94043
  */
 
  * Mountain View, California 94043
  */
 
-#pragma ident  "@(#) $Id: machdep.h,v 1.2 1995/02/16 22:58:43 georgn Exp $ - SMI"
+#pragma ident  "@(#) $Id: machdep.h,v 1.3 1997/05/29 04:23:02 steve Exp $ - SMI"
 
 /*
  * Global include file for all sgs Intel machine dependent macros, constants
 
 /*
  * Global include file for all sgs Intel machine dependent macros, constants
index feb5ca9..754b417 100644 (file)
@@ -32,7 +32,7 @@
  * Mountain View, California 94043
  */
 
  * Mountain View, California 94043
  */
 
-#pragma ident "@(#) $Id: _relocate.c,v 1.3 1995/06/26 20:16:39 georgn Exp $ - SMI"
+#pragma ident "@(#) $Id: _relocate.c,v 1.4 1998/03/31 20:10:55 steve Exp $ - SMI"
 
 /* LINTLIBRARY */
 
 
 /* LINTLIBRARY */
 
index 2a3d1e6..a649a9c 100644 (file)
@@ -32,7 +32,7 @@
  * Mountain View, California 94043
  */
 
  * Mountain View, California 94043
  */
 
-#pragma ident "@(#) $Id: machdep.h,v 1.2 1995/02/16 22:58:49 georgn Exp $ - SMI"
+#pragma ident "@(#) $Id: machdep.h,v 1.3 1997/05/29 04:23:20 steve Exp $ - SMI"
 
 /*
  * Global include file for all sgs PowerPC machine dependent macros, constants
 
 /*
  * Global include file for all sgs PowerPC machine dependent macros, constants
index 10b0fda..14466f0 100644 (file)
@@ -35,7 +35,7 @@
 /*
  * Update the value of the `_edata' and `_end' symbols.
  */
 /*
  * Update the value of the `_edata' and `_end' symbols.
  */
-#pragma ident  "@(#) $Id: _relocate.c,v 1.4 1995/06/26 20:13:26 georgn Exp $ - SMI"
+#pragma ident  "@(#) $Id: _relocate.c,v 1.4 1998/03/31 20:10:55 steve Exp $ - SMI"
 
 #include       <libelf.h>
 #include       <string.h>
 
 #include       <libelf.h>
 #include       <string.h>
index 972081e..b4b76d8 100644 (file)
@@ -32,7 +32,7 @@
  * Mountain View, California 94043
  */
 
  * Mountain View, California 94043
  */
 
-#pragma ident  "@(#) $Id: machdep.h,v 1.2 1995/02/16 22:58:55 georgn Exp $ - SMI"
+#pragma ident  "@(#) $Id: machdep.h,v 1.3 1997/05/29 04:23:26 steve Exp $ - SMI"
 
 /*
  * Global include file for all sgs SPARC machine dependent macros, constants
 
 /*
  * Global include file for all sgs SPARC machine dependent macros, constants
index c060f33..0ac5cb8 100644 (file)
@@ -35,7 +35,7 @@
 /*
  * Update the value of the `_edata' and `_end' symbols.
  */
 /*
  * Update the value of the `_edata' and `_end' symbols.
  */
-#pragma ident  "@(#) $Id: syms.c,v 1.2 1995/03/06 22:39:22 georgn Exp $ - SMI"
+#pragma ident  "@(#) $Id: syms.c,v 1.3 1997/05/29 04:22:30 steve Exp $ - SMI"
 
 #include       <libelf.h>
 #include       <string.h>
 
 #include       <libelf.h>
 #include       <string.h>
index a8f7c80..9ddb85b 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -88,6 +88,22 @@ maintained internally.
 The new primitives available for this purpose are functions named
 `user-name-completion' and `user-name-all-completions'.
 
 The new primitives available for this purpose are functions named
 `user-name-completion' and `user-name-all-completions'.
 
+** Native widgets can be displayed in buffers.
+
+The glyph system has been extended to allow the display of glyphs that
+are implemented as native window-system widgets. Thus you can embed
+buttons, scrollbars, combo boxes, edit fields and progress gauges in a
+buffer. As a side effect subwindow support now works once again.
+
+This support is currently only available under MS-Windows.
+
+** X-Face support is now available under MS-Windows
+
+If an X-Face libary built under MS-Windows is available then XEmacs
+will use this at build time.
+
+** The font-menu is now available under MS-Windows
+
 \f
 * Lisp and internal changes in XEmacs 21.2
 ==========================================
 \f
 * Lisp and internal changes in XEmacs 21.2
 ==========================================
index 2a9e7d1..8fa12d9 100755 (executable)
@@ -28,7 +28,7 @@ Options:
 
 Report bugs to <bug-gnu-emacs@prep.ai.mit.edu>.'
 
 
 Report bugs to <bug-gnu-emacs@prep.ai.mit.edu>.'
 
-Id='$Id: rcs2log,v 1.37 1997/03/21 22:19:30 eggert Exp $'
+Id='$Id: rcs2log,v 1.2 1997/07/09 04:31:03 steve Exp $'
 
 # Copyright 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
 
 
 # Copyright 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
 
index d981215..280fa3d 100644 (file)
@@ -1,3 +1,37 @@
+1999-06-16  MORIOKA Tomohiko  <tomo@etl.go.jp>
+
+       * mule/thai-xtis.el: Specify `columns' of the charset `thai-xtis'
+       is 1.
+
+1999-06-12  MORIOKA Tomohiko  <tomo@etl.go.jp>
+
+       * mule/cyrillic.el (cyrillic-koi8-r-decode-table): Use NBSP of ISO
+       8859-5 instead of ISO 8859-1.
+
+1999-06-15  SL Baur  <steve@steve1.m17n.org>
+
+       * mule/vietnamese.el (viet-vscii-encode-table): Use split-char.
+       (viet-viscii-encode-table): Ditto.
+
+       * mule/mule-misc.el: Delete split-char & split-char-or-char-int.
+       Make obsolete definition of char-octet.
+
+1999-06-14  SL Baur  <steve@steve1.m17n.org>
+
+       * subr.el: Move no-Mule make-char ...
+       * help-nomule.el (make-char): To here.
+       (string-width): Make Mule compatibility alias.
+
+1999-06-15  Andy Piper  <andy@xemacs.org>
+
+       * select.el (get-selection-no-error): really make there be no-error.
+       (get-selection): revert to original.
+
+1999-06-11  Andy Piper  <andy@xemacs.org>
+
+       * select.el (selection-sets-clipboard): renamed.
+       (own-selection): use it.
+
 1999-06-11  XEmacs Build Bot <builds@cvs.xemacs.org>
 
        * XEmacs 21.2.16 is released
 1999-06-11  XEmacs Build Bot <builds@cvs.xemacs.org>
 
        * XEmacs 21.2.16 is released
index 1f4a0bb..cc90cd2 100644 (file)
@@ -100,6 +100,19 @@ With a prefix argument, choose the language."
                    ;; Now, signal the error
                    (signal (car error-data) (cdr error-data)))))))
 
                    ;; Now, signal the error
                    (signal (car error-data) (cdr error-data)))))))
 
+;; General Mule-compatibility stuffs
+(define-function 'string-width 'length)
+
+;; The following was originally in subr.el
+(defun make-char (charset &optional arg1 arg2)
+  "Make a character from CHARSET and octets ARG1 and ARG2.
+This function is available for compatibility with Mule-enabled XEmacsen.
+When CHARSET is `ascii', return (int-char ARG1).  Otherwise, return
+that value with the high bit set.  ARG2 is always ignored."
+  (int-char (if (eq charset 'ascii)
+               arg1
+             (logior arg1 #x80))))
+
 
 (provide 'help-nomule)
 
 
 (provide 'help-nomule)
 
index 4006514..bb31a83 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
 ;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
 ;; Created: Jan 1998
 ;; Author: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
 ;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
 ;; Created: Jan 1998
-;; Version: $Revision: 1.7.2.3 $
+;; Version: $Revision: 1.7.2.5 $
 ;; Keywords: help comm
 
 ;; This file is part of XEmacs
 ;; Keywords: help comm
 
 ;; This file is part of XEmacs
index 7ae20c3..3713295 100644 (file)
@@ -38,7 +38,7 @@
 ;; Last Modified By: Heiko M|nkel <muenkel@tnt.uni-hannover.de>
 ;; Additional XEmacs integration By: Chuck Thompson <cthomp@cs.uiuc.edu>
 ;; Last Modified On: Thu Jul 1 14:23:00 1994
 ;; Last Modified By: Heiko M|nkel <muenkel@tnt.uni-hannover.de>
 ;; Additional XEmacs integration By: Chuck Thompson <cthomp@cs.uiuc.edu>
 ;; Last Modified On: Thu Jul 1 14:23:00 1994
-;; RCS Info        : $Revision: 1.3.2.1 $ $Locker:  $
+;; RCS Info        : $Revision: 1.3.2.2 $ $Locker:  $
 ;; ========================================================================
 ;; NOTE: XEmacs must be redumped if this file is changed.
 ;;
 ;; ========================================================================
 ;; NOTE: XEmacs must be redumped if this file is changed.
 ;;
index 1c06e6c..f610c1c 100644 (file)
@@ -32,9 +32,9 @@
 
 ;; For syntax of Cyrillic
 (modify-syntax-entry 'cyrillic-iso8859-5 "w")
 
 ;; For syntax of Cyrillic
 (modify-syntax-entry 'cyrillic-iso8859-5 "w")
-(modify-syntax-entry ?\e.L\eN- ".")
-(modify-syntax-entry ?\e.L\eNp ".")
-(modify-syntax-entry ?\e.L\eN} ".")
+(modify-syntax-entry ?\e,L-\e(B ".")
+(modify-syntax-entry ?\e,Lp\e(B ".")
+(modify-syntax-entry ?\e,L}\e(B ".")
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; CYRILLIC
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; CYRILLIC
@@ -77,7 +77,7 @@
                  (charset . (cyrillic-iso8859-5))
                  (tutorial . "TUTORIAL.ru")
                  (coding-system . (iso-8859-5))
                  (charset . (cyrillic-iso8859-5))
                  (tutorial . "TUTORIAL.ru")
                  (coding-system . (iso-8859-5))
-                 (sample-text . "Russian (\e.L\eN@\eNc\eNa\eNa\eNZ\eNX\eNY)    \eN7\eNT\eN`\eNP\eNR\eNa\eNb\eNR\eNc\eNY\eNb\eNU!")
+                 (sample-text . "Russian (\e,L@caaZXY\e(B)       \e,L7T`PRabRcYbU\e(B!")
                  (documentation . ("Support for Cyrillic ISO-8859-5."
                                    . describe-cyrillic-environment-map))))
 
                  (documentation . ("Support for Cyrillic ISO-8859-5."
                                    . describe-cyrillic-environment-map))))
 
    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
    ?\e$B(!\e(B ?\e$B("\e(B ?\e$B(#\e(B ?\e$B($\e(B ?\e$B(&\e(B ?\e$B(%\e(B ?\e$B('\e(B ?\e$B()\e(B ?\e$B((\e(B ?\e$B(*\e(B ?\e$B(+\e(B 32  ?\e$(G#'\e(B ?\e$(G#+\e(B ?\e$(G#/\e(B 32
    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
    ?\e$B(!\e(B ?\e$B("\e(B ?\e$B(#\e(B ?\e$B($\e(B ?\e$B(&\e(B ?\e$B(%\e(B ?\e$B('\e(B ?\e$B()\e(B ?\e$B((\e(B ?\e$B(*\e(B ?\e$B(+\e(B 32  ?\e$(G#'\e(B ?\e$(G#+\e(B ?\e$(G#/\e(B 32
-   32  ?\e$(C"F\e(B 32  32  ?\e$B"#\e(B 32  ?\e$B"e\e(B ?\e$A!V\e(B ?\e$A!\\e(B ?\e$A!]\e(B ?\e.A\eN   32  ?\eN0  ?\eN2  ?\eN7  ?\eNw
-   ?\e$(G#D\e(B 32  32  ?\e.L\eNq  32  32  32  32  32  32  32  32  32  32  32  ?\e$(G#E\e(B
-   32  32  ?\e$(G#G\e(B ?\e.L\eN!  32  32  32  32  32  32  32  32  ?\e$(G#F\e(B 32  32  ?\e.A\eN)
-   ?\e.L\eNn  ?\eNP  ?\eNQ  ?\eNf  ?\eNT  ?\eNU  ?\eNd  ?\eNS  ?\eNe  ?\eNX  ?\eNY  ?\eNZ  ?\eN[  ?\eN\  ?\eN]  ?\eN^ 
-   ?\e.L\eN_  ?\eNo  ?\eN`  ?\eNa  ?\eNb  ?\eNc  ?\eNV  ?\eNR  ?\eNl  ?\eNk  ?\eNW  ?\eNh  ?\eNm  ?\eNi  ?\eNg  ?\eNj 
-   ?\e.L\eNN  ?\eN0  ?\eN1  ?\eNF  ?\eN4  ?\eN5  ?\eND  ?\eN3  ?\eNE  ?\eN8  ?\eN9  ?\eN:  ?\eN;  ?\eN<  ?\eN=  ?\eN> 
-   ?\e.L\eN?  ?\eNO  ?\eN@  ?\eNA  ?\eNB  ?\eNC  ?\eN6  ?\eN2  ?\eNL  ?\eNK  ?\eN7  ?\eNH  ?\eNM  ?\eNI  ?\eNG  ?\eNJ ]
+   32  ?\e$(C"F\e(B 32  32  ?\e$B"#\e(B 32  ?\e$B"e\e(B ?\e$A!V\e(B ?\e$A!\\e(B ?\e$A!]\e(B ?\e,L \e(B  32  ?\e,A0\e(B  ?\e,A2\e(B  ?\e,A7\e(B  ?\e,Aw\e(B
+   ?\e$(G#D\e(B 32  32  ?\e,Lq\e(B  32  32  32  32  32  32  32  32  32  32  32  ?\e$(G#E\e(B
+   32  32  ?\e$(G#G\e(B ?\e,L!\e(B  32  32  32  32  32  32  32  32  ?\e$(G#F\e(B 32  32  ?\e,A)\e(B
+   ?\e,Ln\e(B  ?\e,LP\e(B  ?\e,LQ\e(B  ?\e,Lf\e(B  ?\e,LT\e(B  ?\e,LU\e(B  ?\e,Ld\e(B  ?\e,LS\e(B  ?\e,Le\e(B  ?\e,LX\e(B  ?\e,LY\e(B  ?\e,LZ\e(B  ?\e,L[\e(B  ?\e,L\\e(B  ?\e,L]\e(B  ?\e,L^\e(B 
+   ?\e,L_\e(B  ?\e,Lo\e(B  ?\e,L`\e(B  ?\e,La\e(B  ?\e,Lb\e(B  ?\e,Lc\e(B  ?\e,LV\e(B  ?\e,LR\e(B  ?\e,Ll\e(B  ?\e,Lk\e(B  ?\e,LW\e(B  ?\e,Lh\e(B  ?\e,Lm\e(B  ?\e,Li\e(B  ?\e,Lg\e(B  ?\e,Lj\e(B 
+   ?\e,LN\e(B  ?\e,L0\e(B  ?\e,L1\e(B  ?\e,LF\e(B  ?\e,L4\e(B  ?\e,L5\e(B  ?\e,LD\e(B  ?\e,L3\e(B  ?\e,LE\e(B  ?\e,L8\e(B  ?\e,L9\e(B  ?\e,L:\e(B  ?\e,L;\e(B  ?\e,L<\e(B  ?\e,L=\e(B  ?\e,L>\e(B 
+   ?\e,L?\e(B  ?\e,LO\e(B  ?\e,L@\e(B  ?\e,LA\e(B  ?\e,LB\e(B  ?\e,LC\e(B  ?\e,L6\e(B  ?\e,L2\e(B  ?\e,LL\e(B  ?\e,LK\e(B  ?\e,L7\e(B  ?\e,LH\e(B  ?\e,LM\e(B  ?\e,LI\e(B  ?\e,LG\e(B  ?\e,LJ\e(B ]
   "Cyrillic KOI8-R decoding table.")
 
 (defvar cyrillic-koi8-r-encode-table
   "Cyrillic KOI8-R decoding table.")
 
 (defvar cyrillic-koi8-r-encode-table
        (i 0))
     (while (< i 256)
       (let* ((ch (aref cyrillic-koi8-r-decode-table i))
        (i 0))
     (while (< i 256)
       (let* ((ch (aref cyrillic-koi8-r-decode-table i))
-            (split (split-char-or-char-int ch)))
+            (split (split-char ch)))
        (cond ((eq (car split) 'cyrillic-iso8859-5)
               (aset table (logior (nth 1 split) 128) i)
               )
        (cond ((eq (car split) 'cyrillic-iso8859-5)
               (aset table (logior (nth 1 split) 128) i)
               )
                   (charset . (cyrillic-iso8859-5))
                   (coding-system . (koi8-r))
                   (tutorial . "TUTORIAL.ru")
                   (charset . (cyrillic-iso8859-5))
                   (coding-system . (koi8-r))
                   (tutorial . "TUTORIAL.ru")
-                  (sample-text . "Russian (\e.L\eN@\eNc\eNa\eNa\eNZ\eNX\eNY)   \eN7\eNT\eN`\eNP\eNR\eNa\eNb\eNR\eNc\eNY\eNb\eNU!")
+                  (sample-text . "Russian (\e,L@caaZXY\e(B)      \e,L7T`PRabRcYbU\e(B!")
                   (documentation . ("Support for Cyrillic KOI-8."
                                     . describe-cyrillic-environment-map))))
 
                   (documentation . ("Support for Cyrillic KOI-8."
                                     . describe-cyrillic-environment-map))))
 
               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
               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
-              ?\e.L\eN0  ?\eN1  ?\eN2  ?\eN3  ?\eN4  ?\eN5  ?\eN6  ?\eN7  ?\eN8  ?\eN9  ?\eN:  ?\eN;  ?\eN<  ?\eN=  ?\eN>  ?\eN?
-              ?\e.L\eN@  ?\eNA  ?\eNB  ?\eNC  ?\eND  ?\eNE  ?\eNF  ?\eNG  ?\eNH  ?\eNI  ?\eNJ  ?\eNK  ?\eNL  ?\eNM  ?\eNN  ?\eNO
-              ?\e.L\eNP  ?\eNQ  ?\eNR  ?\eNS  ?\eNT  ?\eNU  ?\eNV  ?\eNW  ?\eNX  ?\eNY  ?\eNZ  ?\eN[  ?\eN\  ?\eN]  ?\eN^  ?\eN_
+              ?\e,L0\e(B  ?\e,L1\e(B  ?\e,L2\e(B  ?\e,L3\e(B  ?\e,L4\e(B  ?\e,L5\e(B  ?\e,L6\e(B  ?\e,L7\e(B  ?\e,L8\e(B  ?\e,L9\e(B  ?\e,L:\e(B  ?\e,L;\e(B  ?\e,L<\e(B  ?\e,L=\e(B  ?\e,L>\e(B  ?\e,L?\e(B
+              ?\e,L@\e(B  ?\e,LA\e(B  ?\e,LB\e(B  ?\e,LC\e(B  ?\e,LD\e(B  ?\e,LE\e(B  ?\e,LF\e(B  ?\e,LG\e(B  ?\e,LH\e(B  ?\e,LI\e(B  ?\e,LJ\e(B  ?\e,LK\e(B  ?\e,LL\e(B  ?\e,LM\e(B  ?\e,LN\e(B  ?\e,LO\e(B
+              ?\e,LP\e(B  ?\e,LQ\e(B  ?\e,LR\e(B  ?\e,LS\e(B  ?\e,LT\e(B  ?\e,LU\e(B  ?\e,LV\e(B  ?\e,LW\e(B  ?\e,LX\e(B  ?\e,LY\e(B  ?\e,LZ\e(B  ?\e,L[\e(B  ?\e,L\\e(B  ?\e,L]\e(B  ?\e,L^\e(B  ?\e,L_\e(B
               32  32  32  32  32  32  32  32  32  32  32  32  32  32  32  32
               32  32  32  32  32  32  32  32  32  32  32  32  32  32  32  32
               32  32  32  32  32  32  32  32  32  32  32  32  32  32  32  32
               32  32  32  32  32  32  32  32  32  32  32  32  32  32  32  32
               32  32  32  32  32  32  32  32  32  32  32  32  32  32  32  32
               32  32  32  32  32  32  32  32  32  32  32  32  32  32  32  32
-              ?\e.L\eN`  ?\eNa  ?\eNb  ?\eNc  ?\eNd  ?\eNe  ?\eNf  ?\eNg  ?\eNh  ?\eNi  ?\eNj  ?\eNk  ?\eNl  ?\eNm  ?\eNn  ?\eNo
-              ?\e.L\eN!  ?\eNq   32  32  32  32  32  32  32  32  32  32  32  32  32 ?\eNp]))))
+              ?\e,L`\e(B  ?\e,La\e(B  ?\e,Lb\e(B  ?\e,Lc\e(B  ?\e,Ld\e(B  ?\e,Le\e(B  ?\e,Lf\e(B  ?\e,Lg\e(B  ?\e,Lh\e(B  ?\e,Li\e(B  ?\e,Lj\e(B  ?\e,Lk\e(B  ?\e,Ll\e(B  ?\e,Lm\e(B  ?\e,Ln\e(B  ?\e,Lo\e(B
+              ?\e,L!\e(B  ?\e,Lq\e(B   32  32  32  32  32  32  32  32  32  32  32  32  32 ?\e,Lp\e(B]))))
   "CCL program to decode Alternativnyj.")
 
 (define-ccl-program ccl-encode-alternativnyj
   "CCL program to decode Alternativnyj.")
 
 (define-ccl-program ccl-encode-alternativnyj
                  (charset . (cyrillic-iso8859-5))
                  (coding-system . (alternativnyj))
                  (tutorial . "TUTORIAL.ru")
                  (charset . (cyrillic-iso8859-5))
                  (coding-system . (alternativnyj))
                  (tutorial . "TUTORIAL.ru")
-                 (sample-text . "Russian (\e.L\eN@\eNc\eNa\eNa\eNZ\eNX\eNY)    \eN7\eNT\eN`\eNP\eNR\eNa\eNb\eNR\eNc\eNY\eNb\eNU!")
+                 (sample-text . "Russian (\e,L@caaZXY\e(B)       \e,L7T`PRabRcYbU\e(B!")
                  (documentation . ("Support for Cyrillic ALTERNATIVNYJ."
                                    . describe-cyrillic-environment-map))))
 
                  (documentation . ("Support for Cyrillic ALTERNATIVNYJ."
                                    . describe-cyrillic-environment-map))))
 
               (charset . (cyrillic-iso8859-5))
              (tutorial . "TUTORIAL.ru")
               (coding-system . (iso-8859-5 koi8-r alternativnyj))
               (charset . (cyrillic-iso8859-5))
              (tutorial . "TUTORIAL.ru")
               (coding-system . (iso-8859-5 koi8-r alternativnyj))
-              (sample-text . "Russian (\e.L\eN@\eNc\eNa\eNa\eNZ\eNX\eNY) \eN7\eNT\eN`\eNP\eNR\eNa\eNb\eNR\eNc\eNY\eNb\eNU!")
+              (sample-text . "Russian (\e,L@caaZXY\e(B) \e,L7T`PRabRcYbU\e(B!")
               (documentation . nil)))
 
 ;;; cyrillic.el ends here
               (documentation . nil)))
 
 ;;; cyrillic.el ends here
index fe9948f..8de1883 100644 (file)
@@ -190,34 +190,46 @@ It might be available for compatibility with Mule 2.3,
 because its `find-charset-string' ignores ASCII charset."
   (delq 'ascii (charsets-in-region start end)))
 
 because its `find-charset-string' ignores ASCII charset."
   (delq 'ascii (charsets-in-region start end)))
 
-(defun split-char (char)
-  "Return list of charset and one or two position-codes of CHAR."
-  (let ((charset (char-charset char)))
-    (if (eq charset 'ascii)
-       (list charset (char-int char))
-      (let ((i 0)
-           (len (charset-dimension charset))
-           (code (if (integerp char)
-                     char
-                   (char-int char)))
-           dest)
-       (while (< i len)
-         (setq dest (cons (logand code 127) dest)
-               code (lsh code -7)
-               i (1+ i)))
-       (cons charset dest)
-       ))))
-
-(defun split-char-or-char-int (char)
-  "Return list of charset and one or two position-codes of CHAR.
-CHAR must be character or integer."
-  (if (characterp char)
-      (split-char char)
-    (let ((c (int-char char)))
-      (if c
-         (split-char c)
-       (list 'ascii c)
-       ))))
+;(defun split-char (char)
+;  "Return list of charset and one or two position-codes of CHAR."
+;  (let ((charset (char-charset char)))
+;    (if (eq charset 'ascii)
+;      (list charset (char-int char))
+;      (let ((i 0)
+;          (len (charset-dimension charset))
+;          (code (if (integerp char)
+;                    char
+;                  (char-int char)))
+;          dest)
+;      (while (< i len)
+;        (setq dest (cons (logand code 127) dest)
+;              code (lsh code -7)
+;              i (1+ i)))
+;      (cons charset dest)
+;      ))))
+
+(defun char-octet (ch &optional n)
+  "Return the octet numbered N (should be 0 or 1) of char CH.
+N defaults to 0 if omitted."
+  (let ((split (split-char ch)))
+    (cond ((eq n 0)
+          (nth 1 split))
+         ((eq n 1)
+          (nth 2 split))
+         (t (error "n must be 0 or 1")))))
+;; Made obsolete June 15, 1999.  Delete ASAP.
+(make-obsolete 'char-octet "Use split-char")
+
+;(defun split-char-or-char-int (char)
+;  "Return list of charset and one or two position-codes of CHAR.
+;CHAR must be character or integer."
+;  (if (characterp char)
+;      (split-char char)
+;    (let ((c (int-char char)))
+;      (if c
+;        (split-char c)
+;      (list 'ascii c)
+;      ))))
 
 
 ;;; Commands
 
 
 ;;; Commands
index 1fe6b88..2b16c2b 100644 (file)
@@ -36,8 +36,9 @@
 
 (when (featurep 'xemacs)
   (make-charset 'thai-xtis "Precomposed Thai (XTIS by Virach)."
 
 (when (featurep 'xemacs)
   (make-charset 'thai-xtis "Precomposed Thai (XTIS by Virach)."
-               '(registry "xtis-0$"
+               '(registry "xtis-0"
                           dimension 2
                           dimension 2
+                          columns 1
                           chars 94
                           final ??
                           graphic 0))
                           chars 94
                           final ??
                           graphic 0))
index d71dbcf..b8ae50c 100644 (file)
 
 (defvar viet-viscii-decode-table
   [;; VISCII is a full 8-bit code.
 
 (defvar viet-viscii-decode-table
   [;; VISCII is a full 8-bit code.
-   0 1 ?\e.2\eNF 3 4 ?\eNG ?\eNg 7 8 9 10 11 12 13 14 15
-   16 17 18 19 ?\e.2\eNV 21 22 23 24 ?\eN[ 26 27 28 29 ?\eN\ 31
+   0 1 ?\e,2F\e(B 3 4 ?\e,2G\e(B ?\e,2g\e(B 7 8 9 10 11 12 13 14 15
+   16 17 18 19 ?\e,2V\e(B 21 22 23 24 ?\e,2[\e(B 26 27 28 29 ?\e,2\\e(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 
    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 
-   ?\e.2\eNU ?\eN! ?\eN" ?\eN# ?\eN$ ?\eN% ?\eN& ?\eN' ?\eN( ?\eN) ?\eN* ?\eN+ ?\eN, ?\eN- ?\eN. ?\eN/
-   ?\e.2\eN0 ?\eN1 ?\eN2 ?\eN5 ?\eN~ ?\eN> ?\eN6 ?\eN7 ?\eN8 ?\eNv ?\eNw ?\eNo ?\eN| ?\eN{ ?\eNx ?\eNO
-   ?\e.2\eNu ?\e.1\eN! ?\eN" ?\eN# ?\eN$ ?\eN% ?\eN& ?\eN' ?\eN( ?\eN) ?\eN* ?\eN+ ?\eN, ?\eN- ?\eN. ?\eN/
-   ?\e.1\eN0 ?\eN1 ?\eN2 ?\e.2\eN^ ?\eN= ?\e.1\eN5 ?\eN6 ?\eN7 ?\eN8 ?\e.2\eNq ?\eNQ ?\eNW ?\eNX ?\e.1\eN= ?\eN> ?\e.2\eN_
-   ?\e.2\eN` ?\eNa ?\eNb ?\eNc ?\eNd ?\eNe ?\e.1\eNF ?\eNG ?\e.2\eNh ?\eNi ?\eNj ?\eNk ?\eNl ?\eNm ?\eNn ?\e.1\eNO
-   ?\e.2\eNp ?\e.1\eNQ ?\e.2\eNr ?\eNs ?\eNt ?\e.1\eNU ?\eNV ?\eNW ?\eNX ?\e.2\eNy ?\eNz ?\e.1\eN[ ?\eN\ ?\e.2\eN} ?\e.1\eN^ ?\eN_
-   ?\e.1\eN` ?\eNa ?\eNb ?\eNc ?\eNd ?\eNe ?\eNf ?\eNg ?\eNh ?\eNi ?\eNj ?\eNk ?\eNl ?\eNm ?\eNn ?\eNo
-   ?\e.1\eNp ?\eNq ?\eNr ?\eNs ?\eNt ?\eNu ?\eNv ?\eNw ?\eNx ?\eNy ?\eNz ?\eN{ ?\eN| ?\eN} ?\eN~ ?\e.2\eNf ]
+   ?\e,2U\e(B ?\e,2!\e(B ?\e,2"\e(B ?\e,2#\e(B ?\e,2$\e(B ?\e,2%\e(B ?\e,2&\e(B ?\e,2'\e(B ?\e,2(\e(B ?\e,2)\e(B ?\e,2*\e(B ?\e,2+\e(B ?\e,2,\e(B ?\e,2-\e(B ?\e,2.\e(B ?\e,2/\e(B
+   ?\e,20\e(B ?\e,21\e(B ?\e,22\e(B ?\e,25\e(B ?\e,2~\e(B ?\e,2>\e(B ?\e,26\e(B ?\e,27\e(B ?\e,28\e(B ?\e,2v\e(B ?\e,2w\e(B ?\e,2o\e(B ?\e,2|\e(B ?\e,2{\e(B ?\e,2x\e(B ?\e,2O\e(B
+   ?\e,2u\e(B ?\e,1!\e(B ?\e,1"\e(B ?\e,1#\e(B ?\e,1$\e(B ?\e,1%\e(B ?\e,1&\e(B ?\e,1'\e(B ?\e,1(\e(B ?\e,1)\e(B ?\e,1*\e(B ?\e,1+\e(B ?\e,1,\e(B ?\e,1-\e(B ?\e,1.\e(B ?\e,1/\e(B
+   ?\e,10\e(B ?\e,11\e(B ?\e,12\e(B ?\e,2^\e(B ?\e,2=\e(B ?\e,15\e(B ?\e,16\e(B ?\e,17\e(B ?\e,18\e(B ?\e,2q\e(B ?\e,2Q\e(B ?\e,2W\e(B ?\e,2X\e(B ?\e,1=\e(B ?\e,1>\e(B ?\e,2_\e(B
+   ?\e,2`\e(B ?\e,2a\e(B ?\e,2b\e(B ?\e,2c\e(B ?\e,2d\e(B ?\e,2e\e(B ?\e,1F\e(B ?\e,1G\e(B ?\e,2h\e(B ?\e,2i\e(B ?\e,2j\e(B ?\e,2k\e(B ?\e,2l\e(B ?\e,2m\e(B ?\e,2n\e(B ?\e,1O\e(B
+   ?\e,2p\e(B ?\e,1Q\e(B ?\e,2r\e(B ?\e,2s\e(B ?\e,2t\e(B ?\e,1U\e(B ?\e,1V\e(B ?\e,1W\e(B ?\e,1X\e(B ?\e,2y\e(B ?\e,2z\e(B ?\e,1[\e(B ?\e,1\\e(B ?\e,2}\e(B ?\e,1^\e(B ?\e,1_\e(B
+   ?\e,1`\e(B ?\e,1a\e(B ?\e,1b\e(B ?\e,1c\e(B ?\e,1d\e(B ?\e,1e\e(B ?\e,1f\e(B ?\e,1g\e(B ?\e,1h\e(B ?\e,1i\e(B ?\e,1j\e(B ?\e,1k\e(B ?\e,1l\e(B ?\e,1m\e(B ?\e,1n\e(B ?\e,1o\e(B
+   ?\e,1p\e(B ?\e,1q\e(B ?\e,1r\e(B ?\e,1s\e(B ?\e,1t\e(B ?\e,1u\e(B ?\e,1v\e(B ?\e,1w\e(B ?\e,1x\e(B ?\e,1y\e(B ?\e,1z\e(B ?\e,1{\e(B ?\e,1|\e(B ?\e,1}\e(B ?\e,1~\e(B ?\e,2f\e(B ]
   "Vietnamese VISCII decoding table.")
 
 (defvar viet-viscii-encode-table
   "Vietnamese VISCII decoding table.")
 
 (defvar viet-viscii-encode-table
@@ -58,7 +58,7 @@
        char-component)
     (while (< i 256)
       (setq char-component
        char-component)
     (while (< i 256)
       (setq char-component
-           (split-char-or-char-int (aref viet-viscii-decode-table i)))
+           (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)
       (cond ((eq (car char-component) 'vietnamese-viscii-lower)
             (aset table-lower (nth 1 char-component) i))
            ((eq (car char-component) 'vietnamese-viscii-upper)
@@ -71,22 +71,22 @@ Both tables are indexed by the position code of Vietnamese characters.")
 
 (defvar viet-vscii-decode-table
   [;; VSCII is a full 8-bit code.
 
 (defvar viet-vscii-decode-table
   [;; VSCII is a full 8-bit code.
-   0 ?\e.2\eNz ?\eNx 3 ?\eNW ?\eNX ?\eNf 7 8 9 10 11 12 13 14 15
-   16 ?\e.2\eNQ ?\eN_ ?\eNO ?\eNV ?\eN[ ?\eN} ?\eN\ 24 25 26 27 28 29 30 31
+   0 ?\e,2z\e(B ?\e,2x\e(B 3 ?\e,2W\e(B ?\e,2X\e(B ?\e,2f\e(B 7 8 9 10 11 12 13 14 15
+   16 ?\e,2Q\e(B ?\e,2_\e(B ?\e,2O\e(B ?\e,2V\e(B ?\e,2[\e(B ?\e,2}\e(B ?\e,2\\e(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 
    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 
-   ?\e.2\eN` ?\eNd ?\eNc ?\eNa ?\eNU ?\eN# ?\eN' ?\eNh ?\eNk ?\eN( ?\eNi ?\eN) ?\eN. ?\eNl ?\eNo ?\eNn
-   ?\e.2\eNm ?\eN8 ?\eNr ?\eNv ?\eNu ?\eNs ?\eNw ?\eN5 ?\eN6 ?\eN7 ?\eN^ ?\eN> ?\eN~ ?\eNy ?\eN| ?\eN{
-   160 ?\e.2\eNe ?\eNb ?\eNj ?\eNt ?\eN= ?\eN_ ?\eNp ?\e.1\eNe ?\eNb ?\eNj ?\eNt ?\eN> ?\eNy ?\eNp ?\e.2\eN"
-   192 193 194 195 196 ?\e.1\eN` ?\eNd ?\eNc ?\eNa ?\eNU ?\e.2\eNF ?\e.1\eN" ?\eNF ?\eNG ?\eN! ?\e.2\eNG
-   ?\e.2\eN! ?\eN% ?\eN& ?\eNg ?\eN% ?\eN+ ?\e.1\eN# ?\eN% ?\eN& ?\eNg ?\eN$ ?\eN' ?\eNh ?\e.2\eN, ?\e.1\eNk ?\eN(
-   ?\e.1\eNi ?\eN) ?\eN+ ?\eN, ?\eN- ?\eN* ?\eN. ?\eNl ?\eNo ?\e.2\eN- ?\eN* ?\eN0 ?\e.1\eNn ?\eNm ?\eN8 ?\eNr
-   ?\e.2\eN1 ?\e.1\eNv ?\eNu ?\eNs ?\eNw ?\eN0 ?\eN1 ?\eN2 ?\eN/ ?\eN5 ?\eN6 ?\eN7 ?\eN^ ?\eN> ?\eN~ ?\eNy
-   ?\e.2\eN2 ?\e.1\eN| ?\eN{ ?\eNz ?\eNx ?\eNW ?\eNX ?\eNf ?\eNQ ?\eNq ?\eNO ?\eNV ?\eN[ ?\eN} ?\eN\ ?\e.2\eN/]
+   ?\e,2`\e(B ?\e,2d\e(B ?\e,2c\e(B ?\e,2a\e(B ?\e,2U\e(B ?\e,2#\e(B ?\e,2'\e(B ?\e,2h\e(B ?\e,2k\e(B ?\e,2(\e(B ?\e,2i\e(B ?\e,2)\e(B ?\e,2.\e(B ?\e,2l\e(B ?\e,2o\e(B ?\e,2n\e(B
+   ?\e,2m\e(B ?\e,28\e(B ?\e,2r\e(B ?\e,2v\e(B ?\e,2u\e(B ?\e,2s\e(B ?\e,2w\e(B ?\e,25\e(B ?\e,26\e(B ?\e,27\e(B ?\e,2^\e(B ?\e,2>\e(B ?\e,2~\e(B ?\e,2y\e(B ?\e,2|\e(B ?\e,2{\e(B
+   160 ?\e,2e\e(B ?\e,2b\e(B ?\e,2j\e(B ?\e,2t\e(B ?\e,2=\e(B ?\e,2_\e(B ?\e,2p\e(B ?\e,1e\e(B ?\e,1b\e(B ?\e,1j\e(B ?\e,1t\e(B ?\e,1>\e(B ?\e,1y\e(B ?\e,1p\e(B ?\e,2"\e(B
+   192 193 194 195 196 ?\e,1`\e(B ?\e,1d\e(B ?\e,1c\e(B ?\e,1a\e(B ?\e,1U\e(B ?\e,2F\e(B ?\e,1"\e(B ?\e,1F\e(B ?\e,1G\e(B ?\e,1!\e(B ?\e,2G\e(B
+   ?\e,2!\e(B ?\e,2%\e(B ?\e,2&\e(B ?\e,2g\e(B ?\e,2%\e(B ?\e,2+\e(B ?\e,1#\e(B ?\e,1%\e(B ?\e,1&\e(B ?\e,1g\e(B ?\e,1$\e(B ?\e,1'\e(B ?\e,1h\e(B ?\e,2,\e(B ?\e,1k\e(B ?\e,1(\e(B
+   ?\e,1i\e(B ?\e,1)\e(B ?\e,1+\e(B ?\e,1,\e(B ?\e,1-\e(B ?\e,1*\e(B ?\e,1.\e(B ?\e,1l\e(B ?\e,1o\e(B ?\e,2-\e(B ?\e,2*\e(B ?\e,20\e(B ?\e,1n\e(B ?\e,1m\e(B ?\e,18\e(B ?\e,1r\e(B
+   ?\e,21\e(B ?\e,1v\e(B ?\e,1u\e(B ?\e,1s\e(B ?\e,1w\e(B ?\e,10\e(B ?\e,11\e(B ?\e,12\e(B ?\e,1/\e(B ?\e,15\e(B ?\e,16\e(B ?\e,17\e(B ?\e,1^\e(B ?\e,1>\e(B ?\e,1~\e(B ?\e,1y\e(B
+   ?\e,22\e(B ?\e,1|\e(B ?\e,1{\e(B ?\e,1z\e(B ?\e,1x\e(B ?\e,1W\e(B ?\e,1X\e(B ?\e,1f\e(B ?\e,1Q\e(B ?\e,1q\e(B ?\e,1O\e(B ?\e,1V\e(B ?\e,1[\e(B ?\e,1}\e(B ?\e,1\\e(B ?\e,2/\e(B]
   "Vietnamese VSCII decoding table.")
 
 (defvar viet-vscii-encode-table
   "Vietnamese VSCII decoding table.")
 
 (defvar viet-vscii-encode-table
@@ -96,7 +96,7 @@ Both tables are indexed by the position code of Vietnamese characters.")
        char-component)
     (while (< i 256)
       (setq char-component
        char-component)
     (while (< i 256)
       (setq char-component
-           (split-char-or-char-int (aref viet-vscii-decode-table i)))
+           (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)
       (cond ((eq (car char-component) 'vietnamese-viscii-lower)
             (aset table-lower (nth 1 char-component) i))
            ((eq (car char-component) 'vietnamese-viscii-upper)
@@ -270,7 +270,7 @@ Both tables are indexed by the position code of Vietnamese characters.")
                (charset . (vietnamese-viscii-lower
                            vietnamese-viscii-upper))
                (coding-system . (viscii vscii viqr))
                (charset . (vietnamese-viscii-lower
                            vietnamese-viscii-upper))
                (coding-system . (viscii vscii viqr))
-               (sample-text . "Vietnamese (Ti\e.1\eN*ng Vi\eN.t)  Ch\eN`o b\eNUn")
+               (sample-text . "Vietnamese (Ti\e,1*\e(Bng Vi\e,1.\e(Bt)     Ch\e,1`\e(Bo b\e,1U\e(Bn")
                (documentation . "\
 For Vietnamese, Emacs uses special charasets internally.
 They can be decoded from and encoded to VISCC, VSCII, and VIQR.")
                (documentation . "\
 For Vietnamese, Emacs uses special charasets internally.
 They can be decoded from and encoded to VISCC, VSCII, and VIQR.")
index 338ea0c..f21d440 100644 (file)
@@ -40,7 +40,7 @@ COMPOUND_TEXT and STRING are the most commonly used data types.
 If a list is provided, the types are tried in sequence until
 there is a successful conversion.")
 
 If a list is provided, the types are tried in sequence until
 there is a successful conversion.")
 
-(defvar selection-is-clipboard-p nil 
+(defvar selection-sets-clipboard nil 
   "Controls the selection's relationship to the clipboard.
 When non-nil, any operation that sets the primary selection will also
 set the clipboard.")
   "Controls the selection's relationship to the clipboard.
 When non-nil, any operation that sets the primary selection will also
 set the clipboard.")
@@ -75,21 +75,18 @@ set the clipboard.")
   "Return the value of one of the cut buffers.
 This will do nothing under anything other than X.")
 
   "Return the value of one of the cut buffers.
 This will do nothing under anything other than X.")
 
-(defun get-selection (&optional type data-type)
+(defun get-selection-no-error (&optional type data-type)
   "Return the value of a Windows selection.
 The argument TYPE (default `PRIMARY') says which selection,
 and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule)
   "Return the value of a Windows selection.
 The argument TYPE (default `PRIMARY') says which selection,
 and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule)
-says how to convert the data. If there is no selection an error is signalled."
-  (let ((text (get-selection-no-error type data-type)))
-    (when (not (stringp text))
-      (error "Selection is not a string: %S" text))
-    text))
+says how to convert the data. Returns NIL if there is no selection"
+  (condition-case err (get-selection type data-type) (t nil)))
 
 
-(defun get-selection-no-error (&optional type data-type)
+(defun get-selection (&optional type data-type)
   "Return the value of a Windows selection.
 The argument TYPE (default `PRIMARY') says which selection,
 and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule)
   "Return the value of a Windows selection.
 The argument TYPE (default `PRIMARY') says which selection,
 and the argument DATA-TYPE (default `STRING', or `COMPOUND_TEXT' under Mule)
-says how to convert the data. Returns NIL if there is no selection"
+says how to convert the data. If there is no selection an error is signalled."
   (or type (setq type 'PRIMARY))
   (or data-type (setq data-type selected-text-type))
   (let ((text
   (or type (setq type 'PRIMARY))
   (or data-type (setq data-type selected-text-type))
   (let ((text
@@ -103,6 +100,8 @@ says how to convert the data. Returns NIL if there is no selection"
           (get-selection-internal type data-type))))
     (when (and (consp text) (symbolp (car text)))
       (setq text (cdr text)))
           (get-selection-internal type data-type))))
     (when (and (consp text) (symbolp (car text)))
       (setq text (cdr text)))
+    (when (not (stringp text))
+      (error "Selection is not a string: %S" text))
     text))
 
 ;; FSFmacs calls this `x-set-selection', and reverses the
     text))
 
 ;; FSFmacs calls this `x-set-selection', and reverses the
@@ -144,7 +143,7 @@ Interactively, the text of the region is used as the selection value."
       (disown-selection-internal type)
     (own-selection-internal type data)
     (when (and (eq type 'PRIMARY)
       (disown-selection-internal type)
     (own-selection-internal type data)
     (when (and (eq type 'PRIMARY)
-              selection-is-clipboard-p)
+              selection-sets-clipboard)
       (own-selection-internal 'CLIPBOARD data)))
   (cond ((eq type 'PRIMARY)
         (setq primary-selection-extent
       (own-selection-internal 'CLIPBOARD data)))
   (cond ((eq type 'PRIMARY)
         (setq primary-selection-extent
index 94a6071..9adf57e 100644 (file)
@@ -682,16 +682,6 @@ FILE should be the name of a library, with no directory name."
   (eval-after-load file (read)))
 (make-compatible 'eval-next-after-load "")
 
   (eval-after-load file (read)))
 (make-compatible 'eval-next-after-load "")
 
-(unless (featurep 'mule)
-  (defun make-char (charset &optional arg1 arg2)
-    "Make a character from CHARSET and octets ARG1 and ARG2.
-This function is available for compatibility with Mule-enabled XEmacsen.
-When CHARSET is `ascii', return (int-char ARG1).  Otherwise, return
-that value with the high bit set.  ARG2 is always ignored."
-    (int-char (if (eq charset 'ascii)
-                 arg1
-               (logior arg1 #x80)))))
-
 ; alternate names (not obsolete)
 (if (not (fboundp 'mod)) (define-function 'mod '%))
 (define-function 'move-marker 'set-marker)
 ; alternate names (not obsolete)
 (if (not (fboundp 'mod)) (define-function 'mod '%))
 (define-function 'move-marker 'set-marker)
index d2fda6f..1b6c0da 100644 (file)
@@ -3,7 +3,7 @@
 @setfilename ../info/info.info
 @settitle Info 1.0
 @comment %**end of header 
 @setfilename ../info/info.info
 @settitle Info 1.0
 @comment %**end of header 
-@comment $Id: info.texi,v 1.4 1997/07/10 21:58:11 karl Exp $
+@comment $Id: info.texi,v 1.4 1998/06/30 06:35:28 steve Exp $
 
 @dircategory Texinfo documentation system
 @direntry
 
 @dircategory Texinfo documentation system
 @direntry
index 3ce4715..6057ffa 100644 (file)
@@ -1,5 +1,5 @@
 % texinfo.tex -- TeX macros to handle Texinfo files.
 % texinfo.tex -- TeX macros to handle Texinfo files.
-% $Id: texinfo.tex,v 2.227 1998/02/25 22:54:34 karl Exp $
+% $Id: texinfo.tex,v 1.5 1998/06/13 04:28:12 steve Exp $
 %
 % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98
 % Free Software Foundation, Inc.
 %
 % Copyright (C) 1985, 86, 88, 90, 91, 92, 93, 94, 95, 96, 97, 98
 % Free Software Foundation, Inc.
@@ -44,7 +44,7 @@
 
 % This automatically updates the version number based on RCS.
 \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
 
 % This automatically updates the version number based on RCS.
 \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
-\deftexinfoversion$Revision: 2.227 $
+\deftexinfoversion$Revision: 1.5 $
 \message{Loading texinfo package [Version \texinfoversion]:}
 
 % If in a .fmt file, print the version number
 \message{Loading texinfo package [Version \texinfoversion]:}
 
 % If in a .fmt file, print the version number
index 0bc09a7..e5cd94d 100644 (file)
@@ -1,5 +1,5 @@
 \input texinfo.tex    @c -*-texinfo-*-
 \input texinfo.tex    @c -*-texinfo-*-
-@c $Id: texinfo.txi,v 1.50 1998/02/27 21:21:34 karl Exp $
+@c $Id: texinfo.texi,v 1.8.2.1 1999/03/04 15:48:24 steveb Exp $
 @c %**start of header
 
 @c All text is ignored before the setfilename.
 @c %**start of header
 
 @c All text is ignored before the setfilename.
index 76641d8..666e99b 100644 (file)
@@ -7,7 +7,7 @@
 @finalout
 @titlepage
 @title XEmacs FAQ
 @finalout
 @titlepage
 @title XEmacs FAQ
-@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 1999/03/04 15:48:25 $
+@subtitle Frequently asked questions about XEmacs @* Last Modified: $Date: 1999/05/13 12:26:40 $
 @sp 1
 @author Tony Rossini <arossini@@stat.sc.edu>
 @author Ben Wing <wing@@666.com>
 @sp 1
 @author Tony Rossini <arossini@@stat.sc.edu>
 @author Ben Wing <wing@@666.com>
index 44c5788..d710a87 100644 (file)
@@ -1,3 +1,14 @@
+1999-06-13  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+       * xemacs.mak (DOC_SRC8): Remove mule-coding.c.
+       (TEMACS_MULE_OBJS): Remove mule-coding.obj
+       (check): Implement according to src/Makefile.
+       (check-temacs): ditto.
+
+1999-06-05  Norbert Koch <n.koch@delta-ii.de>
+
+       * xemacs.mak (mule): remove dependencies from mule-coding.c
+       
 1999-06-11  XEmacs Build Bot <builds@cvs.xemacs.org>
 
        * XEmacs 21.2.16 is released
 1999-06-11  XEmacs Build Bot <builds@cvs.xemacs.org>
 
        * XEmacs 21.2.16 is released
index 79d9a53..1291b43 100644 (file)
@@ -650,8 +650,7 @@ DOC_SRC7=\
 DOC_SRC8=\
  $(XEMACS)\src\mule.c \
  $(XEMACS)\src\mule-charset.c \
 DOC_SRC8=\
  $(XEMACS)\src\mule.c \
  $(XEMACS)\src\mule-charset.c \
- $(XEMACS)\src\mule-ccl.c \
- $(XEMACS)\src\mule-coding.c
+ $(XEMACS)\src\mule-ccl.c
 ! if $(HAVE_X)
  DOC_SRC8=$(DOC_SRC8) $(XEMACS)\src\input-method-xlib.c
 ! endif
 ! if $(HAVE_X)
  DOC_SRC8=$(DOC_SRC8) $(XEMACS)\src\input-method-xlib.c
 ! endif
@@ -739,8 +738,7 @@ TEMACS_MSW_OBJS=\
 TEMACS_MULE_OBJS=\
        $(OUTDIR)\mule.obj \
        $(OUTDIR)\mule-charset.obj \
 TEMACS_MULE_OBJS=\
        $(OUTDIR)\mule.obj \
        $(OUTDIR)\mule-charset.obj \
-       $(OUTDIR)\mule-ccl.obj \
-       $(OUTDIR)\mule-coding.obj
+       $(OUTDIR)\mule-ccl.obj
 ! if $(HAVE_X)
 TEMACS_MULE_OBJS=\
        $(TEMACS_MULE_OBJS) $(OUTDIR)\input-method-xlib.obj
 ! if $(HAVE_X)
 TEMACS_MULE_OBJS=\
        $(TEMACS_MULE_OBJS) $(OUTDIR)\input-method-xlib.obj
@@ -890,6 +888,32 @@ $(TEMACS): $(TEMACS_INCLUDES) $(TEMACS_OBJS)
 $(OUTDIR)\xemacs.res: xemacs.rc
        rc -Fo$@ xemacs.rc
 
 $(OUTDIR)\xemacs.res: xemacs.rc
        rc -Fo$@ xemacs.rc
 
+# Section handling automated tests starts here
+
+SRCDIR=../src
+PROGNAME=xemacs
+blddir=$(MAKEDIR:\=\\)\\..
+temacs_loadup=temacs -batch -l $(SRCDIR)/../lisp/loadup.el
+dump_temacs   = $(temacs_loadup) dump
+run_temacs    = $(temacs_loadup) run-temacs
+## We have automated tests!!
+testdir=../tests/automated
+batch_test_emacs=-batch -l $(testdir)/test-harness.el -f batch-test-emacs $(testdir)
+
+# .PHONY: check check-temacs
+
+check:
+       @cd $(SRCDIR)
+       $(PROGNAME) $(batch_test_emacs)
+
+check-temacs:
+       cd $(SRCDIR)
+       set EMACSBOOTSTRAPLOADPATH=$(LISP)
+       set EMACSBOOTSTRAPMODULEPATH=$(MODULES)
+       $(run_temacs) $(batch_test_emacs)
+
+# Section handling automated tests ends here
+
 #------------------------------------------------------------------------------
 
 # LISP bits 'n bobs
 #------------------------------------------------------------------------------
 
 # LISP bits 'n bobs
index 1f925fa..aa03c8e 100644 (file)
@@ -1,3 +1,118 @@
+1999-06-16  Norbert Koch  <n.koch@eai-delta.de>
+
+       * redisplay-msw.c: Run 'ccl_driver' with 'CCL_MODE_ENCODING' as in 
+       redisplay-x.c
+
+1999-06-12  MORIOKA Tomohiko  <tomo@etl.go.jp>
+
+       * redisplay-x.c (separate_textual_runs): Run `ccl_driver' with
+       `CCL_MODE_ENCODING'.
+
+       * file-coding.c (mule_decode): Run `ccl_driver' with
+       `CCL_MODE_DECODING'.
+       (mule_encode): Run `ccl_driver' with `CCL_MODE_ENCODING'.
+
+       * mule-ccl.c (CCL_WRITE_CHAR): Refer `conversion_mode'.
+       (ccl_driver): Add new argument `conversion_mode'.
+       (Fccl_execute): Run `ccl_driver' with `CCL_MODE_ENCODING'.
+       (Fccl_execute_on_string): Likewise [perhaps it is better to add
+       new optional argument].
+
+       * mule-ccl.h (CCL_MODE_ENCODING): New macro.
+       (CCL_MODE_DECODING): New macro.
+       (ccl_driver): Add new argument `conversion_mode'.
+
+1999-06-15  SL Baur  <steve@miho.m17n.org>
+
+       * mule-charset.c (Fsplit_char): New subr.
+       (Fchar_octet): delete.
+       (syms_of_mule_charset): DEFSUBR it.
+
+1999-06-13  Andy Piper  <andy@xemacs.org>
+
+       * menubar.h: update declarations involving gui_items.
+
+       * lisp.h: declare Lisp_Gui_Item.
+
+       * glyphs.h (struct Lisp_Image_Instance): update type of gui_item.
+
+       * glyphs.c (mark_image_instance): modify for new lisp-based gui_items.
+       (print_image_instance): ditto.
+       (image_instance_equal): ditto.
+       (image_instance_hash): ditto.
+
+       * event-msw.c (mswindows_need_event): assert badly_p status.
+       (mswindows_wnd_proc): modify WM_NOTIFY handling to cope with
+       callbacks in tree-view and tab-control widgets.
+       (emacs_mswindows_next_event): modify use of
+       mswindows_dequeue_dispatch_event.
+
+       * dialog-msw.c (mswindows_popup_dialog_box): modify for new
+       lisp-based gui_items.
+
+       * glyphs-msw.c (mswindows_update_subwindow): update use of
+       gui_items.
+       (mswindows_register_gui_item): new function.
+       (mswindows_register_gui_item): fix to use lisp gui_items.
+       (mswindows_widget_instantiate): ditto.
+       (mswindows_button_instantiate): ditto.
+       (add_tree_item): new function to recursively add tree view
+       elements.
+       (add_tree_item_list): ditto.
+       (mswindows_tree_instantiate): new function. instantiate tree view
+       controls.
+       (add_tab_item): new function to add tabs to a tab control.
+       (mswindows_tab_instantiate): new function. instantiate tab
+       controls.
+       (image_instantiator_format_create_glyphs_mswindows): add tree view
+       and tab controls.
+       (vars_of_glyphs_mswindows): ditto.
+
+       * glyphs-widget.c (check_valid_item_list_1): allow nested lists in
+       item lists.
+       (check_valid_item_list): ditto.
+       (initialize_widget_image_instance): fix to use new lisp gui_item.
+       (widget_instantiate_1): allow the setting of default textwidth in
+       characters.
+       (widget_instantiate): change to use new widget_instantiate_1
+       signature.
+       (combo_instantiate): ditto.
+       (static_instantiate): ditto.
+       (tab_instantiate): new function for tab widgets.
+       (image_instantiator_format_create_glyphs_widget): add tab and tree
+       view widgets.
+
+       * menubar-msw.c (displayable_menu_item): convert to use lisp
+       gui_items.
+       (populate_menu_add_item): ditto.
+       (populate_or_checksum_helper): ditto.
+
+       * menubar.c (menu_parse_submenu_keywords): convert to use lisp
+       gui_items.
+       (Fmenu_find_real_submenu): ditto.
+
+       * gui.h (struct Lisp_Gui_Item): make gui_item a lisp oebjct.
+
+       * gui.c (gui_item_add_keyval_pair): gui_items are now lisp
+       objects, convert functions that use them accordingly.
+       (gui_item_init): ditto.
+       (gui_item_active_p): ditto.
+       (gui_item_selected_p): ditto.
+       (gui_item_included_p): ditto.
+       (gui_item_display_flush_left): ditto.
+       (gui_item_display_flush_right): ditto.
+       (mark_gui_item): ditto.
+       (allocate_gui_item): new function to create a gui_item.
+       (make_gui_item_from_keywords_internal): ditto. create and return a
+       gui_item as well as setting keywords.
+       (gui_parse_item_keywords): ditto.
+       (gui_parse_item_keywords_no_errors): ditto.
+       (gui_add_item_keywords_to_plist): new function, not yet used.
+       (gui_item_hash): new function.
+       (gui_item_id_hash): use gui_item_hash.
+       (gui_item_equal): new function.
+       (print_gui_item): new function.
+
 1999-06-11  XEmacs Build Bot <builds@cvs.xemacs.org>
 
        * XEmacs 21.2.16 is released
 1999-06-11  XEmacs Build Bot <builds@cvs.xemacs.org>
 
        * XEmacs 21.2.16 is released
 
        * file-coding.h (Qraw_text): New variable.
 
 
        * file-coding.h (Qraw_text): New variable.
 
-1999-05-20  MORIOKA Tomohiko  <tomo@etl.go.jp>
-
-       * mule-charset.c (complex_vars_of_mule_charset): Registry of
-       japanese-jisx0208-1978 should not match with "jisx0208.1983" nor
-       "jisc6226.1983".
-
 1999-06-08  SL Baur  <steve@xemacs.org>
 
        * s/decosf4-0.h: Explicitly #undef SYSTEM_MALLOC.
 1999-06-08  SL Baur  <steve@xemacs.org>
 
        * s/decosf4-0.h: Explicitly #undef SYSTEM_MALLOC.
index 24c272c..b5dea45 100644 (file)
@@ -110,12 +110,6 @@ static Lisp_Object Vdialog_data_list;
 
 #define ID_ITEM_BIAS 32
 
 
 #define ID_ITEM_BIAS 32
 
-typedef struct gui_item struct_gui_item;
-typedef struct
-{
-  Dynarr_declare (struct gui_item);
-} struct_gui_item_dynarr;
-
 /* Dialog procedure */
 static BOOL CALLBACK 
 dialog_proc (HWND hwnd, UINT msg, WPARAM w_param, LPARAM l_param)
 /* Dialog procedure */
 static BOOL CALLBACK 
 dialog_proc (HWND hwnd, UINT msg, WPARAM w_param, LPARAM l_param)
@@ -200,7 +194,7 @@ free_dynarr_opaque_ptr (Lisp_Object arg)
 static void
 mswindows_popup_dialog_box (struct frame* f, Lisp_Object desc)
 {
 static void
 mswindows_popup_dialog_box (struct frame* f, Lisp_Object desc)
 {
-  struct_gui_item_dynarr *dialog_items = Dynarr_new (struct_gui_item);
+  Lisp_Object_dynarr *dialog_items = Dynarr_new (Lisp_Object);
   unsigned_char_dynarr *template = Dynarr_new (unsigned_char);
   unsigned int button_row_width = 0;
   unsigned int text_width, text_height;
   unsigned_char_dynarr *template = Dynarr_new (unsigned_char);
   unsigned int button_row_width = 0;
   unsigned int text_width, text_height;
@@ -223,11 +217,10 @@ mswindows_popup_dialog_box (struct frame* f, Lisp_Object desc)
       {
        if (!NILP (XCAR (item_cons)))
          {
       {
        if (!NILP (XCAR (item_cons)))
          {
-           struct gui_item gitem;
-           gui_item_init (&gitem);
-           gui_parse_item_keywords (XCAR (item_cons), &gitem);
+           Lisp_Object gitem = gui_parse_item_keywords (XCAR (item_cons));
            Dynarr_add (dialog_items, gitem);
            Dynarr_add (dialog_items, gitem);
-           button_row_width += button_width (gitem.name) + X_BUTTON_MARGIN;
+           button_row_width += button_width (XGUI_ITEM (gitem)->name) 
+             + X_BUTTON_MARGIN;
          }
       }
     if (Dynarr_length (dialog_items) == 0)
          }
       }
     if (Dynarr_length (dialog_items) == 0)
@@ -350,10 +343,11 @@ mswindows_popup_dialog_box (struct frame* f, Lisp_Object desc)
 
     for (i = 0; i < Dynarr_length (dialog_items); ++i)
       {
 
     for (i = 0; i < Dynarr_length (dialog_items); ++i)
       {
-       struct gui_item *pgui_item = Dynarr_atp (dialog_items, i);
+       Lisp_Object* gui_item = Dynarr_atp (dialog_items, i);
+       struct Lisp_Gui_Item *pgui_item = XGUI_ITEM (*gui_item);
 
        item_tem.style = (WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON
 
        item_tem.style = (WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_PUSHBUTTON
-                         | (gui_item_active_p (pgui_item) ? 0 : WS_DISABLED));
+                         | (gui_item_active_p (*gui_item) ? 0 : WS_DISABLED));
        item_tem.cx = button_width (pgui_item->name);
        /* Item ids are indices into dialog_items plus offset, to avoid having
            items by reserved ids (IDOK, IDCANCEL) */
        item_tem.cx = button_width (pgui_item->name);
        /* Item ids are indices into dialog_items plus offset, to avoid having
            items by reserved ids (IDOK, IDCANCEL) */
@@ -390,7 +384,7 @@ mswindows_popup_dialog_box (struct frame* f, Lisp_Object desc)
     vector = make_vector (Dynarr_length (dialog_items), Qunbound);
     dialog_data = Fcons (frame, vector);
     for (i = 0; i < Dynarr_length (dialog_items); i++)
     vector = make_vector (Dynarr_length (dialog_items), Qunbound);
     dialog_data = Fcons (frame, vector);
     for (i = 0; i < Dynarr_length (dialog_items); i++)
-      XVECTOR_DATA (vector) [i] = Dynarr_atp (dialog_items, i)->callback;
+      XVECTOR_DATA (vector) [i] = XGUI_ITEM (*Dynarr_atp (dialog_items, i))->callback;
 
     /* Woof! Everything is ready. Pop pop pop in now! */
     if (!CreateDialogIndirectParam (NULL,
 
     /* Woof! Everything is ready. Pop pop pop in now! */
     if (!CreateDialogIndirectParam (NULL,
index 4042366..e8d8fc0 100644 (file)
@@ -1327,6 +1327,7 @@ mswindows_need_event (int badly_p)
       
       if (active == 0)
        {
       
       if (active == 0)
        {
+         assert (!badly_p);
          return;               /* timeout */
        }
       else if (active > 0)
          return;               /* timeout */
        }
       else if (active > 0)
@@ -1925,17 +1926,21 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                                       Qcancel_mode_internal, Qnil);
     break;
 
                                       Qcancel_mode_internal, Qnil);
     break;
 
-#ifdef HAVE_TOOLBARS
   case WM_NOTIFY:
     {
   case WM_NOTIFY:
     {
-      LPTOOLTIPTEXT tttext = (LPTOOLTIPTEXT)lParam;
-      Lisp_Object btext;
-      if (tttext->hdr.code ==  TTN_NEEDTEXT)    
+      LPNMHDR nmhdr = (LPNMHDR)lParam;
+      int idCtrl = (int)wParam;
+
+      if (nmhdr->code ==  TTN_NEEDTEXT)
        {
        {
+#ifdef HAVE_TOOLBARS
+         LPTOOLTIPTEXT tttext = (LPTOOLTIPTEXT)lParam;
+         Lisp_Object btext;
+
          /* find out which toolbar */
          frame = XFRAME (mswindows_find_frame (hwnd));
          btext = mswindows_get_toolbar_button_text ( frame, 
          /* find out which toolbar */
          frame = XFRAME (mswindows_find_frame (hwnd));
          btext = mswindows_get_toolbar_button_text ( frame, 
-                                                     tttext->hdr.idFrom );
+                                                     nmhdr->idFrom );
          
          tttext->lpszText = NULL;
          tttext->hinst = NULL;
          
          tttext->lpszText = NULL;
          tttext->hinst = NULL;
@@ -1947,13 +1952,28 @@ mswindows_wnd_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
              GET_C_STRING_EXT_DATA_ALLOCA (btext, FORMAT_OS, 
                                            tttext->lpszText);
            }
              GET_C_STRING_EXT_DATA_ALLOCA (btext, FORMAT_OS, 
                                            tttext->lpszText);
            }
-#if 0
-         tttext->uFlags |= TTF_DI_SETITEM;
 #endif
 #endif
-       }    
+       }
+      /* handle tree view callbacks */
+      else if (nmhdr->code == TVN_SELCHANGED)
+       {
+         NM_TREEVIEW* ptree = (NM_TREEVIEW*)lParam;
+         frame = XFRAME (mswindows_find_frame (hwnd));
+         mswindows_handle_gui_wm_command (frame, 0, ptree->itemNew.lParam);
+       }
+      /* handle tab control callbacks */
+      else if (nmhdr->code == TCN_SELCHANGE)
+       {
+         TC_ITEM item;
+         int index = SendMessage (nmhdr->hwndFrom, TCM_GETCURSEL, 0, 0);
+         frame = XFRAME (mswindows_find_frame (hwnd));
+         SendMessage (nmhdr->hwndFrom, TCM_GETITEM, (WPARAM)index,
+                      (LPARAM)&item);
+         
+         mswindows_handle_gui_wm_command (frame, 0, item.lParam);
+       }
     }
     break;
     }
     break;
-#endif
     
   case WM_PAINT:
     {
     
   case WM_PAINT:
     {
@@ -2552,7 +2572,7 @@ emacs_mswindows_next_event (struct Lisp_Event *emacs_event)
 
   mswindows_need_event (1);
 
 
   mswindows_need_event (1);
 
-  event = mswindows_dequeue_dispatch_event (!NILP(mswindows_u_dispatch_event_queue));
+  event = mswindows_dequeue_dispatch_event ();
   XSETEVENT (event2, emacs_event);
   Fcopy_event (event, event2);
   Fdeallocate_event (event);
   XSETEVENT (event2, emacs_event);
   Fcopy_event (event, event2);
   Fdeallocate_event (event);
index daae138..7a7eee3 100644 (file)
@@ -2116,7 +2116,7 @@ mule_decode (Lstream *decoding, CONST unsigned char *src,
       decode_coding_utf8 (decoding, src, dst, n);
       break;
     case CODESYS_CCL:
       decode_coding_utf8 (decoding, src, dst, n);
       break;
     case CODESYS_CCL:
-      ccl_driver (&str->ccl, src, dst, n, 0);
+      ccl_driver (&str->ccl, src, dst, n, 0, CCL_MODE_DECODING);
       break;
     case CODESYS_ISO2022:
       decode_coding_iso2022 (decoding, src, dst, n);
       break;
     case CODESYS_ISO2022:
       decode_coding_iso2022 (decoding, src, dst, n);
@@ -2528,7 +2528,7 @@ mule_encode (Lstream *encoding, CONST unsigned char *src,
       encode_coding_utf8 (encoding, src, dst, n);
       break;
     case CODESYS_CCL:
       encode_coding_utf8 (encoding, src, dst, n);
       break;
     case CODESYS_CCL:
-      ccl_driver (&str->ccl, src, dst, n, 0);
+      ccl_driver (&str->ccl, src, dst, n, 0, CCL_MODE_ENCODING);
       break;
     case CODESYS_ISO2022:
       encode_coding_iso2022 (encoding, src, dst, n);
       break;
     case CODESYS_ISO2022:
       encode_coding_iso2022 (encoding, src, dst, n);
index 646cb54..4f95bc2 100644 (file)
@@ -71,6 +71,8 @@ DEFINE_DEVICE_IIFORMAT (mswindows, label);
 DEFINE_DEVICE_IIFORMAT (mswindows, scrollbar);
 DEFINE_DEVICE_IIFORMAT (mswindows, combo);
 DEFINE_DEVICE_IIFORMAT (mswindows, progress);
 DEFINE_DEVICE_IIFORMAT (mswindows, scrollbar);
 DEFINE_DEVICE_IIFORMAT (mswindows, combo);
 DEFINE_DEVICE_IIFORMAT (mswindows, progress);
+DEFINE_DEVICE_IIFORMAT (mswindows, tree);
+DEFINE_DEVICE_IIFORMAT (mswindows, tab);
 
 DEFINE_IMAGE_INSTANTIATOR_FORMAT (bmp);
 Lisp_Object Qbmp;
 
 DEFINE_IMAGE_INSTANTIATOR_FORMAT (bmp);
 Lisp_Object Qbmp;
@@ -282,7 +284,7 @@ init_image_instance_from_dibitmap (struct Lisp_Image_Instance *ii,
   struct device *d = XDEVICE (device);
   struct frame *f;
   void* bmp_buf=0;
   struct device *d = XDEVICE (device);
   struct frame *f;
   void* bmp_buf=0;
-  int type;
+  int type = 0;
   HBITMAP bitmap;
   HDC hdc;
 
   HBITMAP bitmap;
   HDC hdc;
 
@@ -2041,7 +2043,7 @@ mswindows_update_subwindow (struct Lisp_Image_Instance *p)
       /* buttons checked or otherwise */
       if ( EQ (IMAGE_INSTANCE_WIDGET_TYPE (p), Qbutton))
        {
       /* buttons checked or otherwise */
       if ( EQ (IMAGE_INSTANCE_WIDGET_TYPE (p), Qbutton))
        {
-         if (gui_item_selected_p (&IMAGE_INSTANCE_WIDGET_ITEM (p)))
+         if (gui_item_selected_p (IMAGE_INSTANCE_WIDGET_SINGLE_ITEM (p)))
            SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), 
                         BM_SETCHECK, (WPARAM)BST_CHECKED, 0); 
          else
            SendMessage (WIDGET_INSTANCE_MSWINDOWS_HANDLE (p), 
                         BM_SETCHECK, (WPARAM)BST_CHECKED, 0); 
          else
@@ -2055,19 +2057,26 @@ mswindows_update_subwindow (struct Lisp_Image_Instance *p)
    callbacks. The hashtable is weak so deregistration is handled
    automatically */
 static int
    callbacks. The hashtable is weak so deregistration is handled
    automatically */
 static int
-mswindows_register_widget_instance (Lisp_Object instance, Lisp_Object domain)
+mswindows_register_gui_item (Lisp_Object gui, Lisp_Object domain)
 {
   Lisp_Object frame = FW_FRAME (domain);
   struct frame* f = XFRAME (frame);
 {
   Lisp_Object frame = FW_FRAME (domain);
   struct frame* f = XFRAME (frame);
-  int id = gui_item_hash (FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f),
-                         &XIMAGE_INSTANCE_WIDGET_ITEM (instance),
-                         WIDGET_GLYPH_SLOT);
+  int id = gui_item_id_hash (FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f),
+                            gui,
+                            WIDGET_GLYPH_SLOT);
   Fputhash (make_int (id),
   Fputhash (make_int (id),
-           XIMAGE_INSTANCE_WIDGET_CALLBACK (instance),
+           XGUI_ITEM (gui)->callback,
            FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f));
   return id;
 }
 
            FRAME_MSWINDOWS_WIDGET_HASH_TABLE (f));
   return id;
 }
 
+static int
+mswindows_register_widget_instance (Lisp_Object instance, Lisp_Object domain)
+{
+  return mswindows_register_gui_item (XIMAGE_INSTANCE_WIDGET_SINGLE_ITEM (instance),
+                                     domain);
+}
+
 static void
 mswindows_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                                 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
 static void
 mswindows_subwindow_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                                 Lisp_Object pointer_fg, Lisp_Object pointer_bg,
@@ -2164,7 +2173,6 @@ mswindows_initialize_dibitmap_image_instance (struct Lisp_Image_Instance *ii,
 /************************************************************************/
 /*                            widgets                            */
 /************************************************************************/
 /************************************************************************/
 /*                            widgets                            */
 /************************************************************************/
-
 static void
 mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                              Lisp_Object pointer_fg, Lisp_Object pointer_bg,
 static void
 mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                              Lisp_Object pointer_fg, Lisp_Object pointer_bg,
@@ -2182,7 +2190,8 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat
   Extbyte* nm=0;
   HWND wnd;
   int id = 0xffff;
   Extbyte* nm=0;
   HWND wnd;
   int id = 0xffff;
-  struct gui_item* pgui = &IMAGE_INSTANCE_WIDGET_ITEM (ii);
+  Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
+  struct Lisp_Gui_Item* pgui = XGUI_ITEM (gui);
 
   if (!DEVICE_MSWINDOWS_P (d))
     signal_simple_error ("Not an mswindows device", device);
 
   if (!DEVICE_MSWINDOWS_P (d))
     signal_simple_error ("Not an mswindows device", device);
@@ -2197,7 +2206,7 @@ mswindows_widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiat
       groupii = XIMAGE_INSTANCE (group);
     }
 #endif
       groupii = XIMAGE_INSTANCE (group);
     }
 #endif
-  if (!gui_item_active_p (pgui))
+  if (!gui_item_active_p (gui))
     flags |= WS_DISABLED;
 
   style = pgui->style;
     flags |= WS_DISABLED;
 
   style = pgui->style;
@@ -2256,10 +2265,11 @@ mswindows_button_instantiate (Lisp_Object image_instance, Lisp_Object instantiat
   HWND wnd;
   int flags = BS_NOTIFY;
   Lisp_Object style;
   HWND wnd;
   int flags = BS_NOTIFY;
   Lisp_Object style;
-  struct gui_item* pgui = &IMAGE_INSTANCE_WIDGET_ITEM (ii);
+  Lisp_Object gui = IMAGE_INSTANCE_WIDGET_ITEM (ii);
+  struct Lisp_Gui_Item* pgui = XGUI_ITEM (gui);
   Lisp_Object glyph = find_keyword_in_vector (instantiator, Q_image);
 
   Lisp_Object glyph = find_keyword_in_vector (instantiator, Q_image);
 
-  if (!gui_item_active_p (pgui))
+  if (!gui_item_active_p (gui))
     flags |= WS_DISABLED;
 
   if (!NILP (glyph))
     flags |= WS_DISABLED;
 
   if (!NILP (glyph))
@@ -2291,7 +2301,7 @@ mswindows_button_instantiate (Lisp_Object image_instance, Lisp_Object instantiat
 
   wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
   /* set the checked state */
 
   wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
   /* set the checked state */
-  if (gui_item_selected_p (pgui))
+  if (gui_item_selected_p (gui))
     SendMessage (wnd, BM_SETCHECK, (WPARAM)BST_CHECKED, 0); 
   else
     SendMessage (wnd, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
     SendMessage (wnd, BM_SETCHECK, (WPARAM)BST_CHECKED, 0); 
   else
     SendMessage (wnd, BM_SETCHECK, (WPARAM)BST_UNCHECKED, 0);
@@ -2320,7 +2330,7 @@ mswindows_edit_instantiate (Lisp_Object image_instance, Lisp_Object instantiator
                                WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT);
 }
 
                                WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT);
 }
 
-/* instantiate an edit control */
+/* instantiate a progress gauge */
 static void
 mswindows_progress_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                                Lisp_Object pointer_fg, Lisp_Object pointer_bg,
 static void
 mswindows_progress_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                                Lisp_Object pointer_fg, Lisp_Object pointer_bg,
@@ -2352,6 +2362,178 @@ mswindows_progress_instantiate (Lisp_Object image_instance, Lisp_Object instanti
 #endif
 }
 
 #endif
 }
 
+/* instantiate a tree view widget */
+static HTREEITEM add_tree_item (Lisp_Object image_instance,
+                               HWND wnd, HTREEITEM parent, Lisp_Object entry,
+                               int children, Lisp_Object domain)
+{
+  TV_INSERTSTRUCT tvitem;
+  HTREEITEM ret;
+
+  tvitem.hParent = parent;
+  tvitem.hInsertAfter = TVI_LAST;
+  tvitem.item.mask = TVIF_TEXT | TVIF_CHILDREN;
+  tvitem.item.cChildren = children;
+      
+  if (VECTORP (entry))
+    {
+      /* we always maintain the real gui item at the head of the
+         list. We have to put them in the list in the first place
+         because the whole model assumes that the glyph instances have
+         references to all the associated data. If we didn't do this
+         GC would bite us badly. */
+      Lisp_Object gui = gui_parse_item_keywords_no_errors (entry);
+      if (CONSP (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance)))
+       {
+         Lisp_Object rest = 
+           Fcons (gui, XCDR (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance)));
+         Fsetcdr (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance), rest);
+       }
+      else
+       {
+         XIMAGE_INSTANCE_WIDGET_ITEM (image_instance) = 
+           Fcons (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance), gui);
+       }
+
+      tvitem.item.lParam = mswindows_register_gui_item (gui, domain);
+      tvitem.item.mask |= TVIF_PARAM;
+      GET_C_STRING_OS_DATA_ALLOCA (XGUI_ITEM (gui)->name, 
+                                  tvitem.item.pszText);
+    }
+  else
+    GET_C_STRING_OS_DATA_ALLOCA (entry, tvitem.item.pszText);
+
+  tvitem.item.cchTextMax = strlen (tvitem.item.pszText);
+
+  if ((ret = (HTREEITEM)SendMessage (wnd, TVM_INSERTITEM, 
+                                    0, (LPARAM)&tvitem)) == 0)
+    signal_simple_error ("error adding tree view entry", entry);
+
+  return ret;
+}
+
+static void add_tree_item_list (Lisp_Object image_instance,
+                               HWND wnd, HTREEITEM parent, Lisp_Object list,
+                               Lisp_Object domain)
+{
+  Lisp_Object rest;
+
+  /* get the first item */
+  parent = add_tree_item (image_instance, wnd, parent, XCAR (list), TRUE, domain);
+  /* recursively add items to the tree view */
+  LIST_LOOP (rest, XCDR (list))
+    {
+      if (LISTP (XCAR (rest)))
+       add_tree_item_list (image_instance, wnd, parent, XCAR (rest), domain);
+      else
+       add_tree_item (image_instance, wnd, parent, XCAR (rest), FALSE, domain);
+    }
+}
+
+static void
+mswindows_tree_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+                           Lisp_Object pointer_fg, Lisp_Object pointer_bg,
+                           int dest_mask, Lisp_Object domain)
+{
+  Lisp_Object rest;
+  HWND wnd;
+  HTREEITEM parent;
+  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  mswindows_widget_instantiate (image_instance, instantiator, pointer_fg,
+                               pointer_bg, dest_mask, domain, WC_TREEVIEW, 
+                               WS_TABSTOP | WS_BORDER | PBS_SMOOTH
+                               | TVS_HASLINES | TVS_HASBUTTONS,
+                               WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT);
+
+  wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
+  /* define a root */
+  parent = add_tree_item (image_instance,
+                         wnd, NULL, IMAGE_INSTANCE_WIDGET_TEXT (ii), TRUE,
+                         domain);
+  /* recursively add items to the tree view */
+  LIST_LOOP (rest, Fplist_get (IMAGE_INSTANCE_WIDGET_PROPS (ii), Q_items, Qnil))
+    {
+      if (LISTP (XCAR (rest)))
+       add_tree_item_list (image_instance, wnd, parent, XCAR (rest), domain);
+      else
+       add_tree_item (image_instance, wnd, parent, XCAR (rest), FALSE, domain);
+    }
+}
+
+/* instantiate a tab control */
+static TC_ITEM* add_tab_item (Lisp_Object image_instance,
+                            HWND wnd, Lisp_Object entry,
+                            Lisp_Object domain, int index)
+{
+  TC_ITEM tvitem, *ret;
+
+  tvitem.mask = TCIF_TEXT;
+      
+  if (VECTORP (entry))
+    {
+      /* we always maintain the real gui item at the head of the
+         list. We have to put them in the list in the first place
+         because the whole model assumes that the glyph instances have
+         references to all the associated data. If we didn't do this
+         GC would bite us badly. */
+      Lisp_Object gui = gui_parse_item_keywords_no_errors (entry);
+      if (CONSP (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance)))
+       {
+         Lisp_Object rest = 
+           Fcons (gui, XCDR (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance)));
+         Fsetcdr (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance), rest);
+       }
+      else
+       {
+         XIMAGE_INSTANCE_WIDGET_ITEM (image_instance) = 
+           Fcons (XIMAGE_INSTANCE_WIDGET_ITEM (image_instance), gui);
+       }
+
+      tvitem.lParam = mswindows_register_gui_item (gui, domain);
+      tvitem.mask |= TCIF_PARAM;
+      GET_C_STRING_OS_DATA_ALLOCA (XGUI_ITEM (gui)->name, 
+                                  tvitem.pszText);
+    }
+  else
+    GET_C_STRING_OS_DATA_ALLOCA (entry, tvitem.pszText);
+
+  tvitem.cchTextMax = strlen (tvitem.pszText);
+
+  if ((ret = (TC_ITEM*)SendMessage (wnd, TCM_INSERTITEM, 
+                                   index, (LPARAM)&tvitem)) < 0)
+    signal_simple_error ("error adding tab entry", entry);
+
+  return ret;
+}
+
+static void
+mswindows_tab_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+                          Lisp_Object pointer_fg, Lisp_Object pointer_bg,
+                          int dest_mask, Lisp_Object domain)
+{
+  Lisp_Object rest;
+  HWND wnd;
+  HTREEITEM parent;
+  int index = 0;
+  struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
+  mswindows_widget_instantiate (image_instance, instantiator, pointer_fg,
+                               pointer_bg, dest_mask, domain, WC_TABCONTROL, 
+                               /* borders don't suit tabs so well */
+                               WS_TABSTOP,
+                               WS_EX_CONTROLPARENT);
+
+  wnd = WIDGET_INSTANCE_MSWINDOWS_HANDLE (ii);
+  /* add items to the tab */
+  LIST_LOOP (rest, Fplist_get (IMAGE_INSTANCE_WIDGET_PROPS (ii), Q_items, Qnil))
+    {
+      add_tab_item (image_instance, wnd, XCAR (rest), domain, index);
+      index++;
+    }
+}
+
 /* instantiate a static control possible for putting other things in */
 static void
 mswindows_label_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
 /* instantiate a static control possible for putting other things in */
 static void
 mswindows_label_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
@@ -2558,6 +2740,7 @@ image_instantiator_format_create_glyphs_mswindows (void)
   INITIALIZE_DEVICE_IIFORMAT (mswindows, xface);
   IIFORMAT_HAS_DEVMETHOD (mswindows, xface, instantiate);
 #endif
   INITIALIZE_DEVICE_IIFORMAT (mswindows, xface);
   IIFORMAT_HAS_DEVMETHOD (mswindows, xface, instantiate);
 #endif
+  /* button widget */
   INITIALIZE_DEVICE_IIFORMAT (mswindows, button);
   IIFORMAT_HAS_DEVMETHOD (mswindows, button, property);
   IIFORMAT_HAS_DEVMETHOD (mswindows, button, instantiate);
   INITIALIZE_DEVICE_IIFORMAT (mswindows, button);
   IIFORMAT_HAS_DEVMETHOD (mswindows, button, property);
   IIFORMAT_HAS_DEVMETHOD (mswindows, button, instantiate);
@@ -2575,22 +2758,35 @@ image_instantiator_format_create_glyphs_mswindows (void)
   INITIALIZE_DEVICE_IIFORMAT (mswindows, group);
   IIFORMAT_HAS_DEVMETHOD (mswindows, group, instantiate);
 #endif
   INITIALIZE_DEVICE_IIFORMAT (mswindows, group);
   IIFORMAT_HAS_DEVMETHOD (mswindows, group, instantiate);
 #endif
+  /* label */
   INITIALIZE_DEVICE_IIFORMAT (mswindows, label);
   IIFORMAT_HAS_DEVMETHOD (mswindows, label, instantiate);
 
   INITIALIZE_DEVICE_IIFORMAT (mswindows, label);
   IIFORMAT_HAS_DEVMETHOD (mswindows, label, instantiate);
 
+  /* combo box */
   INITIALIZE_DEVICE_IIFORMAT (mswindows, combo);
   IIFORMAT_HAS_DEVMETHOD (mswindows, combo, property);
   IIFORMAT_HAS_DEVMETHOD (mswindows, combo, instantiate);
 
   INITIALIZE_DEVICE_IIFORMAT (mswindows, combo);
   IIFORMAT_HAS_DEVMETHOD (mswindows, combo, property);
   IIFORMAT_HAS_DEVMETHOD (mswindows, combo, instantiate);
 
+  /* scrollbar */
   INITIALIZE_DEVICE_IIFORMAT (mswindows, scrollbar);
   IIFORMAT_HAS_DEVMETHOD (mswindows, scrollbar, instantiate);
 
   INITIALIZE_DEVICE_IIFORMAT (mswindows, scrollbar);
   IIFORMAT_HAS_DEVMETHOD (mswindows, scrollbar, instantiate);
 
+  /* progress gauge */
   INITIALIZE_DEVICE_IIFORMAT (mswindows, progress);
   IIFORMAT_HAS_DEVMETHOD (mswindows, progress, set_property);
   IIFORMAT_HAS_DEVMETHOD (mswindows, progress, instantiate);
 
   INITIALIZE_DEVICE_IIFORMAT (mswindows, progress);
   IIFORMAT_HAS_DEVMETHOD (mswindows, progress, set_property);
   IIFORMAT_HAS_DEVMETHOD (mswindows, progress, instantiate);
 
-  INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (bmp, "bmp");
+  /* tree view widget */
+  INITIALIZE_DEVICE_IIFORMAT (mswindows, tree);
+  /*  IIFORMAT_HAS_DEVMETHOD (mswindows, progress, set_property);*/
+  IIFORMAT_HAS_DEVMETHOD (mswindows, tree, instantiate);
 
 
+  /* tab control widget */
+  INITIALIZE_DEVICE_IIFORMAT (mswindows, tab);
+  IIFORMAT_HAS_DEVMETHOD (mswindows, tab, instantiate);
+
+  /* windows bitmap format */
+  INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (bmp, "bmp");
   IIFORMAT_HAS_METHOD (bmp, validate);
   IIFORMAT_HAS_METHOD (bmp, normalize);
   IIFORMAT_HAS_METHOD (bmp, possible_dest_types);
   IIFORMAT_HAS_METHOD (bmp, validate);
   IIFORMAT_HAS_METHOD (bmp, normalize);
   IIFORMAT_HAS_METHOD (bmp, possible_dest_types);
@@ -2599,6 +2795,7 @@ image_instantiator_format_create_glyphs_mswindows (void)
   IIFORMAT_VALID_KEYWORD (bmp, Q_data, check_valid_string);
   IIFORMAT_VALID_KEYWORD (bmp, Q_file, check_valid_string);
 
   IIFORMAT_VALID_KEYWORD (bmp, Q_data, check_valid_string);
   IIFORMAT_VALID_KEYWORD (bmp, Q_file, check_valid_string);
 
+  /* mswindows resources */
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (mswindows_resource,
                                        "mswindows-resource");
 
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (mswindows_resource,
                                        "mswindows-resource");
 
@@ -2630,6 +2827,8 @@ This is used by the `make-image-instance' function.
   Fprovide (Qscrollbar);
   Fprovide (Qlabel);
   Fprovide (Qprogress);
   Fprovide (Qscrollbar);
   Fprovide (Qlabel);
   Fprovide (Qprogress);
+  Fprovide (Qtree);
+  Fprovide (Qtab);
 }
 
 void
 }
 
 void
index 3e2162b..7b4e2bc 100644 (file)
@@ -53,6 +53,10 @@ DEFINE_IMAGE_INSTANTIATOR_FORMAT (label);
 Lisp_Object Qlabel;
 DEFINE_IMAGE_INSTANTIATOR_FORMAT (progress);
 Lisp_Object Qprogress;
 Lisp_Object Qlabel;
 DEFINE_IMAGE_INSTANTIATOR_FORMAT (progress);
 Lisp_Object Qprogress;
+DEFINE_IMAGE_INSTANTIATOR_FORMAT (tree);
+Lisp_Object Qtree;
+DEFINE_IMAGE_INSTANTIATOR_FORMAT (tab);
+Lisp_Object Qtab;
 
 Lisp_Object Q_descriptor, Q_height, Q_width, Q_properties, Q_items;
 Lisp_Object Q_image, Q_text, Q_percent;
 
 Lisp_Object Q_descriptor, Q_height, Q_width, Q_properties, Q_items;
 Lisp_Object Q_image, Q_text, Q_percent;
@@ -146,21 +150,35 @@ check_valid_string_or_vector (Lisp_Object data)
 }
 
 static void
 }
 
 static void
-check_valid_item_list (Lisp_Object data)
+check_valid_item_list_1 (Lisp_Object items)
 {
   Lisp_Object rest;
 {
   Lisp_Object rest;
-  Lisp_Object items;
-  Fcheck_valid_plist (data);
-  
-  items = Fplist_get (data, Q_items, Qnil);
 
   CHECK_LIST (items);
   EXTERNAL_LIST_LOOP (rest, items)
     {
 
   CHECK_LIST (items);
   EXTERNAL_LIST_LOOP (rest, items)
     {
-      CHECK_STRING (XCAR (rest));
+      if (STRINGP (XCAR (rest)))
+       CHECK_STRING (XCAR (rest));
+      else if (VECTORP (XCAR (rest)))
+       gui_parse_item_keywords (XCAR (rest));
+      else if (LISTP (XCAR (rest)))
+       check_valid_item_list_1 (XCAR (rest));
+      else
+       signal_simple_error ("Items must be vectors, lists or strings", items);
     }
 }
 
     }
 }
 
+static void
+check_valid_item_list (Lisp_Object data)
+{
+  Lisp_Object items;
+
+  Fcheck_valid_plist (data);
+  items = Fplist_get (data, Q_items, Qnil);
+
+  check_valid_item_list_1 (items);
+}
+
 /* wire widget property invocations to specific widgets ...  The
  problem we are solving here is that when instantiators get converted
  to instances they lose some type information (they just become
 /* wire widget property invocations to specific widgets ...  The
  problem we are solving here is that when instantiators get converted
  to instances they lose some type information (they just become
@@ -235,15 +253,15 @@ static void
 widget_validate (Lisp_Object instantiator)
 {
   Lisp_Object desc = find_keyword_in_vector (instantiator, Q_descriptor);
 widget_validate (Lisp_Object instantiator)
 {
   Lisp_Object desc = find_keyword_in_vector (instantiator, Q_descriptor);
-  struct gui_item gui;
+
   if (NILP (desc))
     signal_simple_error ("Must supply :descriptor", instantiator);
 
   if (VECTORP (desc))
   if (NILP (desc))
     signal_simple_error ("Must supply :descriptor", instantiator);
 
   if (VECTORP (desc))
-      gui_parse_item_keywords (desc, &gui);
+    gui_parse_item_keywords (desc);
 
   if (!NILP (find_keyword_in_vector (instantiator, Q_width))
 
   if (!NILP (find_keyword_in_vector (instantiator, Q_width))
-            && !NILP (find_keyword_in_vector (instantiator, Q_pixel_width)))
+      && !NILP (find_keyword_in_vector (instantiator, Q_pixel_width)))
     signal_simple_error ("Must supply only one of :width and :pixel-width", instantiator);
 
   if (!NILP (find_keyword_in_vector (instantiator, Q_height))
     signal_simple_error ("Must supply only one of :width and :pixel-width", instantiator);
 
   if (!NILP (find_keyword_in_vector (instantiator, Q_height))
@@ -300,23 +318,22 @@ initialize_widget_image_instance (struct Lisp_Image_Instance *ii, Lisp_Object ty
   IMAGE_INSTANCE_WIDGET_TYPE (ii) = type;
   IMAGE_INSTANCE_WIDGET_PROPS (ii) = Qnil;
   IMAGE_INSTANCE_WIDGET_FACE (ii) = Vwidget_face;
   IMAGE_INSTANCE_WIDGET_TYPE (ii) = type;
   IMAGE_INSTANCE_WIDGET_PROPS (ii) = Qnil;
   IMAGE_INSTANCE_WIDGET_FACE (ii) = Vwidget_face;
-  gui_item_init (&IMAGE_INSTANCE_WIDGET_ITEM (ii));
+  IMAGE_INSTANCE_WIDGET_ITEM (ii) = allocate_gui_item ();
 }
 
 /* Instantiate a button widget. Unfortunately instantiated widgets are
    particular to a frame since they need to have a parent. It's not
    like images where you just select the image into the context you
 }
 
 /* Instantiate a button widget. Unfortunately instantiated widgets are
    particular to a frame since they need to have a parent. It's not
    like images where you just select the image into the context you
-   want to display it in and BitBlt it. So images instances can have a
+   want to display it in and BitBlt it. So image instances can have a
    many-to-one relationship with things you see, whereas widgets can
    only be one-to-one (i.e. per frame) */
 static void
 widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator,
                      Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                      int dest_mask, Lisp_Object domain, int default_textheight,
    many-to-one relationship with things you see, whereas widgets can
    only be one-to-one (i.e. per frame) */
 static void
 widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator,
                      Lisp_Object pointer_fg, Lisp_Object pointer_bg,
                      int dest_mask, Lisp_Object domain, int default_textheight,
-                     int default_pixheight)
+                     int default_pixheight, int default_textwidth)
 {
   struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
 {
   struct Lisp_Image_Instance *ii = XIMAGE_INSTANCE (image_instance);
-  struct gui_item* pgui = &IMAGE_INSTANCE_WIDGET_ITEM (ii);
   Lisp_Object face = find_keyword_in_vector (instantiator, Q_face);
   Lisp_Object height = find_keyword_in_vector (instantiator, Q_height);
   Lisp_Object width = find_keyword_in_vector (instantiator, Q_width);
   Lisp_Object face = find_keyword_in_vector (instantiator, Q_face);
   Lisp_Object height = find_keyword_in_vector (instantiator, Q_height);
   Lisp_Object width = find_keyword_in_vector (instantiator, Q_width);
@@ -349,11 +366,13 @@ widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator,
   if (STRINGP (desc) || NILP (desc))
     {
       /* big cheat - we rely on the fact that a gui item looks like an instantiator */
   if (STRINGP (desc) || NILP (desc))
     {
       /* big cheat - we rely on the fact that a gui item looks like an instantiator */
-      gui_parse_item_keywords_no_errors (instantiator, pgui);
+      IMAGE_INSTANCE_WIDGET_ITEM (ii) = 
+       gui_parse_item_keywords_no_errors (instantiator);
       IMAGE_INSTANCE_WIDGET_TEXT (ii) = desc;
     }
   else
       IMAGE_INSTANCE_WIDGET_TEXT (ii) = desc;
     }
   else
-    gui_parse_item_keywords_no_errors (desc, pgui);
+    IMAGE_INSTANCE_WIDGET_ITEM (ii) =
+      gui_parse_item_keywords_no_errors (desc);
 
   /* normalize size information */
   if (!NILP (width))
 
   /* normalize size information */
   if (!NILP (width))
@@ -377,8 +396,14 @@ widget_instantiate_1 (Lisp_Object image_instance, Lisp_Object instantiator,
     }
 
   /* if we still don' t have sizes, guess from text size */
     }
 
   /* if we still don' t have sizes, guess from text size */
-  if (!tw && !pw && !NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii)))
-    tw = XSTRING_LENGTH (IMAGE_INSTANCE_WIDGET_TEXT (ii));
+  if (!tw && !pw)
+    {
+      if (default_textwidth)
+       tw = default_textwidth;
+      else if (!NILP (IMAGE_INSTANCE_WIDGET_TEXT (ii)))
+       tw = XSTRING_LENGTH (IMAGE_INSTANCE_WIDGET_TEXT (ii));
+    }
+
   if (!th && !ph)
     {
       if (default_textheight)
   if (!th && !ph)
     {
       if (default_textheight)
@@ -404,9 +429,10 @@ widget_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                    int dest_mask, Lisp_Object domain)
 {
   widget_instantiate_1 (image_instance, instantiator, pointer_fg,
                    int dest_mask, Lisp_Object domain)
 {
   widget_instantiate_1 (image_instance, instantiator, pointer_fg,
-                              pointer_bg, dest_mask, domain, 1, 0);
+                              pointer_bg, dest_mask, domain, 1, 0, 0);
 }
 
 }
 
+/* combo-box generic instantiation - get he heigh right */
 static void
 combo_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                   Lisp_Object pointer_fg, Lisp_Object pointer_bg,
 static void
 combo_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                   Lisp_Object pointer_fg, Lisp_Object pointer_bg,
@@ -417,7 +443,33 @@ combo_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
   int len;
   GET_LIST_LENGTH (data, len);
   widget_instantiate_1 (image_instance, instantiator, pointer_fg,
   int len;
   GET_LIST_LENGTH (data, len);
   widget_instantiate_1 (image_instance, instantiator, pointer_fg,
-                       pointer_bg, dest_mask, domain, len + 1, 0);
+                       pointer_bg, dest_mask, domain, len + 1, 0, 0);
+}
+
+static void
+tab_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
+                Lisp_Object pointer_fg, Lisp_Object pointer_bg,
+                int dest_mask, Lisp_Object domain)
+{
+  Lisp_Object data = Fplist_get (find_keyword_in_vector (instantiator, Q_properties),
+                                Q_items, Qnil);
+  Lisp_Object rest;
+  int len = 0;
+
+  LIST_LOOP (rest, data)
+    {
+      len += 3;                        /* some bias */
+      if (STRINGP (XCAR (rest)))
+       len += XSTRING_LENGTH (XCAR (rest));
+      else if (VECTORP (XCAR (rest)))
+       {
+         Lisp_Object gui = gui_parse_item_keywords (XCAR (rest));
+         len += XSTRING_LENGTH (XGUI_ITEM (gui)->name);
+       }
+    }
+
+  widget_instantiate_1 (image_instance, instantiator, pointer_fg,
+                       pointer_bg, dest_mask, domain, 0, 0, len);
 }
 
 /* Instantiate a static control */
 }
 
 /* Instantiate a static control */
@@ -427,7 +479,7 @@ static_instantiate (Lisp_Object image_instance, Lisp_Object instantiator,
                    int dest_mask, Lisp_Object domain)
 {
   widget_instantiate_1 (image_instance, instantiator, pointer_fg,
                    int dest_mask, Lisp_Object domain)
 {
   widget_instantiate_1 (image_instance, instantiator, pointer_fg,
-                       pointer_bg, dest_mask, domain, 0, 4);
+                       pointer_bg, dest_mask, domain, 0, 4, 0);
 }
 
 \f
 }
 
 \f
@@ -445,7 +497,7 @@ syms_of_glyphs_widget (void)
   defkeyword (&Q_items, ":items");
   defkeyword (&Q_image, ":image");
   defkeyword (&Q_percent, ":percent");
   defkeyword (&Q_items, ":items");
   defkeyword (&Q_image, ":image");
   defkeyword (&Q_percent, ":percent");
-  defkeyword (&Q_text, "text");
+  defkeyword (&Q_text, ":text");
 }
 
 void
 }
 
 void
@@ -524,10 +576,28 @@ image_instantiator_format_create_glyphs_widget (void)
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (progress, "progress");
   IIFORMAT_HAS_SHARED_METHOD (progress, validate, widget);
   IIFORMAT_HAS_SHARED_METHOD (progress, possible_dest_types, widget);
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (progress, "progress");
   IIFORMAT_HAS_SHARED_METHOD (progress, validate, widget);
   IIFORMAT_HAS_SHARED_METHOD (progress, possible_dest_types, widget);
-  IIFORMAT_HAS_SHARED_METHOD (progress, instantiate, widget);
+  IIFORMAT_HAS_SHARED_METHOD (progress, instantiate, combo);
   VALID_WIDGET_KEYWORDS (progress);
   VALID_GUI_KEYWORDS (progress);
 
   VALID_WIDGET_KEYWORDS (progress);
   VALID_GUI_KEYWORDS (progress);
 
+  /* tree view */
+  INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (tree, "tree");
+  IIFORMAT_HAS_SHARED_METHOD (tree, validate, combo);
+  IIFORMAT_HAS_SHARED_METHOD (tree, possible_dest_types, widget);
+  IIFORMAT_HAS_SHARED_METHOD (tree, instantiate, combo);
+  VALID_WIDGET_KEYWORDS (tree);
+  VALID_GUI_KEYWORDS (tree);
+  IIFORMAT_VALID_KEYWORD (tree, Q_properties, check_valid_item_list);
+
+  /* tab control */
+  INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (tab, "tab");
+  IIFORMAT_HAS_SHARED_METHOD (tab, validate, combo);
+  IIFORMAT_HAS_SHARED_METHOD (tab, possible_dest_types, widget);
+  IIFORMAT_HAS_METHOD (tab, instantiate);
+  VALID_WIDGET_KEYWORDS (tab);
+  VALID_GUI_KEYWORDS (tab);
+  IIFORMAT_VALID_KEYWORD (tab, Q_properties, check_valid_item_list);
+
   /* labels */
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (label, "label");
   IIFORMAT_HAS_SHARED_METHOD (label, possible_dest_types, widget);
   /* labels */
   INITIALIZE_IMAGE_INSTANTIATOR_FORMAT (label, "label");
   IIFORMAT_HAS_SHARED_METHOD (label, possible_dest_types, widget);
index d92508e..f035111 100644 (file)
@@ -600,7 +600,7 @@ mark_image_instance (Lisp_Object obj, void (*markobj) (Lisp_Object))
       markobj (IMAGE_INSTANCE_WIDGET_TYPE (i));
       markobj (IMAGE_INSTANCE_WIDGET_PROPS (i));
       markobj (IMAGE_INSTANCE_WIDGET_FACE (i));
       markobj (IMAGE_INSTANCE_WIDGET_TYPE (i));
       markobj (IMAGE_INSTANCE_WIDGET_PROPS (i));
       markobj (IMAGE_INSTANCE_WIDGET_FACE (i));
-      mark_gui_item (&IMAGE_INSTANCE_WIDGET_ITEM (i), markobj);
+      markobj (IMAGE_INSTANCE_WIDGET_ITEM (i));
     case IMAGE_SUBWINDOW:
       markobj (IMAGE_INSTANCE_SUBWINDOW_FRAME (i));
       break;
     case IMAGE_SUBWINDOW:
       markobj (IMAGE_INSTANCE_SUBWINDOW_FRAME (i));
       break;
@@ -707,11 +707,13 @@ print_image_instance (Lisp_Object obj, Lisp_Object printcharfun,
       break;
 
     case IMAGE_WIDGET:
       break;
 
     case IMAGE_WIDGET:
+      /*
       if (!NILP (IMAGE_INSTANCE_WIDGET_CALLBACK (ii)))
        {
          print_internal (IMAGE_INSTANCE_WIDGET_CALLBACK (ii), printcharfun, 0);
          write_c_string (", ", printcharfun);
        }
       if (!NILP (IMAGE_INSTANCE_WIDGET_CALLBACK (ii)))
        {
          print_internal (IMAGE_INSTANCE_WIDGET_CALLBACK (ii), printcharfun, 0);
          write_c_string (", ", printcharfun);
        }
+      */
       if (!NILP (IMAGE_INSTANCE_WIDGET_FACE (ii)))
        {
          write_c_string (" (", printcharfun);
       if (!NILP (IMAGE_INSTANCE_WIDGET_FACE (ii)))
        {
          write_c_string (" (", printcharfun);
@@ -834,15 +836,14 @@ image_instance_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
 
     case IMAGE_WIDGET:
       if (!(EQ (IMAGE_INSTANCE_WIDGET_TYPE (i1),
 
     case IMAGE_WIDGET:
       if (!(EQ (IMAGE_INSTANCE_WIDGET_TYPE (i1),
-               IMAGE_INSTANCE_WIDGET_TYPE (i2)) &&
-           EQ (IMAGE_INSTANCE_WIDGET_CALLBACK (i1),
-               IMAGE_INSTANCE_WIDGET_CALLBACK (i2))
+               IMAGE_INSTANCE_WIDGET_TYPE (i2))
+           && internal_equal (IMAGE_INSTANCE_WIDGET_ITEM (i1),
+                              IMAGE_INSTANCE_WIDGET_ITEM (i2),
+                              depth + 1)
            && internal_equal (IMAGE_INSTANCE_WIDGET_PROPS (i1),
                               IMAGE_INSTANCE_WIDGET_PROPS (i2),
                               depth + 1)
            && internal_equal (IMAGE_INSTANCE_WIDGET_PROPS (i1),
                               IMAGE_INSTANCE_WIDGET_PROPS (i2),
                               depth + 1)
-           && internal_equal (IMAGE_INSTANCE_WIDGET_TEXT (i1),
-                              IMAGE_INSTANCE_WIDGET_TEXT (i2),
-                              depth + 1)))
+           ))
        return 0;
     case IMAGE_SUBWINDOW:
       if (!(IMAGE_INSTANCE_SUBWINDOW_WIDTH (i1) ==
        return 0;
     case IMAGE_SUBWINDOW:
       if (!(IMAGE_INSTANCE_SUBWINDOW_WIDTH (i1) ==
@@ -892,7 +893,7 @@ image_instance_hash (Lisp_Object obj, int depth)
       hash = HASH4 (hash, 
                    internal_hash (IMAGE_INSTANCE_WIDGET_TYPE (i), depth + 1),
                    internal_hash (IMAGE_INSTANCE_WIDGET_PROPS (i), depth + 1),
       hash = HASH4 (hash, 
                    internal_hash (IMAGE_INSTANCE_WIDGET_TYPE (i), depth + 1),
                    internal_hash (IMAGE_INSTANCE_WIDGET_PROPS (i), depth + 1),
-                   internal_hash (IMAGE_INSTANCE_WIDGET_CALLBACK (i), depth + 1));
+                   internal_hash (IMAGE_INSTANCE_WIDGET_ITEM (i), depth + 1));
     case IMAGE_SUBWINDOW:
       hash = HASH4 (hash, IMAGE_INSTANCE_SUBWINDOW_WIDTH (i),
                    IMAGE_INSTANCE_SUBWINDOW_HEIGHT (i),
     case IMAGE_SUBWINDOW:
       hash = HASH4 (hash, IMAGE_INSTANCE_SUBWINDOW_WIDTH (i),
                    IMAGE_INSTANCE_SUBWINDOW_HEIGHT (i),
index 12f6098..a0ff30a 100644 (file)
@@ -432,7 +432,7 @@ struct Lisp_Image_Instance
        Lisp_Object face; /* foreground and background colors */
        Lisp_Object type;
        Lisp_Object props;      /* properties */
        Lisp_Object face; /* foreground and background colors */
        Lisp_Object type;
        Lisp_Object props;      /* properties */
-       struct gui_item gui_item;
+       Lisp_Object gui_item;   /* a list of gui_items */
       } widget;                        /* widgets are subwindows */
     } subwindow;
   } u;
       } widget;                        /* widgets are subwindows */
     } subwindow;
   } u;
@@ -472,13 +472,15 @@ struct Lisp_Image_Instance
   IMAGE_INSTANCE_SUBWINDOW_WIDTH(i)
 #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \
   IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i)
   IMAGE_INSTANCE_SUBWINDOW_WIDTH(i)
 #define IMAGE_INSTANCE_WIDGET_HEIGHT(i) \
   IMAGE_INSTANCE_SUBWINDOW_HEIGHT(i)
-#define IMAGE_INSTANCE_WIDGET_CALLBACK(i) \
-  ((i)->u.subwindow.widget.gui_item.callback)
 #define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.widget.type)
 #define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.widget.props)
 #define IMAGE_INSTANCE_WIDGET_FACE(i) ((i)->u.subwindow.widget.face)
 #define IMAGE_INSTANCE_WIDGET_TYPE(i) ((i)->u.subwindow.widget.type)
 #define IMAGE_INSTANCE_WIDGET_PROPS(i) ((i)->u.subwindow.widget.props)
 #define IMAGE_INSTANCE_WIDGET_FACE(i) ((i)->u.subwindow.widget.face)
-#define IMAGE_INSTANCE_WIDGET_TEXT(i) ((i)->u.subwindow.widget.gui_item.name)
 #define IMAGE_INSTANCE_WIDGET_ITEM(i) ((i)->u.subwindow.widget.gui_item)
 #define IMAGE_INSTANCE_WIDGET_ITEM(i) ((i)->u.subwindow.widget.gui_item)
+#define IMAGE_INSTANCE_WIDGET_SINGLE_ITEM(i) \
+(CONSP (IMAGE_INSTANCE_WIDGET_ITEM (i)) ? \
+XCAR (IMAGE_INSTANCE_WIDGET_ITEM (i)) : \
+  IMAGE_INSTANCE_WIDGET_ITEM (i))
+#define IMAGE_INSTANCE_WIDGET_TEXT(i) XGUI_ITEM (IMAGE_INSTANCE_WIDGET_ITEM (i))->name
 
 #define XIMAGE_INSTANCE_DEVICE(i) \
   IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i))
 
 #define XIMAGE_INSTANCE_DEVICE(i) \
   IMAGE_INSTANCE_DEVICE (XIMAGE_INSTANCE (i))
@@ -513,18 +515,18 @@ struct Lisp_Image_Instance
   IMAGE_INSTANCE_WIDGET_WIDTH (XIMAGE_INSTANCE (i))
 #define XIMAGE_INSTANCE_WIDGET_HEIGHT(i) \
   IMAGE_INSTANCE_WIDGET_HEIGHT (XIMAGE_INSTANCE (i))
   IMAGE_INSTANCE_WIDGET_WIDTH (XIMAGE_INSTANCE (i))
 #define XIMAGE_INSTANCE_WIDGET_HEIGHT(i) \
   IMAGE_INSTANCE_WIDGET_HEIGHT (XIMAGE_INSTANCE (i))
-#define XIMAGE_INSTANCE_WIDGET_CALLBACK(i) \
-  IMAGE_INSTANCE_WIDGET_CALLBACK (XIMAGE_INSTANCE (i))
 #define XIMAGE_INSTANCE_WIDGET_TYPE(i) \
   IMAGE_INSTANCE_WIDGET_TYPE (XIMAGE_INSTANCE (i))
 #define XIMAGE_INSTANCE_WIDGET_PROPS(i) \
   IMAGE_INSTANCE_WIDGET_PROPS (XIMAGE_INSTANCE (i))
 #define XIMAGE_INSTANCE_WIDGET_FACE(i) \
   IMAGE_INSTANCE_WIDGET_FACE (XIMAGE_INSTANCE (i))
 #define XIMAGE_INSTANCE_WIDGET_TYPE(i) \
   IMAGE_INSTANCE_WIDGET_TYPE (XIMAGE_INSTANCE (i))
 #define XIMAGE_INSTANCE_WIDGET_PROPS(i) \
   IMAGE_INSTANCE_WIDGET_PROPS (XIMAGE_INSTANCE (i))
 #define XIMAGE_INSTANCE_WIDGET_FACE(i) \
   IMAGE_INSTANCE_WIDGET_FACE (XIMAGE_INSTANCE (i))
-#define XIMAGE_INSTANCE_WIDGET_TEXT(i) \
-  IMAGE_INSTANCE_WIDGET_TEXT (XIMAGE_INSTANCE (i))
 #define XIMAGE_INSTANCE_WIDGET_ITEM(i) \
   IMAGE_INSTANCE_WIDGET_ITEM (XIMAGE_INSTANCE (i))
 #define XIMAGE_INSTANCE_WIDGET_ITEM(i) \
   IMAGE_INSTANCE_WIDGET_ITEM (XIMAGE_INSTANCE (i))
+#define XIMAGE_INSTANCE_WIDGET_SINGLE_ITEM(i) \
+  IMAGE_INSTANCE_WIDGET_SINGLE_ITEM (XIMAGE_INSTANCE (i))
+#define XIMAGE_INSTANCE_WIDGET_TEXT(i) \
+  IMAGE_INSTANCE_WIDGET_TEXT (XIMAGE_INSTANCE (i))
 
 #define XIMAGE_INSTANCE_SUBWINDOW_WIDTH(i) \
   IMAGE_INSTANCE_SUBWINDOW_WIDTH (XIMAGE_INSTANCE (i))
 
 #define XIMAGE_INSTANCE_SUBWINDOW_WIDTH(i) \
   IMAGE_INSTANCE_SUBWINDOW_WIDTH (XIMAGE_INSTANCE (i))
@@ -623,6 +625,7 @@ DECLARE_LRECORD (glyph, struct Lisp_Glyph);
 extern Lisp_Object Qxpm, Qxface;
 extern Lisp_Object Q_data, Q_file, Q_color_symbols, Qconst_glyph_variable;
 extern Lisp_Object Qxbm, Qedit, Qgroup, Qlabel, Qcombo, Qscrollbar, Qprogress;
 extern Lisp_Object Qxpm, Qxface;
 extern Lisp_Object Q_data, Q_file, Q_color_symbols, Qconst_glyph_variable;
 extern Lisp_Object Qxbm, Qedit, Qgroup, Qlabel, Qcombo, Qscrollbar, Qprogress;
+extern Lisp_Object Qtree, Qtab;
 extern Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y;
 extern Lisp_Object Q_foreground, Q_background, Q_face, Q_descriptor, Q_group;
 extern Lisp_Object Q_width, Q_height, Q_pixel_width, Q_pixel_height, Q_text;
 extern Lisp_Object Q_mask_file, Q_mask_data, Q_hotspot_x, Q_hotspot_y;
 extern Lisp_Object Q_foreground, Q_background, Q_face, Q_descriptor, Q_group;
 extern Lisp_Object Q_width, Q_height, Q_pixel_width, Q_pixel_height, Q_text;
index 8c3bf42..50da1ce 100644 (file)
--- a/src/gui.c
+++ b/src/gui.c
@@ -97,35 +97,17 @@ get_gui_callback (Lisp_Object data, Lisp_Object *fn, Lisp_Object *arg)
 }
 
 /*
 }
 
 /*
- * Initialize the gui_item structure by setting all (GC-protected)
- * fields to their default values. The defaults are t for :active and
- * :included values, and nil for others.
- */
-void
-gui_item_init (struct gui_item *pgui_item)
-{
-  pgui_item->name     = Qnil;
-  pgui_item->callback = Qnil;
-  pgui_item->suffix   = Qnil;
-  pgui_item->active   = Qt;
-  pgui_item->included = Qt;
-  pgui_item->config   = Qnil;
-  pgui_item->filter   = Qnil;
-  pgui_item->style    = Qnil;
-  pgui_item->selected = Qnil;
-  pgui_item->keys     = Qnil;
-}
-
-/*
  * Add a value VAL associated with keyword KEY into PGUI_ITEM
  * structure. If KEY is not a keyword, or is an unknown keyword, then
  * error is signaled.
  */
 void
  * Add a value VAL associated with keyword KEY into PGUI_ITEM
  * structure. If KEY is not a keyword, or is an unknown keyword, then
  * error is signaled.
  */
 void
-gui_item_add_keyval_pair (struct gui_item *pgui_item,
+gui_item_add_keyval_pair (Lisp_Object gui_item,
                          Lisp_Object key, Lisp_Object val, 
                          Error_behavior errb)
 {
                          Lisp_Object key, Lisp_Object val, 
                          Error_behavior errb)
 {
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+
   if (!KEYWORDP (key))
     signal_simple_error_2 ("Non-keyword in gui item", key, pgui_item->name);
 
   if (!KEYWORDP (key))
     signal_simple_error_2 ("Non-keyword in gui item", key, pgui_item->name);
 
@@ -144,17 +126,51 @@ gui_item_add_keyval_pair (struct gui_item *pgui_item,
     signal_simple_error_2 ("Unknown keyword in gui item", key, pgui_item->name);
 }
 
     signal_simple_error_2 ("Unknown keyword in gui item", key, pgui_item->name);
 }
 
+void
+gui_item_init (Lisp_Object gui_item)
+{
+  struct Lisp_Gui_Item *lp = XGUI_ITEM (gui_item);
+
+  lp->name     = Qnil;
+  lp->callback = Qnil;
+  lp->suffix   = Qnil;
+  lp->active   = Qt;
+  lp->included = Qt;
+  lp->config   = Qnil;
+  lp->filter   = Qnil;
+  lp->style    = Qnil;
+  lp->selected = Qnil;
+  lp->keys     = Qnil;
+}
+
+Lisp_Object
+allocate_gui_item ()
+{
+  struct Lisp_Gui_Item *lp =
+    alloc_lcrecord_type (struct Lisp_Gui_Item, &lrecord_gui_item);
+  Lisp_Object val;
+
+  zero_lcrecord (lp);
+  XSETGUI_ITEM (val, lp);
+
+  gui_item_init (val);
+
+  return val;
+}
+
 /*
  * ITEM is a lisp vector, describing a menu item or a button. The
  * function extracts the description of the item into the PGUI_ITEM
  * structure.
  */
 /*
  * ITEM is a lisp vector, describing a menu item or a button. The
  * function extracts the description of the item into the PGUI_ITEM
  * structure.
  */
-static void
-gui_parse_item_keywords_internal (Lisp_Object item, struct gui_item *pgui_item,
-                                 Error_behavior errb)
+static Lisp_Object
+make_gui_item_from_keywords_internal (Lisp_Object item,
+                                     Error_behavior errb)
 {
   int length, plist_p, start;
   Lisp_Object *contents;
 {
   int length, plist_p, start;
   Lisp_Object *contents;
+  Lisp_Object gui_item = allocate_gui_item ();
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
 
   CHECK_VECTOR (item);
   length = XVECTOR_LENGTH (item);
 
   CHECK_VECTOR (item);
   length = XVECTOR_LENGTH (item);
@@ -204,21 +220,48 @@ gui_parse_item_keywords_internal (Lisp_Object item, struct gui_item *pgui_item,
        {
          Lisp_Object key = contents [i++];
          Lisp_Object val = contents [i++];
        {
          Lisp_Object key = contents [i++];
          Lisp_Object val = contents [i++];
-         gui_item_add_keyval_pair (pgui_item, key, val, errb);
+         gui_item_add_keyval_pair (gui_item, key, val, errb);
        }
     }
        }
     }
+  return gui_item;
 }
 
 }
 
-void
-gui_parse_item_keywords (Lisp_Object item, struct gui_item *pgui_item)
+Lisp_Object
+gui_parse_item_keywords (Lisp_Object item)
+{
+  return make_gui_item_from_keywords_internal (item, ERROR_ME);
+}
+
+Lisp_Object
+gui_parse_item_keywords_no_errors (Lisp_Object item)
 {
 {
-  gui_parse_item_keywords_internal (item, pgui_item, ERROR_ME);
+  return make_gui_item_from_keywords_internal (item, ERROR_ME_NOT);
 }
 
 }
 
+/* convert a gui item into plist properties */
 void
 void
-gui_parse_item_keywords_no_errors (Lisp_Object item, struct gui_item *pgui_item)
+gui_add_item_keywords_to_plist (Lisp_Object plist, Lisp_Object gui_item)
 {
 {
-  gui_parse_item_keywords_internal (item, pgui_item, ERROR_ME_NOT);
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+  
+  if (!NILP (pgui_item->callback))
+    Fplist_put (plist, Q_callback, pgui_item->callback);
+  if (!NILP (pgui_item->suffix))
+    Fplist_put (plist, Q_suffix, pgui_item->suffix);
+  if (!NILP (pgui_item->active))
+    Fplist_put (plist, Q_active, pgui_item->active);
+  if (!NILP (pgui_item->included))
+    Fplist_put (plist, Q_included, pgui_item->included);
+  if (!NILP (pgui_item->config))
+    Fplist_put (plist, Q_config, pgui_item->config);
+  if (!NILP (pgui_item->filter))
+    Fplist_put (plist, Q_filter, pgui_item->filter);
+  if (!NILP (pgui_item->style))
+    Fplist_put (plist, Q_style, pgui_item->style);
+  if (!NILP (pgui_item->selected))
+    Fplist_put (plist, Q_selected, pgui_item->selected);
+  if (!NILP (pgui_item->keys))
+    Fplist_put (plist, Q_keys, pgui_item->keys);
 }
 
 /*
 }
 
 /*
@@ -226,13 +269,13 @@ gui_parse_item_keywords_no_errors (Lisp_Object item, struct gui_item *pgui_item)
  * if any
  */
 int
  * if any
  */
 int
-gui_item_active_p (CONST struct gui_item *pgui_item)
+gui_item_active_p (Lisp_Object gui_item)
 {
   /* This function can call lisp */
 
   /* Shortcut to avoid evaluating Qt each time */
 {
   /* This function can call lisp */
 
   /* Shortcut to avoid evaluating Qt each time */
-  return (EQ (pgui_item->active, Qt)
-         || !NILP (Feval (pgui_item->active)));
+  return (EQ (XGUI_ITEM (gui_item)->active, Qt)
+         || !NILP (Feval (XGUI_ITEM (gui_item)->active)));
 }
 
 /*
 }
 
 /*
@@ -240,13 +283,13 @@ gui_item_active_p (CONST struct gui_item *pgui_item)
  * if any
  */
 int
  * if any
  */
 int
-gui_item_selected_p (CONST struct gui_item *pgui_item)
+gui_item_selected_p (Lisp_Object gui_item)
 {
   /* This function can call lisp */
 
   /* Shortcut to avoid evaluating Qt each time */
 {
   /* This function can call lisp */
 
   /* Shortcut to avoid evaluating Qt each time */
-  return (EQ (pgui_item->selected, Qt)
-         || !NILP (Feval (pgui_item->selected)));
+  return (EQ (XGUI_ITEM (gui_item)->selected, Qt)
+         || !NILP (Feval (XGUI_ITEM (gui_item)->selected)));
 }
 
 /*
 }
 
 /*
@@ -255,9 +298,10 @@ gui_item_selected_p (CONST struct gui_item *pgui_item)
  * configuration variable
  */
 int
  * configuration variable
  */
 int
-gui_item_included_p (CONST struct gui_item *pgui_item, Lisp_Object conflist)
+gui_item_included_p (Lisp_Object gui_item, Lisp_Object conflist)
 {
   /* This function can call lisp */
 {
   /* This function can call lisp */
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
 
   /* Evaluate :included first. Shortcut to avoid evaluating Qt each time */
   if (!EQ (pgui_item->included, Qt)
 
   /* Evaluate :included first. Shortcut to avoid evaluating Qt each time */
   if (!EQ (pgui_item->included, Qt)
@@ -289,11 +333,12 @@ signal_too_long_error (Lisp_Object name)
  * buffer.
  */
 unsigned int
  * buffer.
  */
 unsigned int
-gui_item_display_flush_left  (CONST struct gui_item *pgui_item,
+gui_item_display_flush_left  (Lisp_Object gui_item,
                              char* buf, Bytecount buf_len)
 {
   char *p = buf;
   Bytecount len;
                              char* buf, Bytecount buf_len)
 {
   char *p = buf;
   Bytecount len;
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
 
   /* Copy item name first */
   CHECK_STRING (pgui_item->name);
 
   /* Copy item name first */
   CHECK_STRING (pgui_item->name);
@@ -336,9 +381,10 @@ gui_item_display_flush_left  (CONST struct gui_item *pgui_item,
  * buffer.
  */
 unsigned int
  * buffer.
  */
 unsigned int
-gui_item_display_flush_right (CONST struct gui_item *pgui_item,
+gui_item_display_flush_right (Lisp_Object gui_item,
                              char* buf, Bytecount buf_len)
 {
                              char* buf, Bytecount buf_len)
 {
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
   *buf = 0;
 
   /* Have keys? */
   *buf = 0;
 
   /* Have keys? */
@@ -374,9 +420,11 @@ gui_item_display_flush_right (CONST struct gui_item *pgui_item,
 }
 #endif /* HAVE_WINDOW_SYSTEM */
 
 }
 #endif /* HAVE_WINDOW_SYSTEM */
 
-Lisp_Object
-mark_gui_item (struct gui_item* p, void (*markobj) (Lisp_Object))
+static Lisp_Object
+mark_gui_item (Lisp_Object obj, void (*markobj) (Lisp_Object))
 {
 {
+  struct Lisp_Gui_Item *p = XGUI_ITEM (obj);
+
   markobj (p->name);
   markobj (p->callback);
   markobj (p->suffix);
   markobj (p->name);
   markobj (p->callback);
   markobj (p->suffix);
@@ -391,10 +439,27 @@ mark_gui_item (struct gui_item* p, void (*markobj) (Lisp_Object))
   return Qnil;
 }
 
   return Qnil;
 }
 
+static unsigned long
+gui_item_hash (Lisp_Object obj, int depth)
+{
+  struct Lisp_Gui_Item *p = XGUI_ITEM (obj);
+
+  return HASH2 (HASH5 (internal_hash (p->name, depth + 1),
+                      internal_hash (p->callback, depth + 1),
+                      internal_hash (p->suffix, depth + 1),
+                      internal_hash (p->active, depth + 1),
+                      internal_hash (p->included, depth + 1)),
+               HASH5 (internal_hash (p->config, depth + 1),
+                      internal_hash (p->filter, depth + 1),
+                      internal_hash (p->style, depth + 1),
+                      internal_hash (p->selected, depth + 1),
+                      internal_hash (p->keys, depth + 1)));
+}
+
 int
 int
-gui_item_hash (Lisp_Object hashtable, struct gui_item* g, int slot)
+gui_item_id_hash (Lisp_Object hashtable, Lisp_Object gitem, int slot)
 {
 {
-  int hashid = HASH2 (internal_hash (g->callback, 0), internal_hash (g->name, 0));
+  int hashid = gui_item_hash (gitem, 0);
   int id = GUI_ITEM_ID_BITS (hashid, slot);
   while (!NILP (Fgethash (make_int (id),
                          hashtable, Qnil)))
   int id = GUI_ITEM_ID_BITS (hashid, slot);
   while (!NILP (Fgethash (make_int (id),
                          hashtable, Qnil)))
@@ -404,6 +469,55 @@ gui_item_hash (Lisp_Object hashtable, struct gui_item* g, int slot)
   return id;
 }
 
   return id;
 }
 
+static int
+gui_item_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
+{
+  struct Lisp_Gui_Item *p1 = XGUI_ITEM (obj1);
+  struct Lisp_Gui_Item *p2 = XGUI_ITEM (obj2);
+
+  if (!(internal_equal (p1->name, p2->name, depth + 1)
+       &&
+       internal_equal (p1->callback, p2->callback, depth + 1)
+       &&
+       EQ (p1->suffix, p2->suffix)
+       &&
+       EQ (p1->active, p2->active)
+       &&
+       EQ (p1->included, p2->included)
+       &&
+       EQ (p1->config, p2->config)
+       &&
+       EQ (p1->filter, p2->filter)
+       &&
+       EQ (p1->style, p2->style)
+       &&
+       EQ (p1->selected, p2->selected)
+       &&
+       EQ (p1->keys, p2->keys)))
+    return 0;
+  return 1;
+}
+
+static void
+print_gui_item (Lisp_Object obj, Lisp_Object printcharfun, int escapeflag)
+{
+  struct Lisp_Gui_Item *g = XGUI_ITEM (obj);
+  char buf[20];
+
+  if (print_readably)
+    error ("printing unreadable object #<gui-item 0x%x>", g->header.uid);
+
+  write_c_string ("#<gui-item ", printcharfun);
+  sprintf (buf, "0x%x>", g->header.uid);
+  write_c_string (buf, printcharfun);
+}
+
+DEFINE_LRECORD_IMPLEMENTATION ("gui-item", gui_item,
+                              mark_gui_item, print_gui_item,
+                              0, gui_item_equal,
+                              gui_item_hash,
+                              struct Lisp_Gui_Item);
+
 void
 syms_of_gui (void)
 {
 void
 syms_of_gui (void)
 {
index 010b41f..362152e 100644 (file)
--- a/src/gui.h
+++ b/src/gui.h
@@ -32,10 +32,24 @@ void get_gui_callback (Lisp_Object, Lisp_Object *, Lisp_Object *);
 
 extern int popup_up_p;
 
 
 extern int popup_up_p;
 
+/************************************************************************/
+/*                     Image Instance Object                           */
+/************************************************************************/
+
+DECLARE_LRECORD (gui_item, struct Lisp_Gui_Item);
+#define XGUI_ITEM(x) \
+  XRECORD (x, gui_item, struct Lisp_Gui_Item)
+#define XSETGUI_ITEM(x, p) XSETRECORD (x, p, gui_item)
+#define GUI_ITEMP(x) RECORDP (x, gui_item)
+#define GC_GUI_ITEMP(x) GC_RECORDP (x, gui_item)
+#define CHECK_GUI_ITEM(x) CHECK_RECORD (x, gui_item)
+#define CONCHECK_GUI_ITEM(x) CONCHECK_RECORD (x, gui_item)
+
 /* This structure describes gui button,
    menu item or submenu properties */
 /* This structure describes gui button,
    menu item or submenu properties */
-struct gui_item
+struct Lisp_Gui_Item
 {
 {
+  struct lcrecord_header header;
   Lisp_Object name;            /* String */
   Lisp_Object callback;                /* Symbol or form */
   Lisp_Object suffix;          /* String */
   Lisp_Object name;            /* String */
   Lisp_Object callback;                /* Symbol or form */
   Lisp_Object suffix;          /* String */
@@ -47,45 +61,28 @@ struct gui_item
   Lisp_Object selected;                /* Form */
   Lisp_Object keys;            /* String */
 };
   Lisp_Object selected;                /* Form */
   Lisp_Object keys;            /* String */
 };
-#define GUI_ITEM_LAST_GCPROED keys
-#define GUI_ITEM_GCPRO_COUNT \
-  (slot_offset(struct gui_item, GUI_ITEM_LAST_GCPROED) / sizeof(Lisp_Object) + 1)
-
-/*
- * gui_item is a struct containing a bunch of Lisp_Object
- * members.  We need to GC-protect all the member slots.
- * Rather than build a long chain of individual gcpro structs
- * that protect the slots individually, we protect all the
- * member slots by pretending the struct is an array.  ANSI C
- * requires this hack to work, ugly though it is.
- */
-#define GCPRO_GUI_ITEM(pgui_item)                                      \
-       do {                                                            \
-         Lisp_Object *gui_item_array = (Lisp_Object *) pgui_item;      \
-         GCPRO1 (gui_item_array[0]);                                   \
-         gcpro1.nvars = GUI_ITEM_GCPRO_COUNT;                          \
-       } while (0);
 
 extern Lisp_Object Q_accelerator, Q_active, Q_config, Q_filter, Q_included;
 extern Lisp_Object Q_keys, Q_selected, Q_suffix, Qradio, Qtoggle;
 extern Lisp_Object Q_key_sequence, Q_label, Q_callback;
 
 
 extern Lisp_Object Q_accelerator, Q_active, Q_config, Q_filter, Q_included;
 extern Lisp_Object Q_keys, Q_selected, Q_suffix, Qradio, Qtoggle;
 extern Lisp_Object Q_key_sequence, Q_label, Q_callback;
 
-void gui_item_init (struct gui_item *pgui_item);
-void gui_item_add_keyval_pair (struct gui_item *pgui_item,
+void gui_item_add_keyval_pair (Lisp_Object,
                               Lisp_Object key, Lisp_Object val,
                               Error_behavior errb);
                               Lisp_Object key, Lisp_Object val,
                               Error_behavior errb);
-void gui_parse_item_keywords (Lisp_Object item, struct gui_item *pgui_item);
-void gui_parse_item_keywords_no_errors (Lisp_Object item, struct gui_item *pgui_item);
-int  gui_item_active_p (CONST struct gui_item *pgui_item);
-int  gui_item_selected_p (CONST struct gui_item *pgui_item);
-int  gui_item_included_p (CONST struct gui_item *pgui_item, Lisp_Object into);
-int  gui_item_hash (Lisp_Object, struct gui_item*, int);
-Lisp_Object mark_gui_item (struct gui_item* p, void (*markobj) (Lisp_Object));
-unsigned int gui_item_display_flush_left  (CONST struct gui_item *pgui_item,
+Lisp_Object gui_parse_item_keywords (Lisp_Object item);
+Lisp_Object gui_parse_item_keywords_no_errors (Lisp_Object item);
+int  gui_item_active_p (Lisp_Object);
+int  gui_item_selected_p (Lisp_Object);
+int  gui_item_included_p (Lisp_Object, Lisp_Object into);
+int  gui_item_id_hash (Lisp_Object, Lisp_Object gui_item, int);
+unsigned int gui_item_display_flush_left  (Lisp_Object pgui_item,
                                           char* buf, Bytecount buf_len);
                                           char* buf, Bytecount buf_len);
-unsigned int gui_item_display_flush_right (CONST struct gui_item *pgui_item,
+unsigned int gui_item_display_flush_right (Lisp_Object gui_item,
                                           char* buf, Bytecount buf_len);
 
                                           char* buf, Bytecount buf_len);
 
+Lisp_Object allocate_gui_item ();
+void gui_item_init (Lisp_Object gui_item);
+
 /* this is mswindows biased but reasonably safe I think */
 #define GUI_ITEM_ID_SLOTS 8
 #define GUI_ITEM_ID_MIN(s) (s * 0x2000)
 /* this is mswindows biased but reasonably safe I think */
 #define GUI_ITEM_ID_SLOTS 8
 #define GUI_ITEM_ID_MIN(s) (s * 0x2000)
index dfe1958..005a1ea 100644 (file)
@@ -336,6 +336,8 @@ struct Lisp_Font_Instance;
 typedef struct Lisp_Font_Instance Lisp_Font_Instance;
 struct Lisp_Image_Instance;
 typedef struct Lisp_Image_Instance Lisp_Image_Instance;
 typedef struct Lisp_Font_Instance Lisp_Font_Instance;
 struct Lisp_Image_Instance;
 typedef struct Lisp_Image_Instance Lisp_Image_Instance;
+struct Lisp_Gui_Item;
+typedef struct Lisp_Gui_Item Lisp_Gui_Item;
 struct display_line;
 struct redisplay_info;
 struct window_mirror;
 struct display_line;
 struct redisplay_info;
 struct window_mirror;
index c56dc36..e3db02f 100644 (file)
@@ -123,7 +123,7 @@ static HMENU top_level_menu;
  * "Left Flush\tRight Flush"
  */
 static char*
  * "Left Flush\tRight Flush"
  */
 static char*
-displayable_menu_item (struct gui_item* pgui_item, int bar_p)
+displayable_menu_item (Lisp_Object gui_item, int bar_p)
 {
   /* We construct the name in a static buffer. That's fine, because
      menu items longer than 128 chars are probably programming errors,
 {
   /* We construct the name in a static buffer. That's fine, because
      menu items longer than 128 chars are probably programming errors,
@@ -134,7 +134,7 @@ displayable_menu_item (struct gui_item* pgui_item, int bar_p)
   unsigned int ll, lr;
 
   /* Left flush part of the string */
   unsigned int ll, lr;
 
   /* Left flush part of the string */
-  ll = gui_item_display_flush_left (pgui_item, buf, MAX_MENUITEM_LENGTH);
+  ll = gui_item_display_flush_left (gui_item, buf, MAX_MENUITEM_LENGTH);
 
   /* Escape '&' as '&&' */
   ptr = buf;
 
   /* Escape '&' as '&&' */
   ptr = buf;
@@ -142,7 +142,7 @@ displayable_menu_item (struct gui_item* pgui_item, int bar_p)
     {
       if (ll+2 >= MAX_MENUITEM_LENGTH)
        signal_simple_error ("Menu item produces too long displayable string",
     {
       if (ll+2 >= MAX_MENUITEM_LENGTH)
        signal_simple_error ("Menu item produces too long displayable string",
-                            pgui_item->name);
+                            XGUI_ITEM (gui_item)->name);
       memmove (ptr+1, ptr, (ll-(ptr-buf))+1);
       ll++;
       ptr+=2;
       memmove (ptr+1, ptr, (ll-(ptr-buf))+1);
       ll++;
       ptr+=2;
@@ -165,7 +165,7 @@ displayable_menu_item (struct gui_item* pgui_item, int bar_p)
   if (!bar_p)
     {
       assert (MAX_MENUITEM_LENGTH > ll + 1);
   if (!bar_p)
     {
       assert (MAX_MENUITEM_LENGTH > ll + 1);
-      lr = gui_item_display_flush_right (pgui_item, buf + ll + 1,
+      lr = gui_item_display_flush_right (gui_item, buf + ll + 1,
                                         MAX_MENUITEM_LENGTH - ll - 1);
       if (lr)
        buf [ll] = '\t';
                                         MAX_MENUITEM_LENGTH - ll - 1);
       if (lr)
        buf [ll] = '\t';
@@ -279,21 +279,21 @@ populate_menu_add_item (HMENU menu, Lisp_Object path,
     {
       /* Submenu */
       HMENU submenu;
     {
       /* Submenu */
       HMENU submenu;
-      struct gui_item gui_item;
+      Lisp_Object gui_item = allocate_gui_item ();
+      struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
       struct gcpro gcpro1;
 
       struct gcpro gcpro1;
 
-      gui_item_init (&gui_item);
-      GCPRO_GUI_ITEM (&gui_item);
+      GCPRO1 (gui_item);
 
 
-      menu_parse_submenu_keywords (item, &gui_item);
+      menu_parse_submenu_keywords (item, gui_item);
 
 
-      if (!STRINGP (gui_item.name))
+      if (!STRINGP (pgui_item->name))
        signal_simple_error ("Menu name (first element) must be a string", item);
 
        signal_simple_error ("Menu name (first element) must be a string", item);
 
-      if (!gui_item_included_p (&gui_item, Vmenubar_configuration))
+      if (!gui_item_included_p (gui_item, Vmenubar_configuration))
        return;
 
        return;
 
-      if (!gui_item_active_p (&gui_item))
+      if (!gui_item_active_p (gui_item))
        item_info.fState = MFS_GRAYED;
       /* Temptation is to put 'else' right here. Although, the
         displayed item won't have an arrow indicating that it is a
        item_info.fState = MFS_GRAYED;
       /* Temptation is to put 'else' right here. Although, the
         displayed item won't have an arrow indicating that it is a
@@ -301,7 +301,7 @@ populate_menu_add_item (HMENU menu, Lisp_Object path,
       submenu = create_empty_popup_menu();
 
       item_info.fMask |= MIIM_SUBMENU;
       submenu = create_empty_popup_menu();
 
       item_info.fMask |= MIIM_SUBMENU;
-      item_info.dwTypeData = displayable_menu_item (&gui_item, bar_p);
+      item_info.dwTypeData = displayable_menu_item (gui_item, bar_p);
       item_info.hSubMenu = submenu;
 
       if (!(item_info.fState & MFS_GRAYED))
       item_info.hSubMenu = submenu;
 
       if (!(item_info.fState & MFS_GRAYED))
@@ -310,12 +310,12 @@ populate_menu_add_item (HMENU menu, Lisp_Object path,
             keyed by menu handle */
          if (NILP(path))
            /* list1 cannot GC */
             keyed by menu handle */
          if (NILP(path))
            /* list1 cannot GC */
-           path = list1 (gui_item.name);
+           path = list1 (pgui_item->name);
          else
            {
              Lisp_Object arg[2];
              arg[0] = path;
          else
            {
              Lisp_Object arg[2];
              arg[0] = path;
-             arg[1] = list1 (gui_item.name);
+             arg[1] = list1 (pgui_item->name);
              /* Fappend gcpro'es its arg */
              path = Fappend (2, arg);
            }
              /* Fappend gcpro'es its arg */
              path = Fappend (2, arg);
            }
@@ -329,22 +329,20 @@ populate_menu_add_item (HMENU menu, Lisp_Object path,
     {
       /* An ordinary item */
       Lisp_Object style, id;
     {
       /* An ordinary item */
       Lisp_Object style, id;
-      struct gui_item gui_item;
+      Lisp_Object gui_item = gui_parse_item_keywords (item);
+      struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
       struct gcpro gcpro1;
 
       struct gcpro gcpro1;
 
-      gui_item_init (&gui_item);
-      GCPRO_GUI_ITEM (&gui_item);
+      GCPRO1 (gui_item);
 
 
-      gui_parse_item_keywords (item, &gui_item);
-
-      if (!gui_item_included_p (&gui_item, Vmenubar_configuration))
+      if (!gui_item_included_p (gui_item, Vmenubar_configuration))
        return;
 
        return;
 
-      if (!gui_item_active_p (&gui_item))
+      if (!gui_item_active_p (gui_item))
        item_info.fState = MFS_GRAYED;
 
        item_info.fState = MFS_GRAYED;
 
-      style = (NILP (gui_item.selected) || NILP (Feval (gui_item.selected))
-              ? Qnil : gui_item.style);
+      style = (NILP (pgui_item->selected) || NILP (Feval (pgui_item->selected))
+              ? Qnil : pgui_item->style);
 
       if (EQ (style, Qradio))
        {
 
       if (EQ (style, Qradio))
        {
@@ -356,13 +354,13 @@ populate_menu_add_item (HMENU menu, Lisp_Object path,
          item_info.fState |= MFS_CHECKED;
        }
 
          item_info.fState |= MFS_CHECKED;
        }
 
-      id = allocate_menu_item_id (path, gui_item.name,
-                                 gui_item.suffix);
-      Fputhash (id, gui_item.callback, hash_tab);
+      id = allocate_menu_item_id (path, pgui_item->name,
+                                 pgui_item->suffix);
+      Fputhash (id, pgui_item->callback, hash_tab);
 
       item_info.wID = (UINT) XINT(id);
       item_info.fType |= MFT_STRING;
 
       item_info.wID = (UINT) XINT(id);
       item_info.fType |= MFT_STRING;
-      item_info.dwTypeData = displayable_menu_item (&gui_item, bar_p);
+      item_info.dwTypeData = displayable_menu_item (gui_item, bar_p);
 
       UNGCPRO; /* gui_item */
     }
 
       UNGCPRO; /* gui_item */
     }
@@ -396,10 +394,9 @@ populate_or_checksum_helper (HMENU menu, Lisp_Object path, Lisp_Object desc,
   int deep_p, flush_right;
   struct gcpro gcpro1;
   unsigned long checksum;
   int deep_p, flush_right;
   struct gcpro gcpro1;
   unsigned long checksum;
-  struct gui_item gui_item;
-
-  gui_item_init (&gui_item);
-  GCPRO_GUI_ITEM (&gui_item);
+  Lisp_Object gui_item = allocate_gui_item ();
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+  GCPRO1 (gui_item);
 
   /* We are sometimes called with the menubar unchanged, and with changed
      right flush. We have to update the menubar in this case,
 
   /* We are sometimes called with the menubar unchanged, and with changed
      right flush. We have to update the menubar in this case,
@@ -414,15 +411,15 @@ populate_or_checksum_helper (HMENU menu, Lisp_Object path, Lisp_Object desc,
   deep_p = !NILP (path);
 
   /* Fetch keywords prepending the item list */
   deep_p = !NILP (path);
 
   /* Fetch keywords prepending the item list */
-  desc = menu_parse_submenu_keywords (desc, &gui_item);
+  desc = menu_parse_submenu_keywords (desc, gui_item);
 
   /* Check that menu name is specified when expected */
 
   /* Check that menu name is specified when expected */
-  if (NILP (gui_item.name) && deep_p)
+  if (NILP (pgui_item->name) && deep_p)
     signal_simple_error ("Menu must have a name", desc);
 
   /* Apply filter if specified */
     signal_simple_error ("Menu must have a name", desc);
 
   /* Apply filter if specified */
-  if (!NILP (gui_item.filter))
-    desc = call1 (gui_item.filter, desc);
+  if (!NILP (pgui_item->filter))
+    desc = call1 (pgui_item->filter, desc);
 
   /* Loop thru the desc's CDR and add items for each entry */
   flush_right = 0;
 
   /* Loop thru the desc's CDR and add items for each entry */
   flush_right = 0;
@@ -453,11 +450,11 @@ populate_or_checksum_helper (HMENU menu, Lisp_Object path, Lisp_Object desc,
       /* Add the header to the popup, if told so. The same as in X - an
         insensitive item, and a separator (Seems to me, there were
         two separators in X... In Windows this looks ugly, anyways. */
       /* Add the header to the popup, if told so. The same as in X - an
         insensitive item, and a separator (Seems to me, there were
         two separators in X... In Windows this looks ugly, anyways. */
-      if (!bar_p && !deep_p && popup_menu_titles && !NILP(gui_item.name))
+      if (!bar_p && !deep_p && popup_menu_titles && !NILP(pgui_item->name))
        {
        {
-         CHECK_STRING (gui_item.name);
+         CHECK_STRING (pgui_item->name);
          InsertMenu (menu, 0, MF_BYPOSITION | MF_STRING | MF_DISABLED,
          InsertMenu (menu, 0, MF_BYPOSITION | MF_STRING | MF_DISABLED,
-                     0, XSTRING_DATA(gui_item.name));
+                     0, XSTRING_DATA(pgui_item->name));
          InsertMenu (menu, 1, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
          SetMenuDefaultItem (menu, 0, MF_BYPOSITION);
        }
          InsertMenu (menu, 1, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
          SetMenuDefaultItem (menu, 0, MF_BYPOSITION);
        }
index bd03ead..8eab6af 100644 (file)
@@ -102,8 +102,10 @@ current_frame_menubar (CONST struct frame* f)
 }
 
 Lisp_Object
 }
 
 Lisp_Object
-menu_parse_submenu_keywords (Lisp_Object desc, struct gui_item* pgui_item)
+menu_parse_submenu_keywords (Lisp_Object desc, Lisp_Object gui_item)
 {
 {
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
+
   /* Menu descriptor should be a list */
   CHECK_CONS (desc);
 
   /* Menu descriptor should be a list */
   CHECK_CONS (desc);
 
@@ -130,7 +132,7 @@ menu_parse_submenu_keywords (Lisp_Object desc, struct gui_item* pgui_item)
       desc = XCDR (desc);
       if (!NILP (desc))
        CHECK_CONS (desc);
       desc = XCDR (desc);
       if (!NILP (desc))
        CHECK_CONS (desc);
-      gui_item_add_keyval_pair (pgui_item, key, val, ERROR_ME);
+      gui_item_add_keyval_pair (gui_item, key, val, ERROR_ME);
     }
 
   /* Return the rest - supposed to be a list of items */
     }
 
   /* Return the rest - supposed to be a list of items */
@@ -152,10 +154,10 @@ See also 'find-menu-item'.
 {
   Lisp_Object path_entry, submenu_desc, submenu;
   struct gcpro gcpro1;
 {
   Lisp_Object path_entry, submenu_desc, submenu;
   struct gcpro gcpro1;
-  struct gui_item gui_item;
+  Lisp_Object gui_item = allocate_gui_item ();
+  struct Lisp_Gui_Item* pgui_item = XGUI_ITEM (gui_item);
 
 
-  gui_item_init (&gui_item);
-  GCPRO_GUI_ITEM (&gui_item);
+  GCPRO1 (gui_item);
 
   EXTERNAL_LIST_LOOP (path_entry, path)
     {
 
   EXTERNAL_LIST_LOOP (path_entry, path)
     {
@@ -164,15 +166,15 @@ See also 'find-menu-item'.
        RETURN_UNGCPRO (Qnil);
 
       /* Parse this menu */
        RETURN_UNGCPRO (Qnil);
 
       /* Parse this menu */
-      desc = menu_parse_submenu_keywords (desc, &gui_item);
+      desc = menu_parse_submenu_keywords (desc, gui_item);
 
       /* Check that this (sub)menu is active */
 
       /* Check that this (sub)menu is active */
-      if (!gui_item_active_p (&gui_item))
+      if (!gui_item_active_p (gui_item))
        RETURN_UNGCPRO (Qnil);
 
       /* Apply :filter */
        RETURN_UNGCPRO (Qnil);
 
       /* Apply :filter */
-      if (!NILP (gui_item.filter))
-       desc = call1 (gui_item.filter, desc);
+      if (!NILP (pgui_item->filter))
+       desc = call1 (pgui_item->filter, desc);
 
       /* Find the next menu on the path inside this one */
       EXTERNAL_LIST_LOOP (submenu_desc, desc)
 
       /* Find the next menu on the path inside this one */
       EXTERNAL_LIST_LOOP (submenu_desc, desc)
@@ -191,7 +193,7 @@ See also 'find-menu-item'.
 
     descend:
       /* Prepare for the next iteration */
 
     descend:
       /* Prepare for the next iteration */
-      gui_item_init (&gui_item);
+      gui_item_init (gui_item);
     }
 
   /* We have successfully descended down the end of the path */
     }
 
   /* We have successfully descended down the end of the path */
index 25fac94..2507d8b 100644 (file)
@@ -30,7 +30,7 @@ Boston, MA 02111-1307, USA.  */
 void update_frame_menubars (struct frame *f);
 void free_frame_menubars (struct frame *f);
 Lisp_Object menu_parse_submenu_keywords (Lisp_Object desc,
 void update_frame_menubars (struct frame *f);
 void free_frame_menubars (struct frame *f);
 Lisp_Object menu_parse_submenu_keywords (Lisp_Object desc,
-                                        struct gui_item* pgui_item);
+                                        Lisp_Object gui_item);
 Lisp_Object current_frame_menubar (CONST struct frame* f);
 
 EXFUN (Fmenu_find_real_submenu, 2);
 Lisp_Object current_frame_menubar (CONST struct frame* f);
 
 EXFUN (Fmenu_find_real_submenu, 2);
index 70f26a6..ab4cd67 100644 (file)
@@ -447,7 +447,8 @@ Lisp_Object Vccl_program_table;
   else                                                 \
     {                                                  \
       Bufbyte work[MAX_EMCHAR_LEN];                    \
   else                                                 \
     {                                                  \
       Bufbyte work[MAX_EMCHAR_LEN];                    \
-      int len = ( ch < 256 ) ?                         \
+      int len = ( ch < ( conversion_mode == CCL_MODE_ENCODING ? \
+                         256 : 128 ) ) ?                       \
        simple_set_charptr_emchar (work, ch) :          \
        non_ascii_set_charptr_emchar (work, ch);        \
       Dynarr_add_many (destination, work, len);                \
        simple_set_charptr_emchar (work, ch) :          \
        non_ascii_set_charptr_emchar (work, ch);        \
       Dynarr_add_many (destination, work, len);                \
@@ -517,7 +518,7 @@ struct ccl_prog_stack
   };
 
 int
   };
 
 int
-ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_dynarr *destination, int src_bytes, int *consumed)
+ccl_driver (struct ccl_program *ccl, CONST unsigned char *source, unsigned_char_dynarr *destination, int src_bytes, int *consumed, int conversion_mode)
 {
   int *reg = ccl->reg;
   int ic = ccl->ic;
 {
   int *reg = ccl->reg;
   int ic = ccl->ic;
@@ -978,7 +979,7 @@ As side effect, each element of REGISTER holds the value of
                  : 0);
 
   ccl_driver (&ccl, (CONST unsigned char *)0, (unsigned_char_dynarr *)0,
                  : 0);
 
   ccl_driver (&ccl, (CONST unsigned char *)0, (unsigned_char_dynarr *)0,
-             0, (int *)0);
+             0, (int *)0, CCL_MODE_ENCODING);
   QUIT;
   if (ccl.status != CCL_STAT_SUCCESS)
     error ("Error in CCL program at %dth code", ccl.ic);
   QUIT;
   if (ccl.status != CCL_STAT_SUCCESS)
     error ("Error in CCL program at %dth code", ccl.ic);
@@ -1035,7 +1036,7 @@ CCL-PROGRAM on exit.
   outbuf = Dynarr_new (unsigned_char);
   ccl.last_block = NILP (contin);
   produced = ccl_driver (&ccl, XSTRING_DATA (str), outbuf,
   outbuf = Dynarr_new (unsigned_char);
   ccl.last_block = NILP (contin);
   produced = ccl_driver (&ccl, XSTRING_DATA (str), outbuf,
-                        XSTRING_LENGTH (str), (int *)0);
+                        XSTRING_LENGTH (str), (int *)0, CCL_MODE_ENCODING);
   for (i = 0; i < 8; i++)
     XVECTOR_DATA (status)[i] = make_int(ccl.reg[i]);
   XSETINT (XVECTOR_DATA (status)[8], ccl.ic);
   for (i = 0; i < 8; i++)
     XVECTOR_DATA (status)[i] = make_int(ccl.reg[i]);
   XSETINT (XVECTOR_DATA (status)[8], ccl.ic);
index 10c759d..68cbb76 100644 (file)
@@ -43,8 +43,13 @@ struct ccl_program {
                                   should be than the input buffer.  */
 };
 
                                   should be than the input buffer.  */
 };
 
+
+#define CCL_MODE_ENCODING 0
+#define CCL_MODE_DECODING 1
+
 int ccl_driver (struct ccl_program *ccl, CONST unsigned char *source,
 int ccl_driver (struct ccl_program *ccl, CONST unsigned char *source,
-               unsigned_char_dynarr *destination, int src_bytes, int *consumed);
+               unsigned_char_dynarr *destination, int src_bytes,
+               int *consumed, int conversion_mode);
 void setup_ccl_program (struct ccl_program *ccl, Lisp_Object val);
 
 /* Alist of fontname patterns vs corresponding CCL program.  */
 void setup_ccl_program (struct ccl_program *ccl, Lisp_Object val);
 
 /* Alist of fontname patterns vs corresponding CCL program.  */
index 739e6ba..712263a 100644 (file)
@@ -1105,27 +1105,33 @@ Return the character set of char CH.
                        (CHAR_LEADING_BYTE (XCHAR (ch))));
 }
 
                        (CHAR_LEADING_BYTE (XCHAR (ch))));
 }
 
-DEFUN ("char-octet", Fchar_octet, 1, 2, 0, /*
-Return the octet numbered N (should be 0 or 1) of char CH.
-N defaults to 0 if omitted.
+DEFUN ("split-char", Fsplit_char, 1, 1, 0, /*
+Return list of charset and one or two position-codes of CHAR.
 */
 */
-       (ch, n))
+       (character))
 {
 {
-  Lisp_Object charset;
-  int c1, c2, int_n;
+  /* This function can GC */
+  struct gcpro gcpro1, gcpro2;
+  Lisp_Object charset = Qnil;
+  Lisp_Object rc = Qnil;
+  int c1, c2;
 
 
-  CHECK_CHAR_COERCE_INT (ch);
-  if (NILP (n))
-    int_n = 0;
+  GCPRO2 (charset, rc);
+  CHECK_CHAR_COERCE_INT (character);
+
+  BREAKUP_CHAR (XCHAR (character), charset, c1, c2);
+
+  if (XCHARSET_DIMENSION (Fget_charset (charset)) == 2)
+    {
+      rc = list3 (XCHARSET_NAME (charset), make_int (c1), make_int (c2));
+    }
   else
     {
   else
     {
-      CHECK_INT (n);
-      int_n = XINT (n);
-      if (int_n != 0 && int_n != 1)
-       signal_simple_error ("Octet number must be 0 or 1", n);
+      rc = list2 (XCHARSET_NAME (charset), make_int (c1));
     }
     }
-  BREAKUP_CHAR (XCHAR (ch), charset, c1, c2);
-  return make_int (int_n == 0 ? c1 : c2);
+  UNGCPRO;
+
+  return rc;
 }
 
 \f
 }
 
 \f
@@ -1230,7 +1236,7 @@ syms_of_mule_charset (void)
 
   DEFSUBR (Fmake_char);
   DEFSUBR (Fchar_charset);
 
   DEFSUBR (Fmake_char);
   DEFSUBR (Fchar_charset);
-  DEFSUBR (Fchar_octet);
+  DEFSUBR (Fsplit_char);
 
 #ifdef ENABLE_COMPOSITE_CHARS
   DEFSUBR (Fmake_composite_char);
 
 #ifdef ENABLE_COMPOSITE_CHARS
   DEFSUBR (Fmake_composite_char);
index 00ed917..60b5a14 100644 (file)
@@ -165,7 +165,7 @@ separate_textual_runs (unsigned char *text_storage,
          char_converter.reg[1] = byte1;
          char_converter.reg[2] = byte2;
          char_converter.ic = 0; /* start at beginning each time */
          char_converter.reg[1] = byte1;
          char_converter.reg[2] = byte2;
          char_converter.ic = 0; /* start at beginning each time */
-         ccl_driver (&char_converter, 0, 0, 0, 0);
+         ccl_driver (&char_converter, 0, 0, 0, 0, CCL_MODE_ENCODING);
          byte1 = char_converter.reg[1];
          byte2 = char_converter.reg[2];
        }
          byte1 = char_converter.reg[1];
          byte2 = char_converter.reg[2];
        }
index 492231c..6555163 100644 (file)
@@ -195,7 +195,7 @@ separate_textual_runs (unsigned char *text_storage,
          char_converter.reg[0] = XCHARSET_ID (charset);
          char_converter.reg[1] = byte1;
          char_converter.reg[2] = byte2;
          char_converter.reg[0] = XCHARSET_ID (charset);
          char_converter.reg[1] = byte1;
          char_converter.reg[2] = byte2;
-         ccl_driver (&char_converter, 0, 0, 0, 0);
+         ccl_driver (&char_converter, 0, 0, 0, 0, CCL_MODE_ENCODING);
          byte1 = char_converter.reg[1];
          byte2 = char_converter.reg[2];
        }
          byte1 = char_converter.reg[1];
          byte2 = char_converter.reg[2];
        }
index d9de182..06e71e7 100644 (file)
@@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA.  */
 
 /* Synched up with: Not in FSF. */
 
 
 /* Synched up with: Not in FSF. */
 
-/* #pragma ident "@(#) $Id: unexsol2.c,v 1.2 1995/01/25 20:39:16 georgn Exp $" */
+/* #pragma ident "@(#) $Id: unexsol2.c,v 1.3 1997/10/13 03:35:33 steve Exp $" */
 
 #include <stdlib.h>
 #include <stdio.h>
 
 #include <stdlib.h>
 #include <stdio.h>
index d0aaf9a..31bdc9a 100644 (file)
                        :face modeline-mousable
                        :descriptor "ok" :callback foo 
                        :selected t])))
                        :face modeline-mousable
                        :descriptor "ok" :callback foo 
                        :selected t])))
+
+;; tree view
+(set-extent-begin-glyph 
+ (make-extent (point) (point))
+ (setq tree (make-glyph 
+              [tree :width 10
+                    :descriptor "My Tree"
+                    :properties (:items (["One" foo]
+                                         (["Two" foo]
+                                          ["Four" foo]
+                                          "Six")
+                                         "Three"))])))
+
+;; tab control
+(set-extent-begin-glyph 
+ (make-extent (point) (point))
+ (setq tab (make-glyph 
+           [tab :descriptor "My Tab"
+                :face default
+                :properties (:items (["One" foo]
+                                     ["Two" foo]
+                                     ["Three" foo]))])))
+
 ;; progress gauge
 (set-extent-begin-glyph 
  (make-extent (point) (point))
 ;; progress gauge
 (set-extent-begin-glyph 
  (make-extent (point) (point))
@@ -63,6 +86,7 @@
 (set-extent-begin-glyph 
  (make-extent (point) (point))
  (make-glyph [button :descriptor ["A Big Button" foo ]]))
 (set-extent-begin-glyph 
  (make-extent (point) (point))
  (make-glyph [button :descriptor ["A Big Button" foo ]]))
+
 ;; edit box
 (set-extent-begin-glyph 
  (make-extent (point) (point)) 
 ;; edit box
 (set-extent-begin-glyph 
  (make-extent (point) (point))