# 
# Copyright (C) 1994, Enterprise Integration Technologies Corp. and Niels Mayer.
# WINTERP 1.15-1.99, Copyright (c) 1993, Niels P. Mayer.
# WINTERP 1.0-1.14, Copyright (c) 1989-1992 Hewlett-Packard Co. and Niels Mayer.
# 
# 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 Enterprise Integration Technologies,
# Hewlett-Packard Company, or Niels Mayer not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. Enterprise Integration Technologies, Hewlett-Packard
# Company, and Niels Mayer makes no representations about the suitability of
# this software for any purpose.  It is provided "as is" without express or
# implied warranty.
# 
# ENTERPRISE INTEGRATION TECHNOLOGIES, HEWLETT-PACKARD COMPANY AND NIELS MAYER
# DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL ENTERPRISE
# INTEGRATION TECHNOLOGIES, HEWLETT-PACKARD COMPANY OR NIELS MAYER 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.
#

DONE>> SGI only WIDGET: SG_FINDER_WIDGET_CLASS
DONE>> 
DONE>> Methods:
DONE>> 
DONE>>  * (send <finder_widget> :ADD_HISTORY_ITEM <string>)
DONE>>  *	==> returns <finder_widget>
DONE>>  *
DONE>>  * Method :ADD_HISTORY_ITEM adds STRING item <string> to the Finder history
DONE>>  * list at the top position.  When the item is inserted into the list,
DONE>>  * it is compared with the current items. If the new item matches an item on
DONE>>  * the selected Finder, the item is removed from the old position, so it is
DONE>>  * not duplicated in the history list.
DONE>>  * --------------------------------------------------------------------------
DONE>>  * void SgFinderAddHistoryItem(Widget w, char* str);
DONE>> 
DONE>> 
DONE>>  * (send <finder_widget> :CLEAR_HISTORY)
DONE>>  * 
DONE>>  * Method :CLEAR_HISTORY deletes all items from the Finder's history list.
DONE>>  * --------------------------------------------------------------------------
DONE>>  * void SgFinderClearHistory( Widget w );
DONE>> 
DONE>> 
DONE>>  * (send <finder_widget> :GET_STRING)
DONE>>  *	==> returns a STRING
DONE>>  * 
DONE>>  * Method :GET_STRING accesses the string value of the Finder widget.
DONE>>  * --------------------------------------------------------------------------
DONE>>  * char* SgFinderGetTextString( Widget w );
DONE>> 
DONE>>  * (send <finder_widget> :SET_STRING <string>)
DONE>>  *	==> returns <finder_widget>
DONE>>  *
DONE>>  * Method :SET_STRING sets the string value of the Finder widget.
DONE>>  * It also calls the widget's :XMN_VALUE_CHANGED_CALLBACK and
DONE>>  * :XMN_ACTIVATE_CALLBACK.
DONE>>  * --------------------------------------------------------------------------
DONE>>  * void SgFinderSetTextString(Widget w, char* value);
DONE>> 
DONE>>  * (send <finder_widget> :GET_CHILD <child_sym>)
DONE>>  *	==> returns a WIDGETOBJ corresponding to a SgFinder child.
DONE>>  *
DONE>>  * <child_sym> can be one of the following keyword symbols:
DONE>>  *           :DROP_POCKET, :TEXT, :ZOOM_BAR, or :HISTORY_MENUBAR.
DONE>>  *
DONE>>  * Method :GET_CHILD is used to access a widget component within a Finder.
DONE>>  * The parameters given to the function are the Finder widget and a value
DONE>>  * indicating which component to access.
DONE>>  *
DONE>>  * The Finder widget generally provides the functionality and access to
DONE>>  * child behavior through other means.  Accessing the children of the
DONE>>  * Finder and modifying their callbacks or resources significantly may
DONE>>  * cause unpredictable results.  It is suggested that applications not
DONE>>  * modify the state of the Finder children.
DONE>>  * ----------------------------------------------------------------------------
DONE>>  * Widget SgFinderGetChild(Widget w, int child);
DONE>> 
DONE>> New Resources:
DONE>> 
DONE>> X SgNhistoryPixmap		Pixmap
DONE>> X SgNseparator			unsigned char
DONE>> X /* SgNsetTextSectionFunc */ -- notused
DONE>> X SgNuseDropPocket		Boolean
DONE>> X SgNuseHistoryMenu		Boolean
DONE>> 
DONE>> already defined resources:
DONE>> X XmNvalueChangedCallback
DONE>> X XmNactivateCallback
DONE>> X XmNbottomShadowColor
DONE>> X XmNbottomShadowPixmap
DONE>> X XmNforeground
DONE>> X XmNhelpCallback
DONE>> X XmNhighlightColor
DONE>> X XmNhighlightPixmap
DONE>> --> XmNinitialFocus
DONE>> X XmNnavigationType
DONE>> X XmNshadowThickness
DONE>> X XmNstringDirection
DONE>> X XmNtopShadowColor
DONE>> X XmNtopShadowPixmap
DONE>> X XmNtraversalOn
DONE>> X XmNunitType
DONE>> ... XmNuserData
DONE>> ... XmNchildren
DONE>> ... XmNinsertPosition
DONE>> ...XmNnumChildren
DONE>> X XmNaccelerators
DONE>> X XmNancestorSensitive
DONE>> X XmNbackground
DONE>> X XmNbackgroundPixmap
DONE>> X XmNborderColor
DONE>> X XmNborderPixmap
DONE>> X XmNborderWidth
DONE>> X XmNcolormap
DONE>> X XmNdepth
DONE>> X XmNdestroyCallback
DONE>> X XmNheight
DONE>> X XmNinitialResourcesPersistent
DONE>> X XmNmappedWhenManaged
DONE>> X XmNscreen
DONE>> X XmNsensitive
DONE>> X XmNtranslations
DONE>> X XmNwidth
DONE>> X XmNx
DONE>> X XmNy
DONE>> 
DONE>> 
DONE>> --------------------
DONE>> 
DONE>> SGI only WIDGET: SG_DROP_POCKET_WIDGET_CLASS
DONE>> 
DONE>> Methods :ADD_CALLBACK, :SET_CALLBACK:
DONE>>  * Same as WIDGET_CLASS's :add_callback method except that this understands
DONE>>  * how to get values from the SgDropPocketCallbackStruct.
DONE>>  * Specifying one or more of the following symbols in the callback bindings 
DONE>>  * list will bind that symbol's value in the lexical environment of the callback:
DONE>>  * CALLBACK_WIDGET
DONE>>  * CALLBACK_REASON
DONE>>  * CALLBACK_XEVENT
DONE>>  * CALLBACK_WINDOW
DONE>>  * CALLBACK_ICON_NAME
DONE>>  * CALLBACK_ICON_DATA
DONE>> 
DONE>> New resources:
DONE>> :SGN_NAME 			== SgNname			XmString
DONE>> :SGN_ACTIVE_PIXEL		== SgNactivePixel		XmRPixel
DONE>> :SGN_ICON_DATA_BASE_PATH	== SgNiconDataBasePath		XmRString
DONE>> :SGN_ICON_UPDATE_CALLBACK	== SgNiconUpdateCallback	XmRCallback
DONE>> 
DONE>> (inherited resources:)
DONE>> . XmNbottomShadowColor
DONE>> . XmNbottomShadowPixmap
DONE>> . XmNforeground
DONE>> . XmNhelpCallback
DONE>> . XmNhighlightColor
DONE>> . XmNhighlightOnEnter
DONE>> . XmNhighlightPixmap
DONE>> . XmNhighlightThickness
DONE>> . XmNnavigationType
DONE>> . XmNshadowThickness
DONE>> . XmNtopShadowColor
DONE>> . XmNtopShadowPixmap
DONE>> . XmNtraversalOn
DONE>> . XmNunitType
DONE>> . XmNuserData
DONE>> . XmNaccelerators
DONE>> . XmNancestorSensitive
DONE>> . XmNbackground
DONE>> . XmNbackgroundPixmap
DONE>> . XmNborderColor
DONE>> . XmNborderPixmap
DONE>> . XmNborderWidth
DONE>> . XmNcolormap
DONE>> . XmNdepth
DONE>> . XmNdestroyCallback
DONE>> . XmNheight
DONE>> . XmNinitialResourcesPersistent
DONE>> . XmNmappedWhenManaged
DONE>> . XmNscreen
DONE>> . XmNsensitive
DONE>> . XmNtranslations
DONE>> . XmNwidth
DONE>> . XmNx
DONE>> . XmNy

