pfuetz@agd.fhg.de (02/26/91)
Submitted-by: pfuetz@agd.fhg.de Posting-number: Volume 11, Issue 96 Archive-name: xstrek/part10 #!/bin/sh # To unshare, sh or unshar this file echo xstrek/Imakefile 1>&2 sed -e 's/^X//' > xstrek/Imakefile <<'E!O!F! xstrek/Imakefile' X# Imakefile for xstrek X XOBJS= strek_main.o \ X strek_db_subs.o \ X strek_enemy_subs.o \ X strek_ships_subs.o \ X strek_random_subs.o \ X strek_graphics_subs.o \ X cstrek_keydef_subs.o \ X gpr.o X XSTAT_OBJS= strek_stats.o \ X strek_db_subs.o \ X strek_graphics_subs.o \ X cstrek_keydef_subs.o \ X gpr.o X XPRUNE_OBJS= strek_prune_db.o \ X gpr.o X XPROGRAMS= xstrek \ X xstrek_stats \ X xstrek_startup_db \ X xstrek_prune_db \ X xstrek_keysym_string X XLOCAL_LIBRARIES=$(XLIB) XEXTRA_LIBRARIES= -lF77 -lI77 -lm -lc X XAllTarget(${PROGRAMS}) X XSingleProgramTarget(xstrek,${OBJS},,${LOCAL_LIBRARIES}) XSingleProgramTarget(xstrek_stats,${STAT_OBJS},,${LOCAL_LIBRARIES}) XSingleProgramTarget(xstrek_startup_db,strek_startup_db.o,,${LOCAL_LIBRARIES}) XSingleProgramTarget(xstrek_prune_db,${PRUNE_OBJS},,${LOCAL_LIBRARIES}) XSingleProgramTarget(xstrek_keysym_string,strek_keysym_string.o,,${LOCAL_LIBRARIES}) X XInstallProgram(xstrek,$(BINDIR)) XInstallProgram(xstrek_stats,$(BINDIR)) XInstallProgram(xstrek_startup_db,$(BINDIR)) XInstallProgram(xstrek_prune_db,$(BINDIR)) XInstallProgram(xstrek_keysym_string,$(BINDIR)) X Xinstall:: X -mkdir /usr/lib/X11/xstrek X chmod 4755 $(BINDIR)/xstrek X xstrek_startup_db X chmod 644 /usr/lib/X11/xstrek/strek_info X chmod 644 /usr/lib/X11/xstrek/strek_top_scores X cp README /usr/lib/X11/xstrek X cp strek.doc /usr/lib/X11/xstrek E!O!F! xstrek/Imakefile echo xstrek/Makefile 1>&2 sed -e 's/^X//' > xstrek/Makefile <<'E!O!F! xstrek/Makefile' X# Makefile generated by imake - do not edit! X# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $ X# X# The cpp used on this machine replaces all newlines and multiple tabs and X# spaces in a macro expansion with a single space. Imake tries to compensate X# for this, but is not always successful. X# X X########################################################################### X# Makefile generated from "Imake.tmpl" and </tmp/IIf.a10950> X# $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $ X# X# Platform-specific parameters may be set in the appropriate .cf X# configuration files. Site-wide parameters may be set in the file X# site.def. Full rebuilds are recommended if any parameters are changed. X# X# If your C preprocessor doesn't define any unique symbols, you'll need X# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing X# "make Makefile", "make Makefiles", or "make World"). X# X# If you absolutely can't get imake to work, you'll need to set the X# variables at the top of each Makefile as well as the dependencies at the X# bottom (makedepend will do this automatically). X# X X########################################################################### X# platform-specific configuration parameters - edit sun.cf to change X XSYSLIBS=-lXt -lX11 XMWM_DEFINES=-DSHAPE -DOPAQUE X X# platform: $XConsortium: sun.cf,v 1.38 89/12/23 16:10:10 jim Exp $ X# operating system: SunOS 4.1 X X########################################################################### X# site-specific configuration parameters - edit site.def to change X X# site: $XConsortium: site.def,v 1.21 89/12/06 11:46:50 jim Exp $ X X SHELL = /bin/sh X X TOP = . X CURRENT_DIR = . X X AR = ar cq X BOOTSTRAPCFLAGS = X CC = cc X X COMPRESS = compress X CPP = /lib/cpp $(STD_CPP_DEFINES) X PREPROCESSCMD = cc -E $(STD_CPP_DEFINES) X INSTALL = install X LD = ld X LINT = lint X LINTLIBFLAG = -C X LINTOPTS = -axz X LN = ln -s X MAKE = make X MV = mv X CP = cp X RANLIB = ranlib X RANLIBINSTFLAGS = X RM = rm -f X STD_INCLUDES = X STD_CPP_DEFINES = X STD_DEFINES = X EXTRA_LOAD_FLAGS = X EXTRA_LIBRARIES = X TAGS = ctags X X SHAREDCODEDEF = -DSHAREDCODE X SHLIBDEF = -DSUNSHLIB X X PROTO_DEFINES = X X INSTPGMFLAGS = X X INSTBINFLAGS = -m 0755 X INSTUIDFLAGS = -m 4755 X INSTLIBFLAGS = -m 0664 X INSTINCFLAGS = -m 0444 X INSTMANFLAGS = -m 0444 X INSTDATFLAGS = -m 0444 X INSTKMEMFLAGS = -m 4755 X X DESTDIR = X X TOP_INCLUDES = -I$(INCROOT) X X CDEBUGFLAGS = -O X CCOPTIONS = -D_NO_PROTO -DSTRINGS_ALIGNED -DNO_REGEX -DNO_ISDIR -DUSE_RE_COMP -DUSE_GETWD X COMPATFLAGS = X X ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES) X ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS) X CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) X LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) X LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) X LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) X LDCOMBINEFLAGS = -X -r X X MACROFILE = sun.cf X RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut X X IMAKE_DEFINES = X X IRULESRC = $(CONFIGDIR) X IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) X X ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \ X $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \ X $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES) X X########################################################################### X# X Window System Build Parameters X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $ X X########################################################################### X# X Window System make variables; this need to be coordinated with rules X# $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $ X X PATHSEP = / X USRLIBDIR = $(DESTDIR)/usr/lib X BINDIR = $(DESTDIR)/usr/bin/X11 X INCROOT = $(DESTDIR)/usr/include X BUILDINCROOT = $(TOP) X BUILDINCDIR = $(BUILDINCROOT)/X11 X BUILDINCTOP = .. X INCDIR = $(INCROOT)/X11 X ADMDIR = $(DESTDIR)/usr/adm X LIBDIR = $(USRLIBDIR)/X11 X CONFIGDIR = $(LIBDIR)/config X LINTLIBDIR = $(USRLIBDIR)/lint X X FONTDIR = $(LIBDIR)/fonts X XINITDIR = $(LIBDIR)/xinit X XDMDIR = $(LIBDIR)/xdm X AWMDIR = $(LIBDIR)/awm X TWMDIR = $(LIBDIR)/twm X GWMDIR = $(LIBDIR)/gwm X MANPATH = $(DESTDIR)/usr/man X MANSOURCEPATH = $(MANPATH)/man X MANDIR = $(MANSOURCEPATH)n X LIBMANDIR = $(MANSOURCEPATH)3 X XAPPLOADDIR = $(LIBDIR)/app-defaults X X SOXLIBREV = 4.2 X SOXTREV = 4.0 X SOXAWREV = 4.0 X SOOLDXREV = 4.0 X SOXMUREV = 4.0 X SOXEXTREV = 4.0 X X FONTCFLAGS = -t X X INSTAPPFLAGS = $(INSTDATFLAGS) X X IMAKE = imake X DEPEND = makedepend X RGB = rgb X FONTC = bdftosnf X MKFONTDIR = mkfontdir X MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier.sh X X CONFIGSRC = $(TOP)/config 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 SCRIPTSRC = $(UTILSRC)/scripts X EXAMPLESRC = $(TOP)/examples X CONTRIBSRC = $(TOP)/../contrib X DOCSRC = $(TOP)/doc X RGBSRC = $(TOP)/rgb X DEPENDSRC = $(UTILSRC)/makedepend X IMAKESRC = $(CONFIGSRC) X XAUTHSRC = $(LIBSRC)/Xau X XLIBSRC = $(LIBSRC)/X X XMUSRC = $(LIBSRC)/Xmu X TOOLKITSRC = $(LIBSRC)/Xt X AWIDGETSRC = $(LIBSRC)/Xaw X OLDXLIBSRC = $(LIBSRC)/oldX X XDMCPLIBSRC = $(LIBSRC)/Xdmcp X BDFTOSNFSRC = $(FONTSRC)/bdftosnf X MKFONTDIRSRC = $(FONTSRC)/mkfontdir X EXTENSIONSRC = $(TOP)/extensions X X DEPEXTENSIONLIB = $(USRLIBDIR)/libXext.a X EXTENSIONLIB = -lXext X X DEPXLIB = $(DEPEXTENSIONLIB) X XLIB = $(EXTENSIONLIB) -lX11 X X DEPXAUTHLIB = $(USRLIBDIR)/libXau.a X XAUTHLIB = -lXau X X DEPXMULIB = X XMULIB = -lXmu X X DEPOLDXLIB = X OLDXLIB = -loldX X X DEPXTOOLLIB = X XTOOLLIB = -lXt X X DEPXAWLIB = X XAWLIB = -lXaw X X LINTEXTENSIONLIB = $(USRLIBDIR)/llib-lXext.ln X LINTXLIB = $(USRLIBDIR)/llib-lX11.ln X LINTXMU = $(USRLIBDIR)/llib-lXmu.ln X LINTXTOOL = $(USRLIBDIR)/llib-lXt.ln X LINTXAW = $(USRLIBDIR)/llib-lXaw.ln X X DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) X X DEPLIBS1 = $(DEPLIBS) X DEPLIBS2 = $(DEPLIBS) X DEPLIBS3 = $(DEPLIBS) X X USRINCDIR = $(DESTDIR)/usr/include X TESTSRC = $(TOP)/tests X MTOOLKITSRC = $(LIBSRC)/Xt X MWIDGETSRC = $(LIBSRC)/Xm X MRESOURCESRC = $(LIBSRC)/Mrm X UILSRC = $(CLIENTSRC)/uil X X UIL = uil X X DEPLIBS = X X DEPLIBS1 = $(DEPLIBS) X DEPLIBS2 = $(DEPLIBS) X DEPLIBS3 = $(DEPLIBS) X X SOXMREV = 1.1 X SOMRMREV = 1.1 X X DEPXMLIB = X XMLIB = -lXm X XDEPMRESOURCELIB = X MRESOURCELIB = -lMrm X X DEPUILLIB = $(USRLIBDIR)/libUil.a X UILLIB = -lUil X LINTMRESOURCE = $(USRLIBDIR)/llib-lMrm.ln XLINTXMWIDGETLIB = $(USRLIBDIR)/llib-lXm.ln X LINTUILLIB = $(USRLIBDIR)/llib-lUil.ln X X########################################################################### X# Imake rules for building libraries, programs, scripts, and data files X# rules: $XConsortium: Imake.rules,v 1.67 89/12/18 17:14:15 jim Exp $ X X########################################################################### X# start of Imakefile X X# Imakefile for xstrek X XOBJS= strek_main.o \ X strek_db_subs.o \ X strek_enemy_subs.o \ X strek_ships_subs.o \ X strek_random_subs.o \ X strek_graphics_subs.o \ X cstrek_keydef_subs.o \ X gpr.o X XSTAT_OBJS= strek_stats.o \ X strek_db_subs.o \ X strek_graphics_subs.o \ X cstrek_keydef_subs.o \ X gpr.o X XPRUNE_OBJS= strek_prune_db.o \ X gpr.o X XPROGRAMS= xstrek \ X xstrek_stats \ X xstrek_startup_db \ X xstrek_prune_db \ X xstrek_keysym_string X XLOCAL_LIBRARIES=$(XLIB) XEXTRA_LIBRARIES= -lF77 -lI77 -lm -lc X Xall:: ${PROGRAMS} X Xxstrek: ${OBJS} X $(RM) $@ X $(CC) -o $@ ${OBJS} $(LDOPTIONS) $(LDLIBS) ${LOCAL_LIBRARIES} $(EXTRA_LOAD_FLAGS) X Xclean:: X $(RM) xstrek X Xxstrek_stats: ${STAT_OBJS} X $(RM) $@ X $(CC) -o $@ ${STAT_OBJS} $(LDOPTIONS) $(LDLIBS) ${LOCAL_LIBRARIES} $(EXTRA_LOAD_FLAGS) X Xclean:: X $(RM) xstrek_stats X Xxstrek_startup_db: strek_startup_db.o X $(RM) $@ X $(CC) -o $@ strek_startup_db.o $(LDOPTIONS) $(LDLIBS) ${LOCAL_LIBRARIES} $(EXTRA_LOAD_FLAGS) X Xclean:: X $(RM) xstrek_startup_db X Xxstrek_prune_db: ${PRUNE_OBJS} X $(RM) $@ X $(CC) -o $@ ${PRUNE_OBJS} $(LDOPTIONS) $(LDLIBS) ${LOCAL_LIBRARIES} $(EXTRA_LOAD_FLAGS) X Xclean:: X $(RM) xstrek_prune_db X Xxstrek_keysym_string: strek_keysym_string.o X $(RM) $@ X $(CC) -o $@ strek_keysym_string.o $(LDOPTIONS) $(LDLIBS) ${LOCAL_LIBRARIES} $(EXTRA_LOAD_FLAGS) X Xclean:: X $(RM) xstrek_keysym_string X Xinstall:: xstrek X $(INSTALL) -c $(INSTPGMFLAGS) xstrek $(BINDIR) X Xinstall:: xstrek_stats X $(INSTALL) -c $(INSTPGMFLAGS) xstrek_stats $(BINDIR) X Xinstall:: xstrek_startup_db X $(INSTALL) -c $(INSTPGMFLAGS) xstrek_startup_db $(BINDIR) X Xinstall:: xstrek_prune_db X $(INSTALL) -c $(INSTPGMFLAGS) xstrek_prune_db $(BINDIR) X Xinstall:: xstrek_keysym_string X $(INSTALL) -c $(INSTPGMFLAGS) xstrek_keysym_string $(BINDIR) X Xinstall:: X -mkdir /usr/lib/X11/xstrek X chmod 4755 $(BINDIR)/xstrek X xstrek_startup_db X chmod 644 /usr/lib/X11/xstrek/strek_info X chmod 644 /usr/lib/X11/xstrek/strek_top_scores X cp README /usr/lib/X11/xstrek X cp strek.doc /usr/lib/X11/xstrek X X########################################################################### X# common rules for all Makefiles - do not edit X Xemptyrule:: X Xclean:: X $(RM_CMD) \#* X XMakefile:: X -@if [ -f Makefile ]; then \ X echo " $(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \ X $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ X else exit 0; fi X $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) X Xtags:: X $(TAGS) -w *.[ch] X $(TAGS) -xw *.[ch] > TAGS X X########################################################################### X# empty rules for directories that do not have SUBDIRS - do not edit X Xinstall:: X @echo "install in $(CURRENT_DIR) done" X Xinstall.man:: X @echo "install.man in $(CURRENT_DIR) done" X XMakefiles:: X Xincludes:: X X########################################################################### X# dependencies generated by makedepend X E!O!F! xstrek/Makefile echo xstrek/Makefile.simple 1>&2 sed -e 's/^X//' > xstrek/Makefile.simple <<'E!O!F! xstrek/Makefile.simple' XOBJS= strek_main.o \ X strek_db_subs.o \ X strek_enemy_subs.o \ X strek_ships_subs.o \ X strek_random_subs.o \ X strek_graphics_subs.o \ X cstrek_keydef_subs.o \ X gpr.o X XSTAT_OBJS= strek_stats.o \ X strek_db_subs.o \ X strek_graphics_subs.o \ X cstrek_keydef_subs.o \ X gpr.o X XCFLAGS= -O XLIBS= -lF77 -lI77 -lXext -lX11 -lm -lc X XPROGRAMS= xstrek \ X xstrek_stats \ X xstrek_startup_db \ X xstrek_prune_db X Xall:: ${PROGRAMS} X Xxstrek: ${OBJS} X ${CC} -o xstrek ${OBJS} ${LIBS} X Xxstrek_stats: ${STAT_OBJS} X ${CC} -o xstrek_stats ${STAT_OBJS} ${LIBS} X Xxstrek_startup_db: strek_startup_db.o X ${CC} -o xstrek_startup_db strek_startup_db.o ${LIBS} X Xxstrek_prune_db: strek_prune_db.o X ${CC} -o xstrek_prune_db strek_prune_db.o gpr.c ${LIBS} X Xinstall: xstrek xstrek_startup_db xstrek_prune_db xstrek_stats X install -s xstrek /usr/bin/X11 X install -s xstrek_startup_db /usr/bin/X11 X install -s xstrek_prune_db /usr/bin/X11 X install -s xstrek_stats /usr/bin/X11 X mkdir /usr/lib/X11/xstrek X chmod 4755 /usr/bin/X11/xstrek X xstrek_startup_db X chmod 644 /usr/lib/X11/xstrek/strek_info X chmod 644 /usr/lib/X11/xstrek/strek_top_scores X cp README /usr/lib/X11/xstrek X cp strek.doc /usr/lib/X11/xstrek X Xclean:; X ${RM} -f ${PROGRAMS} ${OBJS} ${STAT_OBJS} E!O!F! xstrek/Makefile.simple echo xstrek/README 1>&2 sed -e 's/^X//' > xstrek/README <<'E!O!F! xstrek/README' XThis is the game "strek" (STAR TREK VERSION 3.0) written by Justin S. XRevenaugh, Massachusetts Institute of Technology, Department of Earth, XAtmospheric and Planetary Science, 8/85, ported to X11 with the help Xof the gpr.c code from Dan Lovinger, Dec, 1990, CMU, and Tood W XMummert, Dec 1990, CMU. The game was originally written for APOLLO Xmachines. I took the source from a 1987 ADUS (Apollo Domain User XSociety) tape. I had to fix some problems in order to get it through Xf2c, the Fortran to C converter (and to work with gpr.c :-)). Because Xof the fact that the c-code was produced by f2c, you need this Xconverter (especially libF77.a, libI77.a, f2c.h)(e.g. here all of the Xthings apply that Dan Lovinger stated with "xbzone" [Articles v10 .. Xv10]). X XDon't get nervous: The gpr.c code replaces the arc-drawing routines by Xno-op's for MIT Servers < Release 4. They paint circles awfully slow. XThis means that the starbase only has four lines and not balls at the Xend but it is better to play with this than falling asleep while the Xserver rotates the starbase. X XI also changed the key redefinition routine. It now uses XXRebindKeysym() for this feature. But it still works the same way. You Xsimply add a line for the key you want to redefine to your X<keydef>file. So if you want to do docking with the <Return> key, add Xthe following line: X XReturn d # Perform docking with the <Return> key! X XI also wrote a program (xstrek_keysym_string) that easily allows you Xto determine how the keys are named while simply pressing them. The Xprogram prints four names. The later three apply when modifieres are Xalso pressed. xev lists the names also but there is much redundant Xinformation you do not need for xstrek key redefinitions. X XI also added the original APOLLO include files and added comments to Xthe gpr.c routines, so that anybody who wants to enhance the gpr.c Xcode can get a notion of what these routines originally do. X XThere still is a problem I didn't find: Whenever the nickname (How do Xyour frieds call you?) is printed it isn't printed correct. I didn't Xfind the bug, nick_name always is used as a "char nick_name[10]". But Xthis is a small bug and might not prevent you from playing a very nice Xdone spacegame (3D). X XThings left to do: How do you put #define into fortran code, so that Xthe default directory for the two files "strek_info" and X"strek_top_scores" can be at a place where all players can acces it? I Xnow replaced the original "strek_info" by X"/usr/lib/X11/xstrek/strek_info" and "strek_top_scores" by X/usr/lib/X11/xstrek/strek_top_scores". So if you want to have these Xtwo files at different places, you have to edit the files Xstrek_startup_db.[fc], strek_db_subs.[fc] and strek_prune_db.[fc]. X XThere is also no unix-style manualpage for the programs. So if anyone Xis willing to write these, do it and send them to me. X XYou also have to "mkdir /usr/lib/X11/xstrek" before X"xstrek_startup_db". Also the game "xstrek" should be setuid to Xwhoever can write the files in /usr/lib/X11/xstrek. X XThe original fortran code can be found in "original_code", the changed Xcode resides in f_changed. So if you want to build the c-code Xyourself, perform the following steps: X Xcd original_code Xforeach i (`ls *.f`) Xf2c $i Xend Xmv strek*.c .. Xcd ../f_changed Xforeach i (`ls *.f`) Xf2c $i Xend Xmv strek*.c .. Xcd .. Xxmkmf Xmake Xmake install X X======================================================================= XFollowing is a "ls -algR" of the directory: X Xtotal 379 Xdrwxrwxr-x 4 pfuetz X11 1536 Feb 8 14:35 . Xdrwxrwxr-x 3 pfuetz siemcad 512 Feb 8 13:17 .. X-rw-rw-r-- 1 pfuetz X11 1318 Feb 8 14:25 Imakefile X-rw-rw-r-- 1 pfuetz X11 10775 Feb 8 14:29 Makefile X-rw-rw-r-- 1 pfuetz X11 1263 Feb 8 14:28 Makefile.simple X-rw-rw-r-- 1 pfuetz X11 7928 Feb 8 14:35 README X-rw-rw-r-- 1 pfuetz X11 6332 Jan 21 14:03 cstrek_keydef_subs.c Xdrwxrwxr-x 2 pfuetz X11 512 Jan 25 16:26 f_changed X-rw-rw-r-- 1 pfuetz X11 84698 Jan 25 16:50 gpr.c X-rw-rw-r-- 1 pfuetz X11 1655 Jan 21 13:17 gpr.h Xdrwxrwxr-x 3 pfuetz X11 512 Jan 21 15:40 original_code X-rw-rw-r-- 1 pfuetz X11 21 Jan 21 14:07 patchlevel.h X-rw-rw-r-- 1 pfuetz X11 17815 Jan 14 09:33 strek.doc X-rw-rw-r-- 1 pfuetz X11 2080 Jan 14 09:33 strek.install X-rw-rw-r-- 1 pfuetz X11 1197 Jan 14 09:33 strek_bld X-rw-rw-r-- 1 pfuetz X11 4260 Jan 21 15:38 strek_create_form.c X-rw-rw-r-- 1 pfuetz X11 49935 Jan 25 16:25 strek_db_subs.c X-rw-rw-r-- 1 pfuetz X11 20507 Jan 21 15:39 strek_enemy_subs.c X-rw-rw-r-- 1 pfuetz X11 35031 Jan 25 15:34 strek_graphics_subs.c X-rw-rw-r-- 1 pfuetz X11 721 Jan 25 09:44 strek_key_defs X-rw-rw-r-- 1 pfuetz X11 587 Jan 18 14:52 strek_key_defs.orig X-rw-rw-r-- 1 pfuetz X11 2057 Jan 25 09:34 strek_keysym_string.c X-rw-rw-r-- 1 pfuetz X11 54991 Jan 25 15:34 strek_main.c X-rw-rw-r-- 1 pfuetz X11 5601 Jan 25 15:34 strek_prune_db.c X-rw-rw-r-- 1 pfuetz X11 6391 Jan 25 15:34 strek_random_subs.c X-rw-rw-r-- 1 pfuetz X11 45499 Jan 25 15:34 strek_ships_subs.c X-rw-rw-r-- 1 pfuetz X11 4666 Jan 25 16:21 strek_startup_db.c X-rw-rw-r-- 1 pfuetz X11 2977 Jan 21 15:39 strek_stats.c X Xf_changed: Xtotal 152 Xdrwxrwxr-x 2 pfuetz X11 512 Jan 25 16:26 . Xdrwxrwxr-x 4 pfuetz X11 1536 Feb 8 14:35 .. X-rw-rw-r-- 1 pfuetz X11 27036 Jan 25 16:25 strek_db_subs.f X-rw-rw-r-- 1 pfuetz X11 30413 Jan 22 09:29 strek_graphics_subs.f X-rw-rw-r-- 1 pfuetz X11 2530 Jan 14 09:33 strek_keydef_subs.f X-rw-rw-r-- 1 pfuetz X11 38986 Jan 25 15:00 strek_main.f X-rw-rw-r-- 1 pfuetz X11 3215 Jan 25 15:30 strek_prune_db.f X-rw-rw-r-- 1 pfuetz X11 5340 Jan 14 09:33 strek_random_subs.f X-rw-rw-r-- 1 pfuetz X11 37622 Jan 14 09:33 strek_ships_subs.f X-rw-rw-r-- 1 pfuetz X11 2473 Jan 25 16:21 strek_startup_db.f X Xoriginal_code: Xtotal 203 Xdrwxrwxr-x 3 pfuetz X11 512 Jan 21 15:40 . Xdrwxrwxr-x 4 pfuetz X11 1536 Feb 8 14:35 .. Xdrwxrwxr-x 2 pfuetz X11 512 Jan 17 08:54 apollo_inc X-rw-rw-r-- 1 pfuetz X11 12564 Dec 14 09:12 c_gpr.c X-rw-rw-r-- 1 pfuetz X11 13740 Jan 14 09:33 gpr.c X-rw-rw-r-- 1 pfuetz X11 2455 Jan 14 09:33 strek_create_form.f X-rw-rw-r-- 1 pfuetz X11 25314 Jan 14 09:33 strek_db_subs.f X-rw-rw-r-- 1 pfuetz X11 19615 Jan 14 09:33 strek_enemy_subs.f X-rw-rw-r-- 1 pfuetz X11 31066 Jan 14 09:33 strek_graphics_subs.f X-rw-rw-r-- 1 pfuetz X11 2364 Jan 14 09:33 strek_keydef_subs.f X-rw-rw-r-- 1 pfuetz X11 38803 Jan 14 09:33 strek_main.f X-rw-rw-r-- 1 pfuetz X11 3065 Jan 14 09:33 strek_prune_db.f X-rw-rw-r-- 1 pfuetz X11 5329 Jan 14 09:33 strek_random_subs.f X-rw-rw-r-- 1 pfuetz X11 37906 Jan 14 09:33 strek_ships_subs.f X-rw-rw-r-- 1 pfuetz X11 2315 Jan 17 16:18 strek_startup_db.f X-rw-rw-r-- 1 pfuetz X11 1700 Jan 14 09:33 strek_stats.f X Xoriginal_code/apollo_inc: Xtotal 69 Xdrwxrwxr-x 2 pfuetz X11 512 Jan 17 08:54 . Xdrwxrwxr-x 3 pfuetz X11 512 Jan 21 15:40 .. X-rw-rw-r-- 1 pfuetz X11 4851 Jan 15 10:11 base.ins.c X-rw-rw-r-- 1 pfuetz X11 2687 Jan 15 10:11 cal.ins.c X-rw-rw-r-- 1 pfuetz X11 34690 Jan 15 10:11 gpr.ins.c X-rw-rw-r-- 1 pfuetz X11 5403 Jan 15 10:12 kbd.ins.c X-rw-rw-r-- 1 pfuetz X11 17660 Jan 15 10:12 smdu.ins.c X-rw-rw-r-- 1 pfuetz X11 777 Jan 15 10:12 time.ins.c E!O!F! xstrek/README echo xstrek/cstrek_keydef_subs.c 1>&2 sed -e 's/^X//' > xstrek/cstrek_keydef_subs.c <<'E!O!F! xstrek/cstrek_keydef_subs.c' X/* ================================================================== */ X/* */ X/* This part is rewritten by Matthias Pfuetzner in order to get a */ X/* quite simple possibility to redefine the keys. */ X/* */ X/* ================================================================== */ X X/* strek_keydef_subs.f -- translated by f2c (version of 19 December 1990 16:50:21). X You must link the resulting object file with the libraries: X -lF77 -lI77 -lm -lc (in that order) X*/ X X#include "f2c.h" X X/* Common Block Declarations */ X Xstruct { X char means[256]; X} key_defs__; X X#define key_defs__1 key_defs__ X X/* Table of constant values */ X Xstatic integer c__1 = 1; X X/* Subroutine */ int strek_parse_key_defs__(key_file__, found, key_file_len) Xchar *key_file__; Xlogical *found; Xftnlen key_file_len; X{ X /* Initialized data */ X X static char pf[1*32+1] = "abcdefghijklmnopqrstuvwxyz ,./;["; X X /* Format strings */ X static char fmt_100[] = "(6x,a)"; X X /* System generated locals */ X olist o__1; X cllist cl__1; X inlist ioin__1; X X /* Builtin functions */ X integer f_inqu(), f_open(), s_rsfe(), do_fio(), e_rsfe(), f_clos(); X X /* Local variables */ X static char temp[1]; X static integer j; X static logical fyn; X X /* Fortran I/O blocks */ X static cilist io___4 = { 0, 1, 0, "(a)", 0 }; X static cilist io___6 = { 0, 1, 0, "(a)", 0 }; X static cilist io___7 = { 0, 1, 0, fmt_100, 0 }; X X X X/* STREK_PARSE_KEY_DEFS interprets the user input key */ X/* definitions file in terms of the actual keys and */ X/* KBD.INS.FTN parameters */ X X/* version 2 */ X/* -jsr 8/85 */ X/* modified 11/20/85 */ X X/* % include '/sys/ins/base.ins.ftn' */ X/* % include '/sys/ins/kbd.ins.ftn' */ X X/* character*1 means(256), temp, pf(90) */ X X/* common block of key def's */ X X/* data pf /'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', */ X/* & 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', */ X/* & 'u', 'v', 'w', 'x', 'y', 'z', kbdl1, kbdl2, */ X/* & kbdl3, kbdl4, kbdl5, kbdl6, kbdl7, kbdl8, */ X/* & kbdl9, kbdla, kbdlb, kbdlc, kbdld, kbdle, */ X/* & kbdlf, kbdl1a, kbdl2a, kbdl3a, kbdl1u, */ X/* & kbdl2u, kbdl3u, kbdl4u, kbdl5u, kbdl6u, */ X/* & kbdl7u, kbdl8u, kbdl9u, kbdlau, kbdlbu, */ X/* & kbdlcu, kbdldu, kbdleu, kbdlfu, kbdl1au, */ X/* & kbdl2au, kbdl3au, kbdf1, kbdf2, kbdf3, kbdf4, */ X/* & kbdf5, kbdf6, kbdf7, kbdf8, kbdf1u, kbdf2u, */ X/* & kbdf3u, kbdf4u, kbdf5u, kbdf6u, kbdf7u, */ X/* & kbdf8u, kbdr1, kbdr2, kbdr3, kbdr4, kbdr5, */ X/* & kbdr6, ' ', ',', '.', '/', ';', '['/ */ X X/* read in file */ X X/* X ioin__1.inerr = 0; X ioin__1.infilen = 256; X ioin__1.infile = key_file__; X ioin__1.inex = &fyn; X ioin__1.inopen = 0; X ioin__1.innum = 0; X ioin__1.innamed = 0; X ioin__1.inname = 0; X ioin__1.inacc = 0; X ioin__1.inseq = 0; X ioin__1.indir = 0; X ioin__1.infmt = 0; X ioin__1.inform = 0; X ioin__1.inunf = 0; X ioin__1.inrecl = 0; X ioin__1.innrec = 0; X ioin__1.inblank = 0; X f_inqu(&ioin__1); X if (! fyn) { X *found = FALSE_; X return 0; X } X *found = TRUE_; X for (j = 1; j <= 256; ++j) { X key_defs__1.means[j - 1] = j; X*/ X/* L10: */ X/* X } X o__1.oerr = 0; X o__1.ounit = 1; X o__1.ofnmlen = 256; X o__1.ofnm = key_file__; X o__1.orl = 0; X o__1.osta = 0; X o__1.oacc = 0; X o__1.ofm = 0; X o__1.oblnk = 0; X f_open(&o__1); X s_rsfe(&io___4); X do_fio(&c__1, temp, 1L); X e_rsfe(); X s_rsfe(&io___6); X do_fio(&c__1, temp, 1L); X e_rsfe(); X for (j = 1; j <= 90; ++j) { X s_rsfe(&io___7); X do_fio(&c__1, temp, 1L); X e_rsfe(); X if (*temp != ' ') { X key_defs__1.means[pf[j - 1] - 1] = *temp; X } X*/ X/* L20: */ X/* X } X cl__1.cerr = 0; X cl__1.cunit = 1; X cl__1.csta = 0; X f_clos(&cl__1); X return 0; X*/ X X X#include <stdio.h> X#include <X11/Xlib.h> X#include <X11/keysym.h> X X KeySym keysym; X KeySym list[1]; /* Modifier List [shift etc.] ignored */ X int mod_count = 0; X unsigned char string[1]; X int bytes_string = 1; X char key_string[50]; X char cmd_string[10]; X char dummy_string[256]; X KeyCode keycode; X FILE *file; X extern Display *d; X char tmp_file[256]; X int tmp_char; X X X X list[1] = NoSymbol; X X sscanf(key_file__,"%s %s",tmp_file,dummy_string); X X if (( file = fopen(tmp_file,"r")) == NULL) X { X fprintf(stderr, "File not found: \"%s\"", key_file__); X *found = FALSE_; X return 0; X } X X *found = TRUE_; X X if (d == 0) X d = XOpenDisplay (0); X if (d == 0) X { X printf("can't open display! bye.\n"); X exit(1); X } X X X while (feof(file) == NULL) X { X fscanf(file,"%s",key_string); X fscanf(file,"%s",cmd_string); X X while (1 == 1) X { X tmp_char = fgetc(file); X if (tmp_char == (int) '\n') X break; X if (tmp_char == (int) EOF) X break; X } X X/* X dummy_string = fgets(dummy_string, 256, file); X*/ X X string[0] = cmd_string[0]; X X if (( keysym = XStringToKeysym(key_string)) == NoSymbol) X fprintf(stderr, X "strek_parse_key_defs__: No valid KeySym-string: %s", X key_string); X/* X if (( keycode = XKeysymToKeycode(d, keysym)) == 0) X fprintf(stderr, X "strek_parse_key_defs__: Undefined KeySym (No key for this?)"); X X bytes_string = strlen(string); X*/ X XRebindKeysym(d, keysym, list, mod_count, string, bytes_string); X } X fclose(file); X} /* strek_parse_key_defs__ */ X X X X X X/* Subroutine */ int strek_interpret_key__(t_key__, t_key_len) Xchar *t_key__; Xftnlen t_key_len; X{ X X/* STREK_INTERPRET_KEY interprets an keystroke event datum */ X/* in terms of it's users defined key. */ X X/* version 2 */ X/* -jsr 8/85 */ X/* modified 11/20/85 */ X X/* *t_key__ = key_defs__1.means[*t_key__ - 1]; */ X} /* strek_interpret_key__ */ X E!O!F! xstrek/cstrek_keydef_subs.c echo xstrek/gpr.h 1>&2 sed -e 's/^X//' > xstrek/gpr.h <<'E!O!F! xstrek/gpr.h' X/* X * emulate gpr/ftn on top of X11. X * X * this is a gross crock, and I make no apologies for it.. X */ X X#include <stdio.h> X#include <pwd.h> X#include <sys/types.h> X#include <sys/time.h> X#include <X11/Xlib.h> X#include <X11/Xutil.h> X X X Xtypedef long bitmap_desc_t; Xtypedef unsigned long plane_t; Xtypedef unsigned long raster_op_t; Xtypedef long coord_t; Xtypedef long pixel_t; X Xtypedef struct X{ X coord_t x; X coord_t y; X} position_t; X Xtypedef struct X{ X coord_t x; X coord_t y; X} offset_t; X Xtypedef struct X{ X coord_t x_coord_l; X coord_t x_coord_r; X coord_t y_coord; X} horiz_seg_t; X Xtypedef struct X{ X horiz_seg_t top; X horiz_seg_t bot; X} trap_t; X Xtypedef struct X{ X position_t base; X offset_t size; X} window_t; X XDisplay *d = 0; XWindow w; XGC FillGC; XGC DrawGC; XGC TextGC; XGC EraseGC; XXPoint curpoint; XXRectangle clipr; Xstatic long lop; Xposition_t mouse_posn; Xint wid; Xint hei; XBool was_placed = False; X Xstatic struct X{ X char *gprname; X char *xname; X} fontmap[] = X{ X { "/sys/dm/fonts/f5x9", X "6x10" }, X { "/sys/dm/fonts/nonie.r.8", X "-*-helvetica-medium-r-*-*-18-*-*-*-*-*-*-*"}, X { "/sys/dm/fonts/scvc8x16.i.r", X "-*-helvetica-medium-o-*-*-18-*-*-*-*-*-*-*"}, X { "/sys/dm/fonts/scvc5x10.r.b", X "-*-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*"}, X { "/sys/dm/fonts/i.12", X "-*-*-medium-i-*-*-14-*-*-*-*-*-*-*"}, X { "/sys/dm/fonts/f7x13", X "8x13" }, X { "bzonefont", X "-*-times-medium-r-*-*-24-*-*-*-*-*-*-*"}, X { 0, X 0 } X}; X Xunsigned long colortrans[15]; X X#define MAX_COLORS 16 E!O!F! xstrek/gpr.h echo xstrek/patchlevel.h 1>&2 sed -e 's/^X//' > xstrek/patchlevel.h <<'E!O!F! xstrek/patchlevel.h' X#define PATCHLEVEL 0 E!O!F! xstrek/patchlevel.h exit ===== @work: | Matthias Pfuetzner | @home: ZGDV, Wilhelminenstrasse 7 | 6100 Darmstadt, FRG | Lichtenbergstrasse 73 +49 6151 155-164 or -101 \ <- Tel.nr. -> / +49 6151 75717 pfuetzner@agd.fhg.de pfuetzner@zgdvda.UUCP XBR1YD3U@DDATHD21.BITNET -- Dan Heller ------------------------------------------------ O'Reilly && Associates ZipCode Software Senior Writer President argv@ora.com argv@zipcode.com