[comp.sources.x] v04i037: xmtool -- X interface for ucbMail, Part02/03

argv@island.uu.net (Dan Heller) (06/30/89)

Submitted-by: Peter Chang <chang@eds.com>
Posting-number: Volume 4, Issue 37
Archive-name: xmtool/part02

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then feed it
# into a shell via "sh file" or similar.  To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix@uunet.uu.net if you want that tool.
# If this archive is complete, you will see the following message at the end:
#		"End of shell archive."
# Contents:  Imakefile Makefile README xmtool.man
# Wrapped by argv@maui on Thu Jun 29 18:33:58 1989
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'Imakefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Imakefile'\"
else
echo shar: Extracting \"'Imakefile'\" \(449 characters\)
sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
X           SRCS = xmtool.c
X           OBJS = xmtool.o
X       PROGRAMS = xmtool
X        DEFINES =
X       INCLUDES = 
X  SYS_LIBRARIES = $(TOP)/lib/libXaw.a $(TOP)/lib/libXmu.a \
X		  $(TOP)/lib/libXt.a $(TOP)/lib/libX11.a
X
X
XComplexProgramTarget(xmtool)
X
Xxmtool: $(TOP)/lib/libXaw.a \
X        $(TOP)/lib/libXmu.a \
X        $(TOP)/lib/libXt.a \
X        $(TOP)/lib/libX11.a
X
XMakeBug:
X	cp Makefile MakeBug.bak
X	make -f MakeBug.bak Makefile
X	rm MakeBug.bak
END_OF_FILE
if test 449 -ne `wc -c <'Imakefile'`; then
    echo shar: \"'Imakefile'\" unpacked with wrong size!