--------------------

DONE>> XM_GRAPH_WIDGET_CLASS XM_ARC_WIDGET_CLASS
DONE>> ...methods
DONE>> ...resources

--------------------

DONE>> XM_TABLE_WIDGET_CLASS
DONE>> ...methods
DONE>> ...resources
DONE>> XtNlayout

--------------------

DONE>> TANGO:WIDGET_CLASS, all the TANGO:IMAGE_CLASS subclasses, etc
DONE>> ... methods.

--------------------

DONE>> * Describe new behavior of 'wl' and 'wl-tcpip':
DONE>> 	-- on successful eval of the command-line <sexp>, an exit status of
DONE>> 	   0 is returned, and the result of the evaluation is printed to
DONE>> 	   stdout of the 'wl' or 'wl-tcpip' client.
DONE>> 	-- when an error in evaluation of command-line <sexp> occurs,
DONE>> 	   an exit status of 128 is returned, and the following is printed
DONE>> 	   on stdout:
DONE>> 		"wl: an evaluation error occured in WINTERP server."
DONE>> 	-- if some other error occured, an exit status of 1 is returned and
DONE>>            a message is printed on stderr.

--------------------

wc_ScrolledW.c:
DONE>> /******************************************************************************
DONE>>  * (send <ScrolledWin_Widget> :SCROLL_VISIBLE <wid> <hor-margin> <ver-margin>)
DONE>>  * ==> returns <ScrolledWin_Widget>....
DONE>>  *
DONE>>  * Method :SCROLL_VISIBLE makes WIDGETOBJ <wid>, an obscured or partially
DONE>>  * obscured widget or gadget descendant of a ScrolledWindow work area visible.
DONE>>  * The function repositions the work area and sets the specified margins
DONE>>  * (FIXNUMs <hor-margin> and <ver-margin>) between the widget and the nearest
DONE>>  * viewport boundary. The widget's location relative to the viewport determines
DONE>>  * whether one or both of the margins must be adjusted. This function requires
DONE>>  * that the XmNscrollingPolicy of the ScrolledWindow widget be set to XmAUTOMATIC.
DONE>>  *
DONE>>  * void XmScrollVisible(
DONE>>  *			Widget      	scrw,
DONE>>  *			Widget          wid,
DONE>>  *			Dimension       hor_margin, 
DONE>>  *			Dimension       ver_margin);
DONE>>  ******************************************************************************/

