jkh@ardent.UUCP (Jordan K. Hubbard) (06/06/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 1 (of 8)." # Contents: Beep.c Bindings.c CircleDown.c CircleUp.c Cursors.c # Error.c Focus.c Grab.c Imakefile Lower.c Pause.c README Raise.c # StoreZap.c XError.c XRdBitFD.c bitmaps def.awmrc errHndlr.c lex.l # menus neaten.def.h neaten.ext.h support.c support.h # Wrapped by jkh@ardent on Sun Jun 5 18:56:23 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'Beep.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Beep.c'\" else echo shar: Extracting \"'Beep.c'\" \(1786 characters\) sed "s/^X//" >'Beep.c' <<'END_OF_FILE' X#ifndef lint static char *rcsid_Beep_c = "$Header: Beep.c,v 1.4 87/09/11 08:21:18 toddb Exp $"; X#endif lint X X#include "X11/copyright.h" 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 = "@(#)Beep.c 3.8 1/24/86"; X#endif X X#include "awm.h" X Boolean Beep(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("Beep") X X XBell(dpy, VOLUME_PERCENTAGE(Volume)); X Leave(FALSE) X} END_OF_FILE if test 1786 -ne `wc -c <'Beep.c'`; then echo shar: \"'Beep.c'\" unpacked with wrong size! fi # end of 'Beep.c' fi if test -f 'Bindings.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Bindings.c'\" else echo shar: Extracting \"'Bindings.c'\" \(2988 characters\) sed "s/^X//" >'Bindings.c' <<'END_OF_FILE' X#ifndef lint static char *rcsid_Bindings_c = "$Header: Bindings.c,v 1.9 87/08/21 13:30:22 swick Exp $"; X#endif lint X X#include "X11/copyright.h" 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 2988 -ne `wc -c <'Bindings.c'`; then echo shar: \"'Bindings.c'\" unpacked with wrong size! fi # end of 'Bindings.c' fi if test -f 'CircleDown.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'CircleDown.c'\" else echo shar: Extracting \"'CircleDown.c'\" \(1936 characters\) sed "s/^X//" >'CircleDown.c' <<'END_OF_FILE' X#ifndef lint static char *rcsid_CircleDown_c = "$Header: CircleDown.c,v 1.4 87/09/11 08:21:21 toddb Exp $"; X#endif lint X X#include "X11/copyright.h" 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 1936 -ne `wc -c <'CircleDown.c'`; then echo shar: \"'CircleDown.c'\" unpacked with wrong size! fi # end of 'CircleDown.c' fi if test -f 'CircleUp.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'CircleUp.c'\" else echo shar: Extracting \"'CircleUp.c'\" \(1918 characters\) sed "s/^X//" >'CircleUp.c' <<'END_OF_FILE' X#ifndef lint static char *rcsid_CircleUp_c = "$Header: CircleUp.c,v 1.4 87/09/11 08:21:23 toddb Exp $"; X#endif lint X X#include "X11/copyright.h" 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 = "@(#)CircleUp.c 3.8 1/24/86"; X#endif X X#include "awm.h" X Boolean CircleUp(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("CircleUp") X X XCirculateSubwindowsUp(dpy, RootWindow(dpy, scr)); X Leave(FALSE) X} END_OF_FILE if test 1918 -ne `wc -c <'CircleUp.c'`; then echo shar: \"'CircleUp.c'\" unpacked with wrong size! fi # end of 'CircleUp.c' fi if test -f 'Cursors.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Cursors.c'\" else echo shar: Extracting \"'Cursors.c'\" \(3174 characters\) sed "s/^X//" >'Cursors.c' <<'END_OF_FILE' X#ifndef lint static char *rcsid_StoreCursors_c = "$Header: Cursors.c,v 1.2 87/09/11 08:21:52 toddb Exp $"; X#endif lint X X#include "X11/copyright.h" 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 * Convert to X11 X */ X X#ifndef lint static char *sccsid = "@(#)StoreCursors.c 3.8 1/24/86"; X#endif X X#include "awm.h" X#include "X11/cursorfont.h" X X/* X * Store all the cursors into global variables. X */ StoreCursors() X{ X Entry("StoreCursors") X X /* X * Main awm cursor and movement cursor. X */ X ArrowCrossCursor = XCreateFontCursor(dpy, XC_fleur); X if (ArrowCrossCursor == FAILURE) { X Error("StoreCursors -> Unable to store ArrowCrossCursor."); X } X X /* X * Text cursor used in icons. X */ X TextCursor = XCreateFontCursor(dpy, XC_xterm); X if (TextCursor == FAILURE) { X Error("StoreCursors -> Unable to store TextCursor."); X } X X /* X * Icon cursor used to iconify windows. X */ X IconCursor = XCreateFontCursor(dpy, XC_icon); X if (IconCursor == FAILURE) { X Error("StoreCursors -> Unable to store IconCursor."); X } X X /* X * Left button main cursor. X */ X LeftButtonCursor = XCreateFontCursor(dpy, XC_leftbutton); X if (LeftButtonCursor == FAILURE) { X Error("StoreCursors -> Unable to store LeftButtonCursor."); X } X X /* X * Middle button main cursor. X */ X MiddleButtonCursor = XCreateFontCursor(dpy, XC_middlebutton); X if (MiddleButtonCursor == FAILURE) { X Error("StoreCursors -> Unable to store MiddleButtonCursor."); X } X X /* X * Right button main cursor. X */ X RightButtonCursor = XCreateFontCursor(dpy, XC_rightbutton); X if (RightButtonCursor == FAILURE) { X Error("StoreCursors -> Unable to store RightButtonCursor."); X } X X /* X * Targer cursor used to identify a window for an action. X */ X TargetCursor = XCreateFontCursor(dpy, XC_circle); X if (TargetCursor == FAILURE) { X Error("StoreCursors -> Unable to store TargetCursor."); X } X Leave(0) X} X END_OF_FILE if test 3174 -ne `wc -c <'Cursors.c'`; then echo shar: \"'Cursors.c'\" unpacked with wrong size! fi # end of 'Cursors.c' fi if test -f 'Error.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Error.c'\" else echo shar: Extracting \"'Error.c'\" \(1784 characters\) sed "s/^X//" >'Error.c' <<'END_OF_FILE' X#ifndef lint static char *rcsid_Error_c = "$Header: Error.c,v 1.4 87/09/09 11:58:56 swick Exp $"; X#endif lint X X#include "X11/copyright.h" 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 = "@(#)Error.c 3.8 1/24/86"; X#endif X X#include "awm.h" X/* X * Default error reporting routine. Called when a random awm error X * is encountered. X */ XError(s) char *s; /* Error description string */ X{ X Entry("Error") X X fprintf(stderr, "awm: %s\n", s); X Cleanup(); X exit(1); X} X void Warning(s) char *s; /* Error description string */ X{ X Entry("Warning") X X fprintf(stderr, "awm: warning: %s\n", s); X Leave_void X} END_OF_FILE if test 1784 -ne `wc -c <'Error.c'`; then echo shar: \"'Error.c'\" unpacked with wrong size! fi # end of 'Error.c' fi if test -f 'Focus.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Focus.c'\" else echo shar: Extracting \"'Focus.c'\" \(1941 characters\) sed "s/^X//" >'Focus.c' <<'END_OF_FILE' X#ifndef lint static char *rcsid_Focus_c = "$Header: Focus.c,v 1.4 87/09/11 08:21:26 toddb Exp $"; X#endif lint X X#include "X11/copyright.h" 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 = "@(#)Focus.c 3.8 1/24/86"; X#endif X X#include "awm.h" X Boolean Focus(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 X Entry("Focus"); X X awi = GetAwmInfo(window); X if (awi) X window = awi->client; X XSetInputFocus(dpy, window, RevertToParent, CurrentTime); X FocusSetByUser = TRUE; X Leave(FALSE) X} END_OF_FILE if test 1941 -ne `wc -c <'Focus.c'`; then echo shar: \"'Focus.c'\" unpacked with wrong size! fi # end of 'Focus.c' fi if test -f 'Grab.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Grab.c'\" else echo shar: Extracting \"'Grab.c'\" \(464 characters\) sed "s/^X//" >'Grab.c' <<'END_OF_FILE' X#include "X11/Xlib.h" X#include "awm.h" X void grab_pointer() X{ X Entry("grab_pointer") X X if (XGrabPointer( dpy, RootWindow(dpy, scr), X TRUE, EVENTMASK, GrabModeAsync, X GrabModeAsync, None, X ArrowCrossCursor, CurrentTime ) X != GrabSuccess ) X fprintf(stderr, "awm (grab_pointer): Can't grab the mouse."); X Leave_void X} X void ungrab_pointer() X{ X Entry("ungrab_pointer") X X XUngrabPointer(dpy, CurrentTime); X Leave_void X} END_OF_FILE if test 464 -ne `wc -c <'Grab.c'`; then echo shar: \"'Grab.c'\" unpacked with wrong size! fi # end of 'Grab.c' fi if test -f 'Imakefile' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Imakefile'\" else echo shar: Extracting \"'Imakefile'\" \(1880 characters\) sed "s/^X//" >'Imakefile' <<'END_OF_FILE' 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 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 SRCS= globals.c Beep.c Bindings.c CircleDown.c CircleUp.c\ X Cursors.c Focus.c GetButton.c GridBox.c Iconify.c Icons.c Lower.c\ X Menu.c Move.c MoveOpaque.c NewIconify.c Pause.c Push.c Error.c\ X Raise.c Refresh.c Resize.c Restart.c RubberBand.c StoreBox.c \ X StoreZap.c XError.c awm.c FocusChng.c Titlebar.c errHndlr.c \ X Grab.c menu_sup.c Gadget.c support.c exp_path.c Neaten.c X OBJS= gram.o lex.o globals.o Beep.o Bindings.o CircleDown.o CircleUp.o\ X Cursors.o Focus.o GetButton.o GridBox.o Iconify.o Icons.o Lower.o\ X Menu.o Move.o MoveOpaque.o NewIconify.o Pause.o Push.o Error.o\ X Raise.o Refresh.o Resize.o Restart.o RubberBand.o StoreBox.o \ X StoreZap.o XError.o awm.o FocusChng.o Titlebar.o errHndlr.o \ X Grab.o menu_sup.o Gadget.o support.o exp_path.o Neaten.o X ComplexProgramTarget(awm) X InstallNonExec(def.awmrc, $(LIBDIR)) X X$(MENU_ARCH):: X @echo Making menu package... X @(cd $(MENU_LIB); make) X @echo done. X X$(NEATEN_ARCH):: X cp Makefile.rtl $(NEATEN_LIB)/Makefile X @echo Making Neaten package X @(cd $(NEATEN_LIB); make -f Makefile) X @echo done. X clean:: X @echo Cleaning menus... X @(cd $(MENU_LIB); make clean) X @echo done. X rm -f y.tab.h END_OF_FILE if test 1880 -ne `wc -c <'Imakefile'`; then echo shar: \"'Imakefile'\" unpacked with wrong size! fi # end of 'Imakefile' fi if test -f 'Lower.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Lower.c'\" else echo shar: Extracting \"'Lower.c'\" \(2054 characters\) sed "s/^X//" >'Lower.c' <<'END_OF_FILE' X#ifndef lint X static char *rcsid_Lower_c = "$Header: Lower.c,v 1.3 87/09/11 08:21:32 toddb Exp $"; X#endif lint X X#include "X11/copyright.h" 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 */ X X#ifndef lint static char *sccsid = "@(#)Lower.c 3.8 1/24/86"; X#endif 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 2054 -ne `wc -c <'Lower.c'`; then echo shar: \"'Lower.c'\" unpacked with wrong size! fi # end of 'Lower.c' fi if test -f 'Pause.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Pause.c'\" else echo shar: Extracting \"'Pause.c'\" \(2244 characters\) sed "s/^X//" >'Pause.c' <<'END_OF_FILE' X#ifndef lint static char *rcsid_Pause_c = "$Header: Pause.c,v 1.3 87/09/11 08:21:35 toddb Exp $"; X#endif lint X X#include "X11/copyright.h" 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#ifndef lint static char *sccsid = "@(#)Pause.c 3.8 1/24/86"; X#endif 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 2244 -ne `wc -c <'Pause.c'`; then echo shar: \"'Pause.c'\" unpacked with wrong size! fi # end of 'Pause.c' fi if test -f 'README' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'README'\" else echo shar: Extracting \"'README'\" \(6154 characters\) sed "s/^X//" >'README' <<'END_OF_FILE' This represents the first release of the Ardent Window Manager (awm). It's being released on the same terms as its predecessor (uwm) with one additional request: Since this window manager is the "official" window manager of Ardent Computer, a lot more effort and time will be expended to ensure that it works reliably. Please try and coordinate fixes and enhancements through Ardent so that all may benefit. There are sure to be some bugs, we'll be here trying to fix them. X INSTALLATION: X Installation should be fairly straightforward. If you're using imake, first modify $(TOPDIR)/util/imake.includes/Imake.tmpl to define a macro called AWMDIR (look for UWMDIR for an example) which should point to someplace where you want to stash the system.awmrc file. If you like, you can just make UWMDIR and AWMDIR point to the same place. If you're using make, modify the definition of AWMDIR in the Makefile X(sort of against the rules). X There's a file named XRdBitFD.c which contains a new Xlib routine called XXReadBitmapFileData(). Awm uses this routine quite a bit, so you must install it as part of your Xlib before compiling awm. Just move the file named "XRdBitFD.c" to lib/X and modify lib/X/Imakefile (or lib/X/Makefile if you don't use imake) to compile it with the rest of the library. X The reason I wrote this routine was that the only two routines for dealing with (reading in) bitmap files were XReadBitmapFile() and XXCreatePixmapFromBitmapData(). XXReadBitmapFile() returns a depth one pixmap, with no opportunity to specify either depth or color (evil). XCreatePixmapFromBitmapData() allows this, but assumes that you've already got ahold of the data somehow. XReadBitmapFileData() takes care of that part. It's my personal feeling that XReadBitmapFile() is about due for extinction. X If all this seems confusing, send me mail and I'll try to explain it differently. X Support for the RTL Neaten package has been added and if you'd like to compile it in, you need to do two things: X X 1. Obtain the RTL neaten package somehow. It's too big to bundle with awm, X so it's expected that you'll obtain it by some other means (if you haven't X already). If you are on a system V system with 14 character file names you're X in for a bit for work. After renaming all of the > 14 char files, you'll want X to modify Makefile.rtl (in the awm directory) accordingly. X X 2. The makefile that comes with the neaten package assumes that you want to X compile their neatening window manager (nuwm), so you don't want to use X that. Modify awm's Imakefile (or Makefile) to point to the directory X where neaten resides (the macro NEATEN_LIB) and uncomment/comment the X appropriate macro definition lines. X X 3. Do an imake/make. The make will compile all of awm's files and then proceed X to make a neaten.a in the neaten directory which it will link against. X X X If you don't compile awm with Neaten, the function f.neaten may still be bound X but it will just print a warning message if invoked. X X Please note that the Neaten package has not been extensively tested with X awm and should be considered an experimental "frill" more than anything else. X It seems to shuffle icons around ok, though I don't understand some of its X window placement logic. If it's useful, use it, if not, don't compile it in. X The rtl menu package in menus (non-optional) has its own Makefile which you may wish to customize (compiler flags, compiler type, etc), though the default configuration should produce a working awm binary on your system. This whole setup needs to be gone through and redone, but that will have to wait for another day (or a kind volunteer). X X XFirst time users of awm will probably want to read the manual page carefully and then set about tailoring their .Xdefaults file accordingly. The actual format of the .awmrc file does not differ substantially from uwm's .uwmrc file, but since much of the variable declaration stuff has been moved into .Xdefaults, a .uwmrc file will fail miserably if blithly copied into a .awmrc file. It's probably easier to go from scratch, starting with .Xdefaults. X After defaults have been entered (by far the largest task), a careful examination of your current uwm interface should be done to see what possible benefits might be derived from title bar, gadget and border contexts. You will most likely be able to eliminate almost all "chorded" buttons and go to naked buttons on title bars/gadgets/borders. You can now also bind naked buttons to icons without having the button stolen from applications, so it's usually a win to bind an f.iconify to the icon context if you like the way X10's xterm used to work. X Highlighting is a new feature which does quite a bit more than just tweak border colors. It will change the title bar text font (and redisplay the text) as well as alternating between two different title bar background pixmaps and or border context pixmaps. X I use a blank pixmap for the regular background (which is the default, I.E. I don't declare one) and a pixmap containing 7 horizontal lines for the BoldPixmap. The effect is not unlike a macintosh window. With some careful artistry (and placement) of gadget boxes, one could probably emulate this even more closely, though I'm not sure why one would want to. X If you decide to draw some bitmaps for gadget boxes, be sure to calculate the height of the title bar font (and the title bar bold font, since the highest of the two is used) (plus title.pad) to see how "tall" the title bars will be. Gadget boxes are expected to fit within the title bar, not the other way around. Of course, one can create pixmaps that are smaller than the height of the title bar and the resulting gadget box will be scaled (and centered) accordingly. X It's suggested that you look at the cursor font first as there are a lot of suitable glyphs already there. X X Any and all suggestions are, of course, appreciated. Bugs should be reported to the following e-mail address(s) X X Jordan Hubbard X Internet: jkh@violet.berkeley.edu X UUCP: uunet!ardent!jkh X U.S. Mail: Ardent Computer X 880 Maude X Sunnyvale, Ca. 94086 X END_OF_FILE if test 6154 -ne `wc -c <'README'`; then echo shar: \"'README'\" unpacked with wrong size! fi # end of 'README' fi if test -f 'Raise.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Raise.c'\" else echo shar: Extracting \"'Raise.c'\" \(2936 characters\) sed "s/^X//" >'Raise.c' <<'END_OF_FILE' X/* $Header: Raise.c,v 1.1 87/09/11 08:21:40 toddb Exp $ */ X X#include "X11/copyright.h" 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 */ X X#ifndef lint static char *sccsid = "@(#)Raise.c 3.8 1/24/86"; X#endif X X#include "awm.h" X extern int Fheight; 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 + Fheight + 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 2936 -ne `wc -c <'Raise.c'`; then echo shar: \"'Raise.c'\" unpacked with wrong size! fi # end of 'Raise.c' fi if test -f 'StoreZap.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'StoreZap.c'\" else echo shar: Extracting \"'StoreZap.c'\" \(3120 characters\) sed "s/^X//" >'StoreZap.c' <<'END_OF_FILE' X#ifndef lint static char *rcsid_StoreZap_c = "$Header: StoreZap.c,v 1.3 87/09/11 08:21:46 toddb Exp $"; X#endif lint X X#include "X11/copyright.h" 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#ifndef lint static char *sccsid = "@(#)StoreZap.c 3.8 1/24/86"; X#endif 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 3120 -ne `wc -c <'StoreZap.c'`; then echo shar: \"'StoreZap.c'\" unpacked with wrong size! fi # end of 'StoreZap.c' fi if test -f 'XError.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'XError.c'\" else echo shar: Extracting \"'XError.c'\" \(2016 characters\) sed "s/^X//" >'XError.c' <<'END_OF_FILE' X#ifndef lint static char *rcsid_XError_c = "$Header: XError.c,v 1.4 87/09/11 08:21:49 toddb Exp $"; X#endif lint X X#include "X11/copyright.h" 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 = "@(#)XError.c 3.8 1/24/86"; X#endif 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 2016 -ne `wc -c <'XError.c'`; then echo shar: \"'XError.c'\" unpacked with wrong size! fi # end of 'XError.c' fi if test -f 'XRdBitFD.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'XRdBitFD.c'\" else echo shar: Extracting \"'XRdBitFD.c'\" \(3044 characters\) sed "s/^X//" >'XRdBitFD.c' <<'END_OF_FILE' X/* Copyright, 1988, Massachusetts Institute of Theology */ X X#include "copyright.h" X X#include "Xos.h" X#include "X11/Xlib.h" X#include "X11/Xutil.h" X#include "Xlibint.h" X#include <stdio.h> X X#define MAX_LINE 1000 X int XReadBitmapFileData(filename, width, height, data, x_hot, y_hot) X char *filename; X unsigned int *width, *height; /* RETURNED */ X char **data; /* RETURNED */ X int *x_hot, *y_hot; /* RETURNED */ X{ X FILE *stream; X char *bits = 0; X char *ptr; X char line[MAX_LINE]; X int size, bytes; X char name_and_type[MAX_LINE]; X char *type; X int value; X int version10p; X int padding; X int bytes_per_line; X unsigned int ww = 0; X unsigned int hh = 0; X int hx = -1; X int hy = -1; X X if (!filename || !(stream = fopen(filename, "r"))) X return(BitmapOpenFailed); X X for (;;) { X if (!fgets(line, MAX_LINE, stream)) X break; X if (strlen(line) == MAX_LINE-1) { X fclose(stream); X return(BitmapFileInvalid); X } X X if (sscanf(line, "#define %s %d", name_and_type, &value) == 2) { X if (!(type = rindex(name_and_type, '_'))) X type = name_and_type; X else X type++; X if (!strcmp("width", type)) X ww=(unsigned int) value; X if (!strcmp("height", type)) X hh=(unsigned int) value; X if (!strcmp("hot", type)) { X if (type--==name_and_type || type--==name_and_type) X continue; X if (!strcmp("x_hot", type)) X hx = value; X if (!strcmp("y_hot", type)) X hy = value; X } X continue; X } X X if (sscanf(line, "static short %s = {", name_and_type) == 1) X version10p = 1; X else if (sscanf(line, "static unsigned char %s = {", name_and_type) == 1) X version10p = 0; X else if (sscanf(line, "static char %s = {", name_and_type) == 1) X version10p = 0; X else continue; X X if (!(type = rindex(name_and_type, '_'))) X type = name_and_type; X else X type++; X if (strcmp("bits[]", type)) X continue; X X if (!ww || !hh) { X fclose(stream); X return(BitmapFileInvalid); X } X X padding = 0; X if ((ww % 16) && ((ww % 16) < 9) && version10p) X padding = 1; X X bytes_per_line = (ww+7)/8 + padding; X X size = bytes_per_line * hh; X bits = (char *) Xmalloc( size ); X if (!bits) { X fclose(stream); X return(BitmapNoMemory); X } X X if (version10p) X for (bytes=0, ptr=bits; bytes<size; (bytes += 2)) { X if (fscanf(stream, " 0x%x%*[,}]%*[ \n]", &value) != 1) { X Xfree(bits); X fclose(stream); X return(BitmapFileInvalid); X } X *(ptr++) = value & 0xff; X if (!padding || ((bytes+2) % bytes_per_line)) X *(ptr++) = value >> 8; X } X else X for (bytes=0, ptr=bits; bytes<size; bytes++, ptr++) { X if (fscanf(stream, " 0x%x%*[,}]%*[ \n]", &value) != 1) { X Xfree(bits); X fclose(stream); X return(BitmapFileInvalid); X } X *ptr=value; X } X X } X X if (!bits) { X fclose(stream); X return(BitmapFileInvalid); X } X *data = bits; X *width = ww; X *height = hh; X X if (x_hot) X *x_hot = hx; X if (y_hot) X *y_hot = hy; X X fclose(stream); X return(BitmapSuccess); X} END_OF_FILE if test 3044 -ne `wc -c <'XRdBitFD.c'`; then echo shar: \"'XRdBitFD.c'\" unpacked with wrong size! fi # end of 'XRdBitFD.c' fi if test ! -d 'bitmaps' ; then echo shar: Creating directory \"'bitmaps'\" mkdir 'bitmaps' fi if test -f 'def.awmrc' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'def.awmrc'\" else echo shar: Extracting \"'def.awmrc'\" \(1879 characters\) sed "s/^X//" >'def.awmrc' <<'END_OF_FILE' X# $Source $ X# $Author $ X# $Header $ X# Copyright (c) 1987 by the Massachusetts Institute of Technology. X# X# This is a startup file for uwm that produces an xwm lookalike, X# but adds two useful menus. It is patterned on the public X# distribution ../lib/X/uwm/jg.uwmrc file by Jim Gettys. X# resetbindings resetmenus resetgadgets X X# FUNCTION KEYS CONTEXT MOUSE BUTTON ACTIONS f.newiconify= meta :window|icon: delta left f.raise= meta :window|icon: delta left f.lower= meta :window|icon: left up f.raise= meta :window: middle down f.resize= meta :window: delta middle f.iconify= meta :icon: middle up f.raise= meta :window|icon: right down f.move= meta :window|icon: delta right f.circledown= meta :root: left down f.circleup= meta :root: right down f.circledown= m|s :: left down f.menu= :root: middle down : "WindowOps" f.menu= m|s :: middle down : "WindowOps" f.menu= m|s :: middle down : "Preferences" f.circleup= m|s :: right down f.iconify= m|c :window|icon: left down f.newiconify= m|l :window|icon: left down f.raise= m|l :window|icon: left up f.pushright= m|l :window|icon: right down f.pushleft= m|c :window|icon: right down f.pushup= m|l :window|icon: middle down f.pushdown= m|c :window|icon: middle down X menu = "WindowOps" { New Window: !"xterm&" RefreshScreen: f.refresh Redraw: f.redraw Move: f.move Resize: f.resize Lower: f.lower Raise: f.raise CircUp: f.circleup CircDown: f.circledown AutoIconify: f.iconify LowerIconify: f.newiconify NewIconify: f.newiconify XFocus: f.focus XFreeze: f.pause UnFreeze: f.continue Restart: f.restart X} menu = "Preferences" { Bell Loud: !"xset b 7&" Bell Normal: !"xset b 3&" Bell Off: !"xset b off&" Click Loud: !"xset c 8&" Click Soft: !"xset c on&" Click Off: !"xset c off&" Lock On: !"xset l on&" Lock Off: !"xset l off&" Mouse Fast: !"xset m 4 2&" Mouse Normal: !"xset m 2 5&" Mouse Slow: !"xset m 1 1&" X} END_OF_FILE if test 1879 -ne `wc -c <'def.awmrc'`; then echo shar: \"'def.awmrc'\" unpacked with wrong size! fi # end of 'def.awmrc' fi if test -f 'errHndlr.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'errHndlr.c'\" else echo shar: Extracting \"'errHndlr.c'\" \(1809 characters\) sed "s/^X//" >'errHndlr.c' <<'END_OF_FILE' X/* $Header: errHndlr.c,v 1.1 87/09/11 08:23:29 toddb Exp $ */ X#include <stdio.h> X#include "X11/Xlib.h" X int errorStatus = False; X X#ifdef DEBUG void debug(s, x1, x2, x3, x4, x5, x6, x7, x8) char *s; long 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 int 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) fprintf(stderr, "Hey!\n"); X (void) fprintf(stderr, "X Error: %s\n", buffer); X (void) fprintf(stderr, " Request Major code: %d\n", event->request_code); X (void) fprintf(stderr, " Request Minor code: %d\n", event->minor_code); X (void) fprintf(stderr, " ResourceId 0x%x\n", event->resourceid); X (void) fprintf(stderr, " Error Serial #%d\n", event->serial); X (void) fprintf(stderr, " Current Serial #%d\n", dpy->request); X#endif X errorStatus = True; X return 0; X} X static 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 void print_event_info(s, ev) char *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_FILE if test 1809 -ne `wc -c <'errHndlr.c'`; then echo shar: \"'errHndlr.c'\" unpacked with wrong size! fi # end of 'errHndlr.c' fi if test -f 'lex.l' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'lex.l'\" else echo shar: Extracting \"'lex.l'\" \(2260 characters\) sed "s/^X//" >'lex.l' <<'END_OF_FILE' X%{ X X#include <X11/copyright.h> 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 */ X X#ifndef lint static char *sccsid = "@(#)lex.l 3.8 1/24/86"; X#endif 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 char *dequote(); char *stash(); X X%} W [ \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 */ char * dequote(s) char *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 */ char *stash(s) char *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_FILE if test 2260 -ne `wc -c <'lex.l'`; then echo shar: \"'lex.l'\" unpacked with wrong size! fi # end of 'lex.l' fi if test ! -d 'menus' ; then echo shar: Creating directory \"'menus'\" mkdir 'menus' fi if test -f 'neaten.def.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'neaten.def.h'\" else echo shar: Extracting \"'neaten.def.h'\" \(251 characters\) sed "s/^X//" >'neaten.def.h' <<'END_OF_FILE' X#define NEATEN_DEFINE X typedef enum { X Place_Closest, X Place_Top, X Place_Bottom, X Place_Left, X Place_Right, X Place_Center X} Placement; X X#define NEATEN_TRUE 1 X#define NEATEN_FALSE 0 X X#define MAX_PRIORITY 100 X#define MIN_PRIORITY -100 END_OF_FILE if test 251 -ne `wc -c <'neaten.def.h'`; then echo shar: \"'neaten.def.h'\" unpacked with wrong size! fi # end of 'neaten.def.h' fi if test -f 'neaten.ext.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'neaten.ext.h'\" else echo shar: Extracting \"'neaten.ext.h'\" \(411 characters\) sed "s/^X//" >'neaten.ext.h' <<'END_OF_FILE' X#ifndef NEATEN_DEFINE X#include "neaten.def.h" X#endif X extern void Neaten_Desktop(); extern void Neaten_Initialize(); extern void Neaten_Icon_Placement(); extern void Neaten_Identify(); extern int Neaten_Set_Desired(); extern int Neaten_Set_Min(); extern int Neaten_Set_Max(); extern void Neaten_Prorate(); extern int Neaten_Get_Geometry(); extern void Neaten_Set_Priorities(); extern void Neaten_Set_Options(); END_OF_FILE if test 411 -ne `wc -c <'neaten.ext.h'`; then echo shar: \"'neaten.ext.h'\" unpacked with wrong size! fi # end of 'neaten.ext.h' fi if test -f 'support.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'support.c'\" else echo shar: Extracting \"'support.c'\" \(1152 characters\) sed "s/^X//" >'support.c' <<'END_OF_FILE' X#include "support.h" X#include <stdio.h> X X int _rtn_level; int _rtn_trace; X static struct func_stack { X char *rtn_name; X struct func_stack *next; X} *Head; X char *curr_rtn() X{ X if (!Head) X return((char *)0); X else X return(Head->rtn_name); X} X void push_rtn(s) register char *s; X{ X if (!Head) { X Head = (struct func_stack *)malloc(sizeof(struct func_stack)); X if (!Head) { X fprintf(stderr, "Couldn't malloc new func_stack entry!\n"); X exit(1); X } X Head->rtn_name = s; X Head->next = 0; X } X else { X struct func_stack *ptr; X X ptr = (struct func_stack *)malloc(sizeof(struct func_stack)); X if (!ptr) { X fprintf(stderr, "Couldn't malloc new func_stack entry!\n"); X exit(1); X } X ptr->rtn_name = s; X ptr->next = Head; X Head = ptr; X } X _rtn_level++; X if (_rtn_trace) { X int i; X X for (i = 0; i < _rtn_level; i++) X putchar('\t'); X printf("%s(%d)\n", Head->rtn_name, _rtn_level); X } X} X void pop_rtn() X{ X struct func_stack *ptr; X X if (!Head) X return; X ptr = Head; X Head = Head->next; X free(ptr); X _rtn_level--; X} END_OF_FILE if test 1152 -ne `wc -c <'support.c'`; then echo shar: \"'support.c'\" unpacked with wrong size! fi # end of 'support.c' fi if test -f 'support.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'support.h'\" else echo shar: Extracting \"'support.h'\" \(420 characters\) sed "s/^X//" >'support.h' <<'END_OF_FILE' X#define TRACE X X#ifdef TRACE X#define Entry(s) push_rtn(s); X#define Leave(s) { pop_rtn(); return(s); } X#define Leave_void { pop_rtn(); return; } X#define Trace_on _rtn_trace = 1; X#define Trace_off _rtn_trace = 0; extern char *curr_rtn(); extern int _rtn_level; extern int _rtn_trace; X#else X#define Entry(s) X#define Leave(s) return(s); X#define Leave_void return; X#define Trace_on X#define Trace_off X#define Curr_rtn() X#endif END_OF_FILE if test 420 -ne `wc -c <'support.h'`; then echo shar: \"'support.h'\" unpacked with wrong size! fi # end of 'support.h' fi echo shar: End of archive 1 \(of 8\). cp /dev/null ark1isdone MISSING="" for I in 1 2 3 4 5 6 7 8 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 8 archives. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0