#	Copyright (c) 1991, 1992 UNIX System Laboratories, Inc.
#	All Rights Reserved

#	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF
#	UNIX System Laboratories, Inc.
#	The copyright notice above does not evidence any
#	actual or intended publication of such source code.

#ident	"@(#)wksh:xmexamples/README	1.1"


This directory contains WKSH Motif example scripts.  Here is a short
explanation of the programs.  None of the programs is really robust
enough to be a final product at this time, and some features of some
programs are not implemented.  These are provided simply to show some
typical WKSH programming techniques.  Also, some of these programs
have hard-coded colors and fonts, which is not recommended for robust
product quality programs (resource files should be used instead).

wcalc
		A 4-function calculator with memory, square, square-root and
		reciprocal.  Does the math by spawning calls to awk.
helloworld
		The traditional UNIX System example program.
procs
		An example of creating an interface to a UNIX System command
		(ps).
timer
		A simple stopwatch style program.

progguide*
		The examples from the WKSH for Motif Programmer's Guide, 
		in the order that they are presented.  The number following
		the string progguide indicates the Chapter 3 figure number.
		So, progguide6 is Chapter 3 - Figure 6.

xmdata		An example of how to use the powerful DataOp command that
		recursively traverses widgets printing out or
		resetting widget data.

xmne		An example of how to use the MnemonicOp command that allows
		for automatic mnemonic selection.

xmfilesd	An example of how to use a FileSelectionDialog widget.

xmlist		An example of how to use List widget convenience routines.

xmtext		An example of how to use Text widget convenience routines.

xmmessages	An example of how to use the warn, fatal, confirm, working and
		prompt convenience routines for posting messages.

attach.c
		This is a trivial example of a user-attachable command.
		This will only work on systems with Dynamic Shared Objects,
		like SunOs 4.1 or SVR4, but not SVR3 or earlier versions.

		On a SVR4 system, you can compile this into a shared
		object by using the following command line:

			cc -G -K PIC -o libattach.so attach.c

		On SunOs 4.1 or later you make this a shared object
		by doing:

			cc -c -PIC attach.c
			ld -o libattach.so attach.o

		Then, from within WKSH, you can execute:

			libload ./libattach.so
			cmdload argprint

		And then you can just start using argprint as a ksh
		built-in command.

		Note that ./libattach.so is necessary because the dynamic
		library commands need a "full" path to find the library
		if it's not in /usr/lib or in your $LD_LIBRARY_PATH.