====================

DONE>> w_pixmap.c
DONE>>  * (GIF_TO_PIXMAP <gif-file-name-str> [:verbose])
DONE>>  *	==> returns a PIXMAP node...

====================

New functionality for Motif 1.2:

DONE>>  * (XM_GET_DESTINATION)
DONE>>  * 	==> Returns a WIDGETOBJ, "the widget to be used as the current
DONE>>  *	    destination for quick paste and certain clipboard operations."
DONE>>  *	    Returns NIL if "there is no current destination".
DONE>>  *
DONE>>  * See XmGetDestination.3X manual page for details.

DONE>> WIDGET_CLASS method :CHANGE_COLOR
DONE>>  * (send <widget> :CHANGE_COLOR <bg-color>)
DONE>>  *	==> Returns <widget>.
DONE>>  *
DONE>>  *	<widget> must be a widget; an XLISP error gets signalled if a gadget 
DONE>>  *      is used.
DONE>>  *
DONE>>  *	<bg-color> is a STRING or PIXEL value representing the desired color
DONE>>  *	for <widget>'s background. If a STRING value is given, it will be
DONE>>  *	converted to a pixel value based on color names given in
DONE>>  *	/usr/lib/X11/rgb.txt; alternately, one may specify the color
DONE>>  *	specification in hexadecimal as "#RRGGBB"...
DONE>>  *
DONE>>  * Given a new background color <bg-color>, method :CHANGE_COLOR recalculates
DONE>>  * the foreground, select, and shadow colors based on the new background color
DONE>>  * and sets the corresponding resources for the  widget. The new colors are
DONE>>  * based on Motif's default color calculation procedures.

==============================================================================

DONE>> Fix to winterp.doc: some resources listed as belonging to XM_FORM_WIDGET_CLASS
DONE>> are actually constraint resources from XmForm manager. Indicate this as such.

Likewise, also check for constraint resources on XM_PANED_WINDOW_WIDGET_CLASS.

==============================================================================
DONE>> added to w_resources.c -- resources for XmScrolledW (motif 1.2)
DONE>>   {":XMN_TRAVERSE_OBSCURED_CALLBACK", &resclass_XmRCallback, XmNtraverseObscuredCallback}, /* Xm/ScrolledW.c */

need to document XmTraverseObscuredCallbackStruct:
      A pointer to the following structure is passed to callbacks for
      XmNtraverseObscuredCallback.
      typedef struct
      {
        int                  reason;
        XEvent               *event:
        Widget               traversal_destination;
        XmTraversalDirection direction;
      } XmTraverseObscuredCallbackStruct;

==============================================================================
added to w_resources.c -- resources for XmRowColumn (Motif 1.2 only)

DONE>> This is a constraint resource on XmRowColumn children:
DONE>> {":XMN_POSITION_INDEX", &resclass_XmRCallback, XmNpositionIndex}, /* Xm/RowColumn.c */
DONE>> 
DONE>> {":XMN_TEAR_OFF_MENU_ACTIVATE_CALLBACK", &resclass_XmRCallback, XmNtearOffMenuActivateCallback}, /* Xm/RowColumn.c */
DONE>> {":XMN_TEAR_OFF_MENU_DEACTIVATE_CALLBACK", &resclass_XmRCallback, XmNtearOffMenuDeactivateCallback}, /* Xm/RowColumn.c */
DONE>> 
DONE>> {":XMN_ENTRY_VERTICAL_ALIGNMENT", &resclass_XmRVerticalAlignment, XmNentryVerticalAlignment}, /* Xm/RowColumn.c */
DONE>>   {":ALIGNMENT_BASELINE_TOP",	 XmALIGNMENT_BASELINE_TOP,	NULL},
DONE>>   {":ALIGNMENT_CENTER",		 XmALIGNMENT_CENTER,		NULL},
DONE>>   {":ALIGNMENT_BASELINE_BOTTOM", XmALIGNMENT_BASELINE_BOTTOM,	NULL},
DONE>>   {":ALIGNMENT_CONTENTS_TOP",	 XmALIGNMENT_CONTENTS_TOP,	NULL},
DONE>>   {":ALIGNMENT_CONTENTS_BOTTOM", XmALIGNMENT_CONTENTS_BOTTOM,	NULL},
DONE>> 
DONE>> {":XMN_TEAR_OFF_MODEL", &resclass_XmRTearOffModel, XmNtearOffModel}, /* Xm/RowColumn.c */
DONE>>   {":TEAR_OFF_ENABLED",		XmTEAR_OFF_ENABLED,	NULL},
DONE>>   {":TEAR_OFF_DISABLED",	XmTEAR_OFF_DISABLED,	NULL},