fi
# end of 'Imakefile'
fi
if test -f 'Makefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Makefile'\"
else
echo shar: Extracting \"'Makefile'\" \(6532 characters\)
sed "s/^X//" >'Makefile' <<'END_OF_FILE'
X# operating system:   SunOS 3.5
X
XBOOTSTRAPCFLAGS =
X             AS = as
X             CC = cc
X            CPP = /lib/cpp
X             LD = ld
X           LINT = lint
X        INSTALL = install
X           TAGS = ctags
X             RM = rm -f
X             MV = mv
X             LN = ln -s
X         RANLIB = ranlib
XRANLIBINSTFLAGS = -t
X             AR = ar clq
X             LS = ls
X       LINTOPTS = -axz
X    LINTLIBFLAG = -C
X           MAKE = make
XSTD_CPP_DEFINES =
X    STD_DEFINES = 
X
X###########################################################################
X# site-specific configuration parameters - edit site.def to change
X###########################################################################
X# definitions common to all Makefiles - do not edit
X
X          SHELL =  /bin/sh
X
X        DESTDIR =
X      USRLIBDIR = $(DESTDIR)/usr/lib
X         BINDIR = $(DESTDIR)/usr/bin/X11
X         INCDIR = $(DESTDIR)/usr/include/X11
X         ADMDIR = $(DESTDIR)/usr/adm
X         LIBDIR = $(USRLIBDIR)/X11
X     LINTLIBDIR = $(USRLIBDIR)/lint
X        FONTDIR = $(LIBDIR)/fonts
X       XINITDIR = $(LIBDIR)/xinit
X         XDMDIR = $(LIBDIR)/xdm
X         UWMDIR = $(LIBDIR)/uwm
X         AWMDIR = $(LIBDIR)/awm
X         TWMDIR = $(LIBDIR)/twm
X        MANPATH = $(DESTDIR)/usr/man
X  MANSOURCEPATH = $(MANPATH)/man
X         MANDIR = $(MANSOURCEPATH)n
X      LIBMANDIR = $(MANSOURCEPATH)3
X    XAPPLOADDIR = $(LIBDIR)/app-defaults
X
X   INSTBINFLAGS = -m 0755
X   INSTUIDFLAGS = -m 4755
X   INSTLIBFLAGS = -m 0664
X   INSTINCFLAGS = -m 0444
X   INSTMANFLAGS = -m 0444
X   INSTAPPFLAGS = -m 0444
X  INSTKMEMFLAGS = -m 4755
X        FCFLAGS = -t
X           DEFS = -DNOSCCS
X    CDEBUGFLAGS = -O $(DEFS)
X
X        PATHSEP = /
X         DEPEND = $(DEPENDSRC)/makedepend
X          IMAKE = $(IMAKESRC)/imake
X            RGB = $(RGBSRC)/rgb
X             FC = $(BDFTOSNFSRC)/bdftosnf
X      MKFONTDIR = $(MKFONTDIRSRC)/mkfontdir
X      MKDIRHIER = $(SCRIPTSSRC)/mkdirhier.sh
X
X         CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(STD_DEFINES) $(DEFINES)
X      LINTFLAGS = $(LINTOPTS) $(INCLUDES) $(STD_DEFINES) $(DEFINES) -DLINT
X        LDFLAGS = $(CDEBUGFLAGS) $(SYS_LIBRARIES) $(SYSAUX_LIBRARIES)
X            TOP = /usr/src/X11/X11R3
X      CLIENTSRC = $(TOP)/clients
X        DEMOSRC = $(TOP)/demos
X         LIBSRC = $(TOP)/lib
X        FONTSRC = $(TOP)/fonts
X     INCLUDESRC = $(TOP)/X11
X      SERVERSRC = $(TOP)/server
X        UTILSRC = $(TOP)/util
X     SCRIPTSSRC = $(UTILSRC)/scripts
X     EXAMPLESRC = $(TOP)/examples
X     CONTRIBSRC = $(TOP)/contrib
X         DOCSRC = $(TOP)/doc
X         RGBSRC = $(TOP)/rgb
X      DEPENDSRC = $(UTILSRC)/makedepend
X       IMAKESRC = $(UTILSRC)/imake
X       IRULESRC = $(UTILSRC)/imake.includes
X        XLIBSRC = $(LIBSRC)
X         XMUSRC = $(LIBSRC)
X     TOOLKITSRC = $(LIBSRC)
X     AWIDGETSRC = $(LIBSRC)
X     OLDXLIBSRC = $(LIBSRC)/oldX
X    BDFTOSNFSRC = $(FONTSRC)/bdftosnf
X   MKFONTDIRSRC = $(FONTSRC)/mkfontdir
X   EXTENSIONSRC = $(TOP)/extensions
X   EXTENSIONLIB = $(EXTENSIONSRC)/lib/libXext.a
X           XLIB = $(XLIBSRC)/libX11.a
X         XMULIB = $(XMUSRC)/libXmu.a
X        OLDXLIB = $(OLDXLIBSRC)/liboldX.a
X       XTOOLLIB = $(TOOLKITSRC)/libXt.a
X         XAWLIB = $(AWIDGETSRC)/libXaw.a
X       LINTXLIB = $(XLIBSRC)/llib-lX11.ln
X        LINTXMU = $(XMUSRC)/llib-lXmu.ln
X      LINTXTOOL = $(TOOLKITSRC)/llib-lXt.ln
X        LINTXAW = $(AWIDGETSRC)/llib-lXaw.ln
X       INCLUDES = -I$(TOP)
X      MACROFILE = Sun.macros
X   ICONFIGFILES = $(IRULESRC)/Imake.tmpl \
X			$(IRULESRC)/$(MACROFILE) $(IRULESRC)/site.def
X  IMAKE_DEFINES =
X      IMAKE_CMD = $(NEWTOP)$(IMAKE) -TImake.tmpl -I$(NEWTOP)$(IRULESRC) \
X			-s Makefile $(IMAKE_DEFINES)
X         RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \
X			.emacs_* tags TAGS make.log MakeOut
X
X###########################################################################
X# rules: 
X###########################################################################
X
X       INCLUDES = -I$(TOP)
X           SRCS = xmtool.c
XLOCAL_LIBRARIES = -lXaw -lXmu -lXt -lX
X
Xall: xmtool
X
Xxmtool: xmtool.o
X	$(CC) -o $@ xmtool.o $(LOCAL_LIBRARIES) $(LDFLAGS) -lm $(SYSLAST_LIBRARIES)
X
Xrelink::
X	$(RM) xmtool
X	$(MAKE) $(MFLAGS) xmtool
X
Xclean::
X	$(RM) xmtool
X
Xdepend:: $(DEPEND)
X
Xdepend::
X	$(DEPEND) -s "# DO NOT DELETE" -- $(CFLAGS) -- $(SRCS)
X
X$(DEPEND):
X	@echo "making $@"; \
X	cd $(DEPENDSRC); $(MAKE)
X
X###########################################################################
X# Imake.tmpl common rules for all Makefiles - do not edit
X
Xemptyrule::
X
Xclean::
X	$(RM_CMD) \#*
X
XMakefile:: $(IMAKE)
X
XMakefile:: Imakefile \
X	$(IRULESRC)/Imake.tmpl \
X	$(IRULESRC)/Imake.rules \
X	$(IRULESRC)/site.def \
X	$(IRULESRC)/$(MACROFILE)
X	-@if [ -f Makefile ]; then \
X	echo "$(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
X	$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
X	else exit 0; fi
X	$(IMAKE_CMD) -DTOPDIR=$(TOP)
X
X$(IMAKE):
X	@echo "making $@"; \
X	cd $(IMAKESRC); $(MAKE) BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS)
X
Xtags::
X	$(TAGS) -w *.[ch]
X	$(TAGS) -xw *.[ch] > TAGS
X
X###########################################################################
X# empty rules for directories that do not have SUBDIRS - do not edit
X
Xinstall::
X	@echo "install done"
X
Xinstall.man::
X	@echo "install.man done"
X
XMakefiles::
X
X###########################################################################
X# dependencies generated by makedepend
X
X# DO NOT DELETE
X
Xxmtool.o: /usr/include/stdio.h /usr/include/X11/Xatom.h
Xxmtool.o: /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h
Xxmtool.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
Xxmtool.o: /usr/include/X11/X.h /usr/include/X11/Xutil.h
Xxmtool.o: /usr/include/X11/Xresource.h /usr/include/X11/Xos.h
Xxmtool.o: /usr/include/strings.h /usr/include/sys/file.h
Xxmtool.o: /usr/include/sys/fcntl.h /usr/include/sys/time.h
Xxmtool.o: /usr/include/sys/time.h /usr/include/X11/Core.h
Xxmtool.o: /usr/include/X11/Composite.h /usr/include/X11/Constraint.h
Xxmtool.o: /usr/include/X11/StringDefs.h /usr/include/X11/Box.h
Xxmtool.o: /usr/include/X11/Clock.h /usr/include/X11/Xmu.h
Xxmtool.o: /usr/include/X11/Command.h /usr/include/X11/Label.h
Xxmtool.o: /usr/include/X11/Simple.h /usr/include/X11/copyright.h
Xxmtool.o: /usr/include/X11/Dialog.h /usr/include/X11/Form.h
Xxmtool.o: /usr/include/X11/Constraint.h /usr/include/X11/Load.h
Xxmtool.o: /usr/include/X11/Scroll.h /usr/include/X11/AsciiText.h
Xxmtool.o: /usr/include/X11/Text.h /usr/include/X11/VPaned.h
Xxmtool.o: /usr/include/X11/Viewport.h /usr/include/X11/Cardinals.h
Xxmtool.o: /usr/include/errno.h /usr/include/sys/errno.h /usr/include/signal.h
END_OF_FILE
if test 6532 -ne `wc -c <'Makefile'`; then
    echo shar: \"'Makefile'\" unpacked with wrong size!
