[comp.windows.x] Second posting of awm, Part05

jkh@ardent.UUCP (Jordan K. Hubbard) (06/16/88)

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 5 (of 17)."
# Contents:  awm/FocusChng.c awm/Makefile awm/MoveOpaque.c
#   awm/menu_sup.c awm/menus/menu.def.h awm/menus/menu.h
# Wrapped by jkh@ardent on Thu Jun 16 00:44:10 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'awm/FocusChng.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'awm/FocusChng.c'\"
else
echo shar: Extracting \"'awm/FocusChng.c'\" \(5353 characters\)
sed "s/^X//" >'awm/FocusChng.c' <<'END_OF_FILE'
X#ident   "%W% %G%"
X
X
X#ifndef lint
static char *rcsid_FocusChng_c = "$Header: FocusChng.c,v 1.1 88/06/15 15:26:00 jkh Exp $";
X#endif	lint
X
X#include "X11/copyright.h"
X/*
X *
X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
X *
X * Copyright 1987 by Jordan Hubbard.
X *
X *
X *                         All Rights Reserved
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose and without fee is hereby granted,
X * provided that the above copyright notice appear in all copies and that
X * both that copyright notice and this permission notice appear in
X * supporting documentation, and that the name of Ardent Computer
X * Corporation or Jordan Hubbard not be used in advertising or publicity
X * pertaining to distribution of the software without specific, written
X * prior permission.
X *
X */
X
X/*
X * MODIFICATION HISTORY
X *
X * 001 -- Jordan Hubbard, U.C. Berkeley.
X *   Hacks for autoraise and titles.
X * 002 -- Jordan Hubbard, Ardent Computer
X *   Window pixmap changes on focus in/out.
X */
X
X#include "awm.h"
X
X#if defined(sun) || defined(ibm032) || defined(titan)
X#include <sys/time.h>
X#else
X#include <time.h>
X#endif
X
HandleFocusIn(ev)
XXEvent *ev;
X{
X     XEnterWindowEvent *e = (XEnterWindowEvent *)ev;
X     Window w = e->window;
X     AwmInfoPtr awi;
X     XEvent event;
X     
X     Entry("HandleFocusIn")
X
X     if (!(Hilite || Autoraise) || Snatched)
X	 Leave(FALSE)
X     awi = GetAwmInfo(w);
X     if (!awi)  /* probably a menu or something */
X         Leave(FALSE)
X     w = awi->client;
X     if (FrameFocus && awi->frame)
X	  w = awi->frame;
X     /*
X      * Don't try to understand this, I sure don't. If someone wants to
X      * explain the vagaries of focus in/out and enter/leave to me, I'm
X      * all ears. What's here was derived from empirical data on what *usually*
X      * happens when the pointer moves between windows and the focus either
X      * does or doesn't follow it.
X      */
X     if ((FrameFocus && (e->detail == NotifyNonlinearVirtual ||
X			 e->detail == NotifyVirtual)) ||
X	 (e->mode == NotifyNormal && e->focus && e->detail != NotifyInferior)) {
X	  struct timeval foo;
X	  
X	  foo.tv_sec = 0;
X	  foo.tv_usec = RaiseDelay * 1000; 
X	  /*
X	   * Sleep for awhile to avoid race conditions and give any potential
X	   * leave events a chance to get here..
X	   */
X	  select(0, 0, 0, 0, &foo);
X	  /* Did we leave this window already? */
X	  if (XCheckTypedWindowEvent(dpy, w, LeaveNotify, &event)) {
X	       XPutBackEvent(dpy, &event);
X	       Leave(FALSE)
X	  }
X	  if (FrameFocus) {
X	       XSetInputFocus(dpy, awi->client, RevertToParent, CurrentTime);
X	       FocusSetByUser = TRUE;
X	  }
X	  /* light the border */
X	  if (Hilite) {
X	       if (BorderHilite)
X		    SetBorderPixmaps(w, SolidPixmap);
X	       if (awi->frame) {
X		    if (awi->bold) {
X			 XSetWindowBackgroundPixmap(dpy, awi->title,
X						    awi->bold);
X			 PaintTitle(w);
X		    }
X		    if (awi->BC_bold && BContext) {
X			 XSetWindowBackgroundPixmap(dpy, awi->frame,
X						    awi->BC_bold);
X			 XClearWindow(dpy, awi->frame);
X		    }
X	       }
X	  }
X	  /*
X	   * If Autoraise is set, raise that puppy..
X	   */
X	  if (Autoraise)
X	       XRaiseWindow(dpy, (awi->frame) ? awi->frame : awi->client);
X	  Leave(FALSE)
X     }
X     Leave(FALSE)
X}
X
HandleFocusOut(ev)
XXEvent *ev;
X{
X     XLeaveWindowEvent *e = (XEnterWindowEvent *)ev;
X     Window w = e->window;
X     AwmInfoPtr awi;
X     XEvent event;
X
X     Entry("HandleFocusOut")
X
X     awi = GetAwmInfo(w);
X     if (!awi) /* probably a menu or something */
X         Leave(FALSE)
X     w = awi->client;
X     if (FrameFocus && awi->frame)
X	  w = awi->frame;
X     if (!(Hilite || Autoraise) || Snatched)
X	 Leave(FALSE)
X     /*
X      * Don't try to understand this, I sure don't. If someone wants to
X      * explain the vagaries of focus in/out and enter/leave to me, I'm
X      * all ears. What's here was derived from empirical data on what *usually*
X      * happens when the pointer moves between windows and the focus either
X      * does or doesn't follow it.
X      */
X     if ((FrameFocus && (e->detail == NotifyNonlinearVirtual ||
X			 e->detail == NotifyVirtual)) ||
X	 (e->focus && e->mode == NotifyNormal && e->detail != NotifyInferior)) {
X	  /* Did we come back into this window? */
X	  if (XCheckTypedWindowEvent(dpy, w, EnterNotify, &event)) {
X	       XPutBackEvent(dpy, &event);
X	       Leave(FALSE)
X	  }
X	  if (FrameFocus) {
X	       XSetInputFocus(dpy, PointerRoot, None, CurrentTime);
X	       FocusSetByUser = FALSE;
X	  }
X	  /* set the window border to "gray" stipple */
X	  if (Hilite) {
X	       if (BorderHilite)
X		    SetBorderPixmaps(w, GrayPixmap);
X	       if (awi->frame) {
X		    if (awi->back)
X			 XSetWindowBackgroundPixmap(dpy, awi->title,
X						    awi->back);
X		    if (awi->BC_back && BContext) {
X			 XSetWindowBackgroundPixmap(dpy, awi->frame,
X						    awi->BC_back);
X			 XClearWindow(dpy, awi->frame);
X		    }
X		    PaintTitle(w);
X	       }
X	  }
X	  Leave(FALSE)
X     }
X     Leave(FALSE)
X}
X
void SetBorderPixmaps(w, pix)
Window w;
Pixmap pix;
X{
X     AwmInfoPtr awi;
X
X     Entry("SetBorderPixmaps")
X
X     awi = GetAwmInfo(w);
X     if (!awi)
X	  Leave_void
X     XSetWindowBorderPixmap(dpy, awi->client, pix);
X     if (awi->frame) {
X	  XSetWindowBorderPixmap(dpy, awi->title, pix);
X	  XSetWindowBorderPixmap(dpy, awi->frame, pix);
X     }
X     Leave_void
X}
END_OF_FILE
if test 5353 -ne `wc -c <'awm/FocusChng.c'`; then
    echo shar: \"'awm/FocusChng.c'\" unpacked with wrong size!
