mikew@wyse.wyse.com (Mike Wexler) (09/23/88)
Submitted-by: toml%hpfctel@sde.hp.com (Tom LaStrange) Posting-number: Volume 1, Issue 47 Archive-name: twm/part02 #! /bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh <file", e.g.. If this archive is complete, you # will see the following message at the end: # "End of archive 2 (of 7)." # Contents: Makefile gc.c lex.l list.c menus.h parse.c twm.h # xterm.icon # Wrapped by mikew@wyse on Thu Sep 22 16:21:22 1988 PATH=/bin:/usr/bin:/usr/ucb ; export PATH if test -f 'Makefile' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'Makefile'\" else echo shar: Extracting \"'Makefile'\" \(4738 characters\) sed "s/^X//" >'Makefile' <<'END_OF_FILE' X# X# Warning: the cpp used on this machine replaces X# all newlines and multiple tabs/spaces in a macro X# expansion with a single space. Imake tries to X# compensate for this, but is not always X# successful. X# X X# X# This makefile is automatically generated by imake... do not modify X# or you may lose your changes when imake generates makefiles again. X# Ignore this message if you are not using imake. X# X X TOP = /usr/new/src/x/x11.2 X AS = as X CC = cc X CPP = /lib/cpp X LD = ld X LINT = lint X INSTALL = install X TAGS = ctags X RM = rm -f X MV = mv X LN = ln -s X RANLIB = ranlib X AR = ar clq X LS = ls X LINTOPTS = -axz X LINTLIBFLAG = -C X MAKE = make X STD_DEFINES = X CDEBUGFLAGS = -O4 X DESTDIR = /usr/new X X PATHSEP = / X DEPEND = $(DEPENDSRC)/makedepend X IMAKE = $(IMAKESRC)/imake X RGB = $(RGBSRC)/rgb X CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(STD_DEFINES) $(DEFINES) X LINTFLAGS = $(LINTOPTS) $(INCLUDES) $(STD_DEFINES) $(DEFINES) -DLINT X LDFLAGS = $(CDEBUGFLAGS) $(SYS_LIBRARIES) $(SYSAUX_LIBRARIES) X INSTUIDFLAGS = -m 4755 X INSTLIBFLAGS = -m 0664 X INSTINCFLAGS = -m 0444 X INSTMANFLAGS = -m 0444 X INSTAPPFLAGS = -m 0444 X X USRLIBDIR = $(DESTDIR)/usr/lib X BINDIR = $(DESTDIR)/usr/bin/X11 X LIBDIR = $(USRLIBDIR)/X11 X LINTLIBDIR = $(USRLIBDIR)/lint X INCDIR = $(DESTDIR)/usr/include/X11 X FONTDIR = $(LIBDIR)/fonts X UWMDIR = $(LIBDIR)/uwm X AWMDIR = $(LIBDIR)/awm X MANDIR = $(DESTDIR)/usr/man/mann X XAPPLOADDIR = $(LIBDIR)/app-defaults X ADMDIR = $(DESTDIR)/usr/adm X X CLIENTSRC = $(TOP)/clients X DEMOSRC = $(TOP)/demos X LIBSRC = $(TOP)/lib X FONTSRC = $(TOP)/fonts X INCLUDESRC = $(TOP)/X11 X SERVERSRC = $(TOP)/server X UTILSRC = $(TOP)/util X EXAMPLESRC = $(TOP)/examples X CONTRIBSRC = $(TOP)/contrib X DOCSRC = $(TOP)/doc X DEPENDSRC = $(UTILSRC)/makedepend X IMAKESRC = $(UTILSRC)/imake X IRULESRC = $(UTILSRC)/imake.includes X RGBSRC = $(UTILSRC)/rgb X XLIBSRC = $(LIBSRC)/X X TOOLKITSRC = $(LIBSRC)/Xt X AWIDGETSRC = $(LIBSRC)/Xaw X OLDXLIBSRC = $(LIBSRC)/oldX X EXTENSIONSRC = $(TOP)/extensions X XMANSRC = $(DOCSRC)/Xlib/Xman X EXTENSIONLIB = $(EXTENSIONSRC)/lib/libXext.a X XLIB = $(USRLIBDIR)/libX11.a X OLDXLIB = $(USRLIBDIR)/liboldX.a X XTOOLLIB = $(USRLIBDIR)/libXt.a X XAWLIB = $(USRLIBDIR)/libXaw.a X LINTXLIB = $(XLIBSRC)/llib-lX11.ln X LINTXTOOL = $(TOOLKITSRC)/llib-lXt.ln X LINTXAW = $(AWIDGETSRC)/llib-lXaw.ln X INCLUDES = -I$(TOP) X MACROFILE = Sun.macros X IMAKE_CMD = $(NEWTOP)$(IMAKE) -TImake.tmpl \ X -I$(NEWTOP)$(IRULESRC) \ X -s Makefile X RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \ X tags TAGS make.log X X# X#Here is an Imakefile for twm. It depends on having TWMDIR defined X#in Imake.tmpl. I like to use Imakefiles for everything, and I am sure X#other people do also, so perhaps you could do us all a favor and X#distribute this one. X# X X PROGRAMS = twm XLOCAL_LIBRARIES = $(XLIB) X OTHERSRCS = gram.y lex.l X YFLAGS = -d X XSRCS1= add_window.c gc.c list.c twm.c parse.c\ X menus.c events.c resize.c util.c version.c X XOBJS1= gram.o lex.o add_window.o gc.o list.o twm.o parse.o\ X menus.o events.o resize.o util.o version.o X X OBJS = $(OBJS1) $(OBJS2) $(OBJS3) X SRCS = $(SRCS1) $(SRCS2) $(SRCS3) X Xall: $(PROGRAMS) X Xtwm: $(OBJS1) $(LOCAL_LIBRARIES) X $(RM) $@ X $(CC) -o $@ $(OBJS1) $(LOCAL_LIBRARIES) $(LDFLAGS) X Xinstall:: twm X $(INSTALL) -c $(INSTALLFLAGS) twm $(BINDIR) X Xrelink:: X $(RM) $(PROGRAMS) X $(MAKE) $(MFLAGS) $(PROGRAMS) X Xdepend:: $(DEPEND) X Xdepend:: X $(DEPEND) -s "# DO NOT DELETE" -- $(CFLAGS) -- $(SRCS) X X$(DEPEND): X @echo "making $(DEPENDSRC)"; \ X cd $(DEPENDSRC); $(MAKE) X Xclean:: X $(RM) $(PROGRAMS) X Xinstall:: Sample.twmrc X $(INSTALL) -c $(INSTALLFLAGS) Sample.twmrc $(TWMDIR) X Xinstall:: xterm.icon X $(INSTALL) -c $(INSTALLFLAGS) xterm.icon $(TWMDIR) X Xgram.h gram.c: gram.y X yacc -d gram.y X mv y.tab.c gram.c X mv y.tab.h gram.h X Xclean:: X $(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c lex.c X Xclean:: X $(RM_CMD) \#* X XMakefile:: $(IMAKE) X XMakefile:: Imakefile \ X $(IRULESRC)/Imake.tmpl \ X $(IRULESRC)/Imake.rules \ X $(IRULESRC)/$(MACROFILE) X -$(RM) Makefile.bak; $(MV) Makefile Makefile.bak X $(IMAKE_CMD) -DTOPDIR=$(TOP) X X$(IMAKE): X @echo "making $(IMAKESRC)"; \ X cd $(IMAKESRC); $(MAKE) X Xtags:: X $(TAGS) -w *.[ch] X $(TAGS) -xw *.[ch] > TAGS X Xinstall:: X @echo "install done" X XMakefiles:: X END_OF_FILE if test 4738 -ne `wc -c <'Makefile'`; then echo shar: \"'Makefile'\" unpacked with wrong size! fi # end of 'Makefile' fi if test -f 'gc.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'gc.c'\" else echo shar: Extracting \"'gc.c'\" \(8258 characters\) sed "s/^X//" >'gc.c' <<'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/********************************************************************** X * X * $Header: gc.c,v 1.12 88/09/08 15:33:58 toml Exp $ X * X * Open the fonts and create the GCs X * X * 31-Mar-88 Tom LaStrange Initial Version. X * X **********************************************************************/ X X#ifndef lint Xstatic char RCSinfo[]= X"$Header: gc.c,v 1.12 88/09/08 15:33:58 toml Exp $"; X#endif lint X X#include <stdio.h> X#include "twm.h" X Xstatic XFontStruct *dfont; /* my default font */ Xstatic char *dfontname; X X/*********************************************************************** X * X * Procedure: X * CreateGCs - open fonts and create all the needed GC's. I only X * want to do this once, hence the first_time flag. X * X *********************************************************************** X */ X Xvoid XCreateGCs() X{ X static int first_time = TRUE; X XGCValues gcv; X unsigned long gcm, mask; X X if (!first_time) X return; X X first_time = FALSE; X X /* open fonts */ X X dfontname = "8x13"; X if ((dfont = XLoadQueryFont(dpy, dfontname)) == NULL) X { X dfontname = "fixed"; X if ((dfont = XLoadQueryFont(dpy, dfontname)) == NULL) X { X fprintf(stderr,"twm: could not open fonts \"fixed\" or \"8x13\"\n"); X exit(1); X } X } X X if ((TitleBarFont = XLoadQueryFont(dpy, TitleBarFontName)) == NULL) X FontError(TitleBarFontName, &TitleBarFont); X TitleBarFontHeight = TitleBarFont->ascent + TitleBarFont->descent; X TitleBarY = (TITLE_BAR_FONT_HEIGHT - TitleBarFontHeight)/2 + X TitleBarFont->ascent; X X if ((MenuFont = XLoadQueryFont(dpy, MenuFontName)) == NULL) X FontError(MenuFontName, &MenuFont); X MenuFontHeight = MenuFont->ascent + MenuFont->descent; X MenuY = MenuFont->ascent + 1; X X if ((IconFont = XLoadQueryFont(dpy, IconFontName)) == NULL) X FontError(IconFontName, &IconFont); X IconFontHeight = IconFont->ascent + IconFont->descent; X X if ((VersionFont = XLoadQueryFont(dpy, VersionFontName)) == NULL) X FontError(VersionFontName, &VersionFont); X VersionFontHeight = VersionFont->ascent + VersionFont->descent; X X if ((SizeFont = XLoadQueryFont(dpy, SizeFontName)) == NULL) X FontError(SizeFontName, &SizeFont); X SizeFontHeight = SizeFont->ascent + SizeFont->descent; X X if ((InitialFont = XLoadQueryFont(dpy, InitialFontName)) == NULL) X FontError(InitialFontName, &InitialFont); X InitialFontHeight = InitialFont->ascent + InitialFont->descent; X X /* create GC's */ X X if (ReverseVideo) X { X Background = Black; X Foreground = White; X } X else X { X Foreground = Black; X Background = White; X } X X gcm = 0; X gcm |= GCPlaneMask; gcv.plane_mask = AllPlanes; X gcm |= GCForeground; gcv.foreground = BorderTileForeground; X gcm |= GCBackground; gcv.background = BorderTileBackground; X X BorderGC = XCreateGC(dpy, Root, gcm, &gcv); X X gcm = 0; X gcm |= GCFont; gcv.font = TitleBarFont->fid; X gcm |= GCPlaneMask; gcv.plane_mask = AllPlanes; X gcm |= GCForeground; gcv.foreground = TitleForeground; X gcm |= GCBackground; gcv.background = TitleBackground; X X TitleNormalGC = XCreateGC(dpy, Root, gcm, &gcv); X X gcm = 0; X gcm |= GCFont; gcv.font = MenuFont->fid; X gcm |= GCPlaneMask; gcv.plane_mask = AllPlanes; X gcm |= GCForeground; gcv.foreground = MenuForeground; X gcm |= GCBackground; gcv.background = MenuBackground; X X MenuNormalGC = XCreateGC(dpy, Root, gcm, &gcv); X X gcv.foreground = MenuBackground; X gcv.background = MenuForeground; X X MenuReverseGC = XCreateGC(dpy, Root, gcm, &gcv); X X mask = MenuForeground ^ MenuBackground; X X gcm = 0; X gcm |= GCFunction; gcv.function = GXxor; X gcm |= GCFont; gcv.font = MenuFont->fid; X gcm |= GCPlaneMask; gcv.plane_mask = mask; X gcm |= GCForeground; gcv.foreground = mask; X gcm |= GCBackground; gcv.background = MenuBackground; X X MenuXorGC = XCreateGC(dpy, Root, gcm, &gcv); X X gcm = 0; X gcm |= GCFont; gcv.font = MenuFont->fid; X gcm |= GCPlaneMask; gcv.plane_mask = AllPlanes; X gcm |= GCForeground; gcv.foreground = MenuTitleForeground; X gcm |= GCBackground; gcv.background = MenuTitleBackground; X X MenuTitleGC = XCreateGC(dpy, Root, gcm, &gcv); X X mask = Foreground ^ Background; X gcm = 0; X gcm |= GCFunction; gcv.function = GXxor; X gcm |= GCLineWidth; gcv.line_width = 0; X gcm |= GCForeground; gcv.foreground = mask; X gcm |= GCPlaneMask; gcv.plane_mask = mask; X gcm |= GCSubwindowMode; gcv.subwindow_mode = IncludeInferiors; X X DrawGC = XCreateGC(dpy, Root, gcm, &gcv); X X gcm = 0; X gcm |= GCFont; gcv.font = IconFont->fid; X gcm |= GCPlaneMask; gcv.plane_mask = AllPlanes; X gcm |= GCForeground; gcv.foreground = IconForeground; X gcm |= GCBackground; gcv.background = IconBackground; X X IconNormalGC = XCreateGC(dpy, Root, gcm, &gcv); X X gcm = 0; X gcm |= GCFont; gcv.font = VersionFont->fid; X gcm |= GCPlaneMask; gcv.plane_mask = AllPlanes; X gcm |= GCForeground; gcv.foreground = Foreground; X gcm |= GCBackground; gcv.background = Background; X X VersionNormalGC = XCreateGC(dpy, Root, gcm, &gcv); X X gcm = 0; X gcm |= GCFont; gcv.font = SizeFont->fid; X gcm |= GCPlaneMask; gcv.plane_mask = AllPlanes; X gcm |= GCForeground; gcv.foreground = Foreground; X gcm |= GCBackground; gcv.background = Background; X X SizeNormalGC = XCreateGC(dpy, Root, gcm, &gcv); X X gcm = 0; X gcm |= GCFont; gcv.font = InitialFont->fid; X gcm |= GCPlaneMask; gcv.plane_mask = AllPlanes; X gcm |= GCForeground; gcv.foreground = Foreground; X gcm |= GCBackground; gcv.background = Background; X X InitialNormalGC = XCreateGC(dpy, Root, gcm, &gcv); X} X X/*********************************************************************** X * X * Procedure: X * FontError - we couldn't open the font they wanted, give them a X * default one. X * X * Inputs: X * name - the name of the font we were trying to open X * X * Outputs: X * fptr - the point pointer to fill in with the default font X * X *********************************************************************** X */ X XFontError(name, fptr) Xchar *name; XXFontStruct **fptr; X{ X fprintf(stderr, "twm: couldn't open font \"%s\", using \"%s\" instead.\n", X name, dfontname); X X *fptr = dfont; X} END_OF_FILE if test 8258 -ne `wc -c <'gc.c'`; then echo shar: \"'gc.c'\" unpacked with wrong size! fi # end of 'gc.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'\" \(7285 characters\) sed "s/^X//" >'lex.l' <<'END_OF_FILE' X%{ 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/*********************************************************************** X * X * $Header: lex.l,v 1.34 88/09/08 15:33:46 toml Exp $ X * X * .twmrc lex file X * X * 12-Nov-87 Thomas E. LaStrange File created X * X ***********************************************************************/ X Xstatic char RCSinfo[]= X"$Header: lex.l,v 1.34 88/09/08 15:33:46 toml Exp $"; X X#include <stdio.h> X#include "gram.h" X Xextern int ParseError; X X%} X%k 2000 X%e 2000 X%p 4000 X%n 4000 X Xqstring \"[^"]*\" Xnumber [0-9]+ Xbutton [Bb][Uu][Tt][Tt][Oo][Nn] Xtbutton [Tt][Ii][Tt][Ll][Ee][Bb][Uu][Tt][Tt][Oo][Nn] Xnoraise [Nn][Oo][Rr][Aa][Ii][Ss][Ee][Oo][Nn] X%% X"{" { return (LB); } X"}" { return (RB); } X"=" { return (EQUALS); } X":" { return (COLON); } X X{button}{number} { (void)sscanf(&yytext[6], "%d", &yylval.num); X return (BUTTON); X } X{tbutton}{number} { (void)sscanf(&yytext[11], "%d", &yylval.num); X return (TBUTTON); X } X[Mm][Ee][Nn][Uu] { return MENU; } X[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn] { return FUNCTION; } X Xm { return (META); } Xs { return (SHIFT); } Xc { return (CONTROL); } X Xwindow { return (WINDOW); } Xicon { return (ICON); } Xtitle { return (TITLE); } Xroot { return (ROOT); } Xframe { return (FRAME); } X Xf.nop { return F_NOP; } Xf.beep { return F_BEEP; } Xf.quit { return F_QUIT; } Xf.title { return F_TITLE ; } Xf.menu { return F_MENU; } Xf.unfocus { return F_UNFOCUS; } Xf.refresh { return F_REFRESH; } Xf.winrefresh { return F_WINREFRESH; } Xf.file { return F_FILE; } Xf.twmrc { return F_TWMRC; } Xf.version { return F_VERSION; } Xf.circleup { return F_CIRCLEUP; } Xf.circledown { return F_CIRCLEDOWN; } Xf.source { return F_SOURCE; } Xf.cutfile { return F_CUTFILE; } Xf.function { return F_FUNCTION; } X"!" { return F_EXEC; } X"^" { return F_CUT; } X Xf.move { return F_MOVE; } Xf.iconify { return F_ICONIFY; } Xf.focus { return F_FOCUS; } Xf.resize { return F_RESIZE; } Xf.raise { return F_RAISE; } Xf.lower { return F_LOWER; } Xf.destroy { return F_DESTROY; } X Xt.nop { return F_NOP; } Xt.raise { return F_RAISE; } Xt.lower { return F_LOWER; } Xt.move { return F_MOVE; } X X{noraise}[Mm][Oo][Vv][Ee] { return NO_RAISE_ON_MOVE; } X{noraise}[Dd][Ee][Ii][Cc][Oo][Nn][Ii][Ff][Yy] { return NO_RAISE_ON_DEICONIFY; } X{noraise}[Rr][Ee][Ss][Ii][Zz][Ee] { return NO_RAISE_ON_RESIZE; } X[Cc][Oo][Ll][Oo][Rr] { return (COLOR); } X[Mm][Oo][Nn][Oo][Cc][Hh][Rr][Oo][Mm][Ee] { return (MONOCHROME); } X[Nn][Oo][Tt][Ii][Tt][Ll][Ee][Ff][Oo][Cc][Uu][Ss] { return (NO_TITLE_FOCUS); } X[Nn][Oo][Hh][Ii][Gg][Hh][Ll][Ii][Gg][Hh][Tt] { return (NO_HILITE); } X[Zz][Oo][Oo][Mm] { return (ZOOM); } X[Uu][Nn][Kk][Nn][Oo][Ww][Nn][Ii][Cc][Oo][Nn] { return UNKNOWN_ICON; } X[Ww][Aa][Rr][Pp][Cc][Uu][Rr][Ss][Oo][Rr] { return WARPCURSOR; } X[Bb][Oo][Rr][Dd][Ee][Rr][Ww][Ii][Dd][Tt][Hh] { return BORDERWIDTH; } X[Tt][Ii][Tt][Ll][Ee][Ff][Oo][Nn][Tt] { return (TITLE_FONT); } X[Mm][Ee][Nn][Uu][Ff][Oo][Nn][Tt] { return (MENU_FONT); } X[Ii][Cc][Oo][Nn][Ff][Oo][Nn][Tt] { return (ICON_FONT); } X[Rr][Ee][Ss][Ii][Zz][Ee][Ff][Oo][Nn][Tt] { return (RESIZE_FONT); } X[Rr][Ee][Vv][Ee][Rr][Ss][Ee][Vv][Ii][Dd][Ee][Oo] { return (REVERSE_VIDEO); } X[Nn][Oo][Tt][Ii][Tt][Ll][Ee] { return (NO_TITLE); } X[Aa][Uu][Tt][Oo][Rr][Aa][Ii][Ss][Ee] { return (AUTO_RAISE); } X[Ff][Oo][Rr][Cc][Ee][Ii][Cc][Oo][Nn][Ss] { return (FORCE_ICON); } X[Dd][Ee][Ff][Aa][Uu][Ll][Tt][Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn] { X return (DEFAULT_FUNCTION); } X[Ii][Cc][Oo][Nn][Ss] { return (ICONS); } X[Ii][Cc][Oo][Nn][Dd][Ii][Rr][Ee][Cc][Tt][Oo][Rr][Yy] {return (ICON_DIRECTORY);} X[Bb][Oo][Rr][Dd][Ee][Rr][Cc][Oo][Ll][Oo][Rr] { return (BORDER_COLOR); } X[Tt][Ii][Tt][Ll][Ee][Ff][Oo][Rr][Ee][Gg][Rr][Oo][Uu][Nn][Dd] { X return (TITLE_FOREGROUND); } X[Tt][Ii][Tt][Ll][Ee][Bb][Aa][Cc][Kk][Gg][Rr][Oo][Uu][Nn][Dd] { X return (TITLE_BACKGROUND); } X[Bb][Oo][Rr][Dd][Ee][Rr][Tt][Ii][Ll][Ee][Ff][Oo][Rr][Ee][Gg][Rr][Oo][Uu][Nn][Dd] { X return (BORDER_TILE_FOREGROUND); } X[Bb][Oo][Rr][Dd][Ee][Rr][Tt][Ii][Ll][Ee][Bb][Aa][Cc][Kk][Gg][Rr][Oo][Uu][Nn][Dd] { X return (BORDER_TILE_BACKGROUND); } X[Mm][Ee][Nn][Uu][Ff][Oo][Rr][Ee][Gg][Rr][Oo][Uu][Nn][Dd] { X return (MENU_FOREGROUND); } X[Mm][Ee][Nn][Uu][Bb][Aa][Cc][Kk][Gg][Rr][Oo][Uu][Nn][Dd] { X return (MENU_BACKGROUND); } X[Mm][Ee][Nn][Uu][Tt][Ii][Tt][Ll][Ee][Ff][Oo][Rr][Ee][Gg][Rr][Oo][Uu][Nn][Dd] { X return (MENU_TITLE_FOREGROUND); } X[Mm][Ee][Nn][Uu][Tt][Ii][Tt][Ll][Ee][Bb][Aa][Cc][Kk][Gg][Rr][Oo][Uu][Nn][Dd] { X return (MENU_TITLE_BACKGROUND); } X[Mm][Ee][Nn][Uu][Ss][Hh][Aa][Dd][Oo][Ww][Cc][Oo][Ll][Oo][Rr] { X return (MENU_SHADOW_COLOR); } X[Ii][Cc][Oo][Nn][Ff][Oo][Rr][Ee][Gg][Rr][Oo][Uu][Nn][Dd] { X return (ICON_FOREGROUND); } X[Ii][Cc][Oo][Nn][Bb][Aa][Cc][Kk][Gg][Rr][Oo][Uu][Nn][Dd] { X return (ICON_BACKGROUND); } X[Ii][Cc][Oo][Nn][Bb][Oo][Rr][Dd][Ee][Rr][Cc][Oo][Ll][Oo][Rr] { X return (ICON_BORDER_COLOR); } X[Dd][Oo][Nn][Tt][Mm][Oo][Vv][Ee][Oo][Ff][Ff] return (DONT_MOVE_OFF); } X X{qstring} { yylval.ptr = yytext; return STRING; } X{number} { (void)sscanf(yytext, "%d", &yylval.num); X return (NUMBER); X } X\#[^\n]*\n {;} X[\n\t ] {;} X. { X fprintf(stderr, X "twm: bad character `%s', line %d\n", X yytext, yylineno); X ParseError = 1; X } X%% Xyywrap() { return(1);} X X#define unput(c) TwmUnput(c) X#define input() TwmInput() X#define output(c) TwmOutput(c) END_OF_FILE if test 7285 -ne `wc -c <'lex.l'`; then echo shar: \"'lex.l'\" unpacked with wrong size! fi # end of 'lex.l' fi if test -f 'list.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'list.c'\" else echo shar: Extracting \"'list.c'\" \(5478 characters\) sed "s/^X//" >'list.c' <<'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/********************************************************************** X * X * $Header: list.c,v 1.7 88/09/01 14:03:00 toml Exp $ X * X * TWM code to deal with the name lists for the NoTitle list and X * the AutoRaise list X * X * 11-Apr-88 Tom LaStrange Initial Version. X * X **********************************************************************/ X X#ifndef lint Xstatic char RCSinfo[]= X"$Header: list.c,v 1.7 88/09/01 14:03:00 toml Exp $"; X#endif lint X X#include <stdio.h> X#include "twm.h" X#include "gram.h" X Xtypedef struct name_list name_list; X Xstruct name_list X{ X name_list *next; /* pointer to the next name */ X char *name; /* the name of the window */ X char *ptr; /* list dependent data */ X}; X Xname_list *NoTitle = NULL; /* list of window names with no title bar */ Xname_list *AutoRaise = NULL; /* list of window names to auto-raise */ Xname_list *Icons = NULL; /* list of window names and icons */ Xname_list *NoHighlight = NULL; /* list of windows no to highlight */ X X/*********************************************************************** X * X * Procedure: X * AddToList - add a window name to the appropriate list X * X * Inputs: X * list - a #define to identify the list X * name - a pointer to the name of the window X * ptr - pointer to list dependent data X * X * Special Considerations X * If the list does not use the ptr value, a non-null value X * should be placed in it. LookInList returns this ptr value X * and procedures calling LookInList will check for a non-null X * return value as an indication of success. X * X *********************************************************************** X */ X Xvoid XAddToList(list, name, ptr) Xint list; Xchar *name; Xchar *ptr; X{ X name_list *nptr; X X nptr = (name_list *)malloc(sizeof(name_list)); X if (nptr == NULL) X { X fprintf(stderr, "twm: out of memory\n"); X Done(); X } X X nptr->name = name; X X switch (list) X { X case NO_HILITE: X nptr->next = NoHighlight; X nptr->ptr = (char *)TRUE; X NoHighlight = nptr; X break; X X case AUTO_RAISE: X nptr->next = AutoRaise; X nptr->ptr = (char *)TRUE; X AutoRaise = nptr; X break; X X case NO_TITLE: X nptr->next = NoTitle; X nptr->ptr = (char *)TRUE; X NoTitle = nptr; X break; X X case ICONS: X nptr->next = Icons; X nptr->ptr = ptr; /* this is the pixmap */ X Icons = nptr; X break; X } X} X X/*********************************************************************** X * X * Procedure: X * LookInList - look through a list for a window name, or class X * X * Returned Value: X * the ptr field of the list structure or NULL if the name X * or class was not found in the list X * X * Inputs: X * list - a #define to identify the list X * name - a pointer to the name to look for X * class - a pointer to the class to look for X * X *********************************************************************** X */ X Xchar * XLookInList(list, name, class) Xint list; Xchar *name; XXClassHint *class; X{ X name_list *l; X name_list *nptr; X X switch (list) X { X case NO_HILITE: X l = NoHighlight; X break; X X case AUTO_RAISE: X l = AutoRaise; X break; X X case NO_TITLE: X l = NoTitle; X break; X X case ICONS: X l = Icons; X break; X } X X for (nptr = l; nptr != NULL; nptr = nptr->next) X { X int len; X X len = strlen(nptr->name); X if (strncmp(name, nptr->name, len) == 0 || X (class && strncmp(class->res_name, nptr->name, len) == 0) || X (class && strncmp(class->res_class, nptr->name, len) == 0)) X return (nptr->ptr); X } X return (NULL); X} X Xchar * XLookInNameList(list, name) Xint list; Xchar *name; X{ X return (LookInList(list, name, NULL)); X} END_OF_FILE if test 5478 -ne `wc -c <'list.c'`; then echo shar: \"'list.c'\" unpacked with wrong size! fi # end of 'list.c' fi if test -f 'menus.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'menus.h'\" else echo shar: Extracting \"'menus.h'\" \(5088 characters\) sed "s/^X//" >'menus.h' <<'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/*********************************************************************** X * X * $Header: menus.h,v 1.14 88/09/01 12:05:07 toml Exp $ X * X * twm menus include file X * X * 17-Nov-87 Thomas E. LaStrange File created X * X ***********************************************************************/ X X#ifndef _MENUS_ X#define _MENUS_ X X#define TWM_ROOT "bLoB_GoOp" /* my private root menu */ X X#define MAX_FILE_SIZE 4096 /* max chars to read from file for cut */ X Xtypedef struct MenuItem X{ X struct MenuItem *next; /* next menu item */ X struct MenuItem *prev; /* prev menu item */ X struct MenuRoot *sub; /* MenuRoot of a pull right menu */ X struct MenuRoot *root; /* back pointer to my MenuRoot */ X char *item; /* the character string displayed */ X int y; /* y coordinate for text */ X char *action; /* action to be performed */ X Window w; /* the item window */ X Window pull; /* the pull right window (if any) */ X int func; /* twm built in function */ X int state; /* video state, 0 = normal, 1 = reversed */ X} MenuItem; X Xtypedef struct MenuRoot X{ X struct MenuItem *first; /* first item in menu */ X struct MenuItem *last; /* last item in menu */ X struct MenuRoot *prev; /* previous root menu if pull right */ X struct MenuRoot *next; /* next in list of root menus */ X char *name; /* name of root */ X Window w; /* the window of the menu */ X Window shadow; /* the shadow window */ X int mapped; /* has the menu ever been mapped ? */ X int width; /* width of the menu */ X int items; /* number of items in the menu */ X int pull; /* is there a pull right entry ? */ X int active; /* this menu is active */ X} MenuRoot; X Xtypedef struct MouseButton X{ X int func; /* the function number */ X int mask; /* modifier mask */ X MenuRoot *menu; /* menu if func is F_MENU */ X MenuItem *item; /* action to perform if func != F_MENU */ X} MouseButton; X Xtypedef struct FuncKey X{ X struct FuncKey *next; /* next in the list of function keys */ X char *name; /* key name */ X KeySym keysym; /* X keysym */ X KeyCode keycode; /* X keycode */ X int cont; /* context */ X int mods; /* modifiers */ X int func; /* function to perform */ X char *action; /* action string (if any) */ X} FuncKey; X Xextern int RootFunction; Xextern MouseButton Mouse[MAX_BUTTONS+1][NUM_CONTEXTS][MOD_SIZE]; Xextern MouseButton DefaultFunction; Xextern MenuRoot *MenuList; Xextern MenuRoot *LastMenu; Xextern MenuRoot *ActiveMenu; Xextern MenuItem *ActiveItem; X Xextern int ConstMove; /* constrained move variables */ Xextern int ConstMoveDir; Xextern int ConstMoveX; Xextern int ConstMoveY; Xextern int ConstMoveXL; Xextern int ConstMoveXR; Xextern int ConstMoveYT; Xextern int ConstMoveYB; X X#define MOVE_NONE 0 /* modes of constrained move */ X#define MOVE_VERT 1 X#define MOVE_HORIZ 2 X Xextern void InitMenus(); Xextern MenuRoot *NewMenuRoot(); Xextern MenuItem *AddToMenu(); Xextern void PopUpMenu(); Xextern MenuRoot *FindMenuRoot(); Xextern FuncKey FuncKeyRoot; Xextern void AddFuncKey(); Xextern void ExecuteFunction(); Xextern int DeferExecution(); Xextern void Execute(); Xextern void FocusOnRoot(); X X#endif _MENUS_ END_OF_FILE if test 5088 -ne `wc -c <'menus.h'`; then echo shar: \"'menus.h'\" unpacked with wrong size! fi # end of 'menus.h' fi if test -f 'parse.c' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'parse.c'\" else echo shar: Extracting \"'parse.c'\" \(4559 characters\) sed "s/^X//" >'parse.c' <<'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/*********************************************************************** X * X * $Header: parse.c,v 1.16 88/07/19 13:49:08 toml Exp $ X * X * parse the .twmrc file X * X * 17-Nov-87 Thomas E. LaStrange File created X * X ***********************************************************************/ X X#ifndef lint Xstatic char RCSinfo[]= X"$Header: parse.c,v 1.16 88/07/19 13:49:08 toml Exp $"; X#endif X X#include <stdio.h> X#include "twm.h" X#include "menus.h" X#include "util.h" X X#define BUF_LEN 300 X Xstatic FILE *twmrc; Xstatic int ptr = 0; Xstatic int len = 0; Xstatic char buff[BUF_LEN+1]; Xextern int yylineno; X X/*********************************************************************** X * X * Procedure: X * ParseTwmrc - parse the .twmrc file X * X * Inputs: X * filename - the filename to parse. A NULL indicates $HOME/.twmrc X * X *********************************************************************** X */ X Xvoid XParseTwmrc(filename) Xchar *filename; X{ X char *home; X char init_file[200]; X X InitMenus(); X X if (filename == NULL) X { X home = (char *)getenv("HOME"); X strcpy(init_file, home); X strcat(init_file, "/.twmrc"); X } X else X strcpy(init_file, filename); X X if ((twmrc = fopen(init_file, "r")) == NULL) X { X fprintf(stderr, "twm: couldn't open \"%s\"\n", init_file); X return; X } X X ptr = 0; X len = 0; X yylineno = 0; X ParseError = FALSE; X X yyparse(); X X fclose(twmrc); X X if (ParseError) X { X fprintf(stderr, "twm: errors found in \"%s\", twm aborting\n", X init_file); X Done(); X } X} X X/*********************************************************************** X * X * Procedure: X * TwmInput - redefinition of the lex input routine X * X * Returned Value: X * the next input character X * X *********************************************************************** X */ X Xint XTwmInput() X{ X while (ptr == len) X { X if (fgets(buff, BUF_LEN, twmrc) == NULL) X return NULL; X X yylineno++; X X ptr = 0; X len = strlen(buff); X } X return ((int)buff[ptr++]); X} X X/*********************************************************************** X * X * Procedure: X * TwmUnput - redefinition of the lex unput routine X * X * Inputs: X * c - the character to push back onto the input stream X * X *********************************************************************** X */ X Xvoid XTwmUnput(c) X{ X buff[--ptr] = c; X} X X/*********************************************************************** X * X * Procedure: X * TwmOutput - redefinition of the lex output routine X * X * Inputs: X * c - the character to print X * X *********************************************************************** X */ X Xvoid XTwmOutput(c) X{ X putchar(c); X} END_OF_FILE if test 4559 -ne `wc -c <'parse.c'`; then echo shar: \"'parse.c'\" unpacked with wrong size! fi # end of 'parse.c' fi if test -f 'twm.h' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'twm.h'\" else echo shar: Extracting \"'twm.h'\" \(7916 characters\) sed "s/^X//" >'twm.h' <<'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/*********************************************************************** X * X * $Header: twm.h,v 1.37 88/09/08 15:34:02 toml Exp $ X * X * twm include file X * X * 28-Oct-87 Thomas E. LaStrange File created X * X ***********************************************************************/ X X#ifndef _TWM_ X#define _TWM_ X X#include <X11/Xlib.h> X#include <X11/Xutil.h> X#include <X11/cursorfont.h> X X/* Define this if you want the Focus button on the titlebar */ X/* #define FOCUS */ X X#define BW 2 /* border width */ X X/* directory to look for bitmaps if the file is not found in the current X * directory X */ X#define BITMAPS "/usr/include/X11/bitmaps" X X#ifndef TRUE X#define TRUE 1 X#define FALSE 0 X#endif X X#define MAX_BUTTONS 5 /* max mouse buttons supported */ X X/* contexts for button presses */ X#define C_NO_CONTEXT -1 X#define C_WINDOW 0 X#define C_TITLE 1 X#define C_ICON 2 X#define C_ROOT 3 X#define C_FRAME 4 X#define NUM_CONTEXTS 5 X X/* modifiers for button presses */ X#define MOD_SIZE ((ShiftMask | ControlMask | Mod1Mask) + 1) X X#define TITLE_BAR_SPACE 1 /* 2 pixel space bordering chars */ X#define TITLE_BAR_FONT_HEIGHT 15 /* max of 15 pixel high chars */ X#define TITLE_BAR_HEIGHT (TITLE_BAR_FONT_HEIGHT+(2*TITLE_BAR_SPACE)) X X/* for each window that is on the display, one of these structures X * is allocated and linked into a list X */ Xtypedef struct TwmWindow X{ X struct TwmWindow *next; /* next twm window */ X struct TwmWindow *prev; /* previous twm window */ X Window w; /* the child window */ X Window frame; /* the frame window */ X Window title_w; /* the title bar window */ X Window iconify_w; /* the iconify button */ X Window resize_w; /* the resize button */ X#ifndef NOFOCUS X Window focus_w; /* the focus window */ X#endif X Window hilite_w; /* the hilite window */ X Window icon_w; /* the icon window */ X Window icon_bm_w; /* the icon bitmap window */ X int frame_x; /* x position of frame */ X int frame_y; /* y position of frame */ X int frame_width; /* width of frame */ X int frame_height; /* height of frame */ X int icon_x; /* icon text x coordinate */ X int icon_y; /* icon text y coordiante */ X int icon_w_width; /* width of the icon window */ X int icon_width; /* width of the icon bitmap */ X int icon_height; /* height of the icon bitmap */ X int title_height; /* height of the title bar */ X char *full_name; /* full name of the window */ X char *name; /* name of the window */ X char *icon_name; /* name of the icon */ X int name_width; /* width of name text */ X XWindowAttributes attr; /* the child window attributes */ X XSizeHints hints; /* normal hints */ X XWMHints *wmhints; /* WM hints */ X XClassHint class; X short xterm; /* boolean indicating xterm */ X short iconified; /* has the window ever been iconified? */ X short icon; /* is the window an icon now ? */ X short mapped; /* is the window mapped ? */ X short auto_raise; /* should we auto-raise this window ? */ X short forced; /* has had an icon forced upon it */ X short highlight; /* should highlight this window */ X} TwmWindow; X Xextern TwmWindow TwmRoot; X Xextern Display *dpy; Xextern int screen; Xextern int d_depth; Xextern Visual *d_visual; X Xextern Window Root; Xextern Window VersionWindow; Xextern Window SizeWindow; Xextern Window ResizeWindow; Xextern Window InitialWindow; Xextern Colormap CMap; X Xextern XFontStruct *TitleBarFont; Xextern XFontStruct *MenuFont; Xextern XFontStruct *IconFont; Xextern XFontStruct *SizeFont; Xextern XFontStruct *VersionFont; Xextern XFontStruct *InitialFont; X Xextern char *TitleBarFontName; Xextern char *MenuFontName; Xextern char *IconFontName; Xextern char *SizeFontName; Xextern char *VersionFontName; Xextern char *InitialFontName; Xextern char *IconDirectory; X Xextern int TitleBarFontHeight; Xextern int MenuFontHeight; Xextern int IconFontHeight; Xextern int SizeFontHeight; Xextern int VersionFontHeight; Xextern int InitialFontHeight; X Xextern int BorderColor; Xextern int BorderTileForeground; Xextern int BorderTileBackground; Xextern int TitleForeground; Xextern int TitleBackground; Xextern int MenuForeground; Xextern int MenuBackground; Xextern int MenuTitleForeground; Xextern int MenuTitleBackground; Xextern int MenuShadowColor; Xextern int IconForeground; Xextern int IconBackground; Xextern int IconBorderColor; X Xextern Cursor ArrowCursor; Xextern Cursor ButtonCursor; Xextern Cursor MoveCursor; Xextern Cursor ClockCursor; Xextern Cursor LeftArrowCursor; Xextern Cursor UpperLeftCursor; Xextern Cursor DotCursor; Xextern Cursor SkullCursor; X Xextern GC TitleNormalGC; Xextern GC MenuNormalGC; Xextern GC MenuReverseGC; Xextern GC MenuXorGC; Xextern GC MenuTitleGC; Xextern GC IconNormalGC; Xextern GC VersionNormalGC; Xextern GC SizeNormalGC; Xextern GC InitialNormalGC; Xextern GC DrawGC; Xextern GC BorderGC; X Xextern XClassHint NoClass; X Xextern XContext TwmContext; Xextern XContext MenuContext; X Xextern int BorderWidth; Xextern unsigned long Foreground; Xextern unsigned long Background; Xextern unsigned long Black; Xextern unsigned long White; Xextern Pixmap GrayTile; X Xextern char Version[100]; Xextern Pixmap UnknownPm; Xextern int UnknownWidth; Xextern int UnknownHeight; Xextern int FirstTime; Xextern int ReverseVideo; Xextern int FocusRoot; Xextern TwmWindow *Focus; Xextern int WarpCursor; Xextern int DontMoveOff; Xextern int DoZoom; Xextern int ForceIcon; Xextern int NoRaiseMove; Xextern int NoRaiseResize; Xextern int NoRaiseDeicon; Xextern int Monochrome; Xextern int TitleFocus; Xextern char *Home; Xextern int HomeLen; Xextern int ParseError; Xextern int Highlight; Xextern int MyDisplayWidth; Xextern int MyDisplayHeight; X Xextern int TitleBarY; Xextern int TitleBarX; Xextern int MenuY; Xextern int HandlingEvents; X Xextern Window JunkRoot; Xextern Window JunkChild; Xextern int JunkX; Xextern int JunkY; Xextern int JunkWidth; Xextern int JunkHeight; Xextern int JunkDepth; Xextern int JunkBW; Xextern int JunkMask; X X Xextern void Done(); Xextern void Error(); Xextern void Other(); X X#endif _TWM_ END_OF_FILE if test 7916 -ne `wc -c <'twm.h'`; then echo shar: \"'twm.h'\" unpacked with wrong size! fi # end of 'twm.h' fi if test -f 'xterm.icon' -a "${1}" != "-c" ; then echo shar: Will not clobber existing file \"'xterm.icon'\" else echo shar: Extracting \"'xterm.icon'\" \(3798 characters\) sed "s/^X//" >'xterm.icon' <<'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 Xstatic 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 <'xterm.icon'`; then echo shar: \"'xterm.icon'\" unpacked with wrong size! fi # end of 'xterm.icon' fi echo shar: End of archive 2 \(of 7\). cp /dev/null ark2isdone MISSING="" for I in 1 2 3 4 5 6 7 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have unpacked all 7 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 -- Mike Wexler(wyse!mikew) Phone: (408)433-1000 x1330