[comp.windows.x] Patches to X11r4 contrib/clients/winterp

mayer%hplnpm@HPLABS.HP.COM (Niels P. Mayer) (01/08/90)

After retrieving the X11r4 contrib tape, I was quite surprised to see that
none of my code fixes to WINTERP made before the X11r4 release actually
appeared on the tape. The first round of fixes I made (put on expo on
December 1) are necessary in order to get WINTERP to compile and run on
anything other than HPUX. The second round of fixes (put on expo on
December 19) are less important -- they add new features and fix a few
trivial bugs.

Basically, this means the version of WINTERP distributed on the X11r4 is
nearly worthless without the enclosed patches.

Your best bet is to get the WINTERP distribution via anonymous ftp from
expo.lcs.mit.edu:oldcontrib/winterp.tar.Z -- that file contains the latest
winterp source distribution. However, if you've already received the X11r4
tapes, you will need to apply the following changes:

* All of the following assumes that the current directory is contrib/clients

* Assuming the current directory is contrib/clients do the following
  commands at the unix shell level:

	rm winterp/src-client/winterp.elc		### winterp.el updated
	rm winterp/examples/xlisp-2.0/defstrct.lsp	### not needed in 2.1
	rm winterp/examples/xlisp-2.0/edit.lsp		### not needed in 2.1
	mv winterp/examples/xlisp-2.0 winterp/examples/xlisp-2.1
	rm winterp/README				### old README file!
	ln -s doc/README winterp/README			### link to new README
	touch winterp/src-server/app_funtab.c		### patch needs this (?)
	touch winterp/src-server/app_funtab.h		### patch needs this (?)

* Assuming the current directory is contrib/clients (and that winterp
  is in contrib/clients/winterp). You can patch the WINTERP sources by
  sending the context diffs below to the 'patch' program (see mit/util/patch)
  via the command:

		patch -p0 < patchfile

* where 'patchfile' is:
		-------------------- cut here --------------------
*** winterp.X11r4/examples/initialize.lsp	Sat Nov 25 08:10:52 1989
--- winterp/examples/initialize.lsp	Fri Dec  8 15:03:59 1989
***************
*** 2,8
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;
  ; File:         .winterp
! ; RCS:          $Header: $
  ; Description:  WINTERP INITIALIZATION FILE
  ; Author:       Niels Mayer, HPLabs
  ; Created:      Mon Nov 20 18:13:23 1989

--- 2,8 -----
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;
  ; File:         .winterp
! ; RCS:          $Header: initialize.lsp,v 1.1 89/12/08 15:03:57 mayer Exp $
  ; Description:  WINTERP INITIALIZATION FILE
  ; Author:       Niels Mayer, HPLabs
  ; Created:      Mon Nov 20 18:13:23 1989
***************
*** 6,12
  ; Description:  WINTERP INITIALIZATION FILE
  ; Author:       Niels Mayer, HPLabs
  ; Created:      Mon Nov 20 18:13:23 1989
! ; Modified:     Sat Nov 25 07:17:38 1989 (Niels Mayer) mayer@hplnpm
  ; Language:     Lisp
  ; Package:      N/A
  ; Status:       Experimental (Do Not Distribute)

--- 6,12 -----
  ; Description:  WINTERP INITIALIZATION FILE
  ; Author:       Niels Mayer, HPLabs
  ; Created:      Mon Nov 20 18:13:23 1989
! ; Modified:     Fri Dec  8 15:03:27 1989 (Niels Mayer) mayer@hplnpm
  ; Language:     Lisp
  ; Package:      N/A
  ; Status:       Experimental (Do Not Distribute)
***************
*** 75,90
  					; backtrace on error.
  (setq *gc-flag* t)			; we want to see garbage collection messages
  
! (setq *lisp-lib-dir*
!       (let*
! 	  ((pipe (popen "/bin/echo $HOME" "r"))
! 	   (home (read-line pipe))
! 	   )
! 	(pclose pipe)
! 	(strcat home "/src/widgit/examples/")
! 	)
!       )
!       
! (if (not (load (strcat *lisp-lib-dir* "rc-shell.lsp")))
!     (error (strcat "Couldn't load " *lisp-lib-dir* "rc-shell.lsp"))
!   )

--- 75,90 -----
  					; backtrace on error.
  (setq *gc-flag* t)			; we want to see garbage collection messages
  
! ;; (setq *lisp-lib-dir*
! ;;       (let*
! ;; 	  ((pipe (popen "/bin/echo $HOME" "r"))
! ;; 	   (home (read-line pipe))
! ;; 	   )
! ;; 	(pclose pipe)
! ;; 	(strcat home "/src/widgit/examples/")
! ;; 	)
! ;;       )
! ;;       
! ;; (if (not (load (strcat *lisp-lib-dir* "rc-shell.lsp")))
! ;;     (error (strcat "Couldn't load " *lisp-lib-dir* "rc-shell.lsp"))
! ;;   )
*** winterp.X11r4/examples/trans.lsp	Sat Nov 25 04:00:47 1989
--- winterp/examples/trans.lsp	Tue Dec 12 23:32:25 1989
***************
*** 2,8
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;
  ; File:         trans.lsp
! ; RCS:          $Header: trans.lsp,v 1.1 89/11/25 04:00:46 mayer Exp $
  ; Description:  Tests of Xt trnaslation, accelerator facilies. Also test
  ;               winterp's "Lisp()" action, which allows you to call the
  ;               lisp evaluator from a translation/accelerator table.

--- 2,8 -----
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;
  ; File:         trans.lsp
! ; RCS:          $Header: trans.lsp,v 1.2 89/12/12 23:32:15 mayer Exp $
  ; Description:  Tests of Xt trnaslation, accelerator facilies. Also test
  ;               winterp's "Lisp()" action, which allows you to call the
  ;               lisp evaluator from a translation/accelerator table.
***************
*** 8,14
  ;               lisp evaluator from a translation/accelerator table.
  ; Author:       Niels Mayer, HPLabs
  ; Created:      Fri Nov 24 20:16:35 1989
! ; Modified:     Fri Nov 24 20:18:49 1989 (Niels Mayer) mayer@hplnpm
  ; Language:     Lisp
  ; Package:      N/A
  ; Status:       X11r4 contrib tape release

--- 8,14 -----
  ;               lisp evaluator from a translation/accelerator table.
  ; Author:       Niels Mayer, HPLabs
  ; Created:      Fri Nov 24 20:16:35 1989
! ; Modified:     Tue Dec 12 23:31:53 1989 (Niels Mayer) mayer@hplnpm
  ; Language:     Lisp
  ; Package:      N/A
  ; Status:       X11r4 contrib tape release
***************
*** 61,63
  	      ))
    (send pb_w :install_all_accelerators rc_w)
    )

--- 61,74 -----
  	      ))
    (send pb_w :install_all_accelerators rc_w)
    )
+ 
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ 
+ (setq te_w (send XM_TEXT_WIDGET_CLASS :new :managed :scrolled rc_w
+ 		 :XMN_EDIT_MODE :MULTI_LINE_EDIT
+ 		 :XMN_HEIGHT 400
+ 		 :XMN_WIDTH  300
+ 		 ))
+ (send te_w :override_translations
+       "Ctrl<Key>A: beginning-of-line()\
+        <Key>Return: newline-and-indent()")
*** winterp.X11r4/src-client/winterp.el	Sat Nov 25 03:53:24 1989
--- winterp/src-client/winterp.el	Fri Dec 15 17:48:34 1989
***************
*** 2,8
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;
  ; File:         winterp.el
! ; RCS:          $Header: winterp.el,v 1.1 89/11/25 03:53:20 mayer Exp $
  ; Description:  GNUEMACS lisp-mode interface to WINTERP.
  ; Author:       Niels Mayer, HPLabs
  ; Created:      Tue Nov 14 23:14:54 1989

--- 2,8 -----
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;
  ; File:         winterp.el
! ; RCS:          $Header: winterp.el,v 1.2 89/12/15 17:48:27 mayer Exp $
  ; Description:  GNUEMACS lisp-mode interface to WINTERP.
  ; Author:       Niels Mayer, HPLabs
  ; Created:      Tue Nov 14 23:14:54 1989
***************
*** 6,12
  ; Description:  GNUEMACS lisp-mode interface to WINTERP.
  ; Author:       Niels Mayer, HPLabs
  ; Created:      Tue Nov 14 23:14:54 1989
! ; Modified:     Sat Nov 25 03:45:57 1989 (Niels Mayer) mayer@hplnpm
  ; Language:     Emacs-Lisp
  ; Package:      N/A
  ; Status:       X11r4 contrib tape release

--- 6,12 -----
  ; Description:  GNUEMACS lisp-mode interface to WINTERP.
  ; Author:       Niels Mayer, HPLabs
  ; Created:      Tue Nov 14 23:14:54 1989
! ; Modified:     Fri Dec 15 17:46:07 1989 (Niels Mayer) mayer@hplnpm
  ; Language:     Emacs-Lisp
  ; Package:      N/A
  ; Status:       X11r4 contrib tape release
