This is the game "strek" (STAR TREK VERSION 3.0) written  by Justin S.
Revenaugh, Massachusetts Institute of Technology, Department of Earth,
Atmospheric and Planetary Science,  8/85, ported to  X11 with the help
of  the gpr.c code from  Dan  Lovinger, Dec,  1990,   CMU,  and Tood W
Mummert, Dec 1990, CMU.   The game was  originally written  for APOLLO
machines.   I took the  source from a  1987  ADUS  (Apollo Domain User
Society) tape. I had  to fix some problems  in order to get it through
f2c, the Fortran to C converter (and to work with gpr.c  :-)). Because
of   the fact   that the c-code  was produced   by f2c,  you need this
converter (especially libF77.a, libI77.a, f2c.h)(e.g.  here all of the
things apply  that Dan Lovinger stated  with "xbzone" [Articles v10 ..
v10]).

Don't get nervous: The gpr.c code replaces the arc-drawing routines by
no-op's for MIT Servers < Release 4.  They paint circles awfully slow.
This means that the starbase only has four  lines and not balls at the
end but it is better to play with this  than falling asleep  while the
server rotates the starbase.

I   also   changed  the  key    redefinition   routine. It  now   uses
XRebindKeysym() for this feature. But it still works the same way. You
simply  add  a   line  for the  key   you want  to   redefine  to your
<keydef>file. So if you want to do  docking with the <Return> key, add
the following line:

Return   d     # Perform docking with the <Return> key!

I  also wrote a  program (xstrek_keysym_string) that easily allows you
to determine how the  keys are named  while simply pressing  them. The
program prints  four names. The later three  apply when modifieres are
also pressed.   xev lists the names  also  but there is much redundant
information you do not need for xstrek key redefinitions.

I also added the  original APOLLO include files and  added comments to
the gpr.c routines,  so that anybody  who  wants to enhance  the gpr.c
code can get a notion of what these routines originally do.

There still is a problem I didn't find:  Whenever the nickname (How do
your frieds call you?) is printed it isn't  printed  correct. I didn't
find the bug, nick_name always is  used as a "char nick_name[10]". But
this is a small bug and might not prevent you from playing a very nice
done spacegame (3D).

Things left to do: How do you put  #define into fortran  code, so that
the  default   directory  for  the     two   files  "strek_info"   and
"strek_top_scores" can be at a place where all players can acces it? I
now        replaced     the     original      "strek_info"          by
"/usr/lib/X11/xstrek/strek_info"      and       "strek_top_scores"  by
/usr/lib/X11/xstrek/strek_top_scores". So  if you  want to  have these
two  files  at  different    places,   you have  to   edit  the  files
strek_startup_db.[fc], strek_db_subs.[fc] and strek_prune_db.[fc].

There is also no unix-style manualpage for the  programs. So if anyone
is willing to write these, do it and send them to me.

You       also   have  to       "mkdir    /usr/lib/X11/xstrek"  before
"xstrek_startup_db".  Also  the  game  "xstrek"  should be  setuid  to
whoever can write the files in /usr/lib/X11/xstrek.

The original fortran code can be found in "original_code", the changed
code resides in f_changed. So if you want to build the c-code
yourself, perform the following steps:

cd original_code
foreach i (`ls *.f`)
f2c $i
end
mv strek*.c ..
cd ../f_changed
foreach i (`ls *.f`)
f2c $i
end
mv strek*.c ..
cd ..
xmkmf
make
make install

=======================================================================
Following is a "ls -algR" of the directory:

total 379
drwxrwxr-x  4 pfuetz   X11          1536 Feb  8 14:35 .
drwxrwxr-x  3 pfuetz   siemcad       512 Feb  8 13:17 ..
-rw-rw-r--  1 pfuetz   X11          1318 Feb  8 14:25 Imakefile
-rw-rw-r--  1 pfuetz   X11         10775 Feb  8 14:29 Makefile
-rw-rw-r--  1 pfuetz   X11          1263 Feb  8 14:28 Makefile.simple
-rw-rw-r--  1 pfuetz   X11          7928 Feb  8 14:35 README
-rw-rw-r--  1 pfuetz   X11          6332 Jan 21 14:03 cstrek_keydef_subs.c
drwxrwxr-x  2 pfuetz   X11           512 Jan 25 16:26 f_changed
-rw-rw-r--  1 pfuetz   X11         84698 Jan 25 16:50 gpr.c
-rw-rw-r--  1 pfuetz   X11          1655 Jan 21 13:17 gpr.h
drwxrwxr-x  3 pfuetz   X11           512 Jan 21 15:40 original_code
-rw-rw-r--  1 pfuetz   X11            21 Jan 21 14:07 patchlevel.h
-rw-rw-r--  1 pfuetz   X11         17815 Jan 14 09:33 strek.doc
-rw-rw-r--  1 pfuetz   X11          2080 Jan 14 09:33 strek.install
-rw-rw-r--  1 pfuetz   X11          1197 Jan 14 09:33 strek_bld
-rw-rw-r--  1 pfuetz   X11          4260 Jan 21 15:38 strek_create_form.c
-rw-rw-r--  1 pfuetz   X11         49935 Jan 25 16:25 strek_db_subs.c
-rw-rw-r--  1 pfuetz   X11         20507 Jan 21 15:39 strek_enemy_subs.c
-rw-rw-r--  1 pfuetz   X11         35031 Jan 25 15:34 strek_graphics_subs.c
-rw-rw-r--  1 pfuetz   X11           721 Jan 25 09:44 strek_key_defs
-rw-rw-r--  1 pfuetz   X11           587 Jan 18 14:52 strek_key_defs.orig
-rw-rw-r--  1 pfuetz   X11          2057 Jan 25 09:34 strek_keysym_string.c
-rw-rw-r--  1 pfuetz   X11         54991 Jan 25 15:34 strek_main.c
-rw-rw-r--  1 pfuetz   X11          5601 Jan 25 15:34 strek_prune_db.c
-rw-rw-r--  1 pfuetz   X11          6391 Jan 25 15:34 strek_random_subs.c
-rw-rw-r--  1 pfuetz   X11         45499 Jan 25 15:34 strek_ships_subs.c
-rw-rw-r--  1 pfuetz   X11          4666 Jan 25 16:21 strek_startup_db.c
-rw-rw-r--  1 pfuetz   X11          2977 Jan 21 15:39 strek_stats.c