==============================================================================

added to w_resources.c -- constraint resources for XmFrame (Motif 1.2 only)

DONE>> {":XMN_CHILD_TYPE", &resclass_XmRChildType, XmNchildType}, /* Xm/Frame.c (constraint) 
DONE>>   {":FRAME_GENERIC_CHILD",	XmFRAME_GENERIC_CHILD,	NULL},
DONE>>   {":FRAME_WORKAREA_CHILD",	XmFRAME_WORKAREA_CHILD,	NULL},
DONE>>   {":FRAME_TITLE_CHILD",	XmFRAME_TITLE_CHILD,	NULL},

DONE>> {":XMN_CHILD_HORIZONTAL_ALIGNMENT", &resclass_XmRAlignment, XmNchildHorizontalAlignment}, /* Xm/DFrame.c (constraint resource, actually of class XmRChildHorizontalAlignment) */
DONE>> 	(add to XmRAlignment)
DONE>> 
DONE>> {":XMN_CHILD_VERTICAL_ALIGNMENT", &resclass_XmRChildVerticalAlignment, XmNchildVerticalAlignment}, /* Xm/Frame.c (constraint) */
DONE>>   {":ALIGNMENT_BASELINE_TOP",	XmALIGNMENT_BASELINE_TOP,	NULL},
DONE>>   {":ALIGNMENT_CENTER",		XmALIGNMENT_CENTER,		NULL},
DONE>>   {":ALIGNMENT_BASELINE_BOTTOM", XmALIGNMENT_BASELINE_BOTTOM,	NULL},
DONE>>   {":ALIGNMENT_WIDGET_TOP",	XmALIGNMENT_WIDGET_TOP,		NULL},
DONE>>   {":ALIGNMENT_WIDGET_BOTTOM",	XmALIGNMENT_WIDGET_BOTTOM,	NULL},
DONE>> 
DONE>> {":XMN_CHILD_HORIZONTAL_SPACING", &resclass_XmRHorizontalDimension, XmNchildHorizontalSpacing}, /* Xm/Frame.c(constraint) */

==============================================================================

DONE>> * Document new loadup features:
DONE>> 	-- always loads $HOME/.winterp (if not found, tries to load
DONE>> 	   lib-utils/initialize.lsp)
DONE>> 	-- if no lispInitFile or -init_file spec, loads $HOME/.winterpapp
DONE>> 
DONE>> * Explain that ~/.winterp is for storing global environment stuff, preferences,
DONE>> etc. it gets loaded prior to -init_file or ~/.winterpapp 
DONE>> 
DONE>> * ~/.winterpapp is for loading ctrlpnl, err-hook, etc. doesn't get loaded
DONE>> if -init_file or lispInitFile specified.


==============================================================================
Added to w_utils.c:
DONE>> 
DONE>> /******************************************************************************
DONE>>  * (GET_EVENT_COORDS <xevent>)
DONE>>  * 	--> Returns (<x-fixnum> . <y-fixnum>) or signals error
DONE>>  * <xevent> is an XEvent* as returned via symbol CALLBACK_XEVENT
DONE>>  * (bound via :ADD_CALLBACK or :SET_CALLBACK method), ACTION_XEVENT (bound in
DONE>>  * in the Lisp(...) ActionProc from a translation table), and EVHANDLER_XEVENT
DONE>>  * (bound via :ADD_EVHANDLER or :SET_EVHANDLER method).
DONE>> ******************************************************************************/
DONE>> 
DONE>> todo? add get_event_button, get_event_time, etc?, remove EVHANDLER_TIME and
DONE>> EVHANDLER_BUTTON symbols from XtAddEventHandler().