***************
*** 64,71
  (defvar winterp-client-program-args ""
    "This sets the arguments sent to 'wl'. You may want to set this to
  \"-h <hostname> -p <portnum>\" if you are running  winterp on a different
! host than gnuemacs, or if you want to run winterp on a RCP port other than
! the default == 23751.")
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  (defun winterp-send-defun ()

--- 64,71 -----
  (defvar winterp-client-program-args ""
    "This sets the arguments sent to 'wl'. You may want to set this to
  \"-h <hostname> -p <portnum>\" if you are running  winterp on a different
! host than gnuemacs, or if you want to run winterp on a TCP port other than
! the default, which is 23751.")
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  (defun winterp-send-defun ()
***************
*** 101,106
    (process-send-string "winterp-client-shell" 
  		       (format "%s %s\n"
  			       winterp-client-program winterp-client-program-args))
    )
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

--- 101,126 -----
    (process-send-string "winterp-client-shell" 
  		       (format "%s %s\n"
  			       winterp-client-program winterp-client-program-args))
+   )
+ 
+ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+ (defun winterp-send-buffer ()
+   "A version of winterp-send-defun that sends the entire buffer off to WINTERP
+ for evaluation. This routine talks to WINTERP's lisp server via the winterp client
+ program 'wl' (which must be on your search path)."
+   (interactive)
+   (if (not (get-process "winterp-client-shell"))
+       (make-shell "winterp-client-shell" winterp-client-shell)
+     )
+   (let ((loadfile (format "/tmp/wl%d.lsp"
+ 			  (process-id (get-process "winterp-client-shell")))))
+     (save-excursion (write-region (point-min) (point-max)
+ 		     loadfile nil 'nomessage))
+     (process-send-string "winterp-client-shell"
+ 			 (format "%s %s '(load \"%s\" :verbose nil :print t)'\n"
+ 				 winterp-client-program winterp-client-program-args
+ 				 loadfile))
+     )
    )
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
*** /dev/null	Mon Jan  8 00:28:13 1990
--- winterp/src-server/app_funtab.c	Fri Dec  1 17:14:04 1989
***************
*** 1,0

--- 1,57 -----
+ /* -*-C-*-
+ ********************************************************************************
+ *
+ * File:         app_funtab.c
+ * RCS:          $Header: app_funtab.c,v 1.2 89/12/01 17:14:02 mayer Exp $
+ * Description:  This file is #included in w_funtab.c. It allows applications 
+ *		built upon winterp to add new functions to the xlisp function
+ *		table set up in w_funtab.c. Any entries in this file must have
+ *		corresponding extern declarations and function table indexes
+ *		set up in the file app_funtab.h.
+ * Author:       Niels Mayer, HPLabs
+ * Created:      Fri Dec  1 16:39:14 1989
+ * Modified:     Fri Dec  1 17:13:26 1989 (Niels Mayer) mayer@hplnpm
+ * Language:     C
+ * Package:      N/A
+ * Status:       X11r4 contrib tape release
+ *
+ * WINTERP 1.0 Copyright 1989 Hewlett-Packard Company (by Niels Mayer).
+ * XLISP version 2.1, Copyright (c) 1989, by David Betz.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Hewlett-Packard and David Betz not be
+ * used in advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission.  Hewlett-Packard and David Betz
+ * make no representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ * HEWLETT-PACKARD AND DAVID BETZ DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL HEWLETT-PACKARD NOR DAVID BETZ BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * See ./winterp/COPYRIGHT for information on contacting the authors.
+ * 
+ * Please send modifications, improvements and bugfixes to mayer@hplabs.hp.com
+ * Post XLISP-specific questions/information to the newsgroup comp.lang.lisp.x
+ *
+ ********************************************************************************
+ */
+ 
+ #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
+ 
+ 	FORMAT FOR ENTRIES IN THIS FILE: (see also app_funtab.h and w_funtab.c)
+ 
+ {"The_First_Application_Primitive", S, The_First_Application_Primitive}, /*  */
+ {"The_Second_Application_Primitive", S, The_Second_Application_Primitive}, /*  */
+ 	.
+ 	.
+ 	.
+ 
+ #endif
*** /dev/null	Mon Jan  8 00:28:13 1990
--- winterp/src-server/app_funtab.h	Fri Dec  1 17:14:01 1989
***************
*** 1,0

--- 1,59 -----
+ /* -*-C-*-
+ ********************************************************************************
+ *
+ * File:         app_funtab.h
+ * RCS:          $Header: app_funtab.h,v 1.2 89/12/01 17:13:56 mayer Exp $
+ * Description:  This file is #included by w_funtab.h. It allows applications
+ *		built upon winterp to add new  functions to the xlisp function
+ *		table set up in w_funtab.c. Any entries in this file must have
+ *		corresponding function table entries in app_funtab.c.
+ * Author:       Niels Mayer, HPLabs
+ * Created:      Fri Dec  1 16:39:10 1989
+ * Modified:     Fri Dec  1 17:13:30 1989 (Niels Mayer) mayer@hplnpm
+ * Language:     C
+ * Package:      N/A
+ * Status:       X11r4 contrib tape release
+ *
+ * WINTERP 1.0 Copyright 1989 Hewlett-Packard Company (by Niels Mayer).
+ * XLISP version 2.1, Copyright (c) 1989, by David Betz.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Hewlett-Packard and David Betz not be
+ * used in advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission.  Hewlett-Packard and David Betz
+ * make no representations about the suitability of this software for any
+ * purpose. It is provided "as is" without express or implied warranty.
+ *
+ * HEWLETT-PACKARD AND DAVID BETZ DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL HEWLETT-PACKARD NOR DAVID BETZ BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * See ./winterp/COPYRIGHT for information on contacting the authors.
+ * 
+ * Please send modifications, improvements and bugfixes to mayer@hplabs.hp.com
+ * Post XLISP-specific questions/information to the newsgroup comp.lang.lisp.x
+ *
+ ********************************************************************************
+ */
+ 
+ #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
+ 
+ 	FORMAT FOR ENTRIES IN THIS FILE: (see also app_funtab.c and w_funtab.h)
+ 
+ extern LVAL The_First_Application_Primitive();
+ #define FTAB_The_First_Application_Primitive LAST_FUNTAB_POINTER_USED_BY_libWinterp + 1
+ 
+ extern LVAL The_Second_Application_Primitive();
+ #define FTAB_The_Second_Application_Primitive FTAB_The_First_Application_Primitive + 1
+     .
+     .
+     .
+ 
+ #endif
*** winterp.X11r4/src-server/w_XmString.c	Sat Nov 25 04:19:20 1989
--- winterp/src-server/w_XmString.c	Sun Dec 17 16:52:17 1989
***************
*** 2,8
  ********************************************************************************
  *
  * File:         w_XmString.c
! * RCS:          $Header: w_XmString.c,v 1.1 89/11/25 04:19:10 mayer Exp $
  * Description:  Interfaces to XmString abominations (sounds of puking deleted)
  * Author:       Niels Mayer, HPLabs
  * Created:      Sun Nov  5 14:46:20 1989

--- 2,8 -----
  ********************************************************************************
  *
  * File:         w_XmString.c
! * RCS:          $Header: w_XmString.c,v 1.2 89/12/17 16:52:00 mayer Exp $
  * Description:  Interfaces to XmString abominations (sounds of puking deleted)
  * Author:       Niels Mayer, HPLabs
  * Created:      Sun Nov  5 14:46:20 1989
***************
*** 6,12
  * Description:  Interfaces to XmString abominations (sounds of puking deleted)
  * Author:       Niels Mayer, HPLabs
  * Created:      Sun Nov  5 14:46:20 1989
! * Modified:     Sat Nov 25 04:19:01 1989 (Niels Mayer) mayer@hplnpm
  * Language:     C
  * Package:      N/A
  * Status:       X11r4 contrib tape release

--- 6,12 -----
  * Description:  Interfaces to XmString abominations (sounds of puking deleted)
  * Author:       Niels Mayer, HPLabs
  * Created:      Sun Nov  5 14:46:20 1989
! * Modified:     Sun Dec 17 16:49:52 1989 (Niels Mayer) mayer@hplnpm
  * Language:     C
  * Package:      N/A
  * Status:       X11r4 contrib tape release
***************
*** 39,45
  *
  ********************************************************************************
  */
! static char rcs_identity[] = "@(#)$Header: w_XmString.c,v 1.1 89/11/25 04:19:10 mayer Exp $";
  
  #include <stdio.h>
  #include <X11/Intrinsic.h>

--- 39,45 -----
  *
  ********************************************************************************
  */
! static char rcs_identity[] = "@(#)$Header: w_XmString.c,v 1.2 89/12/17 16:52:00 mayer Exp $";
  
  #include <stdio.h>
  #include <X11/Intrinsic.h>
***************
*** 112,114
    else
      xlerror("Bad type: expected either a XmString or a string.", item);
  }

--- 112,581 -----
    else
      xlerror("Bad type: expected either a XmString or a string.", item);
  }
+ 
+ 
+ /******************************************************************************
+  * (XM_STRING_CREATE <string> [<charset>])
+  *	--> returns an XMSTRING version of string <string>.
+  * 
+  * Create a compound string from STRING <text>. Optional argument <charset>
+  * specifies an XmStringCharSet. If left out, XmSTRING_DEFAULT_CHARSET is
+  * used.
+  *
+  * Note -- WINTERP 1.0 does not take the <charset> argument. It defaults to using
+  * XmSTRING_DEFAULT_CHARSET.
+  *
+  * XmString XmStringCreate (text, charset)
+  *     char	*text;
+  *     XmStringCharSet charset;
+  ******************************************************************************/
+ LVAL Wxms_Prim_XM_STRING_CREATE()
+ {
+   char* string = (char*) getstring(xlgastring());
+   xllastarg();
+   
+   return (cv_xmstring(XmStringCreate(string, XmSTRING_DEFAULT_CHARSET)));
+ }
+ 
+ 
+ /******************************************************************************
+  * (XM_STRING_DIRECTION_CREATE :STRING_DIRECTION_L_TO_R)
+  *	--> returns an XMSTRING with a single L->R direction component.
+  * (XM_STRING_DIRECTION_CREATE :STRING_DIRECTION_R_TO_L)
+  *	--> returns an XMSTRING with a single R->L direction component
+  *
+  *
+  * XmString XmStringDirectionCreate (direction)
+  *     XmStringDirection direction;
+  ******************************************************************************/
+ LVAL Wxms_Prim_XM_STRING_DIRECTION_CREATE()
+ {
+   extern LVAL s_XmSTRING_DIRECTION_L_TO_R; /* w_resources.c */
+   extern LVAL s_XmSTRING_DIRECTION_R_TO_L; /* w_resources.c */
+   LVAL direction = xlgetarg();
+   xllastarg();
+   
+   if (direction == s_XmSTRING_DIRECTION_L_TO_R)
+     return (cv_xmstring(XmStringDirectionCreate(XmSTRING_DIRECTION_L_TO_R)));
+   else if (direction == s_XmSTRING_DIRECTION_R_TO_L)
+     return (cv_xmstring(XmStringDirectionCreate(XmSTRING_DIRECTION_R_TO_L)));
+   else
+     xlerror("Bad <direction> keyword.", direction);
+ }
+ 
+ 
+ /******************************************************************************
+  * (XM_STRING_SEPARATOR_CREATE)
+  *	--> returns an XMSTRING with a single component, a separator.
+  *
+  * XmString XmStringSeparatorCreate ()
+  ******************************************************************************/
+ LVAL Wxms_Prim_XM_STRING_SEPARATOR_CREATE()
+ {
+   xllastarg();
+   return (cv_xmstring(XmStringSeparatorCreate()));
+ }
+ 
+ 
+ /******************************************************************************
+  * (XM_STRING_SEGMENT_CREATE <text> [<charset>] <direction> <separator_p>)
+  *	--> returns a XMSTRING of the specified 
+  * string <text>, 
+  * character set <charset>, 
+  * symbol <direction>, either :STRING_DIRECTION_L_TO_R, or
+  *                            :STRING_DIRECTION_R_TO_L
+  * if <separator_p> is not NIL, a separator component will be included.
+  * 
+  * Note -- WINTERP 1.0 does not take the <charset> argument. It defaults to using
+  * XmSTRING_DEFAULT_CHARSET.
+  * 
+  * XmString XmStringSegmentCreate (text, charset, direction, separator)
+  *     char 		 *text;
+  *     XmStringCharSet	 charset;
+  *     XmStringDirection direction;
+  *     Boolean		 separator;
+  ******************************************************************************/
+ LVAL Wxms_Prim_XM_STRING_SEGMENT_CREATE()
+ {
+   extern LVAL s_XmSTRING_DIRECTION_L_TO_R; /* w_resources.c */
+   extern LVAL s_XmSTRING_DIRECTION_R_TO_L; /* w_resources.c */
+   XmStringDirection direction;
+   char* text = (char*) getstring(xlgastring());
+   LVAL lval_direction = xlgetarg();
+   LVAL separator_p = xlgetarg();
+   xllastarg();
+ 
+   if (lval_direction == s_XmSTRING_DIRECTION_L_TO_R)
+     direction = XmSTRING_DIRECTION_L_TO_R;
+   else if (lval_direction == s_XmSTRING_DIRECTION_R_TO_L)
+     direction = XmSTRING_DIRECTION_R_TO_L;
+   else
+     xlerror("Bad <direction> keyword.", lval_direction);
+   
+   return (cv_xmstring(XmStringSegmentCreate(text, XmSTRING_DEFAULT_CHARSET,
+ 					    direction, 
+ 					    (separator_p) ? TRUE : FALSE)));
+ }
+ 
+ /******************************************************************************
+  * (XM_STRING_CREATE_L_TO_R <text> [<charset>])
+  *	--> returns an XMSTRING version of string <text>.
+  * 
+  * Create a left-to-right compound string from STRING <text>. If <text>
+  * includes '\n', they will be replaced by a separator.
+  *
+  * Optional argument <charset> specifies an XmStringCharSet.
+  * If left out, XmSTRING_DEFAULT_CHARSET is used.
+  *
+  * Note -- WINTERP 1.0 does not take the <charset> argument. It defaults to using
+  * XmSTRING_DEFAULT_CHARSET.
+  *
+  * XmString XmStringCreateLtoR (text, charset)
+  *     char	*text;
+  *     XmStringCharSet charset;
+  ******************************************************************************/
+ LVAL Wxms_Prim_XM_STRING_CREATE_L_TO_R()
+ {
+   char* string = (char*) getstring(xlgastring());
+   xllastarg();
+   
+   return (cv_xmstring(XmStringCreateLtoR(string, XmSTRING_DEFAULT_CHARSET)));
+ }
+ 
+ 
+ /******************************************************************************
+  * XmStrings are bullshit! -- I'm ignoring this fn in this version of WINTERP.
+  * 
+  * Boolean XmStringInitContext (context, string)
+  *     XmStringContext *context;
+  *     XmString string;
+  ******************************************************************************/
+ /******************************************************************************
+  * XmStrings are bullshit! -- I'm ignoring this fn in this version of WINTERP.
+  *
+  * void XmStringFreeContext (context)
+  *     XmStringContext context;
+  ******************************************************************************/
+ /******************************************************************************
+  * XmStrings are bullshit! -- I'm ignoring this fn in this version of WINTERP.
+  *
+  * XmStringComponentType 
+  * XmStringGetNextComponent (context, text, charset, direction, 
+  * 		unknown_tag, unknown_length, unknown_value)
+  *     XmStringContext 	context;
+  *     char		**text;
+  *     XmStringCharSet	*charset;
+  *     XmStringDirection	*direction;
+  *     XmStringComponentType *unknown_tag;
+  *     UShort		*unknown_length;
+  *     UChar		**unknown_value;
+  ******************************************************************************/
+ /******************************************************************************
+  * XmStrings are bullshit! -- I'm ignoring this fn in this version of WINTERP.
+  *
+  * XmStringComponentType XmStringPeekNextComponent (context)
+  *     XmStringContext	context;
+  ******************************************************************************/
+ /******************************************************************************
+  * XmStrings are bullshit! -- I'm ignoring this fn in this version of WINTERP.
+  *
+  * Boolean XmStringGetNextSegment (context, text, charset, direction, separator)
+  *     XmStringContext 	context;
+  *     char		**text;
+  *     XmStringCharSet	*charset;
+  *     XmStringDirection *direction;
+  *     Boolean		*separator;
+  ******************************************************************************/
+ 
+ 
+ /******************************************************************************
+  * (XM_STRING_GET_L_TO_R <xmstring> [<charset>])
+  *	--> returns a STRING, or NIL if no matching character set found.
+  *
+  * This function will fetch the first text segment of the XMSTRING <xmstring>
+  * which matches the character set <charset>, and returns that as a STRING.
+  *
+  * Note -- WINTERP 1.0 does not take the <charset> argument. It defaults to using
+  * XmSTRING_DEFAULT_CHARSET.
+  *
+  * Boolean XmStringGetLtoR (string, charset, text)
+  *     XmString 		string;
+  *     XmStringCharSet	charset;
+  *     char		**text;
+  ******************************************************************************/
+ LVAL Wxms_Prim_XM_STRING_GET_L_TO_R()
+ {
+   LVAL lval_string;
+   char* result;
+   XmString xmstring = get_xmstring(xlga_xmstring());
+   xllastarg();
+ 
+   if (XmStringGetLtoR(xmstring, XmSTRING_DEFAULT_CHARSET, &result)) {
+     lval_string = cvstring(result);
+     XtFree(result);
+     return (lval_string);
+   }
+   else 
+     return (NIL);
+ }
+ 
+ 
+ /******************************************************************************
+  * XmStrings are bullshit! -- I'm ignoring this fn in this version of WINTERP.
+  *
+  * XmFontList XmFontListCreate (font, charset)
+  *     XFontStruct 	*font;
+  *     XmStringCharSet 	charset;
+  ******************************************************************************/
+ /******************************************************************************
+  * XmStrings are bullshit! -- I'm ignoring this fn in this version of WINTERP.
+  *
+  * XmFontList XmStringCreateFontList (font, charset)
+  *     XFontStruct 	*font;
+  *     XmStringCharSet 	charset;
+  ******************************************************************************/
+ /******************************************************************************
+  * XmStrings are bullshit! -- I'm ignoring this fn in this version of WINTERP.
+  *
+  * void  XmFontListFree (fontlist)
+  *     XmFontList fontlist;
+  ******************************************************************************/
+ /******************************************************************************
+  * XmStrings are bullshit! -- I'm ignoring this fn in this version of WINTERP.
+  *
+  * XmFontList XmFontListAdd (old, font, charset)
+  *     XmFontList 	old;
+  *     XFontStruct		*font;
+  *     XmStringCharSet	charset;
+  ******************************************************************************/
+ /******************************************************************************
+  * XmStrings are bullshit! -- I'm ignoring this fn in this version of WINTERP.
+  *
+  * XmFontList XmFontListCopy (fontlist)
+  *     XmFontList fontlist;
+  ******************************************************************************/
+ 
+ 
+ /******************************************************************************
+  * (XM_STRING_CONCAT <xmstring_a> <xmstring_b>)
+  *	--> returns a new XMSTRING  which is the concatenation of XMSTRINGS
+  *	    <xmstring_a> and <xmstring_b>.
+  *
+  * XmString XmStringConcat (a, b)
+  *     XmString a;
+  *     XmString b;
+  ******************************************************************************/
+ LVAL Wxms_Prim_XM_STRING_CONCAT()
+ {
+   XmString xms_a = get_xmstring(xlga_xmstring());
+   XmString xms_b = get_xmstring(xlga_xmstring());
+   xllastarg();
+   return (cv_xmstring(XmStringConcat(xms_a, xms_b)));
+ }
+ 
+ 
+ /******************************************************************************
+  * I'm ignoring this one for now since it looks useless and low-level.
+  *
+  * XmString XmStringNConcat (a, b, n)
+  *     XmString a, b;
+  *     int n;
+  ******************************************************************************/
+ 
+ 
+ /******************************************************************************
+  * (XM_STRING_COPY <xmstring>)
+  *	--> returns a new XMSTRING, a copy of <xmstring>
+  *
+  * XmString XmStringCopy (string)
+  *     XmString string;
+  ******************************************************************************/
+ LVAL Wxms_Prim_XM_STRING_COPY()
+ {
+   XmString xms = get_xmstring(xlga_xmstring());
+   xllastarg();
+   return (cv_xmstring(XmStringCopy(xms)));
+ }
+ 
+ 
+ /******************************************************************************
+  * I'm ignoring this one for now since it looks useless and low-level.
+  *
+  * XmString XmStringNCopy (a, n)
+  *     XmString a;
+  *     int n;
+  ******************************************************************************/
+ 
+ 
+ /******************************************************************************
+  * (XM_STRING_BYTE_COMPARE <xmstring_a> <xmxtring_b>)
+  *	--> returns T if the two XMSTRING args are byte-for-byte equal, else
+  *	    NIL.
+  *
+  * Note that this function will return NIL for an XMSTRING that is retrieved
+  * from a widget via :get_values, a callback, or a method. It's pretty useless, 
+  * just like all the other XmString bogosities.
+  *
+  * Boolean XmStringByteCompare (a, b)
+  *     XmString a, b;
+  ******************************************************************************/
+ LVAL Wxms_Prim_XM_STRING_BYTE_COMPARE()
+ {
+   extern LVAL true;
+   XmString xms_a = get_xmstring(xlga_xmstring());
+   XmString xms_b = get_xmstring(xlga_xmstring());
+   xllastarg();
+   return (XmStringByteCompare(xms_a, xms_b) ? true : NIL);
+ }
+ 
+ 
+ /******************************************************************************
+  * (XM_STRING_COMPARE <xmstring_a> <xmxtring_b>)
+  *	--> returns T if the two XMSTRING args are "semantically equal", 
+  *	    else NIL.
+  *
+  * Boolean XmStringCompare (a, b)
+  *     XmString a, b;
+  ******************************************************************************/
+ LVAL Wxms_Prim_XM_STRING_COMPARE()
+ {
+   extern LVAL true;
+   XmString xms_a = get_xmstring(xlga_xmstring());
+   XmString xms_b = get_xmstring(xlga_xmstring());
+   xllastarg();
+   return (XmStringCompare(xms_a, xms_b) ? true : NIL);
+ }
+ 
+ 
+ /******************************************************************************
+  * (XM_STRING_LENGTH <xmstring>)
+  *	--> returns a FIXNUM representing the number of bytes in <xmstring>
+  *
+  * int XmStringLength (string)
+  *     XmString string;
+  ******************************************************************************/
+ LVAL Wxms_Prim_XM_STRING_LENGTH()
+ {
+   XmString xms = get_xmstring(xlga_xmstring());
+   xllastarg();
+   return (cvfixnum((FIXTYPE) XmStringLength(xms)));
+ }
+ 
+ 
+ /******************************************************************************
+  * (XM_STRING_EMPTY <xmstring>)
+  *	--> returns T if all segments in XMSTRING <xmstring> are zero length
+  *	    or if there are no text segments. Otherwiser returns NIL.
+  *
+  * Boolean XmStringEmpty (string)
+  *     XmString string;
+  ******************************************************************************/
+ LVAL Wxms_Prim_XM_STRING_EMPTY()
+ {
+   extern LVAL true;
+   XmString xms = get_xmstring(xlga_xmstring());
+   xllastarg();
+   return (XmStringEmpty(xms) ? true : NIL);
+ }
+ 
+ 
+ /******************************************************************************
+  * Don't need to interface this -- XMSTRINGS are freed by garbage collector.
+  *
+  * void XmStringFree (string)
+  *     XmString string;
+  ******************************************************************************/
+ /******************************************************************************
+  * Add this when I add the type XmFontList to winterp.
+  *
+  * Dimension XmStringBaseline (fontlist, string)
+  *     XmFontList fontlist;
+  *     XmString string;
+  ******************************************************************************/
+ /******************************************************************************
+  * Add this when I add the type XmFontList to winterp.
+  *
+  * Dimension XmStringWidth (fontlist, string)
+  *     XmFontList fontlist;
+  *     XmString string;
+  ******************************************************************************/
+ /******************************************************************************
+  * Add this when I add the type XmFontList to winterp.
+  *
+  * Dimension XmStringHeight (fontlist, string)
+  *     XmFontList fontlist;
+  *     XmString string;
+  ******************************************************************************/
+ /******************************************************************************
+  * Add this when I add the type XmFontList to winterp.
+  *
+  * void XmStringExtent (fontlist, string, width, height)
+  *     XmFontList fontlist;
+  *     XmString string;
+  *     Dimension *width, *height;
+  ******************************************************************************/
+ 
+ 
+ /******************************************************************************
+  * (XM_STRING_LINE_COUNT <xmstring>)
+  *	--> returns a FIXNUM representing the number of lines
+  *          in XMSTRING <xmstring>.
+  *
+  * int XmStringLineCount (string)
+  *     XmString string;
+  ******************************************************************************/
+ LVAL Wxms_Prim_XM_STRING_LINE_COUNT()
+ {
+   XmString xms = get_xmstring(xlga_xmstring());
+   xllastarg();
+   return (cvfixnum((FIXTYPE) XmStringLineCount(xms)));
+ }
+ 
+ 
+ /******************************************************************************
+  * Ignore -- too low-level.
+ 
+  * void XmStringDraw (d, w, fontlist, string, gc, x, y, width, align, lay_dir, clip)
+  *     Display	*d;
+  *     Window 	w;
+  *     XmFontList fontlist;
+  *     XmString	string;
+  *     GC		gc;
+  *     Position	x, y;
+  *     Dimension	width;
+  *     UChar	align;
+  *     UChar	lay_dir;
+  *     XRectangle	*clip;
+  ******************************************************************************/
+ /******************************************************************************
+  * Ignore -- too low-level
+  * void XmStringDrawImage (d, w, fontlist, string, gc, x, y, 
+  * 	width, align, lay_dir, clip)
+  *     Display	*d;
+  *     Window 	w;
+  *     XmFontList fontlist;
+  *     XmString	string;
+  *     GC		gc;
+  *     Position	x, y;
+  *     Dimension	width;
+  *     UChar	align;
+  *     UChar	lay_dir;
+  *     XRectangle	*clip;
+  ******************************************************************************/
+ /******************************************************************************
+  * Ignore -- too low-level
+  *
+  * void XmStringDrawUnderline (d, w, fontlist, string, gc, x, y, 
+  * 	width, align, lay_dir, clip, underline)
+  *     Display	*d;
+  *     Window 	w;
+  *     XmFontList fontlist;
+  *     XmString	string;
+  *     GC		gc;
+  *     Position	x, y;
+  *     Dimension	width;
+  *     UChar	align;
+  *     UChar	lay_dir;
+  *     XRectangle	*clip;
+  *     XmString	underline;
+  ******************************************************************************/
*** winterp.X11r4/src-server/w_funtab.c	Sat Nov 25 06:27:08 1989
--- winterp/src-server/w_funtab.c	Sun Dec 17 16:52:23 1989
***************
*** 2,8
  ********************************************************************************
  *
  * File:         w_funtab.c
! * RCS:          $Header: w_funtab.c,v 1.3 89/11/25 04:23:00 mayer Exp $
  * Description:  Function table for winterp (replaces xlisp/xlftab.c)
  * Author:       Niels Mayer, HPLabs
  * Created:      Tue Jul 18 00:12:30 1989

--- 2,8 -----
  ********************************************************************************
  *
  * File:         w_funtab.c
! * RCS:          $Header: w_funtab.c,v 1.6 89/12/17 16:52:18 mayer Exp $
  * Description:  Function table for winterp (replaces xlisp/xlftab.c)
  * Author:       Niels Mayer, HPLabs
  * Created:      Tue Jul 18 00:12:30 1989
***************
*** 6,12
  * Description:  Function table for winterp (replaces xlisp/xlftab.c)
  * Author:       Niels Mayer, HPLabs
  * Created:      Tue Jul 18 00:12:30 1989
! * Modified:     Sat Nov 25 04:22:44 1989 (Niels Mayer) mayer@hplnpm
  * Language:     C
  * Package:      N/A
  * Status:       X11r4 contrib tape release

--- 6,12 -----
  * Description:  Function table for winterp (replaces xlisp/xlftab.c)
  * Author:       Niels Mayer, HPLabs
  * Created:      Tue Jul 18 00:12:30 1989
! * Modified:     Sun Dec 17 16:47:10 1989 (Niels Mayer) mayer@hplnpm
  * Language:     C
  * Package:      N/A
  * Status:       X11r4 contrib tape release
***************
*** 36,42
  * 
  * Please send modifications, improvements and bugfixes to mayer@hplabs.hp.com
  * Post XLISP-specific questions/information to the newsgroup comp.lang.lisp.x
! **
  ********************************************************************************
  */
  static char rcs_identity[] = "@(#)$Header: w_funtab.c,v 1.3 89/11/25 04:23:00 mayer Exp $";

--- 36,42 -----
  * 
  * Please send modifications, improvements and bugfixes to mayer@hplabs.hp.com
  * Post XLISP-specific questions/information to the newsgroup comp.lang.lisp.x
! *
  ********************************************************************************
  */
  static char rcs_identity[] = "@(#)$Header: w_funtab.c,v 1.6 89/12/17 16:52:18 mayer Exp $";
***************
*** 39,45
  **
  ********************************************************************************
  */
! static char rcs_identity[] = "@(#)$Header: w_funtab.c,v 1.3 89/11/25 04:23:00 mayer Exp $";
  
  /* xlftab.c - xlisp function table */
  /*	Copyright (c) 1985, by David Michael Betz */

--- 39,45 -----
  *
  ********************************************************************************
  */
! static char rcs_identity[] = "@(#)$Header: w_funtab.c,v 1.6 89/12/17 16:52:18 mayer Exp $";
  
  /* xlftab.c - xlisp function table */
  /*	Copyright (c) 1985, by David Michael Betz */
***************
*** 564,569
  {NULL, S, Widget_Class_Method_WINDOW}, /* 448 */
  {NULL, S, Widget_Class_Method_MAP}, /* 449 */
  {NULL, S, Widget_Class_Method_UNMAP}, /* 450 */
  
  #ifdef 0			/* TEMPLATE */
  {NULL, S, Widget_Class_Method_}, /*  */

--- 564,583 -----
  {NULL, S, Widget_Class_Method_WINDOW}, /* 448 */
  {NULL, S, Widget_Class_Method_MAP}, /* 449 */
  {NULL, S, Widget_Class_Method_UNMAP}, /* 450 */
+ {NULL, S, Xm_Bulletin_Board_Widget_Class_Method_ISNEW}, /* 451 */
+ {"XM_STRING_CREATE", S, Wxms_Prim_XM_STRING_CREATE}, /* 452 */
+ {"XM_STRING_DIRECTION_CREATE", S, Wxms_Prim_XM_STRING_DIRECTION_CREATE}, /* 453 */
+ {"XM_STRING_SEPARATOR_CREATE", S, Wxms_Prim_XM_STRING_SEPARATOR_CREATE}, /* 454 */
+ {"XM_STRING_SEGMENT_CREATE", S, Wxms_Prim_XM_STRING_SEGMENT_CREATE}, /* 455 */
+ {"XM_STRING_CREATE_L_TO_R", S, Wxms_Prim_XM_STRING_CREATE_L_TO_R}, /* 455 */
+ {"XM_STRING_GET_L_TO_R", S, Wxms_Prim_XM_STRING_GET_L_TO_R}, /* 457 */
+ {"XM_STRING_CONCAT", S, Wxms_Prim_XM_STRING_CONCAT}, /* 458 */
+ {"XM_STRING_COPY", S, Wxms_Prim_XM_STRING_COPY}, /* 459 */
+ {"XM_STRING_BYTE_COMPARE", S, Wxms_Prim_XM_STRING_BYTE_COMPARE}, /* 460 */
+ {"XM_STRING_COMPARE", S, Wxms_Prim_XM_STRING_COMPARE}, /* 461 */
+ {"XM_STRING_LENGTH", S, Wxms_Prim_XM_STRING_LENGTH}, /* 462 */
+ {"XM_STRING_EMPTY", S, Wxms_Prim_XM_STRING_EMPTY}, /* 463 */
+ {"XM_STRING_LINE_COUNT", S, Wxms_Prim_XM_STRING_LINE_COUNT}, /* 464 */
  
  /*
    applications built on winterp will add new function table entries via
***************
*** 565,573
  {NULL, S, Widget_Class_Method_MAP}, /* 449 */
  {NULL, S, Widget_Class_Method_UNMAP}, /* 450 */
  
! #ifdef 0			/* TEMPLATE */
! {NULL, S, Widget_Class_Method_}, /*  */
! #endif
  
  {0,0,0} /* end of table marker */
  

--- 579,590 -----
  {"XM_STRING_EMPTY", S, Wxms_Prim_XM_STRING_EMPTY}, /* 463 */
  {"XM_STRING_LINE_COUNT", S, Wxms_Prim_XM_STRING_LINE_COUNT}, /* 464 */
  
! /*
!   applications built on winterp will add new function table entries via
!   this include file. The indexes of entries in this file must correspond
!   to the indexes computed by cpp in app_funtab.h
! */
! #include "app_funtab.c"
  
  {0,0,0} /* end of table marker */
  
*** winterp.X11r4/src-server/w_funtab.h	Sat Nov 25 06:25:50 1989
--- winterp/src-server/w_funtab.h	Sun Dec 17 16:52:34 1989
***************
*** 2,8
  ********************************************************************************
  *
  * File:         w_funtab.h
! * RCS:          $Header: w_funtab.h,v 1.2 89/11/25 06:25:36 mayer Exp $
  * Description:  Indexes (pointers) info functiontable.... there should be a
  *               better way, but I didn't want to mess with XLISP.
  * Author:       Niels Mayer, HPLabs

--- 2,8 -----
  ********************************************************************************
  *
  * File:         w_funtab.h
! * RCS:          $Header: w_funtab.h,v 1.5 89/12/17 16:52:24 mayer Exp $
  * Description:  Indexes (pointers) info functiontable.... there should be a
  *               better way, but I didn't want to mess with XLISP.
  * Author:       Niels Mayer, HPLabs
***************
*** 7,13
  *               better way, but I didn't want to mess with XLISP.
  * Author:       Niels Mayer, HPLabs
  * Created:      Fri Nov 24 00:00:00 1989
! * Modified:     Sat Nov 25 06:25:27 1989 (Niels Mayer) mayer@hplnpm
  * Language:     C
  * Package:      N/A
  * Status:       X11r4 contrib tape release

--- 7,13 -----
  *               better way, but I didn't want to mess with XLISP.
  * Author:       Niels Mayer, HPLabs
  * Created:      Fri Nov 24 00:00:00 1989
! * Modified:     Sun Dec 17 16:46:31 1989 (Niels Mayer) mayer@hplnpm
  * Language:     C
  * Package:      N/A
  * Status:       X11r4 contrib tape release
***************
*** 1365,1370
  extern LVAL Widget_Class_Method_UNMAP();
  #define FTAB_Widget_Class_Method_UNMAP  FTAB_Widget_Class_Method_MAP + 1
  
  
  #define LAST_FUNTAB_POINTER_USED_BY_libWinterp FTAB_Widget_Class_Method_UNMAP
  

--- 1365,1372 -----
  extern LVAL Widget_Class_Method_UNMAP();
  #define FTAB_Widget_Class_Method_UNMAP  FTAB_Widget_Class_Method_MAP + 1
  
+ extern LVAL Xm_Bulletin_Board_Widget_Class_Method_ISNEW();
+ #define FTAB_Xm_Bulletin_Board_Widget_Class_Method_ISNEW  FTAB_Widget_Class_Method_UNMAP + 1
  
  extern LVAL Wxms_Prim_XM_STRING_CREATE();
  #define FTAB_Wxms_Prim_XM_STRING_CREATE  FTAB_Xm_Bulletin_Board_Widget_Class_Method_ISNEW + 1
***************
*** 1366,1372
  #define FTAB_Widget_Class_Method_UNMAP  FTAB_Widget_Class_Method_MAP + 1
  
  
! #define LAST_FUNTAB_POINTER_USED_BY_libWinterp FTAB_Widget_Class_Method_UNMAP
  
  /*
    since you have to update this file every time you append a new primitive

--- 1368,1375 -----
  extern LVAL Xm_Bulletin_Board_Widget_Class_Method_ISNEW();
  #define FTAB_Xm_Bulletin_Board_Widget_Class_Method_ISNEW  FTAB_Widget_Class_Method_UNMAP + 1
  
! extern LVAL Wxms_Prim_XM_STRING_CREATE();
! #define FTAB_Wxms_Prim_XM_STRING_CREATE  FTAB_Xm_Bulletin_Board_Widget_Class_Method_ISNEW + 1
  
  extern LVAL Wxms_Prim_XM_STRING_DIRECTION_CREATE();
  #define FTAB_Wxms_Prim_XM_STRING_DIRECTION_CREATE  FTAB_Wxms_Prim_XM_STRING_CREATE + 1
***************
*** 1368,1373
  
  #define LAST_FUNTAB_POINTER_USED_BY_libWinterp FTAB_Widget_Class_Method_UNMAP
  
  /*
    since you have to update this file every time you append a new primitive
    or method to w_funtab.c, you might as well update

--- 1371,1414 -----
  extern LVAL Wxms_Prim_XM_STRING_CREATE();
  #define FTAB_Wxms_Prim_XM_STRING_CREATE  FTAB_Xm_Bulletin_Board_Widget_Class_Method_ISNEW + 1
  
+ extern LVAL Wxms_Prim_XM_STRING_DIRECTION_CREATE();
+ #define FTAB_Wxms_Prim_XM_STRING_DIRECTION_CREATE  FTAB_Wxms_Prim_XM_STRING_CREATE + 1
+ 
+ extern LVAL Wxms_Prim_XM_STRING_SEPARATOR_CREATE();
+ #define FTAB_Wxms_Prim_XM_STRING_SEPARATOR_CREATE  FTAB_Wxms_Prim_XM_STRING_DIRECTION_CREATE + 1
+ 
+ extern LVAL Wxms_Prim_XM_STRING_SEGMENT_CREATE();
+ #define FTAB_Wxms_Prim_XM_STRING_SEGMENT_CREATE  FTAB_Wxms_Prim_XM_STRING_SEPARATOR_CREATE + 1
+ 
+ extern LVAL Wxms_Prim_XM_STRING_CREATE_L_TO_R();
+ #define FTAB_Wxms_Prim_XM_STRING_CREATE_L_TO_R  FTAB_Wxms_Prim_XM_STRING_SEGMENT_CREATE + 1
+ 
+ extern LVAL Wxms_Prim_XM_STRING_GET_L_TO_R();
+ #define FTAB_Wxms_Prim_XM_STRING_GET_L_TO_R  FTAB_Wxms_Prim_XM_STRING_CREATE_L_TO_R + 1
+ 
+ extern LVAL Wxms_Prim_XM_STRING_CONCAT();
+ #define FTAB_Wxms_Prim_XM_STRING_CONCAT  FTAB_Wxms_Prim_XM_STRING_GET_L_TO_R + 1
+ 
+ extern LVAL Wxms_Prim_XM_STRING_COPY();
+ #define FTAB_Wxms_Prim_XM_STRING_COPY  FTAB_Wxms_Prim_XM_STRING_CONCAT + 1
+ 
+ extern LVAL Wxms_Prim_XM_STRING_BYTE_COMPARE();
+ #define FTAB_Wxms_Prim_XM_STRING_BYTE_COMPARE  FTAB_Wxms_Prim_XM_STRING_COPY + 1
+ 
+ extern LVAL Wxms_Prim_XM_STRING_COMPARE();
+ #define FTAB_Wxms_Prim_XM_STRING_COMPARE  FTAB_Wxms_Prim_XM_STRING_BYTE_COMPARE + 1
+ 
+ extern LVAL Wxms_Prim_XM_STRING_LENGTH();
+ #define FTAB_Wxms_Prim_XM_STRING_LENGTH  FTAB_Wxms_Prim_XM_STRING_COMPARE + 1
+ 
+ extern LVAL Wxms_Prim_XM_STRING_EMPTY();
+ #define FTAB_Wxms_Prim_XM_STRING_EMPTY  FTAB_Wxms_Prim_XM_STRING_LENGTH + 1
+ 
+ extern LVAL Wxms_Prim_XM_STRING_LINE_COUNT();
+ #define FTAB_Wxms_Prim_XM_STRING_LINE_COUNT  FTAB_Wxms_Prim_XM_STRING_EMPTY + 1
+ 
+ #define LAST_FUNTAB_POINTER_USED_BY_libWinterp FTAB_Wxms_Prim_XM_STRING_LINE_COUNT
+ 
  /*
    since you have to update this file every time you append a new primitive
    or method to w_funtab.c, you might as well update
***************
*** 1377,1383
    the sequencing of funtab entries being out-of-sync, but then again
    this is all pretty lame anyways.
  */
! #define INDEX_OF_LAST_FUNTAB_ENTRY_USED_BY_libWinterp 450
  
  #ifdef 0			/* template */
  extern LVAL Widget_Class_Method_();

--- 1418,1424 -----
    the sequencing of funtab entries being out-of-sync, but then again
    this is all pretty lame anyways.
  */
! #define INDEX_OF_LAST_FUNTAB_ENTRY_USED_BY_libWinterp 464
  
  /*
    applications built on winterp will add new extern declarations in this
***************
*** 1379,1385
  */
  #define INDEX_OF_LAST_FUNTAB_ENTRY_USED_BY_libWinterp 450
  
! #ifdef 0			/* template */
! extern LVAL Widget_Class_Method_();
! #define FTAB_Widget_Class_Method_  FTAB_Widget_Class_Method_ + 1
! #endif

--- 1420,1429 -----
  */
  #define INDEX_OF_LAST_FUNTAB_ENTRY_USED_BY_libWinterp 464
  
! /*
!   applications built on winterp will add new extern declarations in this
!   include file. Additionally, this file should use cpp macros to compute
!   the index into funtab[] for the application's new function pointers
!   added in app_funtab.c. 
! */
! #include "app_funtab.h"
*** winterp.X11r4/src-server/w_resources.c	Sat Nov 25 04:29:10 1989
--- winterp/src-server/w_resources.c	Sun Dec 17 17:00:09 1989
***************
*** 2,8
  ********************************************************************************
  *
  * File:         w_resources.c
! * RCS:          $Header: w_resources.c,v 1.2 89/11/25 04:28:44 mayer Exp $
  * Description:  WINTERP interfaces to Motif and Xtoolkit resources
  * Author:       Niels Mayer, HPLabs
  * Created:      Sat Jul 22 04:42:12 1989

--- 2,8 -----
  ********************************************************************************
  *
  * File:         w_resources.c
! * RCS:          $Header: w_resources.c,v 1.5 89/12/17 16:59:49 mayer Exp $
  * Description:  WINTERP interfaces to Motif and Xtoolkit resources
  * Author:       Niels Mayer, HPLabs
  * Created:      Sat Jul 22 04:42:12 1989
***************
*** 6,12
  * Description:  WINTERP interfaces to Motif and Xtoolkit resources
  * Author:       Niels Mayer, HPLabs
  * Created:      Sat Jul 22 04:42:12 1989
! * Modified:     Sat Nov 25 04:28:34 1989 (Niels Mayer) mayer@hplnpm
  * Language:     C
  * Package:      N/A
  * Status:       X11r4 contrib tape release

--- 6,12 -----
  * Description:  WINTERP interfaces to Motif and Xtoolkit resources
  * Author:       Niels Mayer, HPLabs
  * Created:      Sat Jul 22 04:42:12 1989
! * Modified:     Sun Dec 17 16:59:43 1989 (Niels Mayer) mayer@hplnpm
  * Language:     C
  * Package:      N/A
  * Status:       X11r4 contrib tape release
***************
*** 39,45
  **
  ********************************************************************************
  */
! static char rcs_identity[] = "@(#)$Header: w_resources.c,v 1.2 89/11/25 04:28:44 mayer Exp $";
  
  #include <stdio.h>
  #include <X11/Intrinsic.h>

--- 39,45 -----
  **
  ********************************************************************************
  */
! static char rcs_identity[] = "@(#)$Header: w_resources.c,v 1.5 89/12/17 16:59:49 mayer Exp $";
  
  #include <stdio.h>
  #include <X11/Intrinsic.h>
***************
*** 90,96
  static LVAL s_XmNO_ORIENTATION, s_XmVERTICAL, s_XmHORIZONTAL;
  static LVAL s_XmNO_PACKING, s_XmPACK_TIGHT, s_XmPACK_COLUMN, s_XmPACK_NONE;
  static LVAL s_XmWORK_AREA, s_XmMENU_BAR, s_XmMENU_POPUP, s_XmMENU_PULLDOWN, s_XmMENU_OPTION;
! static LVAL s_XmSTRING_DIRECTION_L_TO_R, s_XmSTRING_DIRECTION_R_TO_L;
  static LVAL s_Button1, s_Button2, s_Button3, s_Button4, s_Button5;
  static LVAL s_XmPIXELS, s_Xm100TH_MILLIMETERS, s_Xm1000TH_INCHES, s_Xm100TH_POINTS, s_Xm100TH_FONT_UNITS;
  static LVAL s_XmRESIZE_NONE, s_XmRESIZE_GROW, s_XmRESIZE_ANY;

--- 90,96 -----
  static LVAL s_XmNO_ORIENTATION, s_XmVERTICAL, s_XmHORIZONTAL;
  static LVAL s_XmNO_PACKING, s_XmPACK_TIGHT, s_XmPACK_COLUMN, s_XmPACK_NONE;
  static LVAL s_XmWORK_AREA, s_XmMENU_BAR, s_XmMENU_POPUP, s_XmMENU_PULLDOWN, s_XmMENU_OPTION;
! LVAL s_XmSTRING_DIRECTION_L_TO_R, s_XmSTRING_DIRECTION_R_TO_L;
  static LVAL s_Button1, s_Button2, s_Button3, s_Button4, s_Button5;
  static LVAL s_XmPIXELS, s_Xm100TH_MILLIMETERS, s_Xm1000TH_INCHES, s_Xm100TH_POINTS, s_Xm100TH_FONT_UNITS;
  static LVAL s_XmRESIZE_NONE, s_XmRESIZE_GROW, s_XmRESIZE_ANY;
***************
*** 198,204
  
  
  /******************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRBool = {
    XmRBool,
    xxx,	

--- 198,204 -----
  
  
  /******************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRBool = {
    XmRBool,
    xxx,	
***************
*** 263,269
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRCallProc = {
    XmRCallProc,	
    xxx,	

--- 263,269 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRCallProc = {
    XmRCallProc,	
    xxx,	
***************
*** 302,308
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRColor = {
    XmRColor,
    xxx,

--- 302,308 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRColor = {
    XmRColor,
    xxx,
***************
*** 313,319
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRCursor = {
    XmRCursor,
    xxx,	

--- 313,319 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRCursor = {
    XmRCursor,
    xxx,	
***************
*** 398,404
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRDisplay = {
    XmRDisplay,
    xxx,	

--- 398,404 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRDisplay = {
    XmRDisplay,
    xxx,	
***************
*** 452,458
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRFile = {
    XmRFile,
    xxx,	

--- 452,458 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRFile = {
    XmRFile,
    xxx,	
***************
*** 463,469
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRFont = {
    XmRFont,
    xxx,	

--- 463,469 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRFont = {
    XmRFont,
    xxx,	
***************
*** 503,509
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRFontStruct = {
    XmRFontStruct,	
    xxx, 

--- 503,509 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRFontStruct = {
    XmRFontStruct,	
    xxx, 
***************
*** 519,525
  #endif
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRFunction = {
    XmRFunction,	
    xxx,	

--- 519,525 -----
  #endif
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRFunction = {
    XmRFunction,	
    xxx,	
***************
*** 540,546
  #endif
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRGeometry = {
    XmRGeometry,	
    xxx,	

--- 540,546 -----
  #endif
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRGeometry = {
    XmRGeometry,	
    xxx,	
***************
*** 551,557
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRImmediate = {
    XmRImmediate,	
    xxx, 

--- 551,557 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRImmediate = {
    XmRImmediate,	
    xxx, 
***************
*** 654,660
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRJustify = {
    XmRJustify,
    xxx,	

--- 654,660 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRJustify = {
    XmRJustify,
    xxx,	
***************
*** 707,713
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRLongBoolean = {
    XmRLongBoolean,	
    xxx, 

--- 707,713 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRLongBoolean = {
    XmRLongBoolean,	
    xxx, 
***************
*** 717,723
  #endif
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRMenuWidget = {
    XmRMenuWidget,
    xxx,

--- 717,723 -----
  #endif
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRMenuWidget = {
    XmRMenuWidget,
    xxx,
***************
*** 729,735
  #endif
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRMnemonic = {
    XmRMnemonic,	
    xxx,	

--- 729,735 -----
  #endif
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRMnemonic = {
    XmRMnemonic,	
    xxx,	
***************
*** 1065,1071
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRProc = {
    XmRProc,
    xxx,	

--- 1065,1071 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRProc = {
    XmRProc,
    xxx,	
***************
*** 1291,1297
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRStringTable = {
    XmRStringTable,	
    xxx, 

--- 1291,1297 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRStringTable = {
    XmRStringTable,	
    xxx, 
***************
*** 1302,1308
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRUnsignedChar = {
    XmRUnsignedChar,	
    xxx, 

--- 1302,1308 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRUnsignedChar = {
    XmRUnsignedChar,	
    xxx, 
***************
*** 1578,1584
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRSizePolicy = {
    XmRSizePolicy,	
    xxx, 

--- 1578,1584 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRSizePolicy = {
    XmRSizePolicy,	
    xxx, 
***************
*** 1870,1876
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRMargin = {
    XmRMargin,
    xxx,	

--- 1870,1876 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRMargin = {
    XmRMargin,
    xxx,	
***************
*** 1958,1964
      return (s_XmMAX_ON_TOP);
    case XmMAX_ON_BOTTOM:
      return (s_XmMAX_ON_BOTTOM);
! #ifdef 0			/* can't put these in a case since XmMAX_ON_LEFT==XmMAX_ON_TOP, XmMAX_ON_BOTTOM==XmMAX_ON_RIGHT*/
    case XmMAX_ON_LEFT:
      return (s_XmMAX_ON_LEFT);
    case XmMAX_ON_RIGHT:

--- 1958,1964 -----
      return (s_XmMAX_ON_TOP);
    case XmMAX_ON_BOTTOM:
      return (s_XmMAX_ON_BOTTOM);
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT /* can't put these in a case since XmMAX_ON_LEFT==XmMAX_ON_TOP, XmMAX_ON_BOTTOM==XmMAX_ON_RIGHT*/
    case XmMAX_ON_LEFT:
      return (s_XmMAX_ON_LEFT);
    case XmMAX_ON_RIGHT:
***************
*** 2004,2010
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRListSpacing = {
    XmRListSpacing,	
    xxx, 

--- 2004,2010 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRListSpacing = {
    XmRListSpacing,	
    xxx, 
***************
*** 2015,2021
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRListMarginWidth = {
    XmRListMarginWidth,	
    xxx, 

--- 2015,2021 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRListMarginWidth = {
    XmRListMarginWidth,	
    xxx, 
***************
*** 2026,2032
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRListMarginHeight = {
    XmRListMarginHeight, 
    xxx,	

--- 2026,2032 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRListMarginHeight = {
    XmRListMarginHeight, 
    xxx,	
***************
*** 2037,2043
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRItems = {
    XmRItems,
    xxx,	

--- 2037,2043 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRItems = {
    XmRItems,
    xxx,	
***************
*** 2048,2054
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRItemCount = {
    XmRItemCount,	
    xxx, 

--- 2048,2054 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRItemCount = {
    XmRItemCount,	
    xxx, 
***************
*** 2059,2065
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRSelectedItems = {
    XmRSelectedItems,	
    xxx, 

--- 2059,2065 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRSelectedItems = {
    XmRSelectedItems,	
    xxx, 
***************
*** 2070,2076
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRSelectedItemCount = {
    XmRSelectedItemCount, 
    xxx, 

--- 2070,2076 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRSelectedItemCount = {
    XmRSelectedItemCount, 
    xxx, 
***************
*** 2081,2087
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRVisibleItemCount = {
    XmRVisibleItemCount, 
    xxx,	

--- 2081,2087 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRVisibleItemCount = {
    XmRVisibleItemCount, 
    xxx,	
***************
*** 2193,2199
  
  
  /********************************************************************************/
! #ifdef 0
  static Resource_Class resclass_XmRDoubleClickInterval = {
    XmRDoubleClickInterval, 
    xxx, 

--- 2193,2199 -----
  
  
  /********************************************************************************/
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT
  static Resource_Class resclass_XmRDoubleClickInterval = {
    XmRDoubleClickInterval, 
    xxx, 
***************
*** 2693,2699
  
  
  /**************************************************************************/
! /************      T A B L E     OF    R E S O U R C E S     **************/
  /************                                                **************/
  /**************************************************************************/
  

--- 2693,2699 -----
  
  
  /**************************************************************************/
! /************     T A B L E     O F    R E S O U R C E S     **************/
  /************                                                **************/
  /**************************************************************************/
  
***************
*** 3203,3209
  		  resource->class->XmR_type);
  	  xlerror(temptext, lval_resval);
  	}
! #ifdef 0			/* commented out because this causes unexpected X Protocol Error -- see comments below */
  	/* pixmap is referenced inside widget, so don't allow pixmap to be
  	   garbage collected & XmDestroyPixmap()'d until it is no longer
  	   referenced by anybody. See also Cvt_LVAL_to_Pixmap() above */

--- 3203,3209 -----
  		  resource->class->XmR_type);
  	  xlerror(temptext, lval_resval);
  	}
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT /* commented out because this causes unexpected X Protocol Error -- see comments below */
  	/* pixmap is referenced inside widget, so don't allow pixmap to be
  	   garbage collected & XmDestroyPixmap()'d until it is no longer
  	   referenced by anybody. See also Cvt_LVAL_to_Pixmap() above */
*** winterp.X11r4/src-server/wc_BulletinB.c	Sat Nov 25 04:34:48 1989
--- winterp/src-server/wc_BulletinB.c	Sat Dec  9 20:36:28 1989
***************
*** 2,8
  ********************************************************************************
  *
  * File:         wc_BulletinB.c
! * RCS:          $Header: wc_BulletinB.c,v 1.1 89/11/25 04:34:45 mayer Exp $
  * Description:  XM_BULLETIN_BOARD_WIDGET_CLASS
  * Author:       Niels Mayer, HPLabs
  * Created:      Fri Oct 27 21:46:14 1989

--- 2,8 -----
  ********************************************************************************
  *
  * File:         wc_BulletinB.c
! * RCS:          $Header: wc_BulletinB.c,v 1.3 89/12/09 20:36:15 mayer Exp $
  * Description:  XM_BULLETIN_BOARD_WIDGET_CLASS
  * Author:       Niels Mayer, HPLabs
  * Created:      Fri Oct 27 21:46:14 1989
***************
*** 6,12
  * Description:  XM_BULLETIN_BOARD_WIDGET_CLASS
  * Author:       Niels Mayer, HPLabs
  * Created:      Fri Oct 27 21:46:14 1989
! * Modified:     Sat Nov 25 04:34:30 1989 (Niels Mayer) mayer@hplnpm
  * Language:     C
  * Package:      N/A
  * Status:       X11r4 contrib tape release

--- 6,12 -----
  * Description:  XM_BULLETIN_BOARD_WIDGET_CLASS
  * Author:       Niels Mayer, HPLabs
  * Created:      Fri Oct 27 21:46:14 1989
! * Modified:     Sat Dec  9 20:36:06 1989 (Niels Mayer) mayer@hplnpm
  * Language:     C
  * Package:      N/A
  * Status:       X11r4 contrib tape release
***************
*** 39,45
  **
  ********************************************************************************
  */
! static char rcs_identity[] = "@(#)$Header: wc_BulletinB.c,v 1.1 89/11/25 04:34:45 mayer Exp $";
  
  #include <stdio.h>
  #include <X11/Intrinsic.h>

--- 39,45 -----
  **
  ********************************************************************************
  */
! static char rcs_identity[] = "@(#)$Header: wc_BulletinB.c,v 1.3 89/12/09 20:36:15 mayer Exp $";
  
  #include <stdio.h>
  #include <X11/Intrinsic.h>
***************
*** 48,53
  #include "winterp.h"
  #include "user_prefs.h"
  #include "xlisp/xlisp.h"
  
  /******************************************************************************
   *

--- 48,54 -----
  #include "winterp.h"
  #include "user_prefs.h"
  #include "xlisp/xlisp.h"
+ #include "w_funtab.h"
  
  
  /*****************************************************************************
***************
*** 49,54
  #include "user_prefs.h"
  #include "xlisp/xlisp.h"
  
  /******************************************************************************
   *
   ******************************************************************************/

--- 50,150 -----
  #include "xlisp/xlisp.h"
  #include "w_funtab.h"
  
+ 
+ /*****************************************************************************
+  * (send XM_BULLETIN_BOARD_WIDGET_CLASS :new 
+  *                           [:managed/:unmanaged]
+  *                           [:dialog]
+  *                           [<name>]
+  *                           <parent> 
+  *                           [:XMN_<arg1> <val1>]
+  *                           [. . .             ]
+  *                           [:XMN_<argN> <valN>])
+  *
+  * The optional keyword submessage :managed will cause a subsequent call
+  * to XtManageChild(). If the submessage :unmanaged is present, or no
+  * submessage, then XtManageChild() won't be called, and the resulting
+  * widget will be returned unmanaged.
+  *
+  *     (send XM_BULLETIN_BOARD_WIDGET_CLASS :new ...)
+  *     --> XmCreateBulletinBoard();
+  *     (send XM_BULLETIN_BOARD_WIDGET_CLASS :new :dialog ...)
+  *     --> XmCreateBulletinBoardDialog();
+  ****************************************************************************/
+ LVAL Xm_Bulletin_Board_Widget_Class_Method_ISNEW()
+ {
+   extern ArgList Wres_Get_LispArglist(); /* from w_resources.c */
+   extern void    Wres_Free_C_Arglist_Data(); /* from w_resources.c */
+   extern LVAL k_managed, k_unmanaged, k_dialog;
+   LVAL self, o_parent;
+   char* name;
+   Boolean managed_p, dialog_p;
+   Widget parent_widget_id, widget_id;
+ 
+   self = xlgaobject();		/* NOTE: xlobj.c:clnew() returns an OBJECT; if this method
+ 				   returns successfully, it will return a WIDGETOBJ */
+ 
+   /* get optional managed/unmanaged arg */
+   if (moreargs() && ((*xlargv == k_managed) || (*xlargv == k_unmanaged)))
+     managed_p = (nextarg() == k_managed);
+   else
+     managed_p = FALSE;		/* by default don't call XtManageChild() */
+ 
+   /* get optional :dialog arg */
+   if (moreargs() && (*xlargv == k_dialog)) {
+     nextarg();
+     dialog_p = TRUE;
+   }
+   else
+     dialog_p = FALSE;		/* by default, we don't want a dialog widget */
+ 
+   /* get optional <name> arg */
+   if (moreargs() && (stringp(*xlargv)))
+     name = (char*) getstring(nextarg());
+   else
+     name = "";			/* default name */
+ 
+   /* get required <parent> widget-object arg */
+   o_parent = xlga_widgetobj();
+ 
+   if (!(parent_widget_id = get_widgetobj_widgetID(o_parent)))
+     xlerror("<parent> widget object has been :destroy'd or hasn't been initialized by :isnew.", o_parent);
+ 
+   /*
+    * Store the widget object <self> in the XmNuserData resource on the
+    * widget. This will allow us to retrieve the widget object from Xtoolkit
+    * functions returning widget ID's without having to keep around a table
+    * of widgetID-->widget-objects.
+    */
+    ARGLIST_RESET(); ARGLIST_ADD(XmNuserData, self); 
+ 
+   if (moreargs()) {		/* if there are more arguments, */
+     Cardinal xt_numargs;	/* then we have some extra widget resources to set */
+     ArgList xt_arglist = Wres_Get_LispArglist(self, parent_widget_id, ARGLIST(), &xt_numargs);
+     if (dialog_p)
+       widget_id = XmCreateBulletinBoardDialog(parent_widget_id, name, xt_arglist, xt_numargs);
+     else
+       widget_id = XmCreateBulletinBoard(parent_widget_id, name, xt_arglist, xt_numargs);
+     Wres_Free_C_Arglist_Data();
+   }
+   else 
+     if (dialog_p)
+       widget_id = XmCreateBulletinBoardDialog(parent_widget_id, name, ARGLIST());
+     else
+       widget_id = XmCreateBulletinBoard(parent_widget_id, name, ARGLIST());
+ 
+   Wcls_Initialize_WIDGETOBJ(self, widget_id);
+ 
+   if (managed_p)
+     XtManageChild(widget_id);
+ 
+ #ifdef DEBUG_WINTERP_1
+   Wcls_Print_WidgetObj_Info(self);
+ #endif
+   return (self);
+ }
+ 
+ 
  /******************************************************************************
   *
   ******************************************************************************/
***************
*** 60,63
    o_XM_BULLETIN_BOARD_WIDGET_CLASS =
      Wcls_Create_Subclass_Of_WIDGET_CLASS("XM_BULLETIN_BOARD_WIDGET_CLASS",
  					 xmBulletinBoardWidgetClass);
  }

--- 156,164 -----
    o_XM_BULLETIN_BOARD_WIDGET_CLASS =
      Wcls_Create_Subclass_Of_WIDGET_CLASS("XM_BULLETIN_BOARD_WIDGET_CLASS",
  					 xmBulletinBoardWidgetClass);
+   
+   /* a special :isnew method on this class allows for the creation of this
+      widget in a popup dialog if the submessage keyword :dialog is given ... */
+   xladdmsg(o_XM_BULLETIN_BOARD_WIDGET_CLASS, ":ISNEW", 
+ 	   FTAB_Xm_Bulletin_Board_Widget_Class_Method_ISNEW);
  }
*** winterp.X11r4/src-server/wc_CascadeB.c	Sat Nov 25 04:35:25 1989
--- winterp/src-server/wc_CascadeB.c	Sat Dec  9 05:35:00 1989
***************
*** 2,8
  ********************************************************************************
  *
  * File:         wc_CascadeB.c
! * RCS:          $Header: wc_CascadeB.c,v 1.1 89/11/25 04:35:22 mayer Exp $
  * Description:  XM_CASCADE_BUTTON_WIDGET_CLASS/CASCADE_BUTTON_GADGET_CLASS
  * Author:       Niels Mayer, HPLabs
  * Created:      Fri Oct 27 21:54:13 1989

--- 2,8 -----
  ********************************************************************************
  *
  * File:         wc_CascadeB.c
! * RCS:          $Header: wc_CascadeB.c,v 1.2 89/12/09 05:34:27 mayer Exp $
  * Description:  XM_CASCADE_BUTTON_WIDGET_CLASS/CASCADE_BUTTON_GADGET_CLASS
  * Author:       Niels Mayer, HPLabs
  * Created:      Fri Oct 27 21:54:13 1989
***************
*** 6,12
  * Description:  XM_CASCADE_BUTTON_WIDGET_CLASS/CASCADE_BUTTON_GADGET_CLASS
  * Author:       Niels Mayer, HPLabs
  * Created:      Fri Oct 27 21:54:13 1989
! * Modified:     Sat Nov 25 04:35:12 1989 (Niels Mayer) mayer@hplnpm
  * Language:     C
  * Package:      N/A
  * Status:       X11r4 contrib tape release

--- 6,12 -----
  * Description:  XM_CASCADE_BUTTON_WIDGET_CLASS/CASCADE_BUTTON_GADGET_CLASS
  * Author:       Niels Mayer, HPLabs
  * Created:      Fri Oct 27 21:54:13 1989
! * Modified:     Sat Dec  9 05:34:00 1989 (Niels Mayer) mayer@hplnpm
  * Language:     C
  * Package:      N/A
  * Status:       X11r4 contrib tape release
***************
*** 39,45
  **
  ********************************************************************************
  */
! static char rcs_identity[] = "@(#)$Header: wc_CascadeB.c,v 1.1 89/11/25 04:35:22 mayer Exp $";
  
  #include <stdio.h>
  #include <X11/Intrinsic.h>

--- 39,45 -----
  **
  ********************************************************************************
  */
! static char rcs_identity[] = "@(#)$Header: wc_CascadeB.c,v 1.2 89/12/09 05:34:27 mayer Exp $";
  
  #include <stdio.h>
  #include <X11/Intrinsic.h>
***************
*** 54,59
  
  /******************************************************************************
   * (send <cascadebuttonwidget> :highlight <highlight_p>)
   * This method draws the shadow higlight around the cascadebutton if
   * <highlight_p> is true, and unhighlights if <highlight_p> is NIL.
   * 

--- 54,61 -----
  
  /******************************************************************************
   * (send <cascadebuttonwidget> :highlight <highlight_p>)
+  *    ==> returns <cascadebuttonwidget>
+  *
   * This method draws the shadow higlight around the cascadebutton if
   * <highlight_p> is true, and unhighlights if <highlight_p> is NIL.
   * 
***************
*** 73,78
      xlerror("widget object has been :destroy'd or hasn't been initialized by :isnew.", self);
    
    XmCascadeButtonHighlight(widget_id, (highlight_p) ? TRUE : FALSE);
  }
  
  

--- 75,82 -----
      xlerror("widget object has been :destroy'd or hasn't been initialized by :isnew.", self);
    
    XmCascadeButtonHighlight(widget_id, (highlight_p) ? TRUE : FALSE);
+ 
+   return (self);
  }
  
  
*** winterp.X11r4/src-server/wc_WIDGET.c	Sat Nov 25 04:57:10 1989
--- winterp/src-server/wc_WIDGET.c	Fri Dec  1 16:56:01 1989
***************
*** 2,8
  ********************************************************************************
  *
  * File:         wc_WIDGET.c
! * RCS:          $Header: wc_WIDGET.c,v 1.1 89/11/25 04:57:06 mayer Exp $
  * Description:  WIDGET_CLASS (the widget metaclass)
  * Author:       Niels Mayer, HPLabs
  * Created:      Tue Nov 21 00:55:07 1989

--- 2,8 -----
  ********************************************************************************
  *
  * File:         wc_WIDGET.c
! * RCS:          $Header: wc_WIDGET.c,v 1.3 89/12/01 16:55:56 mayer Exp $
  * Description:  WIDGET_CLASS (the widget metaclass)
  * Author:       Niels Mayer, HPLabs
  * Created:      Tue Nov 21 00:55:07 1989
***************
*** 6,12
  * Description:  WIDGET_CLASS (the widget metaclass)
  * Author:       Niels Mayer, HPLabs
  * Created:      Tue Nov 21 00:55:07 1989
! * Modified:     Sat Nov 25 04:54:44 1989 (Niels Mayer) mayer@hplnpm
  * Language:     C
  * Package:      N/A
  * Status:       X11r4 contrib tape release

--- 6,12 -----
  * Description:  WIDGET_CLASS (the widget metaclass)
  * Author:       Niels Mayer, HPLabs
  * Created:      Tue Nov 21 00:55:07 1989
! * Modified:     Fri Dec  1 16:27:28 1989 (Niels Mayer) mayer@hplnpm
  * Language:     C
  * Package:      N/A
  * Status:       X11r4 contrib tape release
***************
*** 39,45
  **
  ********************************************************************************
  */
! static char rcs_identity[] = "@(#)$Header: wc_WIDGET.c,v 1.1 89/11/25 04:57:06 mayer Exp $";
  
  #include <stdio.h>
  #include <X11/Intrinsic.h>

--- 39,45 -----
  **
  ********************************************************************************
  */
! static char rcs_identity[] = "@(#)$Header: wc_WIDGET.c,v 1.3 89/12/01 16:55:56 mayer Exp $";
  
  #include <stdio.h>
  #include <X11/Intrinsic.h>
***************
*** 270,277
    o_WIDGET_CLASS = xlclass("WIDGET_CLASS", WIDGETOBJ_SIZE); 
  
    /* set up the list of ivarnames in IVARS */
!   /* xladdivar(o_WIDGET_CLASS, "SETVALUES_ALIST"); */ /* ivar number 1 */
!   /* xladdivar(o_WIDGET_CLASS, "WIDGET_ID"); */ /* ivar number 0 */
  
    /* set up the list of methods in MESSAGES, and bind the associated FSUBR */
  

--- 270,277 -----
    o_WIDGET_CLASS = xlclass("WIDGET_CLASS", WIDGETOBJ_SIZE); 
  
    /* set up the list of ivarnames in IVARS */
!   xladdivar(o_WIDGET_CLASS, "NIL"); /* this "variable name" corresponds to the WIDGETID slot on a WIDGETOBJ 
! 				       -- users shouldn't access this var, since it isn't an LVAL (hack). */
  
    /* set up the list of methods in MESSAGES, and bind the associated FSUBR */
  
***************
*** 275,281
  
    /* set up the list of methods in MESSAGES, and bind the associated FSUBR */
  
! #ifdef 0			/* template for adding new methods */
    xladdmsg(o_WIDGET_CLASS, ":",
  	   FTAB_Widget_Class_Method_); /*  */
  #endif

--- 275,281 -----
  
    /* set up the list of methods in MESSAGES, and bind the associated FSUBR */
  
! #ifdef THE_FOLLOWING_CODE_IS_COMMENTED_OUT /* template for adding new methods */
    xladdmsg(o_WIDGET_CLASS, ":",
  	   FTAB_Widget_Class_Method_); /*  */
  #endif
*** winterp.X11r4/src-server/xlisp/xlftab.c	Sat Nov 25 05:28:31 1989
--- winterp/src-server/xlisp/xlftab.c	Sat Dec 16 23:15:39 1989
***************
*** 72,78
      xdefstruct(),xmkstruct(),xcpystruct(),xstrref(),xstrset(),xstrtypep(),
      xasin(),xacos(),xatan(),
      Prim_POPEN(), Prim_PCLOSE(), Prim_SYSTEM(),	/* NPM */
!     Prim_FSCANF_FIXNUM, Prim_FSCANF_STRING, Prim_FSCANF_FLONUM,	/* NPM */
      Prim_COPY_ARRAY(), Prim_ARRAY_INSERT_POS(), Prim_ARRAY_DELETE_POS(); /* NPM */
  
  /* functions specific to xldmem.c */

--- 72,78 -----
      xdefstruct(),xmkstruct(),xcpystruct(),xstrref(),xstrset(),xstrtypep(),
      xasin(),xacos(),xatan(),
      Prim_POPEN(), Prim_PCLOSE(), Prim_SYSTEM(),	/* NPM */
!     Prim_FSCANF_FIXNUM(), Prim_FSCANF_STRING(), Prim_FSCANF_FLONUM(), /* NPM */
      Prim_COPY_ARRAY(), Prim_ARRAY_INSERT_POS(), Prim_ARRAY_DELETE_POS(); /* NPM */
  
  /* functions specific to xldmem.c */
***************
*** 442,449
  {	"POPEN",			S, Prim_POPEN		}, /* 295 NPM */
  {	"PCLOSE",			S, Prim_PCLOSE		}, /* 296 NPM */
  {	"FSCANF-FIXNUM",		S, Prim_FSCANF_FIXNUM	}, /* 297 NPM */
! {	"FSCANF_STRING",		S, Prim_FSCANF_STRING	}, /* 298 NPM */
! {	"FSCANF_FLONUM",		S, Prim_FSCANF_FLONUM	}, /* 299 NPM*/
  {	"COPY-ARRAY",			S, Prim_COPY_ARRAY	}, /* 300 NPM */
  {	"ARRAY-INSERT-POS",		S, Prim_ARRAY_INSERT_POS}, /* 301 NPM */
  {	"ARRAY-DELETE-POS",		S, Prim_ARRAY_DELETE_POS}, /* 302 NPM */

--- 442,449 -----
  {	"POPEN",			S, Prim_POPEN		}, /* 295 NPM */
  {	"PCLOSE",			S, Prim_PCLOSE		}, /* 296 NPM */
  {	"FSCANF-FIXNUM",		S, Prim_FSCANF_FIXNUM	}, /* 297 NPM */
! {	"FSCANF-STRING",		S, Prim_FSCANF_STRING	}, /* 298 NPM */
! {	"FSCANF-FLONUM",		S, Prim_FSCANF_FLONUM	}, /* 299 NPM*/
  {	"COPY-ARRAY",			S, Prim_COPY_ARRAY	}, /* 300 NPM */
  {	"ARRAY-INSERT-POS",		S, Prim_ARRAY_INSERT_POS}, /* 301 NPM */
  {	"ARRAY-DELETE-POS",		S, Prim_ARRAY_DELETE_POS}, /* 302 NPM */
*** winterp.X11r4/src-server/xlisp/xlisp.h	Sat Nov 25 05:36:53 1989
--- winterp/src-server/xlisp/xlisp.h	Sun Dec 17 19:05:09 1989
***************
*** 2,8
  ********************************************************************************
  *
  * File:         xlisp.h
! * RCS:          $Header: xlisp.h,v 1.5 89/11/25 05:36:49 mayer Exp $
  * Description:  libXlisp.a external interfaces
  * Author:       David Michael Betz; Niels Mayer
  * Created:      

--- 2,8 -----
  ********************************************************************************
  *
  * File:         xlisp.h
! * RCS:          $Header: xlisp.h,v 1.6 89/12/17 19:05:05 mayer Exp $
  * Description:  libXlisp.a external interfaces
  * Author:       David Michael Betz; Niels Mayer
  * Created:      
***************
*** 6,12
  * Description:  libXlisp.a external interfaces
  * Author:       David Michael Betz; Niels Mayer
  * Created:      
! * Modified:     Sat Nov 25 05:36:21 1989 (Niels Mayer) mayer@hplnpm
  * Language:     C
  * Package:      N/A
  * Status:       X11r4 contrib tape release

--- 6,12 -----
  * Description:  libXlisp.a external interfaces
  * Author:       David Michael Betz; Niels Mayer
  * Created:      
! * Modified:     Sun Dec 17 04:50:59 1989 (Niels Mayer) mayer@hplnpm
  * Language:     C
  * Package:      N/A
  * Status:       X11r4 contrib tape release
***************
*** 350,355
  #define xlga_xttranslations() (testarg(typearg(xttranslations_p)))
  #define xlga_xtaccelerators() (testarg(typearg(xtaccelerators_p)))
  #define xlga_evhandlerobj()   (testarg(typearg(evhandlerobj_p)))
  #endif
  
  /* function definition structure */

--- 350,356 -----
  #define xlga_xttranslations() (testarg(typearg(xttranslations_p)))
  #define xlga_xtaccelerators() (testarg(typearg(xtaccelerators_p)))
  #define xlga_evhandlerobj()   (testarg(typearg(evhandlerobj_p)))
+ #define xlga_xmstring()     (testarg(typearg(xmstring_p)))
  #endif
  
  /* function definition structure */


-------------------------------------------------------------------------------
	    Niels Mayer -- hplabs!mayer -- mayer@hplabs.hp.com
		  Human-Computer Interaction Department
		       Hewlett-Packard Laboratories
			      Palo Alto, CA.
				   *