fi
# end of 'awm/FocusChng.c'
fi
if test -f 'awm/Makefile' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'awm/Makefile'\"
else
echo shar: Extracting \"'awm/Makefile'\" \(6455 characters\)
sed "s/^X//" >'awm/Makefile' <<'END_OF_FILE'
X#
X# Warning: the cpp used on this machine replaces
X# all newlines and multiple tabs/spaces in a macro
X# expansion with a single space.  Imake tries to
X# compensate for this, but is not always
X# successful.
X#
X
X#
X# This makefile is automatically generated by imake... do not modify
X# or you may lose your changes when imake generates makefiles again.
X# Ignore this message if you are not using imake.
X#
X
X            TOP = /usr/src/X.V11R2
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
X         RANLIB = ranlib
X             AR = ar clq
X             LS = ls
X       LINTOPTS = -axz
X    LINTLIBFLAG = -C
X           MAKE = make
X    STD_DEFINES =
X    CDEBUGFLAGS = -g
X        DESTDIR = /usr/X11
X
X        PATHSEP = /
X         DEPEND = $(DEPENDSRC)/makedepend
X          IMAKE = $(IMAKESRC)/imake
X            RGB = $(RGBSRC)/rgb
X         CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(STD_DEFINES) $(DEFINES)
X      LINTFLAGS = $(LINTOPTS) $(INCLUDES) $(STD_DEFINES) $(DEFINES) -DLINT
X        LDFLAGS = $(CDEBUGFLAGS) $(SYS_LIBRARIES) $(SYSAUX_LIBRARIES)
X   INSTUIDFLAGS = -m 4755
X   INSTLIBFLAGS = -m 0664
X   INSTINCFLAGS = -m 0444
X   INSTMANFLAGS = -m 0444
X   INSTAPPFLAGS = -m 0444
X
X      USRLIBDIR = $(DESTDIR)/lib
X         BINDIR = $(DESTDIR)
X         LIBDIR = $(USRLIBDIR)
X     LINTLIBDIR = $(USRLIBDIR)/lint
X         INCDIR = $(DESTDIR)/usr/include/X11
X        FONTDIR = $(LIBDIR)/fonts
X         AWMDIR = $(LIBDIR)/awm
X         UWMDIR = $(LIBDIR)/uwm
X         MANDIR = $(DESTDIR)/usr/man/mann
X    XAPPLOADDIR = $(LIBDIR)/app-defaults
X         ADMDIR = $(DESTDIR)/usr/adm
X
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     EXAMPLESRC = $(TOP)/examples
X     CONTRIBSRC = $(TOP)/contrib
X         DOCSRC = $(TOP)/doc
X      DEPENDSRC = $(UTILSRC)/makedepend
X       IMAKESRC = $(UTILSRC)/imake
X       IRULESRC = $(UTILSRC)/imake.includes
X         RGBSRC = $(UTILSRC)/rgb
X        XLIBSRC = $(LIBSRC)/X
X     TOOLKITSRC = $(LIBSRC)/Xt
X     AWIDGETSRC = $(LIBSRC)/Xaw
X     OLDXLIBSRC = $(LIBSRC)/oldX
X   EXTENSIONSRC = $(TOP)/extensions
X        XMANSRC = $(DOCSRC)/Xlib/Xman
X   EXTENSIONLIB = $(EXTENSIONSRC)/lib/libXext.a
X           XLIB = $(XLIBSRC)/libX11.a
X        OLDXLIB = $(OLDXLIBSRC)/liboldX.a
X       XTOOLLIB = $(TOOLKITSRC)/libXt.a
X         XAWLIB = $(AWIDGETSRC)/libXaw.a
X       LINTXLIB = $(XLIBSRC)/llib-lX11.ln
X      LINTXTOOL = $(TOOLKITSRC)/llib-lXt.ln
X        LINTXAW = $(AWIDGETSRC)/llib-lXaw.ln
X       INCLUDES = -I$(TOP)
X      MACROFILE = Sun.macros
X      IMAKE_CMD = $(NEWTOP)$(IMAKE) -TImake.tmpl \
X			-I$(NEWTOP)$(IRULESRC) \
X			-s Makefile
X         RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \
X			tags TAGS make.log
X
X       MENU_LIB = menus
X      MENU_ARCH = $(MENU_LIB)/rtlmenu.a
X     NEATEN_LIB = /grgr/neaten
X    NEATEN_ARCH = $(NEATEN_LIB)/neaten.a
X  SYS_LIBRARIES = -ll
X      OTHERSRCS = gram.y lex.l
X         YFLAGS = -d
X         HFILES = awm.h neaten.def.h neaten.ext.h support.h
X
X# Use these macros if you want the RTL Neaten package.
X# Also make sure that NEATEN_LIB points to the right place. See the README
X# file for instructions (though you can just define this and give it a shot).
X#       DEFINES = -DSYSFILE=\"$(AWMDIR)$(PATHSEP)system.awmrc\" -DNEATEN
X#       LOCAL_LIBRARIES = $(NEATEN_ARCH) $(MENU_ARCH) $(XLIB)
X
X# Use these macros if you don't want the RTL Neaten package.
X        DEFINES = -DSYSFILE=\"$(AWMDIR)$(PATHSEP)system.awmrc\"
X        LOCAL_LIBRARIES = $(MENU_ARCH) $(XLIB)
X
X# Define this if you're compiling XReadBitmapFileData with awm, rather
X# than with Xlib. No guarantees that this will work with all source trees.
X# To be totally sure, compile it with Xlib.
XXRDOBJ=XRdBitFD.o
X
X# Below is just for make noident, remove it if you've moved XRdBitFD.c
X# someplace else.
XXRDSRC=XRdBitFD.c
X
SRCS=	globals.c Beep.c Bindings.c CircleDown.c CircleUp.c\
X	Cursors.c Focus.c GetButton.c  GridBox.c Iconify.c Icons.c Lower.c\
X	Menu.c Move.c MoveOpaque.c NewIconify.c Pause.c Push.c Error.c\
X	Raise.c Refresh.c Resize.c Restart.c RubberBand.c StoreBox.c \
X	StoreZap.c XError.c awm.c FocusChng.c Titlebar.c errHndlr.c \
X	Grab.c menu_sup.c Gadget.c support.c exp_path.c Neaten.c
X
OBJS=	gram.o lex.o globals.o Beep.o Bindings.o CircleDown.o CircleUp.o\
X	Cursors.o Focus.o GetButton.o GridBox.o Iconify.o Icons.o Lower.o\
X	Menu.o Move.o MoveOpaque.o NewIconify.o Pause.o Push.o Error.o\
X	Raise.o Refresh.o Resize.o Restart.o RubberBand.o StoreBox.o \
X	StoreZap.o XError.o awm.o FocusChng.o Titlebar.o errHndlr.o \
X	Grab.o menu_sup.o Gadget.o support.o exp_path.o Neaten.o $(XRDOBJ)
X
X PROGRAM = awm
X
all:: awm
X
awm: $(OBJS) $(LOCAL_LIBRARIES)
X	$(RM) $@
X	$(CC) -o $@ $(OBJS) $(LOCAL_LIBRARIES) $(LDFLAGS)
X
relink::
X	$(RM) $(PROGRAM)
X	$(MAKE) $(MFLAGS) $(PROGRAM)
X
install:: awm
X	$(INSTALL) -c $(INSTALLFLAGS) awm $(BINDIR)
X
install:: awm.man
X	$(INSTALL) -c $(INSTMANFLAGS) awm.man $(MANDIR)/awm.n
X
depend:: $(DEPEND)
X
depend::
X	$(DEPEND) -s "# DO NOT DELETE" -- $(CFLAGS) -- $(SRCS)
X
X$(DEPEND):
X	@echo "making $(DEPENDSRC)"; \
X	cd $(DEPENDSRC); $(MAKE)
X
clean::
X	$(RM) $(PROGRAM)
X
install:: def.awmrc
X	$(INSTALL) -c $(INSTALLFLAGS) def.awmrc  $(LIBDIR)
X
X$(MENU_ARCH)::
X	@echo Making menu package...
X	@(cd $(MENU_LIB); make)
X	@echo done.
X
X$(NEATEN_ARCH)::
X	cp Makefile.rtl $(NEATEN_LIB)/Makefile
X	@echo Making Neaten package
X	@(cd $(NEATEN_LIB); make -f Makefile)
X	@echo done.
X
clean::
X	@echo Cleaning menus...
X	@(cd $(MENU_LIB); make clean)
X	@echo done.
X	rm -f y.tab.h
X
noident::
X	@echo Removing ident lines from awm...
X	@for i in $(SRCS) $(OTHERSRCS) $(HFILES) $(XRDSRC); do \
X	sed -e '/#ident/D' < $$i > /tmp/x.$$i && \
X	mv /tmp/x.$$i $$i ; \
X	done
X	@(cd $(MENU_LIB); make noident)
X	@echo done.
X
XXRdBitFD.o:
X	$(CC) -c -I$(XLIBSRC) -I$(TOP) -I$(INCLUDESRC) XRdBitFD.c
X
clean::
X	$(RM_CMD) \#*
X
Makefile:: $(IMAKE)
X
Makefile:: Imakefile \
X	$(IRULESRC)/Imake.tmpl \
X	$(IRULESRC)/Imake.rules \
X	$(IRULESRC)/$(MACROFILE)
X	-$(RM) Makefile.bak; $(MV) Makefile Makefile.bak
X	$(IMAKE_CMD) -DTOPDIR=$(TOP)
X
X$(IMAKE):
X	@echo "making $(IMAKESRC)"; \
X	cd $(IMAKESRC); $(MAKE)
X
tags::
X	$(TAGS) -w *.[ch]
X	$(TAGS) -xw *.[ch] > TAGS
X
install::
X	@echo "install done"
X
Makefiles::
X
END_OF_FILE
if test 6455 -ne `wc -c <'awm/Makefile'`; then
    echo shar: \"'awm/Makefile'\" unpacked with wrong size!
