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 3 (of 17)." # Contents: awm/Bindings.c awm/CircleDown.c awm/Lower.c awm/Pause.c # awm/Raise.c awm/StoreZap.c awm/XError.c awm/bitmaps/xterm.bm # awm/exp_path.c awm/menus/eventsave.c awm/menus/eventstack.c # Wrapped by jkh@ardent on Thu Jun 16 00:44:06 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'awm/Bindings.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'awm/Bindings.c'\" else echo shar: Extracting \"'awm/Bindings.c'\" \(3700 characters\) sed "s/^X//" >'awm/Bindings.c' <<'END_OF_FILE' X#ident "%W% %G%" X X#ifndef lint static char *rcsid_Bindings_c = "$Header: Bindings.c,v 1.1 88/06/15 15:30:22 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 static char *sccsid = "@(#)Bindings.c 3.8 1/24/86"; X#endif X X/* X * Bindings.c Default bindings for the X window manager 'awm' X * X * Note: Any changes to this file should also be added to the file X * /usr/new/lib/X/awm/default.awmrc to keep users informed as to the bindings X * contained herein. X */ X char *DefaultBindings[] = { X"menu=\"WindowOps\"{", X"New Window:!\"xterm&\"", X"RefreshScreen:f.refresh", X"Redraw:f.redraw", X"Move:f.move", X"Resize:f.resize", X"Lower:f.lower", X"Raise:f.raise", X"CircUp:f.circleup", X"CircDown:f.circledown", X"AutoIconify:f.iconify", X"LowerIconify:f.newiconify", X"NewIconify:f.newiconify", X"Focus:f.focus", X"Freeze:f.pause", X"UnFreeze:f.continue", X"Restart:f.restart", X"}", X"menu=\"Preferences\"{", X"Bell Loud:!\"xset b 7&\"", X"Bell Normal:!\"xset b 3&\"", X"Bell Off:!\"xset b off&\"", X"Click Loud:!\"xset c 8&\"", X"Click Soft:!\"xset c on&\"", X"Click Off:!\"xset c off&\"", X"Lock On:!\"xset l on&\"", X"Lock Off:!\"xset l off&\"", X"Mouse Fast:!\"xset m 4 2&\"", X"Mouse Normal:!\"xset m 2 5&\"", X"Mouse Slow:!\"xset m 1 1&\"", X"}", X"f.newiconify=m:w|i:delta l", X"f.raise=m:w|i:delta l", X"f.lower=m:w|i:l u", X"f.raise=m:w:m d", X"f.resize=m:w:delta m", X"f.iconify=m:i:m u", X"f.raise=m:w|i:r d", X"f.move=m:w|i:delta r", X"f.circledown=m:r:l d", X"f.circleup=m:r:r d", X"f.circledown=m|s::l d", X"f.menu=:r:m d:\"WindowOps\"", X"f.menu=m|s::m d:\"WindowOps\"", X"f.menu=m|s::m d:\"Preferences\"", X"f.circleup=m|s::r d", X"f.iconify=m|c:w|i:l d", X"f.newiconify=m|l:w|i:l d", X"f.raise=m|l:w|i:l u", X"f.pushright=m|l:w|i:r d", X"f.pushleft=m|c:w|i:r d", X"f.pushup=m|l:w|i:m d", X"f.pushdown=m|c:w|i:m d", X0 /* Must NOT be removed. */ X}; END_OF_FILE if test 3700 -ne `wc -c <'awm/Bindings.c'`; then echo shar: \"'awm/Bindings.c'\" unpacked with wrong size! fi # end of 'awm/Bindings.c' fi if test -f 'awm/CircleDown.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'awm/CircleDown.c'\" else echo shar: Extracting \"'awm/CircleDown.c'\" \(2648 characters\) sed "s/^X//" >'awm/CircleDown.c' <<'END_OF_FILE' X#ident "%W% %G%" X X#ifndef lint static 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 static char *sccsid = "@(#)CircleDown.c 3.8 1/24/86"; X#endif X X#include "awm.h" X Boolean CircleDown(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 Entry("CircleDown") X X XCirculateSubwindowsDown(dpy, RootWindow(dpy, scr)); X Leave(FALSE) X} END_OF_FILE if test 2648 -ne `wc -c <'awm/CircleDown.c'`; then echo shar: \"'awm/CircleDown.c'\" unpacked with wrong size! fi # end of 'awm/CircleDown.c' fi if test -f 'awm/Lower.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'awm/Lower.c'\" else echo shar: Extracting \"'awm/Lower.c'\" \(2759 characters\) sed "s/^X//" >'awm/Lower.c' <<'END_OF_FILE' X#ident "%W% %G%" X X#ifndef lint static 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 Boolean Lower(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 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_FILE if test 2759 -ne `wc -c <'awm/Lower.c'`; then echo shar: \"'awm/Lower.c'\" unpacked with wrong size! fi # end of 'awm/Lower.c' fi if test -f 'awm/Pause.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'awm/Pause.c'\" else echo shar: Extracting \"'awm/Pause.c'\" \(2949 characters\) sed "s/^X//" >'awm/Pause.c' <<'END_OF_FILE' X#ident "%W% %G%" X X#ifndef lint static 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 Boolean Pause(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 Entry("Pause") X X XGrabServer(dpy); X Leave(FALSE) X} X Boolean Continue(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 Entry("Continue") X X XUngrabServer(dpy); X Leave(FALSE) X} END_OF_FILE if test 2949 -ne `wc -c <'awm/Pause.c'`; then echo shar: \"'awm/Pause.c'\" unpacked with wrong size! fi # end of 'awm/Pause.c' fi if test -f 'awm/Raise.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'awm/Raise.c'\" else echo shar: Extracting \"'awm/Raise.c'\" \(3676 characters\) sed "s/^X//" >'awm/Raise.c' <<'END_OF_FILE' X#ident "%W% %G%" X X#ifndef lint static char *rcsid_Raise_c = "$Header: Raise.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/* 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 * MODIFICATION HISTORY X * X * 000 -- M. Gancarz, DEC Ultrix Engineering Group X * 001 -- R. Kittell, DEC Storage A/D May 19, 1986 X * Optionally warp mouse to upper right corner of window after raise. X * 002 -- Loretta Guarino Reid, DEC Ultrix Engineering Group X * Western Software Lab. Convert to X11. X * 003 -- Jordan Hubbard, Ardent Computer X * Changed for awm. X */ X X#include "awm.h" X Boolean Raise(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{ X XWindowAttributes winfo; /* Window details for warp */ X AwmInfoPtr awi; X int status, vpoint; X X Entry("Raise") X X /* X * If the window is not the root window, raise the window and return. X */ X X awi = GetAwmInfo(window); X if (!awi) X Leave(FALSE) X if (window != RootWindow(dpy, scr)) { X window = awi->frame ? awi->frame : awi->client; X XRaiseWindow(dpy, window); X if (awi->frame) X vpoint = 10 + titleHeight + 2; X else X vpoint = 10; X /* X * Optionally warp the mouse to the upper left corner of the window. X */ X if (WarpOnRaise) { X status = XGetWindowAttributes (dpy, window, &winfo); X if (status == FAILURE) X Leave(FALSE) X X status = XWarpPointer (dpy, None, window, X 0, 0, 0, 0, X winfo.width >= 7 ? winfo.width - 7 : X winfo.width / 2, X winfo.height >= vpoint ? vpoint : X winfo.height / 2); X if (status == FAILURE) X Leave(FALSE) X } X } X Leave(FALSE) X} END_OF_FILE if test 3676 -ne `wc -c <'awm/Raise.c'`; then echo shar: \"'awm/Raise.c'\" unpacked with wrong size! fi # end of 'awm/Raise.c' fi if test -f 'awm/StoreZap.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'awm/StoreZap.c'\" else echo shar: Extracting \"'awm/StoreZap.c'\" \(3760 characters\) sed "s/^X//" >'awm/StoreZap.c' <<'END_OF_FILE' X#ident "%W% %G%" X X#ifndef lint static char *rcsid_StoreZap_c = "$Header: StoreZap.c,v 1.1 88/06/15 08:21:46 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 */ X X/* X * StoreZap - This subroutine is used by the X Window Manager (xwm) X * to store the vertices for the iconify, uniconify zap. X * X */ X X#include "awm.h" X X/* X * Store the vertices for the zap effect. X */ int StoreZap(zap, ulx_1, uly_1, lrx_1, lry_1, ulx_2, uly_2, lrx_2, lry_2) X register XSegment zap[]; X int ulx_1; /* From window, upper left X coordinate. */ X int uly_1; /* From window, upper left Y coordinate. */ X int lrx_1; /* From window, lower right X coordinate. */ X int lry_1; /* From window, lower right Y coordinate. */ X int ulx_2; /* To window, upper left X coordinate. */ X int uly_2; /* To window, upper left Y coordinate. */ X int lrx_2; /* To window, lower right X coordinate. */ X int lry_2; /* To window, lower right Y coordinate. */ X{ X X Entry("StoreZap") X X /* X * Xor in. X */ X zap[0].x1 = ulx_1; zap[0].y1 = uly_1; X zap[0].x2 = ulx_2; zap[0].y2 = uly_2; X X zap[1].x1 = lrx_1; zap[1].y1 = uly_1; X zap[1].x2 = lrx_2; zap[1].y2 = uly_2; X X zap[2].x1 = lrx_1; zap[2].y1 = lry_1; X zap[2].x2 = lrx_2; zap[2].y2 = lry_2; X X zap[3].x1 = ulx_1; zap[3].y1 = lry_1; X zap[3].x2 = ulx_2; zap[3].y2 = lry_2; X X /* X * Xor out. X */ X zap[4].x1 = ulx_1; zap[4].y1 = uly_1; X zap[4].x2 = ulx_2; zap[4].y2 = uly_2; X X zap[5].x1 = lrx_1; zap[5].y1 = uly_1; X zap[5].x2 = lrx_2; zap[5].y2 = uly_2; X X zap[6].x1 = lrx_1; zap[6].y1 = lry_1; X zap[6].x2 = lrx_2; zap[6].y2 = lry_2; X X zap[7].x1 = ulx_1; zap[7].y1 = lry_1; X zap[7].x2 = ulx_2; zap[7].y2 = lry_2; X /* X * Total number of vertices is 8. X */ X Leave(8) X} END_OF_FILE if test 3760 -ne `wc -c <'awm/StoreZap.c'`; then echo shar: \"'awm/StoreZap.c'\" unpacked with wrong size! fi # end of 'awm/StoreZap.c' fi if test -f 'awm/XError.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'awm/XError.c'\" else echo shar: Extracting \"'awm/XError.c'\" \(2656 characters\) sed "s/^X//" >'awm/XError.c' <<'END_OF_FILE' X#ident "%W% %G%" X X#ifndef lint static 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) Display *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_FILE if test 2656 -ne `wc -c <'awm/XError.c'`; then echo shar: \"'awm/XError.c'\" unpacked with wrong size! fi # end of 'awm/XError.c' fi if test -f 'awm/bitmaps/xterm.bm' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'awm/bitmaps/xterm.bm'\" else echo shar: Extracting \"'awm/bitmaps/xterm.bm'\" \(3798 characters\) sed "s/^X//" >'awm/bitmaps/xterm.bm' <<'END_OF_FILE' 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 xterm_width 48 X#define xterm_height 48 static char xterm_bits[] = { X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x00, X 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0x20, 0xfe, 0xff, 0xff, 0x1f, 0x05, X 0x20, 0x01, 0x00, 0x00, 0x20, 0x09, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x11, X 0xa0, 0xfc, 0xff, 0x00, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, X 0xa0, 0xfc, 0x01, 0x00, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, X 0xa0, 0xfc, 0xff, 0x3f, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, X 0xa0, 0xfc, 0x03, 0x00, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, X 0xa0, 0xfc, 0xff, 0x01, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, X 0xa0, 0xfc, 0x00, 0x00, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, X 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, X 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, X 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, X 0xa0, 0x00, 0x00, 0x00, 0x40, 0x21, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x11, X 0xa0, 0x00, 0x00, 0x00, 0x40, 0x11, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x09, X 0xa0, 0x00, 0x00, 0x00, 0x40, 0x09, 0xa0, 0x00, 0x00, 0x00, 0x40, 0x05, X 0x20, 0x01, 0x00, 0x00, 0x20, 0x05, 0x20, 0xfe, 0xff, 0xff, 0x1f, 0x03, X 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0xff, 0xff, 0xff, 0xff, 0x00, X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, X 0xc0, 0xff, 0xff, 0xff, 0xff, 0x03, 0x20, 0x00, 0x00, 0x00, 0x00, 0x03, X 0xa0, 0xaa, 0xaa, 0xaa, 0x2a, 0x03, 0x10, 0x00, 0x00, 0x00, 0x80, 0x02, X 0x50, 0x55, 0x55, 0x55, 0x95, 0x02, 0x08, 0x00, 0x00, 0x00, 0x40, 0x02, X 0xa8, 0xaa, 0xaa, 0xaa, 0x4a, 0x02, 0x04, 0x00, 0x00, 0x00, 0x20, 0x01, X 0xb4, 0xff, 0xff, 0xff, 0xad, 0x00, 0x02, 0x00, 0x00, 0x00, 0x50, 0x00, X 0xfe, 0xff, 0xff, 0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; END_OF_FILE if test 3798 -ne `wc -c <'awm/bitmaps/xterm.bm'`; then echo shar: \"'awm/bitmaps/xterm.bm'\" unpacked with wrong size! fi # end of 'awm/bitmaps/xterm.bm' fi if test -f 'awm/exp_path.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'awm/exp_path.c'\" else echo shar: Extracting \"'awm/exp_path.c'\" \(3391 characters\) sed "s/^X//" >'awm/exp_path.c' <<'END_OF_FILE' X#ident "%W% %G%" X X#ifndef lint static char *rcsid_exp_path_c = "$Header: exp_path.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 <pwd.h> X#include <stdio.h> X#include <fcntl.h> X#include "awm.h" X X/* X * WARNING: This code is obscure. X * Modify at your Own Risk. X */ char *expand_file(s) register 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 char *deblank(s) register 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 char *expand_from_path(s) register 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_FILE if test 3391 -ne `wc -c <'awm/exp_path.c'`; then echo shar: \"'awm/exp_path.c'\" unpacked with wrong size! fi # end of 'awm/exp_path.c' fi if test -f 'awm/menus/eventsave.c' -a "${1}" != "-c" ; then echo shar: Will not clobber 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_FILE' X#ident "%W% %G%" X X#ifndef lint static 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 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#include <stdio.h> X#include "dbug.h" X#include "X11/Xlib.h" X X#include "eventstack.h" X X void 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 void 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 void 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 void 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 void 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 void 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_FILE if test 3619 -ne `wc -c <'awm/menus/eventsave.c'`; then echo shar: \"'awm/menus/eventsave.c'\" unpacked with wrong size! fi # end of 'awm/menus/eventsave.c' fi if test -f 'awm/menus/eventstack.c' -a "${1}" != "-c" ; then echo shar: Will not clobber 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_FILE' 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 extern char *malloc(); X void PushEvent(event, Eq) XXEvent *event; struct 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) struct 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_FILE if test 2655 -ne `wc -c <'awm/menus/eventstack.c'`; then echo shar: \"'awm/menus/eventstack.c'\" unpacked with wrong size! fi # end of 'awm/menus/eventstack.c' fi echo shar: End of archive 3 \(of 17\). cp /dev/null ark3isdone 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