==============================================================================
added to utils.c:
DONE>> 
DONE>> /******************************************************************************
DONE>>  * (REQUIRE <module-name>)
DONE>>  * 	--> returns T if the requested module got loaded from a file.
DONE>>  *	    returns NIL if the requested module had previously been loaded
DONE>>  *	    (that is, (PROVIDE <module-name>) had been called).
DONE>>  *	    If the module couldn't be loaded, will signal an error.
DONE>>  *
DONE>>  *	<module-name> is a STRING, specifying the name of the file to load.
DONE>>  *	<module-name> can be the full path to the file (e.g. "/users/mayer/foo.lsp"),
DONE>>  *	or a filename plus extension (e.g. "lib-utils/unixstuf.lsp", or "foo.lsp"),
DONE>>  *	or a filename without extension (e.g. "lib-utils/unixstuf" or "foo").
DONE>>  *
DONE>>  * REQUIRE is typically used to load "libraries" in WINTERP. Library files
DONE>>  * which are to be loaded by REQUIRE should have a (PROVIDE <module-name>)
DONE>>  * at the end which tells REQUIRE the desired module has been loaded succesfully.
DONE>>  * REQUIRE will not load a file which has previously been PROVIDED, thus achieving
DONE>>  * the effect of only loading a given module once, even if a particular module
DONE>>  * is REQUIRE'd multiple times throughout the files that comprise a given
DONE>>  * application.
DONE>>  * 
DONE>>  * When REQUIRE determines that <module-name> hasn't previously been loaded, it
DONE>>  * uses the same mechanism and load paths as used by the XLISP LOAD command.
DONE>>  * First, the Unix environment variable "XLPATH" is consulted; if that isn't
DONE>>  * set, the X resource Winterp.lispLoadPath is consulted to retrieve a
DONE>>  * sequence of paths comprised of colon-separated paths (e.g.
DONE>>  * /users/mayer/:/users/mayer/tmp:/users/mayer/winterp/). If the required
DONE>>  * module isn't found on that path, the resource Winterp.lispLibDir is
DONE>>  * consulted to find another directory for the module. Finally, if the required
DONE>>  * module isn't found anywhere on the aforementioned paths, the current directory
DONE>>  * is searched for the requested file. If no file is found, an XLISP error is
DONE>>  * signalled.
DONE>>  *
DONE>>  * Note that (REQUIRE "lib-utils/unixstuf.lsp") will load file
DONE>>  * "unixstuf.lsp" even if (PROVIDE "lib-utils/unixstuf") had
DONE>>  * been called by a previous successful LOAD or REQUIRE of that file.
DONE>>  * (REQUIRE "lib-utils/unixstuf.lsp") will load the same file 
DONE>>  * twice, because "lib-utils/unixstuf.lsp" is not equal to
DONE>>  * "lib-utils/unixstuf". To avoid confusion on this you should
DONE>>  * always specify <module-name> for PROVIDE and REQUIRE without
DONE>>  * the ".lsp" extension  -- "<module-name>.lsp" is the filename that
DONE>>  * will get loaded by (REQUIRE <module-name>)...
DONE>>  *
DONE>>  * The global variable *MODULES* is set to a list of <module-name> which have
DONE>>  * been previously PROVIDE'd...
DONE>>  ******************************************************************************/
DONE>> 
DONE>> /******************************************************************************
DONE>>  * (PROVIDE <module-name>)
DONE>>  * 	--> returns NIL if <module-name> has already been PROVIDE'd;
DONE>>  *		    T   if <module-name> wasn't previously PROVIDE'd.
DONE>>  *
DONE>>  *	<module-name> is a STRING, specifying the name of a module/file that
DONE>>  *	has been loaded succesfully. <module-name> is typically
DONE>>  *	a filename plus extension (e.g. "lib-utils/unixstuf.lsp", or "foo.lsp"),
DONE>>  *	or a filename without extension (e.g. "lib-utils/unixstuf" or "foo").
DONE>>  *
DONE>>  * PROVIDE and REQUIRE are typically used to load "libraries" in WINTERP.
DONE>>  * Library files which are to be loaded by REQUIRE should have a
DONE>>  * (PROVIDE <module-name>) at the end which tells REQUIRE the desired module
DONE>>  * has been loaded succesfully. REQUIRE will not load a file which has
DONE>>  * previously been PROVIDED, thus achieving the effect of only loading a
DONE>>  * given module once, even if a particular module is REQUIRE'd multiple
DONE>>  * times throughout the files that comprise a given application.
DONE>>  *
DONE>>  * Note that (REQUIRE "lib-utils/unixstuf.lsp") will load file
DONE>>  * "unixstuf.lsp" even if (PROVIDE "lib-utils/unixstuf") had
DONE>>  * been called by a previous successful LOAD or REQUIRE of that file
DONE>>  * (REQUIRE "lib-utils/unixstuf.lsp") will load the same file 
DONE>>  * twice, because "lib-utils/unixstuf.lsp" is not equal to
DONE>>  * "lib-utils/unixstuf". To avoid confusion on this you should
DONE>>  * always specify <module-name> for PROVIDE and REQUIRE without
DONE>>  * the ".lsp" extension -- "<module-name>.lsp" is the filename that
DONE>>  * will get loaded by (REQUIRE <module-name>)...
DONE>>  *
DONE>>  * The global variable *MODULES* is set to a list of <module-name> which have
DONE>>  * been previously PROVIDE'd...
DONE>>  ******************************************************************************/
DONE>>
============================================================================== 

* Add docs for w_subprocess.c:
DONE>>  {"EXP_GET_PID",		S, Prim_EXP_GET_PID},
DONE>>  {"EXP_POPEN",			S, Prim_EXP_POPEN},
DONE>>  {"EXP_SPAWN",			S, Prim_EXP_SPAWN},
DONE>>  {"EXP_STTY_INIT",		S, Prim_EXP_STTY_INIT},
DONE>>   {"EXP_WAIT",			S, Prim_EXP_WAIT},
DONE>>   {"EXP_KILL",			S, Prim_EXP_KILL},

