[comp.sources.x] v00i003: Ardent Window Manager

mikew@wyse.wyse.com (Mike Wexler) (08/09/88)

Submitted-by: jkh@ardent (Jordan Hubbard)
Posting-number: Volume 0, Issue 3
Archive-name: awm/part02

#! /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 2 (of 13)."
# Contents:  awm/Beep.c awm/CircleDown.c awm/CircleUp.c awm/Error.c
#   awm/Focus.c awm/Imakefile awm/Lower.c awm/Pause.c awm/XError.c
#   awm/bitmaps/twm.twm.bm awm/errHndlr.c awm/exp_path.c awm/lex.l
#   awm/menus/eventsave.c awm/menus/eventstack.c
#   awm/menus/rtlmnu.ext.h awm/menus/std_defs.h
# Wrapped by mikew@wyse on Mon Aug  8 12:01:41 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f awm/Beep.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/Beep.c\"
else
echo shar: Extracting \"awm/Beep.c\" \(2500 characters\)
sed "s/^X//" >awm/Beep.c <<'END_OF_awm/Beep.c'
X#ident   "%W% %G%"
X
X
X
X#ifndef lint
Xstatic char *rcsid_Beep_c = "$Header: Beep.c,v 1.1 88/06/15 15:00:18 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 */
X
X#ifndef lint
Xstatic char *sccsid = "@(#)Beep.c	3.8	1/24/86";
X#endif
X
X#include "awm.h"
X
XBoolean Beep(window, mask, button, x, y)
XWindow window;                          /* Event window. */
Xint mask;                               /* Button/key mask. */
Xint button;                           /* Button event detail. */
Xint x, y;                               /* Event mouse position. */
X{
X    Entry("Beep")
X
X    XBell(dpy, VOLUME_PERCENTAGE(Volume));
X    Leave(FALSE)
X}
END_OF_awm/Beep.c
if test 2500 -ne `wc -c <awm/Beep.c`; then
    echo shar: \"awm/Beep.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f awm/CircleDown.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/CircleDown.c\"
else
echo shar: Extracting \"awm/CircleDown.c\" \(2650 characters\)
sed "s/^X//" >awm/CircleDown.c <<'END_OF_awm/CircleDown.c'
X#ident   "%W% %G%"
X
X
X
X#ifndef lint
Xstatic char *rcsid_CircleDown_c = "$Header: CircleDown.c,v 1.1 88/06/15 15:21:21 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. Converted to X11.
X */
X
X#ifndef lint
Xstatic char *sccsid = "@(#)CircleDown.c	3.8	1/24/86";
X#endif
X
X#include "awm.h"
X
XBoolean CircleDown(window, mask, button, x, y)
XWindow window;                          /* Event window. */
Xint mask;                               /* Button/key mask. */
Xint button;                           /* Button event detail. */
Xint x, y;                               /* Event mouse position. */
X{
X    Entry("CircleDown")
X
X    XCirculateSubwindowsDown(dpy, RootWindow(dpy, scr));
X    Leave(FALSE)
X}
END_OF_awm/CircleDown.c
if test 2650 -ne `wc -c <awm/CircleDown.c`; then
    echo shar: \"awm/CircleDown.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f awm/CircleUp.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/CircleUp.c\"
else
echo shar: Extracting \"awm/CircleUp.c\" \(2632 characters\)
sed "s/^X//" >awm/CircleUp.c <<'END_OF_awm/CircleUp.c'
X#ident   "%W% %G%"
X
X
X
X#ifndef lint
Xstatic char *rcsid_CircleUp_c = "$Header: CircleUp.c,v 1.1 88/06/15 15:21:23 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. Converted to X11.
X */
X
X#ifndef lint
Xstatic char *sccsid = "@(#)CircleUp.c	3.8	1/24/86";
X#endif
X
X#include "awm.h"
X
XBoolean CircleUp(window, mask, button, x, y)
XWindow window;                          /* Event window. */
Xint mask;                               /* Button/key mask. */
Xint button;                           /* Button event detail. */
Xint x, y;                        	/* Event mouse position. */
X{
X    Entry("CircleUp")
X
X    XCirculateSubwindowsUp(dpy, RootWindow(dpy, scr));
X    Leave(FALSE)
X}
END_OF_awm/CircleUp.c
if test 2632 -ne `wc -c <awm/CircleUp.c`; then
    echo shar: \"awm/CircleUp.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f awm/Error.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/Error.c\"