fi
# end of 'Makefile'
fi
if test -f 'README' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'README'\"
else
echo shar: Extracting \"'README'\" \(4891 characters\)
sed "s/^X//" >'README' <<'END_OF_FILE'
X
X
X		         M A I L     T O O L
X
X
XA. Introduction
X
XThis is an approach that uses the X11 Release 3 Toolkit Intrinsics and Toolkit
XAthena Widgets to develop a front end tool for using the ucb mail program.
XIt has most of the features of the mail program. It is independent of the
XMH message handling system. The ucb mail program is the mail program that
Xhas the option -N that does not print initial header summary and the option
X-f that indicates the name of the file that replaces the system mailbox.
XThis mail tool does not apply to the other mail program Mail that does not
Xhave these options.
X
XFive files and two subdirectories are provided. They are
X
X   ./README     -- This file
X   ./xmtool.man -- The manual page for xmtool
X   ./Imakefile  -- The Imakefile that builds Makefile
X   ./Makefile   -- The Makefile that builds xmtool
X   ./xmtool.c   -- The source file for xmtool
X   ./bitmap     -- The subdirectory that contains 3 bitmap files
X   ./hlp	-- The subdirectory that contains 22 on-line help files
X
XThe software was developed on a Sun 3/60 under Sun OS 3.5 with color monitor. 
XIt runs well on a Sun 3/50 with black and white monitor. It also runs well
Xas a client for X servers running on Apollo, Dec, and Hp workstations.
X
X
XB. Makefile and the environment variable XMTOOLRESRC
X
XAfter you extract the sources, you need to do the following in order to get
Xa workable executable code running:
X
X1. Use imake to generate a Makefile. A sample Makefile for Sun machine
X   is included.
X
X2. In the Makefile, replace the TOPDIR by the absolute path of the directory
X   in your system that contains the X11 Release 3 libraries.
X   For example, if your system has the directory /filesys1/X11 that contains
X   a subdirectory lib and this subdirectory contains the libraries libXaw.a,
X   libXmu.a, libXt.a and libX11.a, then replace TOPDIR by /filesys1/X11.
X   Assume your system has the proper paths for the inclusion directories.
X   You can build the executable code xmtool.
X
X3. Before you run xmtool, you need to set up the C shell environment variable
X   XMTOOLRESRC that points to the absolute path of the directory that
X   contains the subdirectories bitmap and hlp such as
X
X	setenv XMTOOLRESRC path-name
X
X   When xmtool is being started, it gets the content of this environment 
X   variable in order to locate the bitmap files and help files.
X
X
XC. Help Files
X
XThere are 22 help files which contain step by step instructions about ways
Xto use the mail tool. When you are executing xmtool, you can view each of 
Xthese help files by selecting the help option from the menu display. Each 
Xof these file begins with a rough graphic description such as
X
X |-- message counter
X |    |-- upper limit
X |    |
X V    V
X--------------------------------------------------------------------------------
X|001|001|plus|minus|range|set counter|view|delete|save|input                   |
X--------------------------------------------------------------------------------
X--------------------------------------------------------------------------------
X|001|incr|select|reply to sender|reply to all|edit|create|...             |help|
X--------------------------------------------------------------------------------
X ^
X |-- increment unit
X
XThis is a description of the menu display and command selection.
XWhen you are executing xmtool, the boxes identified by plus, minus, range and
Xincr actually display icons instead of texts. Each of the boxes plus and incr 
Xdisplays an icon of the shape of a triangle pointing upward. The box minus
Xdisplays an icon of the shape of a triangle pointing downward. The box range
Xdisplays an icon of the shape of an arrow pointing upward to a horizontal line.
XThe boxes message counter, upper limit and increment unit are used for
Xdisplays only (implemented as label widgets). The box input is used for input
X(implemented as asciiString widget). All other boxes are used for command 
Xselection (implemented as command widgets).
X
XTo begin to learn xmtool, you will find it easier if you first read the help
Xfiles for message counter, set counter, view and/or increment unit. (See a
Xrecommended width of the window that displays these help files in the section
Xof Fonts)
X
XThe help files for view, delete, save and mail to list contain description
Xfor ways to handle single message. The help files for range, select and update 
Xcontain description for ways to handle multiple messages. The maximum number
Xof messages that xmtool handles is 999.
X
X
XD. Fonts
X
XXmtool is most suitable with the font 9x15 because it has been developed and
Xtested with this font. A recommended width of the window that displays the help 
Xfiles with this font is 110. Xmtool can be used with any of the other fonts that 
Xyour system supports.
X
X
XE. Comments
X
XSend comments, flames, etc to chang@edsews.eds.com or
X
XPeter Chang
XElectronic Data Systems Corporation
X750 Tower Drive
XTroy, MI 48007-7019
END_OF_FILE
if test 4891 -ne `wc -c <'README'`; then
    echo shar: \"'README'\" unpacked with wrong size!