* w_inputCB.c:
DONE>>   {"XT_ADD_INPUT",		S, Wicb_Prim_XT_ADD_INPUT},
DONE>> 	modes: :READ, :WRITE, :EXCEPT, :READ_LINE_TO_STRING, :READ_SEXP_TO_USTREAM,
DONE>> 	binding syms: FDINPUTCB_FILE, FDINPUTCB, FDINPUTCB_STRING, FDINPUTCB_USTREAM
DONE>>   {"XT_REMOVE_INPUT",		S, Wicb_Prim_XT_REMOVE_INPUT},
DONE>>   {"INPUT_ACTIVE_P",		S, Wicb_Prim_INPUT_ACTIVE_P},

============================================================================== 
added to utils.c: 

DONE>> /******************************************************************************
DONE>>  * (REDIRECT_STDERR)
DONE>>  * 	--> returns an input-stream suitable for reading.
DONE>>  *
DONE>>  * The returned input-stream represents the text sent to the unix standard
DONE>>  * error (stderr), both for the WINTERP application and for any
DONE>>  * subprocesses invoked by WINTERP. This is typically used to trap error
DONE>>  * output from subprocesses and pop up a dialog indicating a problem.
DONE>>  *
DONE>>  * The stream can be used for reading by existing XLISP/WINTERP reading
DONE>>  * primitives, e.g. READ-LINE, READ-CHAR, FSCANF-FIXNUM, FSCANF-STRING,
DONE>>  * FSCANF-FLONUM, etc.
DONE>>  *
DONE>>  * The returned input-stream is non-blocking, which means you may read
DONE>>  * more than one character at a time without worrying about a deadlock.
DONE>>  * However, note that just because you've been able to read N characters
DONE>>  * in one read operation, doesn't mean you've read all characters output
DONE>>  * on STDERR. To retrieve the full contents, you need to keep on reading
DONE>>  * until you've hit EOF. 
DONE>>  *
DONE>>  * Instead of polling the stream (till hitting EOF) to see if more chars
DONE>>  * have been read, it is better to add an input callback via XT_ADD_INPUT
DONE>>  * and have the callback code read from the input-stream whenever there
DONE>>  * are characters to be read.
DONE>>  ******************************************************************************/

see examples/lib-utils/redir-err.lsp 

DONE>> /******************************************************************************
DONE>>  * (REDIRECT_STDOUT)
DONE>>  * 	--> returns an input-stream suitable for reading.
DONE>>  *
DONE>>  * This is just like REDIRECT_STDERR except that the returned input-stream
DONE>>  * represents the text sent to the unix standard output (stdout).
DONE>>  ******************************************************************************/

see examples/lib-utils/redir-out.lsp 

DONE>> /******************************************************************************
DONE>>  * (READ_EVAL_PRINT <ustream>)
DONE>>  * 	--> returns T if success, NIL if hit EOF, or FIXNUM if error.
DONE>>  *
DONE>>  * This gives programmatic access to the top-level read/eval/print routine.
DONE>>  * By top-level, I mean that it will act like the top-level R.E.P w/r/t
DONE>>  * using the global environment and setting up error and breakloop returns.
DONE>>  ******************************************************************************/

see examples/w_ctrlpnl.lsp

============================================================================== 

added to w_utils.c:

DONE>>  * (X_BELL [<volume>])
DONE>>  * 	--> RETURNS NIL
DONE>>  *
DONE>>  * <volume> is an optional FIXNUM argument ranging from -100 to 100. If the
DONE>>  * <volume> arg is not givem, it defaults to '0'. Note that for most cases
DONE>>  * '0' is a reasonable value, as it will allow the user to set up the X Window
DONE>>  * system to operate silently by setting the base bell volume negative via
DONE>>  * the 'xset' unix command.

==============================================================================

added to xlisp/unixstuf.c:

DONE>> /******************************************************************************
DONE>>  * (FFLUSH <output-stream>)
DONE>>  * 	--> returns T on success, else error
DONE>>  *
DONE>>  * Calls fflush(3S) on <output-stream>
DONE>>  ******************************************************************************/

Should also move docs from xlisp.doc to winterp.doc (remove xlisp.doc entirely).
DONE>>   {"FFLUSH",			S, Prim_FFLUSH},
DONE>>   {"FSCANF-FIXNUM",		S, Prim_FSCANF_FIXNUM},
DONE>>   {"FSCANF-FLONUM",		S, Prim_FSCANF_FLONUM},
DONE>>   {"FSCANF-STRING",		S, Prim_FSCANF_STRING},
DONE>>   {"SYSTEM",			S, Prim_SYSTEM},
DONE>>   {"PCLOSE",			S, Prim_PCLOSE},
DONE>>   {"POPEN",			S, Prim_POPEN},

DONE>> see examples/fifo-read.lsp and examples/fifo-write.lsp for a use...

==============================================================================
Should add some notes on building WINTERP into other applications -- See
compiler define -DWINTERP_EMBEDDED src-server/Makefile.hpux8 targets
'win-lib' and src/server/xlisp/Makefile.hpux8 'libWinterp.a' -- also should
add embedded-app directory to winterp/....