else
echo shar: Extracting \"awm/Error.c\" \(2979 characters\)
sed "s/^X//" >awm/Error.c <<'END_OF_awm/Error.c'
X#ident   "%W% %G%"
X
X
X
X#ifndef lint
Xstatic char *rcsid_Error_c = "$Header: Error.c,v 1.2 88/07/24 01:58:56 jkh Exp $";
X#endif	lint
X
X#if defined(vax)
X#include <sys/file.h>
X#else
X#include <fcntl.h>
X#endif /* vax */
X
X#include <signal.h>
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 */
X
X#ifndef lint
Xstatic char *sccsid = "@(#)Error.c	3.8	1/24/86";
X#endif
X
X#include "awm.h"
X
Xextern Boolean desktop_execd;
Xextern char execfile[];
X
X/*
X * Default error reporting routine.  Called when a random awm error
X * is encountered.
X */
XError(s)
Xchar *s;	/* Error description string */
X{
X    Entry("Error")
X
X    fprintf(stderr, "awm: %s\n", s);
X    if (!desktop_execd) {
X	 if (access(execfile, X_OK) == 0) {
X	      if (fork() == 0) {
X		   setpgrp(0, 0);
X		   signal(SIGHUP, SIG_IGN);
X		   signal(SIGQUIT, SIG_IGN);
X		   signal(SIGINT, SIG_IGN);
X		   execl("/bin/sh", "sh", "-c", execfile, 0);
X		   _exit(127);
X	      }
X	      else
X		   desktop_execd = TRUE;
X	 }
X    }
X    Cleanup();
X    exit(1);
X}
X
Xvoid Warning(s)
Xchar *s;	/* Error description string */
X{
X    Entry("Warning")
X
X    fprintf(stderr, "awm: warning: %s\n", s);
X    Leave_void
X}
END_OF_awm/Error.c
if test 2979 -ne `wc -c <awm/Error.c`; then
    echo shar: \"awm/Error.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f awm/Focus.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/Focus.c\"
else
echo shar: Extracting \"awm/Focus.c\" \(3223 characters\)
sed "s/^X//" >awm/Focus.c <<'END_OF_awm/Focus.c'
X#ident   "%W% %G%"
X
X
X
X#ifndef lint
Xstatic char *rcsid_Focus_c = "$Header: Focus.c,v 1.2 88/07/02 02:21:26 jkh Exp $";
X#endif	lint
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 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. Converted to X11.
X */
X
X#ifndef lint
Xstatic char *sccsid = "@(#)Focus.c	3.8	1/24/86";
X#endif
X
X#include "awm.h"
X
Xextern Window FocusWindow;
X
XBoolean Focus(window, mask, button, x, y)
XWindow window;				/* Event window. */
Xint mask;				/* Button/key mask. */
Xint button;				/* Button event detail. */
Xint x, y;				/* Event mouse position. */
X{
X     AwmInfoPtr awi;
X
X     Entry("Focus");
X
X     awi = GetAwmInfo(window);
X     if (awi)
X	  window = awi->client;
X     XSetInputFocus(dpy, window, RevertToPointerRoot, CurrentTime);
X     if (window != RootWindow(dpy, scr))
X	  FocusSetByUser = TRUE;
X     else
X	  FocusSetByUser = FALSE;
X     FocusSetByWM = FALSE;
X     FocusWindow = window;
X     Leave(FALSE)
X}
X
XBoolean UnFocus(window, mask, button, x, y)
XWindow window;				/* Event window. */
Xint mask;				/* Button/key mask. */
Xint button;				/* Button event detail. */
Xint x, y;				/* Event mouse position. */
X{
X     Entry("UnFocus");
X
X     XSetInputFocus(dpy, PointerRoot, None, CurrentTime);
X     FocusSetByUser = FALSE;
X     FocusSetByWM = FALSE;
X     FocusWindow = RootWindow(dpy, scr);
X     Leave(FALSE)
X}
X
END_OF_awm/Focus.c
if test 3223 -ne `wc -c <awm/Focus.c`; then
    echo shar: \"awm/Focus.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f awm/Imakefile -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/Imakefile\"
else
echo shar: Extracting \"awm/Imakefile\" \(2744 characters\)
sed "s/^X//" >awm/Imakefile <<'END_OF_awm/Imakefile'
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# Add the line -DCONSOLE to the appropriate DEFINES macro (see below) if
X# you want output (stderr and stdout) to go to the system console.
X#
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
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.
X#XRDOBJ=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
X
XSRCS=	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
XOBJS=	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
XComplexProgramTarget(awm)
X
XInstallNonExec(system.awmrc, $(AWMDIR))
X
X$(MENU_ARCH)::
X	@echo Making menu package...
X	@(cd $(MENU_LIB); make CC=$(CC) CFLAGS="$(CFLAGS)")
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
Xclean::
X	@echo Cleaning menus...
X	@(cd $(MENU_LIB); make clean)
X	@echo done.
X	rm -f y.tab.h
X
Xnoident::
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
END_OF_awm/Imakefile
if test 2744 -ne `wc -c <awm/Imakefile`; then
    echo shar: \"awm/Imakefile\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f awm/Lower.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/Lower.c\"