f_changed:
total 152
drwxrwxr-x  2 pfuetz   X11           512 Jan 25 16:26 .
drwxrwxr-x  4 pfuetz   X11          1536 Feb  8 14:35 ..
-rw-rw-r--  1 pfuetz   X11         27036 Jan 25 16:25 strek_db_subs.f
-rw-rw-r--  1 pfuetz   X11         30413 Jan 22 09:29 strek_graphics_subs.f
-rw-rw-r--  1 pfuetz   X11          2530 Jan 14 09:33 strek_keydef_subs.f
-rw-rw-r--  1 pfuetz   X11         38986 Jan 25 15:00 strek_main.f
-rw-rw-r--  1 pfuetz   X11          3215 Jan 25 15:30 strek_prune_db.f
-rw-rw-r--  1 pfuetz   X11          5340 Jan 14 09:33 strek_random_subs.f
-rw-rw-r--  1 pfuetz   X11         37622 Jan 14 09:33 strek_ships_subs.f
-rw-rw-r--  1 pfuetz   X11          2473 Jan 25 16:21 strek_startup_db.f

original_code:
total 203
drwxrwxr-x  3 pfuetz   X11           512 Jan 21 15:40 .
drwxrwxr-x  4 pfuetz   X11          1536 Feb  8 14:35 ..
drwxrwxr-x  2 pfuetz   X11           512 Jan 17 08:54 apollo_inc
-rw-rw-r--  1 pfuetz   X11         12564 Dec 14 09:12 c_gpr.c
-rw-rw-r--  1 pfuetz   X11         13740 Jan 14 09:33 gpr.c
-rw-rw-r--  1 pfuetz   X11          2455 Jan 14 09:33 strek_create_form.f
-rw-rw-r--  1 pfuetz   X11         25314 Jan 14 09:33 strek_db_subs.f
-rw-rw-r--  1 pfuetz   X11         19615 Jan 14 09:33 strek_enemy_subs.f
-rw-rw-r--  1 pfuetz   X11         31066 Jan 14 09:33 strek_graphics_subs.f
-rw-rw-r--  1 pfuetz   X11          2364 Jan 14 09:33 strek_keydef_subs.f
-rw-rw-r--  1 pfuetz   X11         38803 Jan 14 09:33 strek_main.f
-rw-rw-r--  1 pfuetz   X11          3065 Jan 14 09:33 strek_prune_db.f
-rw-rw-r--  1 pfuetz   X11          5329 Jan 14 09:33 strek_random_subs.f
-rw-rw-r--  1 pfuetz   X11         37906 Jan 14 09:33 strek_ships_subs.f
-rw-rw-r--  1 pfuetz   X11          2315 Jan 17 16:18 strek_startup_db.f
-rw-rw-r--  1 pfuetz   X11          1700 Jan 14 09:33 strek_stats.f

original_code/apollo_inc:
total 69
drwxrwxr-x  2 pfuetz   X11           512 Jan 17 08:54 .
drwxrwxr-x  3 pfuetz   X11           512 Jan 21 15:40 ..
-rw-rw-r--  1 pfuetz   X11          4851 Jan 15 10:11 base.ins.c
-rw-rw-r--  1 pfuetz   X11          2687 Jan 15 10:11 cal.ins.c
-rw-rw-r--  1 pfuetz   X11         34690 Jan 15 10:11 gpr.ins.c
-rw-rw-r--  1 pfuetz   X11          5403 Jan 15 10:12 kbd.ins.c
-rw-rw-r--  1 pfuetz   X11         17660 Jan 15 10:12 smdu.ins.c
-rw-rw-r--  1 pfuetz   X11           777 Jan 15 10:12 time.ins.c