see hplnpm1:/d1/win-compiles/strudel/{embedded-app,src,src-server} and note
the following wrapper example in /d1/win-compiles/strudel/embedded-app/test.c:
	"
	#include <stdio.h>
	
	char* app_name;
	
	main( argc, argv )
	int argc;
	char *argv[];
	{
	  app_name = argv[0];
	  printf("Starting application %s with embedded WINTERP\n", app_name);
	  winterp_embedded_main(argc,argv);
	}
	
	int winterp_embedded_app_wrapup()
	{
	  printf("Exiting application %s with embedded WINTERP\n", app_name);
	  return 0;                     /* return 0 --> exit */
	}
	"

==============================================================================
DONE>> /*****************************************************************************
DONE>>  * (send <text_widget> :READ_FILE <filename>)
DONE>>  *	--> on success, returns a FIXNUM -- the length of the file;
DONE>>  *	    on failure to read file, signals an error.
DONE>>  ****************************************************************************/
DONE>> 
DONE>> /*****************************************************************************
DONE>>  * (send <text_widget> :WRITE_FILE <filename>)
DONE>>  *	--> on success, returns a FIXNUM -- the length of the file;
DONE>>  *	    on failure to write file, signals an error.
DONE>>  ****************************************************************************/
DONE>> 
DONE>> /*****************************************************************************
DONE>>  * (send <text_widget> :READ_FILE_GOTO_LINE <filename> <linenum> <highlight_p>)
DONE>>  *	--> on success, returns a FIXNUM -- the length of the file;
DONE>>  *	    on failure to read file, signals an error.
DONE>>  * <filename> is a string, the full path to the file to be read.
DONE>>  * <linenum> is a fixnum >=0, the line to display.
DONE>>  * <higlight_p> is a boolean, if non-NIL the highlight the selected line.
DONE>>  ****************************************************************************/
DONE>> 
DONE>> /*****************************************************************************
DONE>>  * (send <text_widget> :GOTO_LINE <linenum> <highlight_p>)
DONE>>  *	--> returns the FIXNUM position of the desired current line.
DONE>>  * <linenum> is a fixnum >=0, the line to display.
DONE>>  * <higlight_p> is a boolean, if non-NIL the highlight the selected line.
DONE>>  ****************************************************************************/
DONE>> 
DONE>> /*****************************************************************************
DONE>>  * (send <text_widget> :SEARCH <search-str>)
DONE>>  * 	--> returns NIL if <search-str> not found in <text-w>
DONE>>  *	    returns a FIXNUM == the position of the text on success.
DONE>>  ****************************************************************************/

DONE>> /*****************************************************************************
DONE>>  * (send <Shell_Widget_Instance> :MAP_RAISED)
DONE>>  *	==> returns <Shell_Widget_Instance>
DONE>>  *
DONE>>  * :MAPs the shell and all subwindows that have map requests, and raises 
DONE>>  * the shell to the top of the stacking order.
DONE>>  *
DONE>>  * extern XMapRaised(display, w)
DONE>>  * 	Display* display;
DONE>>  *	Window   w;
DONE>>  ****************************************************************************/
DONE>> 
DONE>> /*****************************************************************************
DONE>>  * (send <Shell_Widget_Instance> :RAISE_WINDOW)
DONE>>  *	==> returns <Shell_Widget_Instance>
DONE>>  *
DONE>>  * Raises the shell to the top of the stacking order, such that no other
DONE>>  * sibling windows obscure it.
DONE>>  *
DONE>>  * extern XRaiseWindow(display, w)
DONE>>  *	Display* display;
DONE>>  *	Window   w;
DONE>>  ****************************************************************************/
DONE>> 
DONE>> /*****************************************************************************
DONE>>  * (send <Shell_Widget_Instance> :LOWER_WINDOW)
DONE>>  *	==> returns <Shell_Widget_Instance>
DONE>>  *
DONE>>  * Lowers the shell to the bottom of the stacking order so that it doesn't 
DONE>>  * obscure any sibling windows.
DONE>>  *
DONE>>  * extern XLowerWindow(display, w)
DONE>>  *	Display* display;
DONE>>  *	Window	 w;
DONE>>  ****************************************************************************/

--------------------

DONE>>  * (WINTERP_SHOW_BUSY <busy_p>)
DONE>>  * when <busy_p> is non-NIL, a "busy cursor" will appear over all WINTERP
DONE>>  * related shells, popup-shells, and dialogues.
DONE>>  * when <busy_p> is NIL, the "busy cursor" will be removed.
DONE>>  *
DONE>>  * Note that this routine may be called multiple times (e.g. recursively),
DONE>>  * however, in order to undo the effects of calling the routine N times with
DONE>>  * <busy_p>==T, one will need to call N times with <busy_p>==NIL.
DONE>>  *
DONE>>  * On the N'th call with <busy_p>==NIL, this routine will return a FIXNUM
DONE>>  * indicating the number of enqueud ButtonPress/ButtonRelease/ButtonMotion/
DONE>>  * PointerMotion/KeyPress events that have been discarded. This is done because
DONE>>  * the application should not have been able to respond to events while "busy",
DONE>>  * and yet impatient users may "type ahead" enqueuing events that might cause
DONE>>  * erroneous actions to occur when the application begins processing events
DONE>>  * again. Discarding these events will prevent erroneous actions from occuring...
DONE>>  *
DONE>>  * For all other calls, with <busy_p>==T this routine returns NIL. For calls
DONE>>  * where <busy_p>==NIL but where the number of <busy_p>==NIL calls done so far
DONE>>  * do not match the number of <busy_p>==T calls, this routine will also return
DONE>>  * NIL.