else
echo shar: Extracting \"awm/Lower.c\" \(2761 characters\)
sed "s/^X//" >awm/Lower.c <<'END_OF_awm/Lower.c'
X#ident   "%W% %G%"
X
X
X
X#ifndef lint
Xstatic char *rcsid_Lower_c = "$Header: Lower.c,v 1.1 88/06/15 15:21:32 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 * 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 *  Conversion to awm.
X */
X
X#include "awm.h"
X
XBoolean Lower(window, mask, button, x, y)
XWindow window;				/* Event window. */
Xint mask;				/* Button/key mask. */
Xint button;				/* Button event detail. */
Xint x, y;				/* Event mouse position. */
X{
X     AwmInfoPtr awi;
X     Entry("Lower")
X
X     awi = GetAwmInfo(window);
X     if (!awi)
X	  Leave(FALSE)
X     window = awi->frame ? awi->frame : awi->client;
X     /*
X      * If the window is not the root window, lower the window and return.
X      */
X     if (window != RootWindow(dpy, scr))
X	  XLowerWindow(dpy, window);
X     Leave(FALSE)
X}
END_OF_awm/Lower.c
if test 2761 -ne `wc -c <awm/Lower.c`; then
    echo shar: \"awm/Lower.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f awm/Pause.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/Pause.c\"
else
echo shar: Extracting \"awm/Pause.c\" \(2951 characters\)
sed "s/^X//" >awm/Pause.c <<'END_OF_awm/Pause.c'
X#ident   "%W% %G%"
X
X
X
X#ifndef lint
Xstatic char *rcsid_Pause_c = "$Header: Pause.c,v 1.1 88/06/15 15:21:35 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 *  Changes for awm.
X */
X
X#include "awm.h"
X
XBoolean Pause(window, mask, button, x, y)
XWindow window;                          /* Event window. */
Xint mask;                               /* Button/key mask. */
Xint button;                           /* Button event detail. */
Xint x, y;                               /* Event mouse position. */
X{
X    Entry("Pause")
X
X    XGrabServer(dpy);
X    Leave(FALSE)
X}
X
XBoolean Continue(window, mask, button, x, y)
XWindow window;                          /* Event window. */
Xint mask;                               /* Button/key mask. */
Xint button;                           /* Button event detail. */
Xint x, y;                               /* Event mouse position. */
X{
X    Entry("Continue")
X
X    XUngrabServer(dpy);
X    Leave(FALSE)
X}
END_OF_awm/Pause.c
if test 2951 -ne `wc -c <awm/Pause.c`; then
    echo shar: \"awm/Pause.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f awm/XError.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/XError.c\"
else
echo shar: Extracting \"awm/XError.c\" \(2658 characters\)
sed "s/^X//" >awm/XError.c <<'END_OF_awm/XError.c'
X#ident   "%W% %G%"
X
X
X
X#ifndef lint
Xstatic char *rcsid_XError_c = "$Header: XError.c,v 1.1 88/06/15 15:21:49 jk 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 */
X
X#include "awm.h"
X
XXError(dpy, rep)
XDisplay *dpy;
XXErrorEvent *rep;
X{
X#ifdef DEBUG
X    char buffer[BUFSIZ];
X    XGetErrorText(dpy, rep->error_code, buffer, BUFSIZ);
X    fprintf(stderr, "awm: X error occurred during a awm operation.\n");
X    fprintf(stderr, "     Description: '%s'\n", buffer);
X    fprintf(stderr, "     Request code: %d\n", rep->request_code);
X    fprintf(stderr, "     Request function: %d\n", rep->func);
X    fprintf(stderr, "     Request window 0x%x\n", rep->window);
X    fprintf(stderr, "     Error Serial #%d\n", rep->serial);
X    fprintf(stderr, "     Current serial #%d\n", dpy->request);
X#endif
X}
END_OF_awm/XError.c
if test 2658 -ne `wc -c <awm/XError.c`; then
    echo shar: \"awm/XError.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f awm/bitmaps/twm.twm.bm -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/bitmaps/twm.twm.bm\"