fi
# end of 'awm/Makefile'
fi
if test -f 'awm/MoveOpaque.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'awm/MoveOpaque.c'\"
else
echo shar: Extracting \"'awm/MoveOpaque.c'\" \(5295 characters\)
sed "s/^X//" >'awm/MoveOpaque.c' <<'END_OF_FILE'
X#ident   "%W% %G%"
X
X#ifndef lint
static char *rcsid_MoveOpaque_c = "$Header: MoveOpaque.c,v 1.1 88/06/15 15:26:34 jkh Exp $";
X#endif	lint
X
X#include "X11/copyright.h"
X/*
X *
X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
X *
X * Copyright 1987 by Jordan Hubbard.
X *
X *
X *                         All Rights Reserved
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose and without fee is hereby granted,
X * provided that the above copyright notice appear in all copies and that
X * both that copyright notice and this permission notice appear in
X * supporting documentation, and that the name of Ardent Computer
X * Corporation or Jordan Hubbard not be used in advertising or publicity
X * pertaining to distribution of the software without specific, written
X * prior permission.
X *
X */
X
X/*
X * Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
X *
X *                         All Rights Reserved
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose and without fee is hereby granted,
X * provided that the above copyright notice appear in all copies and that
X * both that copyright notice and this permission notice appear in
X * supporting documentation, and that the name of Digital Equipment
X * Corporation not be used in advertising or publicity pertaining to
X * distribution of the software without specific, written prior permission.
X *
X *
X * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
X * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
X * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
X * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
X * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
X * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
X * SOFTWARE.
X */
X
X
X
X/*
X * MODIFICATION HISTORY
X *
X * 000 -- M. Gancarz, DEC Ultrix Engineering Group
X * 001 -- Loretta Guarino Reid, DEC Ultrix Engineering Group,
X * Western Software Lab. Convert to X11.
X * 002 -- Jordan Hubbard, Ardent Computer
X *  Changed to work with awm.
X */
X
X#include "awm.h"
X
Boolean MoveOpaque(window, mask, button, x, y)
Window window;				/* Event window. */
int mask;				/* Button/key mask. */
int button;				/* Button event detail. */
int x, y;				/* Event mouse position. */
X{
X     int prev_x, prev_y;		/* Previous mouse location. */
X     int rbound, dbound;		/* potential right/down boundries */
X     int cur_x, cur_y;			/* Current mouse location. */
X     int win_x, win_y;			/* Current window location. */
X     int root_x;			/* Root window X location. */
X     int root_y;			/* Root window Y location. */
X     int ptrmask;			/* state of ptr when queried */
X     XWindowAttributes window_info;	/* Event window information. */
X     Window sub_window;			/* Query mouse event sub-window. */
X     Window root;			/* Query mouse event root. */
X     XEvent button_event;		/* Button event packet. */
X     
X     Entry("MoveOpaque")
X
X     /*
X      * Do not try to move the root window.
X      */
X     if (window == RootWindow(dpy, scr))
X	  Leave(FALSE)
X	    
X     /*
X      * Change the cursor.
X      */
X     grab_pointer();
X     
X     /*
X      * Gather info on the event window.
X      */
X     status = XGetWindowAttributes(dpy, window, &window_info);
X     if (status == FAILURE)
X	  Leave(FALSE)
X
X     /*
X      * Initialize movement variables.
X      */
X     prev_x = cur_x = x;
X     prev_y = cur_y = y;
X     win_x = window_info.x;
X     win_y = window_info.y;
X     rbound = ScreenWidth - (window_info.width + window_info.border_width);
X     dbound = ScreenHeight - (window_info.height + window_info.border_width);
X
X     /*
X      * Main loop.
X      */
X     while (TRUE) {
X	  
X	  /*
X	   * Check to see if we have a change in mouse button status.
X	   * This is how we get out of this "while" loop.
X	   */
X	  if (XCheckMaskEvent(dpy,
X			      ButtonPressMask | ButtonReleaseMask,
X			      &button_event)) {
X	       
X	       /*
X		* If the button event was something other than the
X		* release of the original button pressed, then move the
X		* window back to where it was originally.
X		*/
X	       if ((button_event.type != ButtonRelease) ||
X		   (((XButtonReleasedEvent *)&button_event)->button
X		    != button)) {
X		    ResetCursor(button);
X		    XMoveWindow(dpy, window, window_info.x, window_info.y);
X	       }
X	       ungrab_pointer();
X	       Leave(TRUE);
X	  }
X	  
X	  /*
X	   * Take care of all the little things that have changed; 
X	   * i.e., move the window, if necessary.
X	   */
X	  XQueryPointer(dpy, RootWindow(dpy, scr), 
X			&root, &sub_window, &root_x, &root_y, &cur_x, &cur_y, 
X			&ptrmask);
X	  if ((cur_x != prev_x) || (cur_y != prev_y)) {
X	       win_x += (cur_x - prev_x);
X	       win_y += (cur_y - prev_y);
X#ifdef titan /* align to 5x4 */
X	       win_x += (win_x % 5);
X	       win_y += (win_y % 4);
X#endif /* titan */
X	       if (Wall) {
X		    if (win_x < 0)
X			 win_x = 0;
X		    else if (win_x > rbound)
X			 win_x = rbound;
X		    if (win_y < 0)
X			 win_y = 0;
X		    else if (win_y > dbound)
X			 win_y = dbound;
X 	       }
X	       XMoveWindow(dpy, window, win_x, win_y);
X	       prev_x = cur_x;
X	       prev_y = cur_y;
X	  }
X     }
X}
END_OF_FILE
if test 5295 -ne `wc -c <'awm/MoveOpaque.c'`; then
    echo shar: \"'awm/MoveOpaque.c'\" unpacked with wrong size!