fi
# end of 'README'
fi
if test -f 'xmtool.man' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'xmtool.man'\"
else
echo shar: Extracting \"'xmtool.man'\" \(1915 characters\)
sed "s/^X//" >'xmtool.man' <<'END_OF_FILE'
X
X
X
XXMTOOL(1)                 USER COMMANDS                 XMTOOL(1)
X
X
X
XNAME
X     xmtool - start the front end tool for the ucb mail command
X
XSYNOPSIS
X     xmtool [-f filename] [-fn font_name] [-display display_name]
X
XDESCRIPTION
X     Xmtool is an X Window System utility that serves as a  front
X     end  for the ucb mail command.  Xmtool allows X users handle
X     either single message or multiple messages.  Users can  per-
X     form  common  mail  commands  such  as  print  (view), save,
X     delete, edit, mail (mail to list),  reply  (reply  to  all),
X     Reply  (reply to sender). There are also other features such
X     as picking  a  set  of  messages  whose  headers  contain  a
X     specific  string  (update).  The  maximum number of messages
X     that xmtool handles is 999.
X
XOPTIONS
X     -f filename
X             Read messages from filename instead  of  the  system
X             mailbox.  If  present,  it must be the first option.
X             The path of  the  filename  may  be  relative.   The
X             length  of  the path of the filename can not be over
X             20 characters. You can use the  symbolic  link  (the
X             UNIX  command  "ln  -s")  to  handle  path of longer
X             length.
X
X     -fn font_name
X             Identify the font name. Any font of about  the  same
X             size as that of the font 9x15 is suitable.
X
X     -display display_name
X             Specify the server to connect to; see X(1).
X
XENVIRONMENT
X     DISPLAY To get default host and display number.
X
X     XMTOOLRESRC
X             To get the path of the directory that contains  bit-
X             map  and  hlp as subdirectories.  Must be set before
X             executing xmtool.
X
XCOPYRIGHT
X     Copyright 1989, Electronic Data Systems Corporation
X
XAUTHOR
X     Peter Chang, Electronic Data Systems Corporation
X
X
X
X
X
X
X
X
XX Version 11        Last change: 12 June 1989                   1
X
X
X
END_OF_FILE
if test 1915 -ne `wc -c <'xmtool.man'`; then
    echo shar: \"'xmtool.man'\" unpacked with wrong size!
fi
# end of 'xmtool.man'
fi
echo shar: End of shell archive.
exit 0