else
echo shar: Extracting \"awm/bitmaps/twm.twm.bm\" \(2556 characters\)
sed "s/^X//" >awm/bitmaps/twm.twm.bm <<'END_OF_awm/bitmaps/twm.twm.bm'
X/*****************************************************************************/
X/**       Copyright 1988 by Evans & Sutherland Computer Corporation,        **/
X/**                          Salt Lake City, Utah                           **/
X/**                                                                         **/
X/**                           All Rights Reserved                           **/
X/**                                                                         **/
X/**    Permission to use, copy, modify, and distribute this software and    **/
X/**    its documentation  for  any  purpose  and  without  fee is hereby    **/
X/**    granted, provided that the above copyright notice appear  in  all    **/
X/**    copies and that both  that  copyright  notice  and  this  permis-    **/
X/**    sion  notice appear in supporting  documentation,  and  that  the    **/
X/**    name  of Evans & Sutherland  not be used in advertising or publi-    **/
X/**    city pertaining to distribution  of the software without  specif-    **/
X/**    ic, written prior permission.                                        **/
X/**                                                                         **/
X/**    EVANS  & SUTHERLAND  DISCLAIMS  ALL  WARRANTIES  WITH  REGARD  TO    **/
X/**    THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILI-    **/
X/**    TY AND FITNESS, IN NO EVENT SHALL EVANS &  SUTHERLAND  BE  LIABLE    **/
X/**    FOR  ANY  SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY  DAM-    **/
X/**    AGES  WHATSOEVER RESULTING FROM  LOSS OF USE,  DATA  OR  PROFITS,    **/
X/**    WHETHER   IN  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS    **/
X/**    ACTION, ARISING OUT OF OR IN  CONNECTION  WITH  THE  USE  OR PER-    **/
X/**    FORMANCE OF THIS SOFTWARE.                                           **/
X/*****************************************************************************/
X
X#define twm_width 48
X#define twm_height 15
Xstatic char twm_bits[] = {
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0x0f,
X   0xfe, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00,
X   0xc0, 0x0c, 0x0c, 0xcc, 0xc0, 0x00, 0xc0, 0x0c, 0x0c, 0xcc, 0xc0, 0x00,
X   0x60, 0x18, 0x1e, 0xe6, 0xe1, 0x01, 0x60, 0x18, 0x1e, 0xe6, 0xe1, 0x01,
X   0x30, 0x30, 0x33, 0x33, 0x33, 0x03, 0x30, 0x30, 0x33, 0x33, 0x33, 0x03,
X   0x18, 0xe0, 0xe1, 0x19, 0x1e, 0x06, 0x18, 0xe0, 0xe1, 0x19, 0x1e, 0x06,
X   0x0c, 0xc0, 0xc0, 0x0c, 0x0c, 0x0c, 0x0c, 0xc0, 0xc0, 0x0c, 0x0c, 0x0c,
X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
END_OF_awm/bitmaps/twm.twm.bm
if test 2556 -ne `wc -c <awm/bitmaps/twm.twm.bm`; then
    echo shar: \"awm/bitmaps/twm.twm.bm\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f awm/errHndlr.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/errHndlr.c\"
else
echo shar: Extracting \"awm/errHndlr.c\" \(2539 characters\)
sed "s/^X//" >awm/errHndlr.c <<'END_OF_awm/errHndlr.c'
X#ident   "%W% %G%"
X
X#ifndef lint
Xstatic char *rcsid_errHndlr_c = "$Header: errHndlr.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#include <stdio.h>
X#include "X11/Xlib.h"
X
Xint errorStatus = False;
X
X#ifdef DEBUG
Xvoid debug(s, x1, x2, x3, x4, x5, x6, x7, x8)
Xchar *s;
Xlong x1, x2, x3, x4, x5, x6, x7, x8;
X{
X	static FILE *con = 0;
X
X	if (!con)
X		con = fopen("/dev/console", "w");
X	fprintf(con, s, x1, x2, x3, x4, x5, x6, x7, x8);
X}
X#endif
X
Xint ErrorHandler (dpy, event)
X    Display *dpy;
X    XErrorEvent *event;
X{
X#ifdef DEBUG
X    char *buffer[BUFSIZ];
X    XGetErrorText(dpy, event->error_code, buffer, BUFSIZ);
X    (void) debug("Hey!\n");
X    (void) debug("X Error: %s\n", buffer);
X    (void) debug("  Request Major code: %d\n", event->request_code);
X    (void) debug("  Request Minor code: %d\n", event->minor_code);
X    (void) debug("  ResourceId 0x%x\n", event->resourceid);
X    (void) debug("  Error Serial #%d\n", event->serial);
X    (void) debug("  Current Serial #%d\n", dpy->request);
X#endif
X    errorStatus = True;
X    return 0;
X}
X
Xstatic char *eventname[] = {
X	"zero",
X	"one",
X	"KeyPress",
X	"KeyRelease",
X	"ButtonPress",
X	"ButtonRelease",
X	"MotionNotify",
X	"EnterNotify",
X	"LeaveNotify",
X	"FocusIn",
X	"FocusOut",
X	"KeymapNotify",
X	"Expose",
X	"GraphicsExpose",
X	"NoExpose",
X	"VisibilityNotify",
X	"CreateNotify",
X	"DestroyNotify",
X	"UnmapNotify",
X	"MapNotify",
X	"MapRequest",
X	"ReparentNotify",
X	"ConfigureNotify",
X	"ConfigureRequest",
X	"GravityNotify",
X	"ResizeRequest",
X	"CirculateNotify",
X	"CirculateRequest",
X	"PropertyNotify",
X	"SelectionClear",
X	"SelectionRequest",
X	"SelectionNotify",
X	"ColormapNotify",
X	"ClientMessage",
X	"MappingNotify",
X};
X
Xvoid print_event_info(s, ev)
Xchar *s;
XXEvent *ev;
X{
X	fprintf(stderr, "%s: EVENT %s(%d) on %x\n", s, eventname[ev->type],
X	  ev->type, ev->xany.window);
X}
END_OF_awm/errHndlr.c
if test 2539 -ne `wc -c <awm/errHndlr.c`; then
    echo shar: \"awm/errHndlr.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f awm/exp_path.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/exp_path.c\"
else
echo shar: Extracting \"awm/exp_path.c\" \(3455 characters\)
sed "s/^X//" >awm/exp_path.c <<'END_OF_awm/exp_path.c'
X#ident   "%W% %G%"
X
X
X
X#ifndef lint
Xstatic char *rcsid_exp_path_c = "$Header: exp_path.c,v 1.2 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#include <pwd.h>
X#include <stdio.h>
X#if defined(vax)
X#include <sys/file.h>
X#else
X#include <fcntl.h>
X#endif /* vax */
X#include "awm.h"
X
X/*
X * WARNING: This code is obscure.
X * Modify at your Own Risk.
X */
Xchar *expand_file(s)
Xregister char *s;
X{
X     static char tmp[256], *cp, err[80];
X
X     Entry("expand_file")
X     
X     /* zero tmp */
X     tmp[0] = 0;
X     if (*s == '/')
X	  Leave(s)
X     if (*s == '~') {
X	  if (s[1] == '/') { /* It's $HOME */
X	       if (!(cp = (char *)getenv("HOME"))) {
X		    sprintf(err, "expand: Can't find $HOME!\n");
X		    yywarn(err);
X		    Leave(0)
X	       }
X	       strcpy(tmp, cp);
X	       strcat(tmp, s + 1);
X	       Leave(tmp)
X	  }
X	  else { /* it's another user */
X	       struct passwd *pwd;
X	       char uname[32];
X	       int i;
X
X	       for (i = 1; s[i] != '/'; i++)
X		    uname[i - 1] = s[i];
X	       uname[i] = '\0';
X	       pwd = getpwnam(uname);
X	       if (!pwd) {
X		    sprintf(err, "expand: user '%s' not found.\n", uname);
X		    yywarn(err);
X		    Leave(0)
X	       }
X	       strcpy(tmp, pwd->pw_dir);
X	       strcat(tmp, s + i);
X	       Leave(tmp)
X	  }
X     }
X     else
X	  Leave(s)
X}
X
Xchar *deblank(s)
Xregister char *s;
X{
X     Entry("deblank")
X
X     if (!s)
X	  Leave(s)
X     while (*s && (*s == ' ' || *s == '\t'))
X	  s++;
X     Leave(s)
X}
X
Xchar *expand_from_path(s)
Xregister char *s;
X{
X     char tmp[256], *tm;
X     int i, plen;
X
X     Entry("expand_from_path")
X
X     tmp[0] = '\0';
X     s = deblank(s);
X     if (!s || !*s)
X	  Leave(0)
X     s = expand_file(s);
X     if (!s)
X	  Leave(0)
X     if (!access(s, R_OK))
X	  Leave(s)
X     /*
X      * If it starts with a slash, we know it either expanded and couldn't
X      * be found, or that it started with a slash in the first place and
X      * just plain couldn't be found.
X      */
X     if (*s == '/')
X	  Leave(0)
X     /*
X      * At this stage we haven't found the file by name, so it's time to
X      * search the path.
X      */
X     if (!awmPath || !*awmPath)
X	  Leave(0)
X     plen = strlen(awmPath);
X     i = 0;
X     while (1) {
X	  int p, l;
X	  
X	  tmp[0] = '\0';
X	  while (i < plen && awmPath[i] == ' ' || awmPath[i] == '\t')
X	       i++;
X	  for (p = i; p < plen && awmPath[p] != ' ' && awmPath[p] != '\t'; p++)
X	       tmp[p - i] = awmPath[p];
X	  if (!*tmp)
X	       Leave(0)
X	  tmp[p - i] = '\0';
X	  i = p;
X	  tm = expand_file(tmp);
X	  if (!tm || !*tm)
X	       continue;
X	  l = strlen(tm);
X	  if (l < 1)
X	       continue;
X	  if (tm[l - 1] != '/') { /* append / if necessary */
X	       tm[l] = '/';
X	       tm[++l] = '\0';
X	  }
X	  strcat(tm, s);
X	  if (!access(tm, R_OK))
X	       Leave(tm)
X     }
X}
END_OF_awm/exp_path.c
if test 3455 -ne `wc -c <awm/exp_path.c`; then
    echo shar: \"awm/exp_path.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f awm/lex.l -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/lex.l\"
else
echo shar: Extracting \"awm/lex.l\" \(2288 characters\)
sed "s/^X//" >awm/lex.l <<'END_OF_awm/lex.l'
X%{
X
X
X#include <X11/copyright.h>
X
X#ident   "%W% %G%"
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/*
X * MODIFICATION HISTORY
X *
X * 000 -- M. Gancarz, DEC Ultrix Engineering Group
X * 001 -- Jordan Hubbard, Ardent Computer
X *  Handle comments differently.
X */
X
X#include "y.tab.h"
X#include "awm.h"
X
X#undef	YYLMAX
X
X#ifdef	LEXBUFSIZ
X#define YYLMAX	LEXBUFSIZ
X#else
X#define YYLMAX	1024
X#endif
X
Xchar *dequote();
Xchar *stash();
X
X%}
XW	[ \t]+
X%%
X
X#.*\n				{ return(COMMENT); }	/* Comments. */
X\\\n				{ Lineno++; }		/* Continuation. */
X{W}				{ ; }	/* Whitespace. */
X[^ \"\t\n#=\^\!\|\(\)\[\]\{\}:;]+	{ yylval.sval=stash(yytext);return(STRING); }
X\"[^\"]*\"			{ yylval.sval=stash(dequote(yytext));
X				  return(STRING); }
X\n				{ return(NL); }
X.				{ return(*yytext); }
X
X%%
X
X/*
X * Remove the quotes enclosing a quoted string.
X */
Xchar *
Xdequote(s)
Xchar *s;
X{
X    char *p;
X
X    ++s;
X    p = rindex(s, '"');
X    *p = '\0';
X    return(s);
X}
X
X/*
X * Save string away in memory and return a pointer to it.  If
X * no space could be found, quit with a fatal error.
X */
Xchar *stash(s)
Xchar *s;
X{
X    char *ptr;
X    char *malloc();
X
X    ptr = malloc(strlen(s) + 1);
X    if (ptr == NULL) {
X        Error("out of space");
X    }
X    return(strcpy(ptr, s));
X}
END_OF_awm/lex.l
if test 2288 -ne `wc -c <awm/lex.l`; then
    echo shar: \"awm/lex.l\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f awm/menus/eventsave.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/menus/eventsave.c\"
else
echo shar: Extracting \"awm/menus/eventsave.c\" \(3619 characters\)
sed "s/^X//" >awm/menus/eventsave.c <<'END_OF_awm/menus/eventsave.c'
X#ident   "%W% %G%"
X
X#ifndef lint
Xstatic char sccs_id[] = "@(#)eventsave.c	2.1 12/16/87  Siemens Corporate Research and Support, Inc.";
X#endif
X
X
X/* 
X  RTL Menu Package Version 1.0
X  by Joe Camaratta and Mike Berman, Siemens RTL, Princeton NJ, 1987
X
X  eventsave.c: saves/restores the X event queue
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
XCopyright 1987 by
X	Siemens Corporate Research and Support, Inc., Princeton, New Jersey
X
XPermission to use, copy, modify, and distribute this software
Xand its documentation for any purpose and without fee is
Xhereby granted, provided that the above copyright notice
Xappear in all copies and that both that copyright notice and
Xthis permission notice appear in supporting documentation, and
Xthat the name of Siemens not be used in advertising or
Xpublicity pertaining to distribution of the software without
Xspecific, written prior permission.  Siemens makes no
Xrepresentations about the suitability of this software for any
Xpurpose.  It is provided "as is" without express or implied
Xwarranty.
X
X*/
X
X#include <stdio.h>
X#include "dbug.h"
X#include "X11/Xlib.h"
X
X#include "eventstack.h"
X
X
Xvoid SaveEvents(display, Stack, mask)
X    Display *display;
X    struct Ev_q **Stack;
X    unsigned long mask;	 /* Save only events that match mask; */
X			 /* others remain on the event queue  */
X{
X    XEvent ev;
X    int Match = 1;
X
X    Entry("SaveEvents")
X
X    while (XPending(display) && Match)
X    {
X	if (XCheckMaskEvent(display, mask, &ev))
X	{
X	    DBUG_3("SaveEvents","Saving event type %d\n",ev.type);
X	    PushEvent(&ev, Stack);
X	}
X	else
X	    Match = False;
X    }
X    Leave_void
X}
X
Xvoid RestoreEvents(display, Stack)
X    Display *display;
X    struct Ev_q **Stack;    /* pointer to stack containing saved events */
X{
X    XEvent ev, *tmp;
X
X    Entry("RestoreEvents")
X    
X    while (!EventStackIsEmpty(Stack))
X    {
X	bcopy(&ev, tmp = PopEvent(Stack), sizeof(XEvent));
X	XPutBackEvent(display, &ev);
X	free(tmp);
X    }
X    XFlush(display);
X    Leave_void
X}
X
Xvoid DisposeEvents(display, mask)
X    Display *display;
X    unsigned long mask;	 /* dispose events that match mask */
X{
X    int Match = 1;
X    XEvent ev;
X    
X    Entry("DisposeEvents")
X
X    while (XPending(display) && Match)
X    {
X	if (XCheckMaskEvent(display, mask, &ev))
X	{
X	    DBUG_3("SaveEvents","Disposing event type %d\n",ev);
X	}
X	else
X	    Match = False;
X    }
X    Leave_void
X}
X	
Xvoid DiscardEventStore(Stack)
X    struct Ev_q **Stack;
X{
X    Entry("DiscardEventStack")
X    
X    while (!EventStackIsEmpty(Stack))
X    {
X	(void) free(PopEvent(Stack));
X    }
X    Leave_void
X}
X
Xvoid AddEventToStore(Stack, ev)
X    struct Ev_q **Stack;
X    XEvent ev;
X{
X    Entry("AddEventToStore")
X
X    PushEvent(&ev, Stack);
X    Leave_void
X}
X
X
Xvoid RemoveEventFromStore(Stack, ev)
X    struct Ev_q **Stack;
X    XEvent *ev;
X{
X     XEvent *tmp;
X     Entry("RemoveEventFromStore")
X
X    bcopy(ev, tmp = PopEvent(Stack), sizeof(XEvent));
X    free(tmp);
X    Leave_void
X}
END_OF_awm/menus/eventsave.c
if test 3619 -ne `wc -c <awm/menus/eventsave.c`; then
    echo shar: \"awm/menus/eventsave.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f awm/menus/eventstack.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/menus/eventstack.c\"
else
echo shar: Extracting \"awm/menus/eventstack.c\" \(2655 characters\)
sed "s/^X//" >awm/menus/eventstack.c <<'END_OF_awm/menus/eventstack.c'
X#ident   "%W% %G%"
X
X#ifndef lint
X     static char sccs_id[] = "@(#)eventstack.c	2.1 12/16/87  Siemens Corporate Research and Support, Inc.";
X#endif
X
X
X/* 
X  RTL Menu Package Version 1.0
X  by Joe Camaratta and Mike Berman, Siemens RTL, Princeton NJ, 1987
X  
X  eventstack.c: stack implementation for X events
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  
X  Copyright 1987 by
X  Siemens Corporate Research and Support, Inc., Princeton, New Jersey
X  
X  Permission to use, copy, modify, and distribute this software
X  and its documentation for any purpose and without fee is
X  hereby granted, provided that the above copyright notice
X  appear in all copies and that both that copyright notice and
X  this permission notice appear in supporting documentation, and
X  that the name of Siemens not be used in advertising or
X  publicity pertaining to distribution of the software without
X  specific, written prior permission.  Siemens makes no
X  representations about the suitability of this software for any
X  purpose.  It is provided "as is" without express or implied
X  warranty.
X  
X  Almost totally re-written by Jordan Hubbard, Ardent computer corp.
X  Previous code did not pass more strict compilers.
X  */
X
X#include <stdio.h>
X#include "dbug.h"
X#include "X11/Xlib.h"
X#include "eventstack.h"
X
Xextern char *malloc();
X
Xvoid PushEvent(event, Eq)
XXEvent *event;
Xstruct Ev_q **Eq;
X{
X     struct Ev_q *ptr;
X     Entry("PushEvent")
X     
X     if (!*Eq) {
X	  *Eq = ptr = (struct Ev_q *)malloc(sizeof(struct Ev_q));
X	  ptr->prev = 0;
X     }
X     else {
X	  ptr = (struct Ev_q *)malloc(sizeof(struct Ev_q));
X	  ptr->prev = *Eq;
X	  *Eq = ptr;
X     }
X     ptr->event = (XEvent *)malloc(sizeof(XEvent));
X     bcopy(ptr->event, event, sizeof(XEvent));
X     Leave_void
X}
X
XXEvent *PopEvent(Eq)
Xstruct Ev_q **Eq;
X{
X     struct Ev_q *ptr;
X     
X     Entry("PopEvent")
X
X     if (*Eq) {
X	  ptr = *Eq;
X	  *Eq = ptr->prev;
X	  free(ptr);
X	  Leave(ptr->event)
X     }
X     else
X	  Leave((XEvent *)0)
X}
END_OF_awm/menus/eventstack.c
if test 2655 -ne `wc -c <awm/menus/eventstack.c`; then
    echo shar: \"awm/menus/eventstack.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f awm/menus/rtlmnu.ext.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/menus/rtlmnu.ext.h\"
else
echo shar: Extracting \"awm/menus/rtlmnu.ext.h\" \(2319 characters\)
sed "s/^X//" >awm/menus/rtlmnu.ext.h <<'END_OF_awm/menus/rtlmnu.ext.h'
X#ident   "%W% %G%"
X
X/*
X#ifndef lint
Xstatic char sccs_id[] = "@(#)rtlmenu.extern.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  rtlmenu.extern.h: external definitions for rtlmenu user
X*/
X
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/*
XCopyright 1987 by
X	Siemens Corporate Research and Support, Inc., Princeton, New Jersey
X
XPermission to use, copy, modify, and distribute this software
Xand its documentation for any purpose and without fee is
Xhereby granted, provided that the above copyright notice
Xappear in all copies and that both that copyright notice and
Xthis permission notice appear in supporting documentation, and
Xthat the name of Siemens not be used in advertising or
Xpublicity pertaining to distribution of the software without
Xspecific, written prior permission.  Siemens makes no
Xrepresentations about the suitability of this software for any
Xpurpose.  It is provided "as is" without express or implied
Xwarranty.
X
X*/
X
Xextern void RTLMenu_Initialize(), RTLMenu_Destroy(),
X    RTLMenu_Replace_Data_Keyed_String(), RTLMenu_Activate_Entry(),
X    RTLMenu_Inactivate_Entry(), RTLMenu_Delete_Entries(),
X    RTLMenu_Delete_String(), RTLMenu_Delete_Data(),
X    RTLMenu_Enter(), RTLMenu_Generate_Items();
X    
Xextern bool RTLMenu_Has_Data();
X
Xextern RTLMenu RTLMenu_Create(), RTLMenu_Get_Submenu();
X
Xextern pointer RTLMenu_Data();
X
Xextern RTLMenuItem RTLMenu_Append_String(), RTLMenu_Append_Callback(),
X    RTLMenu_Append_Call(), RTLMenu_Append_Checkback(),
X    RTLMenu_Append_Submenu();
X
Xextern RTLPoint RTLMenu_Entry_Pos(); 
X    
END_OF_awm/menus/rtlmnu.ext.h
if test 2319 -ne `wc -c <awm/menus/rtlmnu.ext.h`; then
    echo shar: \"awm/menus/rtlmnu.ext.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f awm/menus/std_defs.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"awm/menus/std_defs.h\"
else
echo shar: Extracting \"awm/menus/std_defs.h\" \(2359 characters\)
sed "s/^X//" >awm/menus/std_defs.h <<'END_OF_awm/menus/std_defs.h'
X#ident   "%W% %G%"
X
X/*
X#ifndef lint
Xstatic char sccs_id[] = "@(#)std_defs.h	2.5  4/13/87 Copyright (c) 1987, 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  std_defs.h: standard definitions shared among menu programs.
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
XCopyright 1987 by
X	Siemens Corporate Research and Support, Inc., Princeton, New Jersey
X
XPermission to use, copy, modify, and distribute this
Xsoftware and its documentation for any purpose and without
Xfee is hereby granted, provided that the above copyright
Xnotice appear in all copies and that both that copyright
Xnotice and this permission notice appear in supporting
Xdocumentation, and that the name of Siemens not be used in
Xadvertising or publicity pertaining to distribution of the
Xsoftware without specific, written prior permission.
XSiemens makes no representations about the suitability of
Xthis software for any purpose.  It is provided "as is"
Xwithout express or implied warranty.
X
X*/
X
X
X#define STD_DEFS
X
X/*	useful macros
X */
Xtypedef char *pointer;
X
Xextern char *malloc();
X#define  allocate(type, quan)	( (type *) malloc(sizeof(type) * (quan)) )
X
X#define  FOREVER		for (;;)
X
X
X/*	initial pointer value
X */
X#ifndef  NULL
X#define  NULL		0
X#endif
X
X/*	values for "bool" type
X */
X#define bool	unsigned
X
X#ifndef  TRUE
X#define  TRUE		1
X#endif
X
X#ifndef  FALSE
X#define  FALSE		0
X#endif
X
X
X/*	VoidFunc type definition
X */
Xtypedef void		(*VoidFunc)();
X
X
X/*	minimal error status return values
X */
X#define  SUCCESS	 0
X#define  FAILURE	-1
X
X#define ABS(val)  \
X    ( ( (val) < 0 ) ? -(val) : (val) ) 
X
END_OF_awm/menus/std_defs.h
if test 2359 -ne `wc -c <awm/menus/std_defs.h`; then
    echo shar: \"awm/menus/std_defs.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
echo shar: End of archive 2 \(of 13\).
cp /dev/null ark2isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 13 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
Mike Wexler(wyse!mikew)    Phone: (408)433-1000 x1330