fi
# end of 'awm/MoveOpaque.c'
fi
if test -f 'awm/menu_sup.c' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'awm/menu_sup.c'\"
else
echo shar: Extracting \"'awm/menu_sup.c'\" \(6059 characters\)
sed "s/^X//" >'awm/menu_sup.c' <<'END_OF_FILE'
X#ident   "%W% %G%"
X
X#ifndef lint
static char *rcsid_menu_sup_c = "$Header: menu_sup.c,v 1.1 88/06/15 15:24:56 jkh Exp $";
X#endif  lint
X
X#include "X11/copyright.h"
X/*
X *
X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
X *
X * Copyright 1987 by Jordan Hubbard.
X *
X *
X *                         All Rights Reserved
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose and without fee is hereby granted,
X * provided that the above copyright notice appear in all copies and that
X * both that copyright notice and this permission notice appear in
X * supporting documentation, and that the name of Ardent Computer
X * Corporation or Jordan Hubbard not be used in advertising or publicity
X * pertaining to distribution of the software without specific, written
X * prior permission.
X *
X */
X
X#include "awm.h"
X#include <signal.h>
X#
X
X/* interface functions for RTL menus */
X
do_nothing()	/* like it says... */
X{
X}
X
Boolean check_booleans(menu, item)
RTLMenu menu;
RTLMenuItem item;
X{
X     Boolean *foo;
X
X     Entry("check_booleans")
X
X     foo = (Boolean *)RTLMenu_Data(menu, item);
X     Leave(*foo)
X}
X
Boolean toggle_booleans(menu, item)
RTLMenu menu;
RTLMenuItem item;
X{
X     Boolean *foo;
X
X     Entry("togglet_booleans")
X
X     foo = (Boolean *)RTLMenu_Data(menu, item);
X     *foo = !(*foo);
X     Leave(*foo)
X}
X
int do_shell(menu, item, window)	/* Do a shell command */
RTLMenu menu;
RTLMenuItem item;
Window window;			/* not used */
X{
X     char *cmd;
X     int status, pid, w;
X     register int (*istat)(), (*qstat)();
X
X     Entry("do_shell")
X
X     cmd = (char *)RTLMenu_Data(menu, item);
X     if ((pid = fork()) == 0) {
X	  setpgrp(0, 0);
X	  execl("/bin/sh", "sh", "-c", cmd, 0);
X	  _exit(127);
X     }
X     istat = signal(SIGINT, SIG_IGN);
X     qstat = signal(SIGQUIT, SIG_IGN);
X     while ((w = wait(&status)) != pid && w != -1);
X     if (w == -1)
X	  status = -1;
X     signal(SIGINT, istat);
X     signal(SIGQUIT, qstat);
X     Leave(status)
X}
X
int do_text(menu, item, window)
RTLMenu menu;
RTLMenuItem item;
Window window;
X{
X     char *buff;
X
X     Entry("do_text")
X
X     buff = (char *)RTLMenu_Data(menu, item);
X     XStoreBytes(dpy, buff, strlen(buff));
X     Leave_void
X}
X
int do_text_nl(menu, item, window)
RTLMenu menu;
RTLMenuItem item;
Window window;
X{
X     char *buff1, *buff2;
X
X     Entry("do_text_nl")
X
X     buff1 = (char *)RTLMenu_Data(menu, item);
X     buff2 = (char *)malloc(strlen(buff1) + 2);
X     strcpy(buff2, buff1);
X     strcat(buff2, "\n");
X     XStoreBytes(dpy, buff2, strlen(buff2));
X     free(buff2);
X     Leave_void
X}
X
int do_awm_func(menu, item, window)
RTLMenu menu;
RTLMenuItem item;
Window window;
X{
X     int x, y, button;
X     Boolean (*func)();
X
X     Entry("do_awm_func")
X
X     XSync(dpy, FALSE);
X     if (window == RootWindow(dpy, scr))
X          window = Select_Window(&x, &y, &button);
X     func = (Boolean(*)())RTLMenu_Data(menu, item);
X     Leave((*func)(window, 0, button, x, y))
X}
X
int do_imm_func(menu, item, window)
RTLMenu menu;
RTLMenuItem item;
Window window;
X{
X     Boolean (*func)();
X
X     Entry("do_imm_func")
X
X     func = (Boolean(*)())RTLMenu_Data(menu, item);
X     Leave((*func)(RootWindow(dpy, scr), 0, 0, 0, 0))
X}
X
MenuInfo *FindMenu(s)
register char *s;
X{
X     MenuLink *ml;
X
X     Entry("FindMenu")
X
X     for (ml = Menus; ml; ml = ml->next)
X	  if (!strcmp(s, ml->menu->name))
X	       Leave(ml->menu)
X     Leave((MenuInfo *) 0)
X}
X
RTLMenu create_menu(m)
MenuInfo *m;
X{
X     ActionLine *ln;
X     RTLMenuItem tmp;
X     MenuInfo *side_menu;
X
X     Entry("create_menu")
X
X     if (!m)
X	  yyerror("Internal error, create_menu passed null pointer");
X     /*
X      * Were we already created? This is possible if we were referenced
X      * by somebody created before us.
X      */
X     if (m->menu)
X	  Leave(m->menu)
X     m->menu = RTLMenu_Create();
X     /* make a name (or picture) label for this menu */
X     tmp = RTLMenu_Append_Call(m->menu, m->name, m->pixmapname, do_nothing, 0);
X     RTLMenu_Label_Entry(m->menu, tmp);
X     ln = m->line;
X     if (!ln) {
X	  yyerror("Internal error in create_menu.");
X	  fprintf(stderr, "Menu '%s' has no line list.\n", m->name);
X	  exit(1);
X     }
X     if (!ln->name && !ln->pixmapname) {
X	  fprintf(stderr, "awm: Action in menu '%s' has no name or backing pixmap\n",
X		  m->name);
X	  yyerror(".. aborting\n");
X	  exit(1);
X     }
X     while (ln) {
X	  switch (ln->type) {
X	  case IsVar:
X	       ln->item = RTLMenu_Append_Checkback(m->menu, ln->name,
X						   ln->pixmapname,
X						   check_booleans,
X						   toggle_booleans,
X						   ln->text);
X	       break;
X	       
X	  case IsImmFunction:
X	       ln->item = RTLMenu_Append_Call(m->menu, ln->name,
X					      ln->pixmapname,
X					      do_imm_func, ln->func);
X	       break;
X
X	  case IsUwmFunction:
X	       ln->item = RTLMenu_Append_Call(m->menu, ln->name,
X					      ln->pixmapname,
X					      do_awm_func, ln->func);
X	       break;
X
X	  case IsMenuFunction:
X	       if (!(side_menu = FindMenu(ln->text))) {
X		    fprintf(stderr, "Unknown menu \"%s\" referenced in ",
X			ln->text);
X		    yyerror(" ..");
X		    exit(1);
X	       }
X	       /* If we haven't created the referenced menu yet, create it now */
X	       if (!side_menu->menu)
X		    side_menu->menu = create_menu(side_menu);
X	       ln->item = RTLMenu_Append_Submenu(m->menu, ln->name,
X						 ln->pixmapname,
X						 side_menu->menu);
X	       break;
X	       
X	  case IsText:
X	       ln->item = RTLMenu_Append_Call(m->menu, ln->name,
X					      ln->pixmapname,
X					      do_text, ln->text);
X	       break;
X
X	  case IsTextNL:
X	       ln->item = RTLMenu_Append_Call(m->menu, ln->name,
X					      ln->pixmapname,
X					      do_text_nl, ln->text);
X	       break;
X	       
X	  case IsShellCommand:
X	       ln->item = RTLMenu_Append_Call(m->menu, ln->name,
X					      ln->pixmapname,
X					      do_shell, ln->text);
X	       break;
X	       
X	  default:
X	       fprintf(stderr, "create_menu, Unknown menu entry type %d\n",
X		  ln->type);
X	       break;
X	  }
X	  free(ln);
X	  ln = ln->next;
X     }
X     Leave(m->menu)
X}
END_OF_FILE
if test 6059 -ne `wc -c <'awm/menu_sup.c'`; then
    echo shar: \"'awm/menu_sup.c'\" unpacked with wrong size!