--------------------

DONE>> * Add a note indicating that XmGetMenuCursor() isn't supported in WINTERP
DONE>> due to lack of a cursor type.

--------------------

DONE>> * new lisp constant *MOTIF_SUBREVISION*
DONE>> 	== 3 for Motif 1.1.3 or 1.1.4
DONE>> 	== 1 for Motif 1.1.1
DONE>> 	== 0 for Motif 1.0 or 1.1.0

--------------------

DONE>> * Indicate that Lisp input can be typed into terminal (winterp's stdin).
DONE>>	-enable_stdin_serv
DONE>>	-no_stdin_serv
DONE>>	and associated resources

--------------------

* Update XlispRef.doc to mention new features and changes in Xlisp 2.1c.
Current version of XlispRef.doc is mostly correct, as it is based on Xlisp 2.0.
Any volunteers?


the following from XlispRef.doc is now incorrect for xlisp 2.1c
| NOTE:
| There is a  &ALLOW-OTHER-KEYS  keyword in XLISP and Common LISP.  In the
| case of XLISP, this keyword is extraneous  since the default for keyword
| arguments is to allow other keys (without errors).


--------------------

DONE>> * add a new winterp resource -- 'initMessageString':
DONE>> 
DONE>>   The string displayed in the WINTERP "default window" at initialization time.
DONE>>   Note: display of initialization message-box is is not disabled by
DONE>>   "enableInitMsgs: FALSE"
DONE>> 
DONE>> * also new command line argument:
DONE>> 	[-init_message <string>]

--------------------

DONE>> * (send <widget> :FORCED_EXPOSE_UPDATE)
DONE>>   	==> returns <widget>
DONE>>   
DONE>>   This is useful in making popup dialogues visible before embarking on a long
DONE>>   computation. Although the Event loop in this method will not process timeouts
DONE>>   or events from input sources, it can and will process Lisp callbacks.
DONE>>   if an error or catch/throw causes a nonlocal exit from the callback, 
DONE>>   one may expect trouble. Be careful. 
DONE>> 
DONE>> 	NOTE: <widget> must not be a gadget. WINTERP will signal a XLISP
DONE>> 	error if :FORCED_EXPOSE_UPDATE is called on a gadget.

--------------------

DONE>> * Document new resource "lispLoadPath", "LispLoadPath"
DONE>> indicate that it is a colon separated path.
DONE>> 
DONE>> Also note:
DONE>>    * If there exists an environment variable XLPATH, it's value will override
DONE>>    * this resource. When searching for a file that is not fully qualified
DONE>>    * (not beginning w '/' or '.'), the path will be searched, then 
DONE>>    * <lispLibDir>/<file>, then ./<file>.
DONE>> 
DONE>> * Add new command-line flag to docs:
DONE>> "\t[-load_path <:-sparated-list-of-paths-to-load-dir>]\n");

DONE>> * Lisp file opening behavior:
DONE>> 	(1) if file begins w/ '/' or '.', then it is loaded, w/o path search
DONE>> 	(2) else lispLoadPath is searched
DONE>> 	(3) else lispLibDir is prepended to name and opened.
DONE>> 	(3) else attempt at opening in current directory.

DONE>> * Add to xlisp docs, perhaps add to WINTERP docs too:
DONE>> 	POPEN
DONE>> 	PCLOSE
DONE>> 	FSCANF-FIXNUM
DONE>> 	FSCANF-STRING
DONE>> 	FSCANF-FLONUM

==============================================================================

* also add:

DONE>>    ** WIDGETOBJP -- primitive to check if lisp value is a widget/gadget.
DONE>>    
DONE>>    	(WIDGETOBJP <expr>)
DONE>>    		--> returns T if argument is a WIDGETOBJ, else NIL.
DONE>>    
DONE>>    	WIDGETOBJP is a type predicate testing to see if a value is 
DONE>>    	a widget or gadget object. 
   
DONE>>    ** :EXISTS_P -- WIDGET_CLASS method to test if widget exists
DONE>>    
DONE>>    	(send <widget> :EXISTS_P)
DONE>>    		--> returns T if the widget exists (and hasn't been destroyed);
DONE>>    		    returns NIL if the widget has been destroyed 
DONE>>    		    or if the widget has never been initialized.
   
   
==============================================================================
DONE>>
DONE>> Update XLISP docs to indicate that for unix, load-pathlist passed in via
DONE>> envvar PATHNAMES uses ':' as separator, rather than ';' (for unix consistency).
DONE>>
==============================================================================
DONE>> 
DONE>> Document ability to trace callbacks with 
DONE>> (trace :xmn_activate_callback)  -- or any other valid XmRCallback resource
DONE>> (trace 'EVHANDLER)
DONE>> (trace 'FDINPUTCB)
DONE>> (trace 'XT_TIMEOUT)
DONE>> 