fi
# end of 'awm/menu_sup.c'
fi
if test -f 'awm/menus/menu.def.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'awm/menus/menu.def.h'\"
else
echo shar: Extracting \"'awm/menus/menu.def.h'\" \(6670 characters\)
sed "s/^X//" >'awm/menus/menu.def.h' <<'END_OF_FILE'
X#ident   "%W% %G%"
X
X/*
X#ifndef lint
static char sccs_id[] = "@(#)menu.define.h	2.1 12/16/87  Siemens Corporate Research and Support, Inc.";
X#endif
X*/
X
X
X/*
X  RTL Menu Package Version 1.0
X  by Joe Camaratta and Mike Berman, Siemens RTL, Princeton NJ, 1987
X
X  menu.h: macros for menu package
X
X#include "X11/copyright.h"
X/*
X *
X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
X *
X * Copyright 1987 by Jordan Hubbard.
X *
X *
X *                         All Rights Reserved
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose and without fee is hereby granted,
X * provided that the above copyright notice appear in all copies and that
X * both that copyright notice and this permission notice appear in
X * supporting documentation, and that the name of Ardent Computer
X * Corporation or Jordan Hubbard not be used in advertising or publicity
X * pertaining to distribution of the software without specific, written
X * prior permission.
X *
X */
X
X/*
X
Copyright 1987 by
X	Siemens Corporate Research and Support, Inc., Princeton, New Jersey
X
Permission to use, copy, modify, and distribute this software
and its documentation for any purpose and without fee is
hereby granted, 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 Siemens not be used in advertising or
publicity pertaining to distribution of the software without
specific, written prior permission.  Siemens makes no
representations about the suitability of this software for any
purpose.  It is provided "as is" without express or implied
warranty.
X
X*/
X
X#ifndef bool
X#define bool	unsigned
X#endif 
X
X#ifndef FALSE
X#define	FALSE			0
X#define	TRUE			1
X#endif
X
X/* Menu data structure access macros */
X
X#define MenuWidth(menu) (menu)->menuWidth
X#define MenuHeight(menu) (menu)->menuHeight
X#define MenuOldWidth(menu) (menu)->menuOldWidth
X#define MenuOldHeight(menu) (menu)->menuOldHeight
X#define MenuItemWidth(menu) (menu)->menuItemWidth
X#define MenuFlags(menu) (menu)->menuFlags
X#define MenuMaxTextWidth(menu) (menu)->menuMaxTextWidth
X#define MenuBorderWidth(menu) MBorderWidth
X#define MenuOldBorderWidth(menu) (menu)->menuOldBorderWidth
X#define MenuItemPad(menu) MPad
X#define MenuDisplay(menu) (menu)->display
X#define MenuScreen(menu) (menu)->screen
X#define MenuWindow(menu) (menu)->menuWindow
X#define MenuCursor(menu) (menu)->menuCursor
X#define MenuSavedPixmap(menu) (menu)->savedPixmap
X#define MenuSavedImage(menu) ((menu)->savedImage)
X#define MenuSavedImageX(menu) (menu)->menuSavedImageX
X#define MenuSavedImageY(menu) (menu)->menuSavedImageY
X#define MenuItems(menu) (menu)->menuItems
X#define MenuFontInfo(menu) (menu)->menuFontInfo
X#define MenuNormalGC(menu) (menu)->normalGC
X#define MenuInvertGC(menu) (menu)->invertGC
X#define MenuHighlightedGC(menu) (menu)->highlightedGC
X#define MenuGreyGC(menu) (menu)->greyGC
X#define MenuGreyPixmap(menu) (menu)->greyPixmap
X#define MenuCheckmarkPixmap(menu) (menu)->checkmarkPixmap
X#define MenuArrowPixmap(menu) (menu)->arrowPixmap
X#define MenuInitialItemText(menu) (menu)->menuInitialItemText
X#define MenuItemHighlighted(menu) (menu)->highlightedItem
X#define MenuNested(menu) (menu)->menuNested
X#define MenuX(menu) (menu)->menuX
X#define MenuY(menu) (menu)->menuY
X#define MenuParent(menu) (menu)->parentMenu
X#define MenuDelta(menu) MDelta
X#define MenuOptions(menu) (menu)->menuOptions
X#define NULLMENU ((Menu *) NULL)
X
X/* Menu predicates */
X
X#define MenuIsNull(menu) (menu == NULLMENU)
X#define MenuIsDisplayed(menu) (menu->menuFlags & menuMapped)
X#define MenuHasInitialItem(menu) (menu->menuInitialItemText != (char *) NULL)
X
X/* Menu modifiers */
X
X#define SetHighlightItem(menu, item) (menu->highlightedItem = item)
X#define ResetHighlightItem(menu) (menu->highlightedItem = NULLITEM)
X#define	SetMenuEventHandler(menu,f)	menu->menuEventHandler = f
X#define SetMenuFlag(menu, flag)     MenuFlags(menu) |= flag
X#define ResetMenuFlag(menu,flag)    MenuFlags(menu) &= ~flag
X#define TestMenuFlag(menu,flag)     (MenuFlags(menu) & flag)
X#define TestOptionFlag(menu,option) (MenuOptions(menu) & option)
X
X/* Item data structure access macros */
X
X#define ItemFlags(item) (item)->itemFlags
X#define ItemText(item) (item)->itemText
X#define ItemTextLength(item) (item)->itemTextLength
X#define ItemTextWidth(item) (item)->itemTextWidth
X#define ItemNext(item) (item)->nextItem
X#define ItemSubmenu(item) (item)->itemSubmenu
X#define ItemTag(item) (item)->itemTag
X#define ItemGenerator(item) (item)->generator
X#define ItemGeneratorParamPointer(item) (item)->genParamPointer
X#define ItemCheckproc(item) (item)->checkproc
X#define ItemCallback(item) (item)->itemCallback
X#define ItemData(item) (item)->itemData
X#define ItemWindow(item) (item)->itemWindow
X#define ItemMenu(item) (item)->itemMenu
X#define NULLITEM ((MenuItem *) NULL)
X#define ItemGetArrowPosition(item) (item->itemMenu->menuWidth - arrow_width)
X
X/* Item predicates */
X#define ItemIsNull(item) (item == NULLITEM)
X#define ItemIsInitialItem(menu, item) \
X    (MenuInitialItemText(menu) && \
X     (strcmp(MenuInitialItemText(menu), ItemText(item)) == 0))
X#define ItemIsLeaf(item) ((item->itemSubmenu == (Menu *) 0) ? TRUE : FALSE)
X#define ItemIsDisabled(item) (ItemFlags(item) & itemDisabled)
X#define ItemIsDeaf(item) (ItemFlags(item) & itemDeaf)
X
X/* Item modifiers */
X
X#define	CheckItem(menu,item)	SetItemCheck(menu,item,1)
X#define	DisableItem(menu,item)	SetItemDisable(menu,item,1)
X#define	EnableItem(menu,item)	SetItemDisable(menu,item,0)
X#define	UncheckItem(menu,item)	SetItemCheck(menu,item,0)
X#define SetItemFlag(item, flag) ItemFlags(item) |= flag
X#define ResetItemFlag(item,flag) ItemFlags(item) &= ~flag
X#define TestItemFlag(item,flag) (ItemFlags(item) & flag)
X#define MoveItemFlag(item,flag1,flag2) \
X    if (TestItemFlag(item,flag1))\
X        SetItemFlag(item,flag2);\
X    else\
X        ResetItemFlag(item,flag2);\
X    ResetItemFlag(item,flag1);
X
X/* Masks */
X
X#define MenuEventMask (LeaveWindowMask | EnterWindowMask | ButtonReleaseMask)
X#define NormalItemEventMask MenuEventMask
X#define SubmenuItemEventMask (MenuEventMask | PointerMotionMask)
X#define MenuIgnoreMask (unsigned long) 0
X
X/* Magic numbers */
X
X#define	checkMarkWidth		9
X#define	checkMarkHeight		8
X#define	defaultCursorWidth     16
X#define	defaultCursorHeight    16
X#define	defaultCursorX		1
X#define	defaultCursorY		1
X#define	lineSeparatorHeight	9
X
X/* external declarations */
X
extern Menu *NewMenu();
extern MenuItem *TrackMenu ();
extern MenuItem *MenuItemByName (), *Display_Menu(); 
extern void InitMenu ();
extern void DisposeMenu ();
extern void Draw_Menu();
END_OF_FILE
if test 6670 -ne `wc -c <'awm/menus/menu.def.h'`; then
    echo shar: \"'awm/menus/menu.def.h'\" unpacked with wrong size!
fi
# end of 'awm/menus/menu.def.h'
fi
if test -f 'awm/menus/menu.h' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'awm/menus/menu.h'\"
else
echo shar: Extracting \"'awm/menus/menu.h'\" \(6217 characters\)
sed "s/^X//" >'awm/menus/menu.h' <<'END_OF_FILE'
X#ident   "%W% %G%"
X
X/*
X#ifndef lint
static char sccs_id[] = "@(#)menu.h	2.1 12/16/87  Siemens Corporate Research and Support, Inc.";
X#endif
X*/
X
X
X/* 
X  RTL Menu Package Version 1.0
X  by Joe Camaratta and Mike Berman, Siemens RTL, Princeton NJ, 1987
X
X  menu.h: menus header file
X  based on: menu.h	X10/6.6	11/3/86
X*/
X
X#include "X11/copyright.h"
X/*
X *
X * Copyright 1987, 1988 by Ardent Computer Corporation, Sunnyvale, Ca.
X *
X * Copyright 1987 by Jordan Hubbard.
X *
X *
X *                         All Rights Reserved
X *
X * Permission to use, copy, modify, and distribute this software and its
X * documentation for any purpose and without fee is hereby granted,
X * provided that the above copyright notice appear in all copies and that
X * both that copyright notice and this permission notice appear in
X * supporting documentation, and that the name of Ardent Computer
X * Corporation or Jordan Hubbard not be used in advertising or publicity
X * pertaining to distribution of the software without specific, written
X * prior permission.
X *
X */
X
X/*
X
Copyright 1985, 1986, 1987 by the Massachusetts Institute of Technology
X
Permission to use, copy, modify, and distribute this
software and its documentation for any purpose and without
fee is hereby granted, 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 M.I.T. not be used in
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
M.I.T. makes no representations about the suitability of
this software for any purpose.  It is provided "as is"
without express or implied warranty.
X
X*/
X
X/*
X
Copyright 1987 by
X	Siemens Corporate Research and Support, Inc., Princeton, New Jersey
X
Permission to use, copy, modify, and distribute this
software and its documentation for any purpose and without
fee is hereby granted, 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 Siemens not be used in
advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
Siemens makes no representations about the suitability of
this software for any purpose.  It is provided "as is"
without express or implied warranty.
X
X*/
X
X/*
X * Menu items are constructed as follows, starting from the left side:
X *
X *	menuItemPad
X *	space for check mark
X *	menuItemPad
X *	text + padding
X *	menuItemPad
X *
X * The padding for the text is that amount that this text is narrower than the
X * widest text.
X */
extern void Retch();
X
X#ifndef STD_DEFS
X#include "std_defs.h"
X#endif
X
X#ifndef OPTION_FLAGS
X#include "rtlmnu.opt.h"
X#endif
X
typedef void (*Callback) ();
typedef struct _menuItem MenuItem;
typedef struct _menu Menu;
X
X/*
X * Special note for those familiar with the original RTL menus:
X * Where we used to keep height and width information for items
X * in the _menu structure, we now just keep width. Each item
X * can be of a different height, but is still constrained
X * to a fixed width (which is the width of the widest item in the
X * menu). We could allow variable widths, but the menu would look
X * like hell. We also allow arbitrary pixmap backgrounds for each
X * item now.
X */
struct _menuItem {
X	int itemFlags;			/* flags of item */
X
X#define	itemDisabled		0x0001	/* item is disabled */
X#define	itemChecked		0x0002	/* item has check mark */
X#define itemDeaf		0x0004	/* item is a label */
X#define	itemChanged		0x0010	/* item desires change */
X	Pixmap itemBackground;		/* either zero or a pixmap */
X	char *itemText;			/* text of item (if no pixmap) */
X	unsigned int itemTextWidth;	/* width of text (or pixmap) */
X	unsigned int itemTextLength;	/* length of text */
X	unsigned int itemHeight;	/* height of this item */
X	struct _menuItem *nextItem;	/* next item in chain */
X	struct _menu *itemSubmenu;	/* For pull-right menus  */
X	Callback generator;		/* Change string and data */
X	caddr_t genParamPointer;	/* Address for generated parameter */
X	bool (*checkproc) ();	        /* Checkmark callback generator */
X	Callback itemCallback;          /* user callback for item */
X	pointer itemData;               /* user data associated with menu */
X        Window  itemWindow;             /* window of item */
X        Menu *itemMenu;                 /* menu this item belongs to */
X};
X
struct _menu {
X	unsigned int menuWidth;		/* full width of menu */
X	unsigned int menuHeight;	/* full height of menu */
X	unsigned int avgHeight;		/* Hack.. */
X        unsigned int menuOldWidth;
X        unsigned int menuOldHeight;
X        unsigned int menuItemWidth;     /* width of a menu item */
X	int menuFlags;			/* flags of this menu */
X
X# define	menuChanged	0x0001		/* menu changed, must redraw */
X# define	menuItemChanged	0x0002		/* item changed, must redraw */
X# define	menuMapped	0x0004		/* menu is now mapped */
X
X	unsigned int menuMaxTextWidth;	/* width of widest text */
X        unsigned int menuOldBorderWidth;
X	Display *display;		/* display of menu */
X	int screen;			/* screen on which to display menu */
X	Window menuWindow;		/* window of menu */
X	Cursor menuCursor;		/* cursor used in menu */
X	Pixmap savedPixmap;             /* for saving image under menu */
X	MenuItem *menuItems;		/* head of menu item chain */
X	XFontStruct *menuFontInfo; 	/* Font info */
X	XFontStruct *boldFont;
X	GC normalGC;			/* Graphics contexts */
X	GC invertGC;			/* Used for inverting entries */
X	GC highlightedGC;		/* Highlighted text. */
X	GC boldGC;			/* For labels */
X	Pixmap greyPixmap;		/* Need to know what to free */
X	Pixmap checkmarkPixmap;		/* Pixmap for drawing check mark. */
X	Pixmap arrowPixmap;		/* Pixmap for drawing arrow. */
X	char *menuInitialItemText;  	/* != NULL, initial item */
X	MenuItem *highlightedItem;	/* highlighted menu item */
X	int menuNested;			/* depth you are nested */
X	int menuX, menuY;		/* Menu position */
X        struct _menu *parentMenu;       /* menu to which you are a submenu
X                                         * (NULL if you are the root)
X					 */
X	MenuOptionsMask menuOptions;    /* option values for this menu */
X    };
END_OF_FILE
if test 6217 -ne `wc -c <'awm/menus/menu.h'`; then
    echo shar: \"'awm/menus/menu.h'\" unpacked with wrong size!
fi
# end of 'awm/menus/menu.h'
fi
echo shar: End of archive 5 \(of 17\).
cp /dev/null ark5isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 17 archives.
    rm -f ark[1-9]isdone ark[1-9][0-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0