[net.sources.games] VMS Empire Part 1 of 3

edjames@ic.Berkeley.EDU (Ed James) (12/18/86)

#----cut here-----cut here-----cut here-----cut here-----
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create the files:
#	vms_empire
# This archive created by edjames at Thu Dec 18 12:15:35 1986
export PATH; PATH=/bin:$PATH
if test ! -d 'vms_empire'
then
	mkdir 'vms_empire'
fi
cd 'vms_empire'
if test -f 'README'
then
	echo shar: will not over-write existing file "'README'"
else
cat << \SHAR_EOF > 'README'
VMS Empire Sources

	This is the game of 2 player EMPIRE, human vs computer.  These
	sources were originally given to me in 1985, and were written
	fully in fortran for VMS.  I converted it to UNIX and some
	C and curses.  It is in no way bug free, but it should at least
	compile.  
	
	The sources came originally from DECUS, I was told, and have
	gone through so many hands as to be public domain.  Feel free
	to hack on it.  If you get it working better, by all means
	send me a copy.

	I also have the original VMS sources.  Mail me if you're 
	*real* interested.
							    --ed
							edjames@ic.berkeley.edu
							ucbvax!edjames
SHAR_EOF
if test 637 -ne "`wc -c < 'README'`"
then
	echo shar: error transmitting "'README'" '(should have been 637 characters)'
fi
fi # end of overwriting check
if test -f 'Makefile'
then
	echo shar: will not over-write existing file "'Makefile'"
else
cat << \SHAR_EOF > 'Makefile'
DEST	      = .

EXTHDRS	      = /usr/include/ctype.h \
		/usr/include/curses.h \
		/usr/include/math.h \
		/usr/include/sgtty.h \
		/usr/include/stdio.h \
		/usr/include/sys/ioctl.h \
		/usr/include/sys/time.h \
		/usr/include/sys/ttychars.h \
		/usr/include/sys/ttydev.h

HDRS	      = c_common.h \
		common.h

CFLAGS        =	-g
#FFLAGS        = -g

LDFLAGS	      = -g -lcurses -ltermlib -lm -lF77 -lI77 -lU77

LIBS	      =

LINKER	      = cc

MAKEFILE      = Makefile

OBJS	      = addidt.o \
		addrock.o \
		addsts.o \
		armcnt.o \
		armjmp.o \
		armyen.o \
		armymv.o \
		attack.o \
		bell.o \
		block.o \
		bufpos.o \
		c.o \
		carier.o \
		citfnd.o \
		cityct.o \
		cityph.o \
		compar.o \
		contained.o \
		cost.o \
		cursor.o \
		data.o \
		decode.o \
		delay.o \
		direc.o \
		dist.o \
		edger.o \
		edit.o \
		empend.o \
		empire.o \
		enemym.o \
		expl.o \
		fatal.o \
		fght.o \
		fighmv.o \
		fightr.o \
		find.o \
		game.o \
		gen.o \
		getc.o \
		getcq.o \
		head.o \
		help.o \
		hits.o \
		huh.o \
		icorr.o \
		idist.o \
		initia.o \
		iphase.o \
		iport.o \
		iscape.o \
		ittype.o \
		jiggle.o \
		kline.o \
		ltr.o \
		makeland.o \
		mov.o \
		movcor.o \
		mve.o \
		order.o \
		path.o \
		phasin.o \
		poschk.o \
		priori.o \
		prod.o \
		putc.o \
		read.o \
		round.o \
		scrchk.o \
		sector.o \
		sensor.o \
		set.o \
		shipmv.o \
		sonar.o \
		stasis.o \
		strlen.o \
		strout.o \
		strpos.o \
		test4.o \
		tran.o \
		troopm.o \
		ver.o \
		write.o

PRINT	      = pr

PROGRAM	      = emp

SRCS	      = addidt.f \
		addrock.f \
		addsts.f \
		armcnt.f \
		armjmp.f \
		armyen.f \
		armymv.f \
		attack.c \
		bell.c \
		block.f \
		bufpos.c \
		c.c \
		carier.f \
		citfnd.c \
		cityct.f \
		cityph.f \
		compar.f \
		contained.c \
		cost.f \
		cursor.f \
		data.c \
		decode.f \
		delay.c \
		direc.c \
		dist.c \
		edger.c \
		edit.f \
		empend.c \
		empire.f \
		enemym.f \
		expl.f \
		fatal.f \
		fght.f \
		fighmv.f \
		fightr.f \
		find.f \
		game.f \
		gen.f \
		getc.c \
		getcq.c \
		head.f \
		help.f \
		hits.c \
		huh.c \
		icorr.c \
		idist.c \
		initia.f \
		iphase.c \
		iport.f \
		iscape.f \
		ittype.f \
		jiggle.f \
		kline.c \
		ltr.f \
		makeland.f \
		mov.f \
		movcor.f \
		mve.f \
		order.c \
		path.f \
		phasin.f \
		poschk.f \
		priori.f \
		prod.f \
		putc.c \
		read.f \
		round.f \
		scrchk.f \
		sector.f \
		sensor.f \
		set.f \
		shipmv.f \
		sonar.f \
		stasis.f \
		strlen.f \
		strout.c \
		strpos.f \
		test4.f \
		tran.f \
		troopm.f \
		ver.c \
		write.f

all:		$(PROGRAM)

$(PROGRAM):     $(OBJS) $(LIBS)
		@echo Loading $(PROGRAM)
		@$(LINKER) $(OBJS) $(LIBS) $(LDFLAGS) -o $(PROGRAM)
		@echo "done"

clean:;		@rm -f $(OBJS)

depend:;	@mkmf -f $(MAKEFILE) PROGRAM=$(PROGRAM) DEST=$(DEST)

index:;		@ctags -wx $(HDRS) $(SRCS)

install:	$(PROGRAM)
		@echo Installing $(PROGRAM) in $(DEST)
		@install -s $(PROGRAM) $(DEST)

print:;		@$(PRINT) $(HDRS) $(SRCS)

program:        $(PROGRAM)

tags:           $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)

update:		$(DEST)/$(PROGRAM)

$(DEST)/$(PROGRAM): $(SRCS) $(LIBS) $(HDRS) $(EXTHDRS)
		@make -f $(MAKEFILE) DEST=$(DEST) install
###
addsts.o: common.h
armcnt.o: common.h
armjmp.o: common.h
armyen.o: common.h
armymv.o: common.h
block.o: common.h
bufpos.o: /usr/include/curses.h /usr/include/stdio.h /usr/include/sgtty.h \
	/usr/include/sys/ioctl.h /usr/include/sys/ttychars.h \
	/usr/include/sys/ttydev.h
c.o: /usr/include/curses.h /usr/include/stdio.h /usr/include/sgtty.h \
	/usr/include/sys/ioctl.h /usr/include/sys/ttychars.h \
	/usr/include/sys/ttydev.h /usr/include/ctype.h
carier.o: common.h
citfnd.o: c_common.h
cityct.o: common.h
cityph.o: common.h
data.o: c_common.h
delay.o: /usr/include/stdio.h /usr/include/sys/time.h
dist.o: c_common.h
edger.o: c_common.h
edit.o: common.h
empire.o: common.h
enemym.o: common.h
expl.o: common.h
fght.o: common.h
fighmv.o: common.h
fightr.o: common.h
find.o: common.h
game.o: common.h
gen.o: common.h
head.o: common.h
idist.o: /usr/include/math.h
initia.o: common.h
iport.o: common.h
jiggle.o: common.h
ltr.o: common.h
makeland.o: common.h
mov.o: common.h
movcor.o: common.h
mve.o: common.h
order.o: /usr/include/stdio.h
path.o: common.h
phasin.o: common.h
poschk.o: common.h
priori.o: common.h
prod.o: common.h
read.o: common.h
scrchk.o: common.h
sector.o: common.h
sensor.o: common.h
shipmv.o: common.h
sonar.o: common.h
stasis.o: common.h
strout.o: /usr/include/curses.h /usr/include/stdio.h /usr/include/sgtty.h \
	/usr/include/sys/ioctl.h /usr/include/sys/ttychars.h \
	/usr/include/sys/ttydev.h
test4.o: common.h
troopm.o: common.h
write.o: common.h
SHAR_EOF
if test 4609 -ne "`wc -c < 'Makefile'`"
then
	echo shar: error transmitting "'Makefile'" '(should have been 4609 characters)'
fi
fi # end of overwriting check
if test -f 'addidt.f'
then
	echo shar: will not over-write existing file "'addidt.f'"
else
cat << \SHAR_EOF > 'addidt.f'
ccc addidt - identify peice and add to string
ccc addpei - add peice to string
	subroutine addidt ( own, string, iptr )
	character own, string ( 80 )
	integer iptr
c
c synopsis
c
c   call addidt ( own, string, iptr )
c

	if ((own.ge.'a').and.(own.le.'t'))
     *	call addstr ( 'Enemy ', string, iptr )
	if ((own.le.'T').and.(own.ge.'A'))
     *	call addstr ( 'Your ', string, iptr )
c	call addpei ( own, string, iptr )

	entry addpei ( own, string, iptr )

	i = 99
c
comment	In case it doesn't exist
	if ((own.eq.'A').or.(own.eq.'a')) i = 2
	if ((own.eq.'F').or.(own.eq.'f')) i = 3
	if ((own.eq.'D').or.(own.eq.'d')) i = 4
	if ((own.eq.'S').or.(own.eq.'s')) i = 5
	if ((own.eq.'T').or.(own.eq.'t')) i = 6
	if ((own.eq.'R').or.(own.eq.'r')) i = 7
	if ((own.eq.'C').or.(own.eq.'c')) i = 8
	if ((own.eq.'B').or.(own.eq.'b')) i = 9
	call addfoo ( i, string, iptr )
	return
	end
SHAR_EOF
if test 874 -ne "`wc -c < 'addidt.f'`"
then
	echo shar: error transmitting "'addidt.f'" '(should have been 874 characters)'
fi
fi # end of overwriting check
if test -f 'make.out'
then
	echo shar: will not over-write existing file "'make.out'"
else
cat << \SHAR_EOF > 'make.out'
f77    -c addrock.f
addrock.f:
   addrock:
       entry    addfoo:
f77    -c addsts.f
addsts.f:
   addsts:
Warning on line 71 of addsts.f: local variable e never used
Warning on line 71 of addsts.f: local variable ab never used
Warning on line 71 of addsts.f: local variable ac never used
Warning on line 71 of addsts.f: local variable ad never used
Warning on line 71 of addsts.f: local variable ao never used
Warning on line 71 of addsts.f: local variable own never used
Warning on line 71 of addsts.f: local variable own1 never used
Warning on line 71 of addsts.f: local variable own2 never used
f77    -c armcnt.f
armcnt.f:
   armcnt:
Warning on line 19 of armcnt.f: local variable e never used
Warning on line 19 of armcnt.f: local variable ab never used
Warning on line 19 of armcnt.f: local variable ac never used
Warning on line 19 of armcnt.f: local variable ad never used
Warning on line 19 of armcnt.f: local variable ao never used
Warning on line 19 of armcnt.f: local variable own never used
Warning on line 19 of armcnt.f: local variable own1 never used
Warning on line 19 of armcnt.f: local variable own2 never used
f77    -c armjmp.f
armjmp.f:
   armjmp:
Warning on line 41 of armjmp.f: local variable e never used
Warning on line 41 of armjmp.f: local variable ac never used
Warning on line 41 of armjmp.f: local variable ad never used
Warning on line 41 of armjmp.f: local variable ao never used
Warning on line 41 of armjmp.f: local variable own never used
Warning on line 41 of armjmp.f: local variable own1 never used
Warning on line 41 of armjmp.f: local variable own2 never used
f77    -c armyen.f
armyen.f:
   armyen:
Warning on line 325 of armyen.f: local variable e never used
Warning on line 325 of armyen.f: local variable ad never used
Warning on line 325 of armyen.f: local variable ao never used
Warning on line 325 of armyen.f: local variable own never used
f77    -c armymv.f
armymv.f:
   armymv:
Warning on line 215 of armymv.f: illegal branch to inner block, statement 1000
Warning on line 216 of armymv.f: local variable own never used
cc -g -c attack.c
cc -g -c bell.c
f77    -c block.f
block.f:
   block:
Warning on line 30 of block.f: implicit conversion of character to numeric type
Warning on line 45 of block.f: local variable e never used
Warning on line 45 of block.f: local variable ac never used
Warning on line 45 of block.f: local variable ad never used
Warning on line 45 of block.f: local variable ao never used
Warning on line 45 of block.f: local variable own never used
Warning on line 45 of block.f: local variable own1 never used
Warning on line 45 of block.f: local variable own2 never used
cc -g -c bufpos.c
cc -g -c c.c
f77    -c carier.f
carier.f:
   carier:
Warning on line 189 of carier.f: local variable e never used
Warning on line 189 of carier.f: local variable ac never used
Warning on line 189 of carier.f: local variable ao never used
Warning on line 189 of carier.f: local variable own never used
cc -g -c citfnd.c
f77    -c cityct.f
cityct.f:
   cityct:
Warning on line 29 of cityct.f: local variable e never used
Warning on line 29 of cityct.f: local variable ab never used
Warning on line 29 of cityct.f: local variable ac never used
Warning on line 29 of cityct.f: local variable ad never used
Warning on line 29 of cityct.f: local variable ao never used
Warning on line 29 of cityct.f: local variable own never used
Warning on line 29 of cityct.f: local variable own1 never used
Warning on line 29 of cityct.f: local variable own2 never used
f77    -c cityph.f
cityph.f:
   cityph:
Warning on line 125 of cityph.f: local variable ab never used
Warning on line 125 of cityph.f: local variable ac never used
Warning on line 125 of cityph.f: local variable ad never used
Warning on line 125 of cityph.f: local variable ao never used
Warning on line 125 of cityph.f: local variable own never used
Warning on line 125 of cityph.f: local variable own1 never used
Warning on line 125 of cityph.f: local variable own2 never used
f77    -c compar.f
compar.f:
   compar:
cc -g -c contained.c
f77    -c cost.f
cost.f:
   cost:
f77    -c cursor.f
cursor.f:
   cursor:
cc -g -c data.c
f77    -c decode.f
decode.f:
   decode:
cc -g -c delay.c
cc -g -c direc.c
cc -g -c dist.c
cc -g -c edger.c
f77    -c edit.f
edit.f:
   edit:
Warning on line 58 of edit.f: implicit conversion of character to numeric type
Warning on line 65 of edit.f: implicit conversion of character to numeric type
Warning on line 380 of edit.f: local variable ac never used
Warning on line 380 of edit.f: local variable ad never used
Warning on line 380 of edit.f: local variable ao never used
Warning on line 380 of edit.f: local variable own never used
Warning on line 380 of edit.f: local variable own1 never used
cc -g -c empend.c
f77    -c empire.f
empire.f:
   MAIN empire:
Warning on line 523 of empire.f: local variable ab never used
Warning on line 523 of empire.f: local variable ac never used
Warning on line 523 of empire.f: local variable ad never used
Warning on line 523 of empire.f: local variable ao never used
Warning on line 523 of empire.f: local variable own never used
Warning on line 523 of empire.f: local variable own1 never used
Warning on line 523 of empire.f: local variable own2 never used
Warning on line 523 of empire.f: local variable status never used
f77    -c enemym.f
enemym.f:
   enemym:
Warning on line 213 of enemym.f: local variable e never used
Warning on line 213 of enemym.f: local variable ac never used
Warning on line 213 of enemym.f: local variable ao never used
Warning on line 213 of enemym.f: local variable own never used
f77    -c expl.f
expl.f:
   expl:
Warning on line 30 of expl.f: local variable e never used
Warning on line 30 of expl.f: local variable ab never used
Warning on line 30 of expl.f: local variable ac never used
Warning on line 30 of expl.f: local variable ad never used
Warning on line 30 of expl.f: local variable ao never used
Warning on line 30 of expl.f: local variable own never used
Warning on line 30 of expl.f: local variable own1 never used
Warning on line 30 of expl.f: local variable own2 never used
f77    -c fatal.f
fatal.f:
   fatal:
f77    -c fght.f
fght.f:
   fght:
Warning on line 54 of fght.f: local variable e never used
Warning on line 54 of fght.f: local variable ab never used
Warning on line 54 of fght.f: local variable ac never used
Warning on line 54 of fght.f: local variable ad never used
Warning on line 54 of fght.f: local variable ao never used
f77    -c fighmv.f
fighmv.f:
   fighmv:
Warning on line 168 of fighmv.f: illegal branch to inner block, statement 1200
Warning on line 169 of fighmv.f: local variable e never used
Warning on line 169 of fighmv.f: local variable own never used
f77    -c fightr.f
fightr.f:
   fightr:
Warning on line 288 of fightr.f: local variable e never used
Warning on line 288 of fightr.f: local variable ad never used
Warning on line 288 of fightr.f: local variable ao never used
Warning on line 288 of fightr.f: local variable own never used
f77    -c find.f
find.f:
   find:
Warning on line 92 of find.f: local variable e never used
Warning on line 92 of find.f: local variable ab never used
Warning on line 92 of find.f: local variable ac never used
Warning on line 92 of find.f: local variable ad never used
Warning on line 92 of find.f: local variable ao never used
Warning on line 92 of find.f: local variable own1 never used
Warning on line 92 of find.f: local variable own2 never used
f77    -c game.f
game.f:
   game:
Warning on line 237 of game.f: local variable ab never used
Warning on line 237 of game.f: local variable ac never used
Warning on line 237 of game.f: local variable ad never used
Warning on line 237 of game.f: local variable ao never used
Warning on line 237 of game.f: local variable own never used
Warning on line 237 of game.f: local variable own1 never used
Warning on line 237 of game.f: local variable own2 never used
f77    -c gen.f
gen.f:
   gen:
Warning on line 152 of gen.f: local variable e never used
Warning on line 152 of gen.f: local variable ab never used
Warning on line 152 of gen.f: local variable ac never used
Warning on line 152 of gen.f: local variable ad never used
Warning on line 152 of gen.f: local variable ao never used
Warning on line 152 of gen.f: local variable own never used
Warning on line 152 of gen.f: local variable own1 never used
Warning on line 152 of gen.f: local variable own2 never used
cc -g -c getc.c
cc -g -c getcq.c
f77    -c head.f
head.f:
   head:
Warning on line 43 of head.f: local variable e never used
Warning on line 43 of head.f: local variable ab never used
Warning on line 43 of head.f: local variable ac never used
Warning on line 43 of head.f: local variable ad never used
Warning on line 43 of head.f: local variable ao never used
Warning on line 43 of head.f: local variable own never used
Warning on line 43 of head.f: local variable own2 never used
f77    -c help.f
help.f:
   help:
cc -g -c hits.c
cc -g -c huh.c
cc -g -c icorr.c
cc -g -c idist.c
f77    -c initia.f
initia.f:
   initia:
Warning on line 22 of initia.f: local variable e never used
Warning on line 22 of initia.f: local variable ab never used
Warning on line 22 of initia.f: local variable ac never used
Warning on line 22 of initia.f: local variable ad never used
Warning on line 22 of initia.f: local variable ao never used
Warning on line 22 of initia.f: local variable own never used
Warning on line 22 of initia.f: local variable own1 never used
Warning on line 22 of initia.f: local variable own2 never used
cc -g -c iphase.c
f77    -c iport.f
iport.f:
   iport:
Warning on line 21 of iport.f: local variable e never used
Warning on line 21 of iport.f: local variable ab never used
Warning on line 21 of iport.f: local variable ac never used
Warning on line 21 of iport.f: local variable ad never used
Warning on line 21 of iport.f: local variable ao never used
Warning on line 21 of iport.f: local variable own never used
Warning on line 21 of iport.f: local variable own1 never used
Warning on line 21 of iport.f: local variable own2 never used
f77    -c iscape.f
iscape.f:
   iscape:
f77    -c ittype.f
ittype.f:
   ittype:
f77    -c jiggle.f
jiggle.f:
   jiggle:
Warning on line 43 of jiggle.f: local variable e never used
Warning on line 43 of jiggle.f: local variable ab never used
Warning on line 43 of jiggle.f: local variable ac never used
Warning on line 43 of jiggle.f: local variable ad never used
Warning on line 43 of jiggle.f: local variable ao never used
Warning on line 43 of jiggle.f: local variable own never used
Warning on line 43 of jiggle.f: local variable own1 never used
Warning on line 43 of jiggle.f: local variable own2 never used
cc -g -c kline.c
f77    -c ltr.f
ltr.f:
   ltr:
Warning on line 27 of ltr.f: implicit conversion of character to numeric type
Warning on line 30 of ltr.f: implicit conversion of character to numeric type
Warning on line 51 of ltr.f: implicit conversion of character to numeric type
Warning on line 60 of ltr.f: local variable e never used
Warning on line 60 of ltr.f: local variable ab never used
Warning on line 60 of ltr.f: local variable ac never used
Warning on line 60 of ltr.f: local variable ad never used
Warning on line 60 of ltr.f: local variable ao never used
Warning on line 60 of ltr.f: local variable own never used
Warning on line 60 of ltr.f: local variable own1 never used
Warning on line 60 of ltr.f: local variable own2 never used
f77    -c makeland.f
makeland.f:
   makeland:
Warning on line 36 of makeland.f: local variable e never used
Warning on line 36 of makeland.f: local variable ab never used
Warning on line 36 of makeland.f: local variable ac never used
Warning on line 36 of makeland.f: local variable ad never used
Warning on line 36 of makeland.f: local variable ao never used
Warning on line 36 of makeland.f: local variable own never used
Warning on line 36 of makeland.f: local variable own1 never used
Warning on line 36 of makeland.f: local variable own2 never used
f77    -c mov.f
mov.f:
   mov:
Warning on line 80 of mov.f: local variable e never used
Warning on line 80 of mov.f: local variable ab never used
Warning on line 80 of mov.f: local variable ac never used
Warning on line 80 of mov.f: local variable ad never used
Warning on line 80 of mov.f: local variable ao never used
Warning on line 80 of mov.f: local variable own never used
Warning on line 80 of mov.f: local variable own1 never used
Warning on line 80 of mov.f: local variable own2 never used
f77    -c movcor.f
movcor.f:
   movcor:
Warning on line 127 of movcor.f: local variable e never used
Warning on line 127 of movcor.f: local variable ac never used
Warning on line 127 of movcor.f: local variable ad never used
Warning on line 127 of movcor.f: local variable ao never used
Warning on line 127 of movcor.f: local variable own never used
Warning on line 127 of movcor.f: local variable own2 never used
f77    -c mve.f
mve.f:
   mve:
Warning on line 251 of mve.f: local variable ab never used
Warning on line 251 of mve.f: local variable ac never used
Warning on line 251 of mve.f: local variable ad never used
Warning on line 251 of mve.f: local variable ao never used
Warning on line 251 of mve.f: local variable own never used
Warning on line 251 of mve.f: local variable own2 never used
cc -g -c order.c
f77    -c path.f
path.f:
   path:
Warning on line 109 of path.f: local variable e never used
Warning on line 109 of path.f: local variable ac never used
Warning on line 109 of path.f: local variable ad never used
Warning on line 109 of path.f: local variable ao never used
Warning on line 109 of path.f: local variable own never used
Warning on line 109 of path.f: local variable own1 never used
Warning on line 109 of path.f: local variable own2 never used
f77    -c phasin.f
phasin.f:
   phasin:
Warning on line 21 of phasin.f: local variable ab never used
Warning on line 21 of phasin.f: local variable ac never used
Warning on line 21 of phasin.f: local variable ad never used
Warning on line 21 of phasin.f: local variable ao never used
Warning on line 21 of phasin.f: local variable own never used
Warning on line 21 of phasin.f: local variable own1 never used
Warning on line 21 of phasin.f: local variable own2 never used
f77    -c poschk.f
poschk.f:
   poschk:
Warning on line 32 of poschk.f: local variable e never used
Warning on line 32 of poschk.f: local variable ab never used
Warning on line 32 of poschk.f: local variable ac never used
Warning on line 32 of poschk.f: local variable ad never used
Warning on line 32 of poschk.f: local variable ao never used
Warning on line 32 of poschk.f: local variable own1 never used
Warning on line 32 of poschk.f: local variable own2 never used
f77    -c priori.f
priori.f:
   priori:
Warning on line 71 of priori.f: local variable e never used
Warning on line 71 of priori.f: local variable ad never used
Warning on line 71 of priori.f: local variable ao never used
Warning on line 71 of priori.f: local variable own never used
Warning on line 71 of priori.f: local variable own1 never used
Warning on line 71 of priori.f: local variable own2 never used
f77    -c prod.f
prod.f:
   prod:
Warning on line 29 of prod.f: local variable e never used
Warning on line 29 of prod.f: local variable ab never used
Warning on line 29 of prod.f: local variable ac never used
Warning on line 29 of prod.f: local variable ad never used
Warning on line 29 of prod.f: local variable ao never used
Warning on line 29 of prod.f: local variable own never used
Warning on line 29 of prod.f: local variable own1 never used
Warning on line 29 of prod.f: local variable own2 never used
cc -g -c putc.c
f77    -c read.f
read.f:
   read:
Warning on line 18 of read.f: local variable e never used
Warning on line 18 of read.f: local variable ab never used
Warning on line 18 of read.f: local variable ac never used
Warning on line 18 of read.f: local variable ad never used
Warning on line 18 of read.f: local variable ao never used
Warning on line 18 of read.f: local variable own never used
Warning on line 18 of read.f: local variable own1 never used
Warning on line 18 of read.f: local variable own2 never used
f77    -c round.f
round.f:
   round:
Warning on line 27 of round.f: local variable e never used
Warning on line 27 of round.f: local variable ab never used
Warning on line 27 of round.f: local variable ac never used
Warning on line 27 of round.f: local variable ad never used
Warning on line 27 of round.f: local variable ao never used
Warning on line 27 of round.f: local variable own never used
Warning on line 27 of round.f: local variable own1 never used
Warning on line 27 of round.f: local variable own2 never used
f77    -c scrchk.f
scrchk.f:
   scrchk:
Warning on line 28 of scrchk.f: local variable e never used
Warning on line 28 of scrchk.f: local variable ab never used
Warning on line 28 of scrchk.f: local variable ac never used
Warning on line 28 of scrchk.f: local variable ad never used
Warning on line 28 of scrchk.f: local variable ao never used
Warning on line 28 of scrchk.f: local variable own never used
Warning on line 28 of scrchk.f: local variable own1 never used
Warning on line 28 of scrchk.f: local variable own2 never used
f77    -c sector.f
sector.f:
   sector:
Warning on line 57 of sector.f: implicit conversion of character to numeric type
Warning on line 65 of sector.f: implicit conversion of character to numeric type
Warning on line 138 of sector.f: local variable e never used
Warning on line 138 of sector.f: local variable ac never used
Warning on line 138 of sector.f: local variable ad never used
Warning on line 138 of sector.f: local variable ao never used
Warning on line 138 of sector.f: local variable own never used
Warning on line 138 of sector.f: local variable own1 never used
Warning on line 138 of sector.f: local variable own2 never used
f77    -c sensor.f
sensor.f:
   sensor:
Warning on line 32 of sensor.f: local variable e never used
Warning on line 32 of sensor.f: local variable ac never used
Warning on line 32 of sensor.f: local variable ad never used
Warning on line 32 of sensor.f: local variable ao never used
Warning on line 32 of sensor.f: local variable own never used
Warning on line 32 of sensor.f: local variable own1 never used
Warning on line 32 of sensor.f: local variable own2 never used
f77    -c set.f
set.f:
   set:
Warning on line 56 of set.f: local variable e never used
Warning on line 56 of set.f: local variable ab never used
Warning on line 56 of set.f: local variable ac never used
Warning on line 56 of set.f: local variable ad never used
Warning on line 56 of set.f: local variable ao never used
Warning on line 56 of set.f: local variable own never used
Warning on line 56 of set.f: local variable own1 never used
Warning on line 56 of set.f: local variable own2 never used
f77    -c shipmv.f
shipmv.f:
   shipmv:
Warning on line 201 of shipmv.f: illegal branch to inner block, statement 900
Warning on line 203 of shipmv.f: local variable e never used
Warning on line 203 of shipmv.f: local variable own never used
f77    -c sonar.f
sonar.f:
   sonar:
Warning on line 95 of sonar.f: local variable e never used
Warning on line 95 of sonar.f: local variable ac never used
Warning on line 95 of sonar.f: local variable ad never used
Warning on line 95 of sonar.f: local variable ao never used
Warning on line 95 of sonar.f: local variable own never used
Warning on line 95 of sonar.f: local variable own1 never used
Warning on line 95 of sonar.f: local variable own2 never used
f77    -c stasis.f
stasis.f:
   stasis:
Warning on line 21 of stasis.f: local variable e never used
Warning on line 21 of stasis.f: local variable ac never used
Warning on line 21 of stasis.f: local variable ad never used
Warning on line 21 of stasis.f: local variable ao never used
Warning on line 21 of stasis.f: local variable own never used
Warning on line 21 of stasis.f: local variable own1 never used
Warning on line 21 of stasis.f: local variable own2 never used
f77    -c strlen.f
strlen.f:
   strlen:
cc -g -c strout.c
f77    -c strpos.f
strpos.f:
   strpos:
f77    -c test4.f
test4.f:
   test4:
Warning on line 16 of test4.f: implicit conversion of character to numeric type
Warning on line 19 of test4.f: implicit conversion of character to numeric type
Warning on line 47 of test4.f: local variable ab never used
Warning on line 47 of test4.f: local variable ac never used
Warning on line 47 of test4.f: local variable ad never used
Warning on line 47 of test4.f: local variable ao never used
Warning on line 47 of test4.f: local variable own never used
Warning on line 47 of test4.f: local variable own1 never used
Warning on line 47 of test4.f: local variable own2 never used
f77    -c tran.f
tran.f:
   tran:
f77    -c troopm.f
troopm.f:
   troopm:
Warning on line 285 of troopm.f: local variable e never used
Warning on line 285 of troopm.f: local variable ad never used
Warning on line 285 of troopm.f: local variable ao never used
Warning on line 285 of troopm.f: local variable own never used
cc -g -c ver.c
f77    -c write.f
write.f:
   write:
Warning on line 18 of write.f: local variable e never used
Warning on line 18 of write.f: local variable ab never used
Warning on line 18 of write.f: local variable ac never used
Warning on line 18 of write.f: local variable ad never used
Warning on line 18 of write.f: local variable ao never used
Warning on line 18 of write.f: local variable own never used
Warning on line 18 of write.f: local variable own1 never used
Warning on line 18 of write.f: local variable own2 never used
Loading emp
done
SHAR_EOF
if test 21590 -ne "`wc -c < 'make.out'`"
then
	echo shar: error transmitting "'make.out'" '(should have been 21590 characters)'
fi
fi # end of overwriting check
if test -f 'addrock.f'
then
	echo shar: will not over-write existing file "'addrock.f'"
else
cat << \SHAR_EOF > 'addrock.f'
ccc addrock - copy peice into buffer
ccc addfoo - copy peice into buffer with extra character(s)
	subroutine addrock ( peice, string, ptr )
	integer peice, ptr
c	character string ( 80 )
	character string ( 80 )
c
c synopsis
c
c   call addrock ( peice, string, ptr )
c   call addfoo ( peice, string, ptr )
c
c	peice - integer value of peice
c	string - character array to put string into
c	ptr - pointer to next unused element in string
c
	if ( peice .eq. 2 ) call addstr ( 'n', string, ptr )
	call addstr ( ' ', string, ptr )

	entry addfoo ( peice, string, ptr )

	goto ( 100, 200, 300, 400, 500, 600, 700, 800, 900 ) peice
	call addstr ( 'steam beer', string, ptr )
100	return
200	call addstr ( 'army', string, ptr )
	return
300	call addstr ( 'fighter', string, ptr )
	return
400	call addstr ( 'destroyer', string, ptr )
	return
500	call addstr ( 'submarine', string, ptr )
	return
600	call addstr ( 'troop transport', string, ptr )
	return
700	call addstr ( 'cruiser', string, ptr )
	return
800	call addstr ( 'aircraft carrier', string, ptr )
	return
900	call addstr ( 'battleship', string, ptr )
	return
	end
SHAR_EOF
if test 1112 -ne "`wc -c < 'addrock.f'`"
then
	echo shar: error transmitting "'addrock.f'" '(should have been 1112 characters)'
fi
fi # end of overwriting check
if test -f 'common.h'
then
	echo shar: will not over-write existing file "'common.h'"
else
cat << \SHAR_EOF > 'common.h'

	PARAMETER (IAR=0,IFI=500,IDE=700,ISU=900,ITT=1100,
     1 ICR=1200,ICA=1300,IBA=1400)
	PARAMETER (IAR2=1500,IFI2=2000,IDE2=2200,ISU2=2400,ITT2=2600,
     1 ICR2=2700,ICA2=2800,IBA2=2900)
	PARAMETER (IDEH=0,ISUH=200,ITTH=400,ICRH=500,ICAH=600,IBAH=700)
	PARAMETER (IDE2H=800,ISU2H=1000,ITT2H=1200,ICR2H=1300,
     1 ICA2H=1400,IBA2H=1500)

	INTEGER G2(100)
	INTEGER TIPE(15),CRAHIT(15),CRALOC(15)
c	HITS(15)
	integer x(70)
	INTEGER INDEX(15)
	INTEGER CMYTBL(9),KBFUDG(9)
	INTEGER LOPMAX(15),COMSCN(40)
	INTEGER NSHPRF(4,6)
	INTEGER PH(8),OVRPOP(16,2)
	INTEGER PRIOR(7)
	INTEGER RANGE(200),AR2S(500)
	INTEGER ARMTOT(20),CODEFU(1500),CODELA(1500),TARGET(70),LIMIT(16)
	INTEGER ARROW(9)
	INTEGER IARROW(10)
	INTEGER D2(3)
	INTEGER D(667)
	INTEGER MYCODE(1500)
	INTEGER RANG(200)
	INTEGER IOTAB(16)
	INTEGER	PHAZEE(8)

	INTEGER		owner(70)
	INTEGER		found(70)
	INTEGER		phase(70)
	INTEGER		fipath(70)
	INTEGER		loci(10,11)
	INTEGER		number(18)
	INTEGER		troopt(6,5)

	integer ptr
	logical		SPECAL,PASS
	character	submap(39,39)
	character	AB,AC,AD,AO,E,OWN1,OWN2,OWN
comment	AVOID WORD REFERENCES TO THESE
	character	KBTBL(9),AB9(9)
	character	COMM(30),PHAZE(8)
	character	IFILE(11),KILL
	character	COMMAN(20),OKA(5),OKB(5),OKC(5)
	character*20	TTY
	integer		MOVEDFLAG(1500)
	integer		J1TS(1600)
	character	EMAP(6000),RMAP(6000),PMAP(6000),OMAP(6000)
	character	PAMELA(8),REEED(9)
	integer		cities(128)
	character jnkbuf ( 80 )
	INTEGER RLMAP(3000)
	LOGICAL	AUTOMV

	COMMON /cols/cols
	COMMON /lines/lines
	COMMON /PRIOR/ PRIOR
	COMMON /NSHPRF/ NSHPRF
	COMMON /AB9/ AB9
	COMMON /ARMTOT/ ARMTOT
	COMMON /COMSCN/ COMSCN
	COMMON /KBTBL/ KBTBL
	COMMON /COMMAN/ COMMAN
	COMMON /COMM/ COMM
	COMMON /IFILE/ IFILE
	COMMON /KILL/ KILL
	COMMON /TTY/ TTY
	COMMON /FOUND/ FOUND
	COMMON /OWNER/ OWNER
	COMMON /PHASE/ PHASE
	COMMON /CMYTBL/ CMYTBL
	COMMON /KBFUDG/ KBFUDG
	COMMON /CODER/ CODER
	COMMON /CODEFU/ CODEFU
	COMMON /CODELA/ CODELA
c	COMMON /HITS/ HITS
	COMMON /TIPE/ TIPE
	COMMON /CRAHIT/ CRAHIT
	COMMON /CRALOC/ CRALOC
	COMMON /FIPATH/ FIPATH
	COMMON /G2/ G2
	COMMON /IARROW/ IARROW
	COMMON /ARROW/ ARROW
	COMMON /INDEX/ INDEX
	COMMON /LOPMAX/ LOPMAX
	COMMON /IOTAB/ IOTAB
	COMMON /J1TS/ J1TS
	COMMON /IADJST/ IADJST
	COMMON /D/ D
	COMMON /EMAP/ EMAP
	COMMON /RMAP/ RMAP
	COMMON /PMAP/ PMAP
	COMMON /RLMAP/ RLMAP
	COMMON /OMAP/ OMAP
	COMMON /TARGET/ TARGET
	COMMON /AR2S/ AR2S
	COMMON /RANGE/ RANGE
	COMMON /RANG/ RANG
	COMMON /LOCI/ LOCI
	COMMON /NUMBER/ NUMBER
	COMMON /LIMIT/ LIMIT
	COMMON /MDATE/ MDATE
	COMMON /VERSION/ VERSION
	COMMON /MODE/ MODE
	COMMON /JECTOR/ JECTOR
	COMMON /ISEC/ ISEC
	COMMON /NEWRND/ NEWRND
	COMMON /MOVEDFLAG/ MOVEDFLAG
	COMMON /D2/ D2
	COMMON /MYCODE/ MYCODE
	COMMON /OKA/ OKA
	COMMON /OKB/ OKB
	COMMON /OKC/ OKC
	COMMON /OVRPOP/ OVRPOP
	COMMON /PHAZE/ PHAZE
	COMMON /PHAZEE/ PHAZEE
	COMMON /PH/ PH
	COMMON /PAMELA/ PAMELA
	COMMON /REEED/ REEED
	COMMON /PASS/ PASS
	COMMON /SPECAL/ SPECAL
	COMMON /AUTOMV/ AUTOMV
	COMMON /SAVBUF/ SAVBUF
	COMMON /STEP/ STEP
	COMMON /POSIT/ POSIT
	COMMON /START/ START
	COMMON /SUCCES/ SUCCES
	COMMON /FAILUR/ FAILUR
	COMMON /FULL/ FULL
	COMMON /TROOPT/ TROOPT
	COMMON /X/ X
	COMMON /jnkbuf/ jnkbuf
	COMMON /ptr/ ptr
	COMMON /CITIES/ CITIES
	COMMON /SUBMAP/SUBMAP
C
C AGGR: THIS IS A MEASURE OF THE ENEMY SHIPS AGGRESSIVENESS,
C  THIS VALUE IS ADDED TO THE COST-EFFECTIVENESS OF ATTACKING AN
C  ENEMY UNIT TO DETERMINE IF THE SHIP WILL ATTACK OR RUN FROM THE
C  ENEMY.
C ALL CITIES ARE REFERENCED BY CITY NUMBER, AS IN X(N)=LOC OF CITY #N
C CODFU/CODELA: CONTAINS A NUMBER THAT DETERMINES WHAT THAT COMPUTER CRAFT
C  IS ASSIGNED TO DO, IS SEPERATED INTO 2 NUMBERS, IFO AND ILA. IFO
C  GIVES THE FUNCTION, ILA GIVES DETAILS.
C CODER: USED FOR DEBUG FLAG
C CROWD: USED IF CITY IS SURROUNDED BY ARMIES
C D: ORIGINAL MAP, ENCODED IN MOD 3
C EXPLOR: THIS IS SET TO 1 IF THE ENEMY SHIP IS TO EXPLORE UNKNOWN
C  TERRITORY ADJACENT TO IT, 0 IF NOT.
C FIPATH: STASIS # TO BE GIVEN TO FIGHTER IN THAT CITY
C FOUND: COMPLETION DATES FOR CITIES
C IADJST: SUBTRACTED FROM Z6 SO CURSOR WILL NOT BE MOVED OFF SCREEN
C IARROW: ADDED TO Z6 SO MOVES [1,2,3,4,5,6,7,8,9] ARE CONVERTED
C  TO [+1,-99,-100,-101,ETC.]
C ISEC: SECTOR TERMINAL IS SHOWING
C IZAP:  .TRUE.=SAVE GAME, .FALSE.=INITIALIZE
C JECTOR: SECTOR PROGRAM IS LOOKING AT
C KURSOR: SET TO POSITION OF CURSOR
C MODE: 1=IN MODE 2, 0=IN MODE 1
C OWNER: WHO OWNS THE CITY: 0>NOBODY, 1>PLAYER, 2>COMPUTER
C PASS: SET TO .TRUE. IF IT IS A PRIVILEGED USER
C PHASE: PHASE OF CITY
C X: LOCATIONS OF CITIES
C
SHAR_EOF
if test 4500 -ne "`wc -c < 'common.h'`"
then
	echo shar: error transmitting "'common.h'" '(should have been 4500 characters)'
fi
fi # end of overwriting check
if test -f 'addsts.f'
then
	echo shar: will not over-write existing file "'addsts.f'"
else
cat << \SHAR_EOF > 'addsts.f'
ccc addsts - display mycod function in english
	subroutine addsts ( mycod, string, iptr )
c
c synopsis
c
c   call addsts ( mycod, string, iptr )
c
c	mycod - function code
c	string - character array to add strings to
c	iptr - current length of string
c
	IMPLICIT INTEGER(A-Z)

	include 'common.h'
C
c	character string ( 80 )
	character string ( 80 )
	integer iptr

	call addstr ( 'Function: ', string, iptr )
c
c	Awake if  mycod = 0
c
	if ( mycod .ne. 0 ) goto 100
	call addstr ( 'awake', string, iptr )
	return
c
c	Sentry if 0 < mycod < 100
c
100	continue
	if (( mycod .le. 0 ) .or. ( mycod .ge. 100 )) goto 200
	call addstr ( 'sentry', string, iptr )
	return
c
c	Random if mycod = 100
c
200	continue
	if ( mycod .ne. 100 ) goto 300
	call addstr ( 'random', string, iptr )
	return
c
c	Aimed at a location if 100 < mycod < 6101
c
300	continue
	if (( mycod .le. 100 ) .or. ( mycod .ge. 6101 )) goto 400
	call addint ( mycod, string, iptr )
	return
c
c	Set in a direction if 6101 <= mycod <= 6108
c
400	continue
	if (( mycod .lt. 6101 ) .or. ( mycod .gt. 6108 )) goto 500
	iptr = iptr + 1
	do 450 i = 6101, 6108
	if ( i .eq. mycod ) string ( iptr ) = comm ( i - 6100 )
450	continue
	return
c
c	Fill if mycod = 9997
c
500	continue
	if ( mycod .ne. 9997 ) goto 600
	call addstr ( 'fill', string, iptr )
	return
c
c	Not assigned a valid function; goofing off
c
600	continue
	call addstr ( 'taking drugs', string, iptr )
	return
	end
SHAR_EOF
if test 1427 -ne "`wc -c < 'addsts.f'`"
then
	echo shar: error transmitting "'addsts.f'" '(should have been 1427 characters)'
fi
fi # end of overwriting check
if test -f 'armcnt.f'
then
	echo shar: will not over-write existing file "'armcnt.f'"
else
cat << \SHAR_EOF > 'armcnt.f'

	SUBROUTINE ARMCNT
C
	IMPLICIT INTEGER(A-Z)

	include 'common.h'
C

C
	DO 100 I=1,20
100	ARMTOT(I)=0
	DO 300 I=1,LIMIT(9)
	IF (CODEFU(I).NE.1) GOTO 300
	ILA=CODELA(I)
	DO 200 I2=1,20
200	IF (TARGET(I2).EQ.ILA) ARMTOT(I2)=ARMTOT(I2)+1
300	CONTINUE
	RETURN
	END
SHAR_EOF
if test 261 -ne "`wc -c < 'armcnt.f'`"
then
	echo shar: error transmitting "'armcnt.f'" '(should have been 261 characters)'
fi
fi # end of overwriting check
if test -f 'armjmp.f'
then
	echo shar: will not over-write existing file "'armjmp.f'"
else
cat << \SHAR_EOF > 'armjmp.f'
	function armjmp(z6,ar2sc)
c 
c	This subroutine determines whether or not an army should get off
c	the troop transport it is on. 0=no, 1=yes
c 
	IMPLICIT INTEGER(A-Z)

	include 'common.h'
C

	armjmp=0
	do 100 i=1,8
c
comment	not all sea surround
100	if (omap(z6+iarrow(i+1)).ne.'.') goto 200	
	return

c
comment	been on troop transport
200	if (ar2sc.eq.0) goto 400
c
comment	for a long time
	do 300 i=1,8
	loc=z6+iarrow(i+1)
	if (omap(loc).eq.'.') goto 300
	if (order(loc).ne.0) goto 300
	ab=rmap(loc)
	if ((ab.eq.'A').or.(ab.eq.'F')) goto 400
	if ((ab.eq.'*').or.(ab.eq.'O')) goto 400
	loc=z6+2*iarrow(i+1)
	ab=emap(loc)
	if (ab.eq.' ') goto 400
300	continue
c
comment	don't jump
	return
400	armjmp=1
c
comment	jump
	return
	end
SHAR_EOF
if test 730 -ne "`wc -c < 'armjmp.f'`"
then
	echo shar: error transmitting "'armjmp.f'" '(should have been 730 characters)'
fi
fi # end of overwriting check
if test -f 'armyen.f'
then
	echo shar: will not over-write existing file "'armyen.f'"
else
cat << \SHAR_EOF > 'armyen.f'
	subroutine armyen
c 
c	This subroutine handles enemy army moves
c 
	IMPLICIT INTEGER(A-Z)

	include 'common.h'
C
cc	integer irand

	monkey=0
	number(1)=0
	if (coder.eq.1) print 999
999	format(' army codes')
c 
c start army move loop
c
	do 4200 y=1,limit(9)
	z6=rlmap(iar2+y)
	if (z6.eq.0) goto 4200
	if (coder.eq.0) goto 200
	ptr = 0
	call addint ( y, jnkbuf, ptr )
	call addstr ( ' ', jnkbuf, ptr )
	call addint ( npath, jnkbuf, ptr )
	npath=0
200	z7=z6
	monkey=y
c
comment	set dir to 1 or -1
	dir=mod(y,2)*2-1
	p=0
c
comment	set ab=what is showing where the army is
	ab=rmap(z6)
	ac= '\0'
	if ((ab.ne.'a').AND.(AB.NE.'t').and.(ab.ne.'X')) goto 3700
c 
c	Age ar2s
c
	if ((ar2s(y).le.100).or.(ar2s(y).gt.1000)) ar2s(y)=ar2s(y)-1
	if ((ar2s(y).lt.0).or.(ar2s(y).eq.1000)) ar2s(y)=0
	if (ab.eq.'a') goto 300
	if (ab.eq.'X') then
	  do 250 i=1,limit(13)
	  if (rlmap(itt2+i).eq.z6) goto 270
250	  continue
	  goto 300
	endif
270	if (armjmp(z6,ar2s(y)).eq.0) goto 4150
c 
c	Move selection
c
300	ifo=codefu(y)
	ila=codela(y)
c 
c	If a priority move exists, pick it and don't bother slugging
c	through code selection and move selection
c
	move1=priori(z6,ifo,ila,dir,ab)
	if (move1.ne.0) goto 2400
c 
c	ifo = 0 move in certain direction, or follow shore
c	ifo = 1 move towards target city
c	ifo = 2 move towards an enemy army
c	ifo = 3 move towards a troop transport
c 
	goto ( 400, 500, 600, 700 ) ifo + 1

c
comment	look for targets, loci, tt's
400	goto 800

500	if (rmap(ila).eq.'X') goto 800	
c
comment	city has been captured
	goto 1600
c
comment	move

600	if (ila.eq.z6) goto 800
c
comment	arrived at enemy concentration
	goto 1600
c
comment	move

700	if (ila.gt.100) goto 800
c
comment	invalid value for ila
	if (codefu(ila+itt2-1500).ge.6) goto 1200
	if (rlmap(ila+itt2).eq.0) goto 1200
c
comment	tt sunk
	if (j1ts(ila+itt2h).lt.3) goto 1200		
c	tt damaged
	goto 1700
c 
c	Select a new code
c
800	continue
c 
c	Look for target city
c
	if (number(10).eq.0) goto 1050
	ia=irand(number(10))+1
	ib=ia+number(10)-1
	do 1000 ic=ia,ib
	i=ic
	if (i.gt.number(10)) i=i-number(10)
	if (target(i).eq.0) goto 1000
	if (idist(z6,target(i)).gt.14) goto 1000
	move=path(z6,target(i),dir,okb,flag)
	npath=npath+1
	if (flag.eq.0) goto 1000
c
comment	can't get to it
	ifo=1
	ila=target(i)
	goto 1800
c
comment	move
1000	continue
c 
c	Look for an army that is on your continent
c
1050	if (loci(10,11).ne.0) loci(10,11)=0
	do 1100 i=1,10
	temp=irand(10)+2
	if (loci(i,temp).eq.0) temp=2
	if (loci(i,temp).eq.0) goto 1100
	temp=loci(i,temp)
	move=path(z6,temp,dir,okb,flag)
	npath=npath+1
	if (flag.eq.0) goto 1100
	ifo=2
	ila=temp
	goto 1800
1100	continue
c 
c	Look for tt that is short of armies
c
1200	if ((ar2s(y).ne.0) .or. (limit(13) .eq. 0)) goto 1400
c				added or here
c
comment	ineligible to get on a tt
	ia=irand(limit(13))+1
	do 1300 ic=ia,ia+limit(13)
	i=ic
	if (i.gt.limit(13)) i=i-limit(13)
	if (rlmap(itt2+i).eq.0) goto 1300
c
comment	tt doesn't exist
	if (j1ts(itt2h+i).lt.3) goto 1300
c
comment	damaged, i.e. unsuitable
	if (iabs(codefu(itt2+i-1500)).ge.6) goto 1300
	if (idist(z6,rlmap(itt2+i)).gt.20) goto 1300
c
comment	too far away
	move=path(z6,rlmap(itt2+i),dir,okb,flag)
	npath=npath+1
	if (flag.eq.0) goto 1300
comment	can't get to it
	move=mov(z6,rlmap(itt2+i))
	ifo=3
	ila=i
	codela(itt2+i-1500)=y
	goto 1800
1300	continue
c 
c	Pick a random direction (ifo=0)
c
1400	if ((ifo.eq.0).and.(ila.ne.0)) goto 1500

comment	if already ass'd direc
	ifo=0
	ila=irand(8)+1
comment	**
 
1500	move=ila
	i1=icorr(move-dir*3)
	if (rmap(z6+iarrow(i1+1)).ne.'+') move=i1
comment	**
	goto 1800

1600	move=path(z6,ila,dir,okb,flag)
	npath=npath+1
	if (flag.eq.0) goto 1400
	goto 1800

1700	move=path(z6,rlmap(ila+itt2),dir,okb,flag)
	npath=npath+1
 
1800	do 2300 i=0,7*dir,dir
	move1=icorr(move+i)
	loc=z6+iarrow(move1+1)
comment	**
	ac=rmap(loc)
	if (ac.ne.'t') goto 2200
	if (ifo.eq.3) ifo=0
	if (ar2s(y).ne.0) goto 2300
	numarm=0
	do 1900 iz=itt2+1,limit(13)+itt2
1900	if (rlmap(iz).eq.loc) goto 2000
2000	if (j1ts(itt2h-itt2+iz).lt.3) goto 2300
	do 2100 iy=iar2+1,limit(9)+iar2
	if (rlmap(iy).eq.loc) numarm=numarm+1
2100	if (numarm.ge.6) goto 2300
	goto 2400
2200	if ((ac.eq.'+').and.(order(loc).eq.0)) goto 2400
2300	continue
	move1=0
c 
2400	if (ifo.eq.0) ila=iabs(move1)
	codefu(y)=ifo
	codela(y)=ila
	if (coder.eq.1) print 998,ifo,ila
998	format(1x,7i,3x)
	z6=z6+iarrow(move1+1)
comment	**
c 
	ac=rmap(z6)
	if (ab.ne.'t') goto 2500
	if (ac.eq.'t') goto 3600
	codefu(y)=0
	codela(y)=0
	ar2s(y)=1020
	goto 2600
2500	if (omap(z7).ne.'*') rmap(z7)=omap(z7)
	if (ac.ne.'t') goto 2600
	ar2s(y)=100
	goto 3600
2600	if (ac.eq.'+') goto 3500
	if ((ac.eq.'X').or.(ac.eq.'.')) goto 3700
	if (omap(z6).ne.'*') goto 3400
	if (irand(100).lt.50) then
	id=10
	do 2650 i=1,limit(9)
	if (rlmap(iar2+i).eq.0) goto 2650
	if (i.eq.y) goto 2650
	if (codefu(i).ne.0) goto 2650
	if (idist(rlmap(iar2+i),z6).ge.id) goto 2650
	move=path(rlmap(iar2+i),z6,1,okb,flag)
	npath=npath+1
	if (flag.eq.0) goto 2650
comment	can't get to it
	id=idist(rlmap(iar2+i),z6)
	iy=i
2650	continue
	if (id.lt.10) then
	ifo=1
	ila=z6
	endif
	goto 3700
	endif

	do 2700 i=1,70
2700	if (target(i).eq.z6) target(i)=0
	do 2800 i=1,limit(9)
2800	if (codefu(i).ne.1.or.codela(i).ne.z6) goto 2900
	codefu(i)=0
	codela(i)=0
2900	do 3000 i=1,100
3000	if (x(i).eq.z6) goto 3100
3100	owner(i)=2
	phase(i)=0
	if (((ac.eq.'O').or.(ar2s(y).gt.0)).and.(edger(z6).lt.8))
     *	phase(i)=-1
	if (ac.ne.'O') goto 3200
	ptr = 0
	call addstr ( 'City at ', jnkbuf, ptr )
	call addint ( z6, jnkbuf, ptr )
	call addstr ( ' surrendered to enemy forces', jnkbuf, ptr )
	jnkbuf ( ptr + 1 ) = '\0'
	call topmsg ( 3, jnkbuf )
	call cflush
	call delay(30)
	rmap(z6)='X'
	call sensor(z6)
	goto 3700
3200	rmap(z6)='X'
	goto 3700
3300	ar2s(y)=100
	goto 3600
3400	h1=1
	if (z7.eq.z6) goto 3600
997	format(1h+,/,' Error: attacked ',a1,4i,1x)
	p=1
	own1='a'
	own2=ac
	h2=30
	call find(own2,z6,z8,h2)
	call fght(z6,h1,h2,own1,own2)
	call find(own2,z6,z8,h2)
	if (h1.le.0) goto 3700
	rmap(z6)=omap(z6)
	if (rmap(z6).eq.'.') goto 3700
3500	rmap(z6)='a'
3600	rlmap(iar2+y)=z6
	if (p.eq.1) call sensor(z6)
	goto 4100
3700	rlmap(iar2+y)=0
	if (ac.ne.'X') goto 3900
	do 3800 i=1,70
3800	if (x(i).eq.z6) phase(i)=0
3900	if (p.eq.1) call sensor(z6)
	if (rmap(z6).ne.'O') goto 4000
	ptr = 0
	call addstr ( 'City at ', jnkbuf, ptr )
	call addint ( z6, jnkbuf, ptr )
	call addstr ( ' repelled enemy invasion', jnkbuf, ptr )
	jnkbuf(ptr + 1) = '\0'
	call topmsg ( 3, jnkbuf )
	call cflush
	call delay(30)
4000	codefu(y)=0
	codela(y)=0
	ar2s(y)=0
4100	call sonar(z6)
4150	if (rlmap(iar2+y).ne.0) number(1)=number(1)+1
4200	continue
	limit(9)=monkey
	return
	end
SHAR_EOF
if test 6667 -ne "`wc -c < 'armyen.f'`"
then
	echo shar: error transmitting "'armyen.f'" '(should have been 6667 characters)'
fi
fi # end of overwriting check
if test -f 'armymv.f'
then
	echo shar: will not over-write existing file "'armymv.f'"
else
cat << \SHAR_EOF > 'armymv.f'
	subroutine armymv
c
c	This routine handles player's army moves
c 
	IMPLICIT INTEGER(A-Z)

	include 'common.h'
C
	logical fatal
 
	iturn = 1
	do 2700 y = 1, limit (1)
	if (movedflag(y) .ne. 0) goto 2700
	z6 = rlmap(y)
 	if (z6 .eq. 0) goto 2700
	mycod = mycode(y)
	if ((mode.eq.1).and.(poschk(z6,'A').eq.0)) goto 2700
	movedflag(y)=1
	z7=z6
	ab=rmap(z6)
	if ((ab.eq.'A').or.(ab.eq.'T').or.(ab.eq.'O')) goto 200
100	continue
	ptr = 0
	call addstr('Army # ', jnkbuf, ptr)
	call addint(y, jnkbuf, ptr)
	call addstr(' destroyed', jnkbuf, ptr)
	jnkbuf(ptr + 1) = '\0'
	call topmsg(3, jnkbuf)
	call cflush
	call delay(30)
	goto 2500
 
200	if (ab.ne.'T') goto 400

	do 300 i=1,8
	if (rmap(z6+iarrow(i+1)).eq.'T') goto 400
300	if (omap(z6+iarrow(i+1)).ne.'.') goto 400
comment	don't ask if nowhere to go
	goto 2700
 
400	if (mycod .eq. 0) goto 1000
	if (mycod .ne. 100) goto 500
	z6 = z6 + iarrow(jiggle(z6, y) + 1)
comment	do random move
	goto 1200
500	call stasis(z6,y)
comment	wake up if near enemy
600	mycod=mycode(y)
	if (mycod.eq.0) goto 1000
	if ((mycod.lt.100).or.(mycod.gt.6108)) goto 1200
	if (mycod.gt.6100) goto 800
	if (mycod.le.6000) goto 700
	goto 1200
700	z6=z6+iarrow(mov(z6,mycod)+1)
comment	do a move toward a location
	goto 900
800	z6=z6+iarrow(mycod-6100+1)
comment	do direction moves
900	ad = rmap(z6)
	if (((ad.eq.'+').or.(ad.eq.'T')).and.(order(z6).eq.0)) goto 1200
	z6=z7
1000	call sector(pmap(1))
	call ltr(z6,iturn)
1100	call mve('A',mdate,y,y,1,z6,z7,disas,z6-iadjst)
	if (disas.eq.-2) goto 600
comment	just put into stasis
c 
c	Move evaluation, z6=to, z7=from, check out new location
c
1200	if ((rmap(z7).ne.'T').and.(omap(z7).ne.'*')) rmap(z7)=omap(z7)
	if (z6.eq.mycode(y)) mycode(y)=0
	ac = rmap(z6)
	ao = omap(z6)
	if (ac .eq. 'T') goto 1400
comment	getting on a transport?
	if ((rmap(z7) .ne. 'T') .or. (ao .ne. '.')) goto 1300
	if (.not. fatal(1)) goto 2800
comment	cannot attack on transports, ask
	call topmsg ( 2, 'You are incapable of attack
     * while on a transport.' )
	call topmsg ( 3, 'Your army jumped into the briny and drowned.' )
	call cflush
	call delay(30)
	goto 2500

1300	if (ao .ne. '.') goto 1600
comment	make sure not sea
	if (.not. fatal(1)) goto 2800
comment	ask about drowning
	if (ac .ne. '.') goto 1800
	call topmsg ( 3, 'Your army marched dutifully into the
     * sea and drowned.' )
	call cflush
	call delay(30)
	goto 2500

1400	h1=30
comment	check if room on transport
	call find(ac,z6,z8,h1)
	n=0
	do 1500 i=1,limit(1)
	if (rlmap(i).ne.z6) goto 1500
	if (i.eq.y) goto 1500
comment	dont count ourself
	n=n+1
1500	continue
	if (n.lt.h1*2) goto 1700
	if (.not. fatal(6)) goto 2800
	if (mycode(y).gt.50) mycode(y)=0
	goto 1700

1600	if (ac .ne. '+') goto 1800
comment	check if clear
	rmap(z6) = 'A'
comment	put army on the map
1700	rlmap(y) = z6
comment	record new location
	goto 2600
c
c	We're attacking something
c
1800	h1=1
comment	armies have one hit
	if (omap(z6) .ne. '*') goto 2400
	do 2300 iy=1,70
comment	it's a city, find who owns it
	if (x(iy).ne.z6) goto 2300
	if (owner(iy).ne.1) goto 1900
	do 1850 jy=1,limit(5)
	if (z6.eq.rlmap(itt+jy)) goto 1400
1850	continue
	if (.not. fatal(5)) goto 2800
comment	ask about fatal move
	rmap(z6)='O'
	call topmsg ( 2, 'BASTARDO!	You attacked your own city!' )
	call topmsg ( 3, 'Your impertinent attacking army was liquidated.' )
	call cflush
	call delay(30)
	goto 2500

1900	if (irand(100).lt.50) goto 2000
	call topmsg ( 3, 'The scum defending the city has crushed
     * your attacking blitzkrieger!' )
	call cflush
	call delay(30)
	goto 2300

2000	call sector(pmap(1))
	ptr = 0
	call addstr ( 'City # ', jnkbuf, ptr )
	call addint ( iy, jnkbuf, ptr )
	call addstr( ' has been subjugated!', jnkbuf, ptr )
	jnkbuf ( ptr + 1 ) = '\0'
	call topmsg ( 2, jnkbuf )
	call topmsg ( 3, 'The army has been dispersed to enforce control.' )
	call topmsg ( 1, 'What are your production demands for this city? ' )
	call cflush
	rmap ( z6  )= 'O'
	call sensor ( z6 )
	call cursor(z6-iadjst)
	phase ( iy ) = 0
	found ( iy ) = 10000
	call phasin ( iy, e )
	if ( owner ( iy ) .ne. 2 ) goto 2200
comment	if enemy owned it, tell him
	call sonar ( z6 )
	do 2100 i = 1, 70
	if (target(i).eq.z6) goto 2200
	if (target(i).ne.0) goto 2100
	target(i)=z6
	goto 2200
2100	continue
2200	owner(iy)=1

2300	continue
	goto 2500
c
c	Attacking another unit
c
2400	if ((ac.ge.'A').and.(ac.le.'T')) then
		if (.not.fatal(2)) goto 2800
		endif
	own1='A'
	own2=ac
	h1=1
	h2=30
	call find(own2,z6,z8,h2)
	call fght(z6,h1,h2,own1,own2)
	call find(own2,z6,z8,h2)
	if (h1.le.0) goto 2500
comment	did I lose?, Yes, wipe up
	rmap(z6)='A'
	if ((own2.ge.'a').and.(own2.le.'t')) call sonar(z6)
	if (ao.eq.'+') goto 1700
	rmap(z6)=ao
	if ((own2.ge.'a').and.(own2.le. 't')) call sonar(z6)
	call topmsg ( 2, 'Your army regretfully drowns after
     * its successful assault' )
	call cflush
	call delay(30)

2500	rlmap(y)=0
comment	"kill" my army
	mycode(y)=0
2600	call sensor(z6)
2700	continue
	return
c
c	Recover from fatal move, and try again
c
2800	z6=z7
comment	go back to old location
	rmap(z6)=ab
comment	change it back to previous
	goto 1000
	end
SHAR_EOF
if test 5112 -ne "`wc -c < 'armymv.f'`"
then
	echo shar: error transmitting "'armymv.f'" '(should have been 5112 characters)'
fi
fi # end of overwriting check
if test -f 'attack.c'
then
	echo shar: will not over-write existing file "'attack.c'"
else
cat << \SHAR_EOF > 'attack.c'
attack_(own1, own2, ih1, aggr)
	char	*own1, *own2;
	int	*ih1, *aggr;
{
	int	h1 = *ih1, h2, c1, c2, zero = 0;
	int	s1 = 1, s2 = 1;

	c1 = cost_(own1, &h1);
	c2 = cost_(own2, &zero);
	if (*own1 == 's')
		s1 = 3;
	if (*own2 == 'S')
		s2 = 3;
	h2 = chits_(own2);
	h1 = (h1 + s2 - 1) / s2;
	h2 = (h2 + s1 - 1) / s1;
	return ((((c2 * 100) * h1) / h2) - (c1 * 100) + (*aggr * 100));
}
SHAR_EOF
if test 378 -ne "`wc -c < 'attack.c'`"
then
	echo shar: error transmitting "'attack.c'" '(should have been 378 characters)'
fi
fi # end of overwriting check
if test -f 'bell.c'
then
	echo shar: will not over-write existing file "'bell.c'"
else
cat << \SHAR_EOF > 'bell.c'

bell_()
{
	putchar('\007');
}
SHAR_EOF
if test 31 -ne "`wc -c < 'bell.c'`"
then
	echo shar: error transmitting "'bell.c'" '(should have been 31 characters)'
fi
fi # end of overwriting check
if test -f 'block.f'
then
	echo shar: will not over-write existing file "'block.f'"
else
cat << \SHAR_EOF > 'block.f'
	subroutine block ( amap )
c
c	This subroutine makes a copy of map ii into supplied file spec
c
	IMPLICIT INTEGER(A-Z)

	include 'common.h'
C
	character amap(6000)
	integer i

	isec=-1
	call clear
	call topini
	jector=-1
	call strout ( 'Output file: ' )
	call cflush
	call getstr ( tty, 20, i )
	call clear
	call topini
	tty ( i + 1 : i + 1 ) = '\0'
	open ( unit=2, file=tty, access='SEQUENTIAL',
     *	form='FORMATTED', status='NEW', err=600 )
	do 500 j=0,5900,100
	do 200 k=100,1,-1
	ab=amap(k+j)
200	if (ab.ne.' ') goto 300
	goto 500
300	do 400 l=1,k
400	g2(l)=amap(j+l)
	write(2,998) (g2(l),l=1,k)
998	format(1x,100a1)
500	continue
	close(unit=2)
	return

600	continue
	ptr = 0
	call addstr ( 'ERROR, Unable to open output file ', jnkbuf, ptr )
	call addstr ( tty, jnkbuf, ptr )
	jnkbuf ( ptr + 1 ) = '\0'
	call topmsg ( 1, jnkbuf )
	call cflush
	return
	end
SHAR_EOF
if test 864 -ne "`wc -c < 'block.f'`"
then
	echo shar: error transmitting "'block.f'" '(should have been 864 characters)'
fi
fi # end of overwriting check
if test -f 'bufpos.c'
then
	echo shar: will not over-write existing file "'bufpos.c'"
else
cat << \SHAR_EOF > 'bufpos.c'
#include <curses.h>
#include "c_common.h"

bufpos_(irow, icol, str, size)
	int	*irow, *icol, *size;
	char	*str;
{
	char	buf[BUFSIZ];

	strncpy(buf, str, *size);
	buf[*size] = '\0';
	tpos_(irow, icol);
	addstr(buf);
	refresh();
}
SHAR_EOF
if test 229 -ne "`wc -c < 'bufpos.c'`"
then
	echo shar: error transmitting "'bufpos.c'" '(should have been 229 characters)'
fi
fi # end of overwriting check
if test -f 'c.c'
then
	echo shar: will not over-write existing file "'c.c'"
else
cat << \SHAR_EOF > 'c.c'
#include <curses.h>
#include <ctype.h>

#include "c_common.h"

int	debug = 0;

FILE	*fileerr;

#undef move
move(y, x)
{
	if (debug) { fprintf(fileerr, "DEBUG: move to %d, %d\n", x, y); fflush(fileerr); }
	wmove(stdscr, y, x);
}

cr_()
{
	if (debug) { fprintf(fileerr, "DEBUG: newline\n"); fflush(fileerr); }
	addch('\n');
}

clreol_(linep, colp, eolcolp)
	int	*linep, *colp, *eolcolp;
{
	if (debug) { fprintf(fileerr, "DEBUG: clrtoeol\n"); fflush(fileerr); }
	move(*linep, *colp);
	clrtoeol();
}

csleep_(secs)
	int	*secs;
{
	sleep(*secs + 1);
}

clear_()
{
	if (debug) { fprintf(fileerr, "DEBUG: clear\n"); fflush(fileerr); }
	erase();
}

ttinit_()
{
	if (debug)
		fileerr = fopen("LOG", "w");
	initscr();
	noecho();
	crmode();
	lines_ = LINES;
	cols_ = COLS;
	if (lines_ > 64)
		lines_ = 64;
	if (cols_ > 110)
		cols_ = 110;
}

cflush_()
{
	if (debug) { fprintf(fileerr, "DEBUG: refresh\n"); fflush(fileerr); }
	refresh();
}

caddch_(c)
	char	*c;
{
	if (debug) { fprintf(fileerr, "DEBUG: addch - %x\n", *c); fflush(fileerr); }
	addch(*c);
}

bufout_(str, countp)
	char	*str;
	int	*countp;
{
	char	buf[BUFSIZ];

	if (debug) { fprintf(fileerr, "DEBUG: (%d) '%s'\n", *countp, str); fflush(fileerr); }
	strncpy(buf, str, *countp);
	buf[*countp] = '\0';
	addstr(buf);
}

tpos_(yp, xp)
	int	*yp, *xp;
{
	move(*yp - 1, *xp - 1);
}

#undef getstr
getstr_(buf, sizep, countp)
	char	*buf;
	int	*sizep, *countp;
{
	if (debug) { fprintf(fileerr, "DEBUG: getstr\n"); fflush(fileerr); }
	echo();
	getstrq_(buf, sizep, countp);
	noecho();
}

getstrq_(buf, sizep, countp)
	char	*buf;
	int	*sizep, *countp;
{
	int	count = 0;

	if (debug) { fprintf(fileerr, "DEBUG: getstrq\n"); fflush(fileerr); }

	fflush(stdout);		/* because the fortran routine did */
	nocrmode();
	if (fgets(buf, *sizep, stdin) == NULL) {
		fputs("Unexpected EOF", stderr);
		exit(1);
	} else {
		*countp = strlen(buf) - 1;
		buf[*countp] = '\0';
	}
	crmode();
}

encpri_(str, startp, endp)
	int	*str;
	int	*startp, *endp;
{
	int	i;
	char	buf[BUFSIZ], *bp = buf;

	if (debug) { fprintf(fileerr, "DEBUG: encpri(%c, %d, %d)\n", str[*startp], *startp, *endp); fflush(fileerr); }
	for (i = *startp - 1; i < *endp; i++, bp++)
		*bp = str[i];
	*bp = '\0';
	waddstr(stdscr, buf);
}

#define NUMTOPS		3

int	len[NUMTOPS];

topini_()
{
	int	i;

	for (i = 0; i < NUMTOPS; i++) {	
		len[i] = 0;
		move(i, 0);
		clrtoeol();
	}
}

topmsg_(linep, buf)
	int	*linep;
	char	*buf;
{
	if (*linep < 1 || *linep > NUMTOPS)
		*linep = 1;
	move(*linep - 1, 0);
	waddstr(stdscr, buf);
	clrtoeol();
	len[*linep] = strlen(buf);
}

addcnt_(linep, addp)
	int	*linep, *addp;
{
	if (*linep < 0 || *linep > NUMTOPS)
		*linep = 1;
	len[*linep] += *addp;
}

addint_(nump, buf, endp)
	int	*nump, *endp;
	char	*buf;
{
	sprintf(&buf[*endp], "%d", *nump);
	*endp = strlen(buf);
}

/* maybe add real?  */
addrel_(nump, widthp, buf, endp)
	int	*nump, *widthp, *endp;
	char	*buf;
{
	/* what's the width for?? */
	sprintf(&buf[*endp], "%d", *nump);
	*endp = strlen(buf);
}

rndini_()
{
	srand(time(0));
}

irand_(high)
	int	*high;
{
	if (*high < 2) {
		if (debug) { fprintf(fileerr, "DEBUG: irand %d\n", *high); fflush(fileerr); }
		return (0);
	}
	return (rand() % *high);
}

rndint_(retval, minp, maxp)
	int	*retval, *minp, *maxp;
{
	int	size = *maxp - *minp + 1;

	*retval = (rand() % size) + *minp;
}

addstr_(from, to, tolen)
	char	*from, *to;
	int	*tolen;
{
	to[*tolen] = '\0';
	strcat(to, from);
	*tolen = strlen(to);
}

getchx_()
{
	char	c;

	if (debug) { fprintf(fileerr, "DEBUG: getchx\n"); fflush(fileerr); }
	if ((c = getchar()) == EOF) {
		fputs("Unexpected EOF\n", stderr);
		exit(1);
	}
	if (islower(c))
		return (toupper(c));
	else
		return (c);
}

readi_(ip)
	int	*ip;
{
	char	buf[BUFSIZ];
	int	size = sizeof (buf), count = sizeof (buf);

	if (debug) { fprintf(fileerr, "DEBUG: readi\n"); fflush(fileerr); }
	*ip = 0;
	getstr_(buf, &size, &count);
	if (count != 0)
		scanf("%d", ip);
}

tupper_(str, lenp)
	char	*str;
	int	*lenp;
{
	int	i;

	for (i = 0; i < *lenp; i++)
		if (islower(str[i]))
			str[i] = toupper(str[i]);
}

printit_(hits)
	int	*hits;
{
	int	i;

	for (i = 0; i < 15; i++)
		printf("%d ", hits[i]);
}

close_disp()
{
	move(LINES - 1, 0);
	clrtoeol();
	refresh();
	endwin();
}
SHAR_EOF
if test 4223 -ne "`wc -c < 'c.c'`"
then
	echo shar: error transmitting "'c.c'" '(should have been 4223 characters)'
fi
fi # end of overwriting check
if test -f 'carier.f'
then
	echo shar: will not over-write existing file "'carier.f'"
else
cat << \SHAR_EOF > 'carier.f'
	subroutine carier
c
c	This subroutine handles enemy carrier moves
c 
	IMPLICIT INTEGER(A-Z)

	character P

	include 'common.h'
C

	NUMBER(7)=0
	IF (CODER.EQ.7) PRINT 999
999	FORMAT(' CARRIER CODES')
	OWN1='c'
	MONKEY=0
c 
c	Begin loop
c
	DO 2700 Y=1,LIMIT(15)
	Z6=RLMAP(ICA2+Y)
	IF (Z6.EQ.0) GOTO 2700
	DIR=MOD(Y,2)*2-1
	H1=J1TS(ICA2H+Y)
	IF (RMAP(Z6).EQ.'X') H1=H1+1
	IF (H1.GT.8) H1=8
C 
	ORIG=Z6
	DO 2600 TURN=1,2
	IF ((TURN.EQ.2).AND.(H1.LE.4)) GOTO 2700
comment	MOVE AT 1/2 SPEED
	P='N'
	N=0
	Z7=Z6
	AB=RMAP(Z6)
	IF ((AB.NE.'c').AND.(AB.NE.'X')) GOTO 1800
C 
C MOVE SELECTION
C
	IFO=CODEFU(Y+ICA2-1500)
	ILA=CODELA(Y+ICA2-1500)
	IF (H1.EQ.8) GOTO 100
	IFO=8
	ILA=IPORT(Z6)
	GOTO 1300
C 
C IFO=7: RANDOM DIRECTION
C IFO=6: HEADING TOWARDS STATION
C IFO=8: DAMAGED
C IFO=9: STATIONED
C 
C DOES A NEW CODE NEED TO BE SELETED? 800:YES, 1300:NO
C
100	GOTO (200,300,400,500) IFO-5
	GOTO 800
C 
200	GOTO 1300
C 
300	GOTO 800
C 
400	IF (H1.EQ.8) GOTO 800
	GOTO 1300
C 
500	DO 600 I=1,70
	IF (TARGET(I).EQ.0) GOTO 600
	IF ((EMAP(TARGET(I)).EQ.'O').AND.(IDIST(Z6,TARGET(I)).LE.10))
     1	 GOTO 1300
600	CONTINUE
	DO 700 I=1,10
700	IF (IDIST(Z6,LOCI(I,2)).LE.10) GOTO 1300
	GOTO 800
C 
C NEW CODE SELECTION
C 
800	DO 1200 J=1,10
	IF (LOCI(J,2).EQ.0) GOTO 1200
	LOC=LOCI(J,2)
	KDORK=0
	ID=500
	DO 900 K=1,70
	IF (OWNER(K).NE.2) GOTO 900
	IF (IDIST(X(K),LOC).GE.ID) GOTO 900
	ID=IDIST(X(K),LOC)
	IF (ID.LT.10) GOTO 1200
	KDORK=X(K)
900	CONTINUE
	DO 1000 K=ICA2+1,ICA2+LIMIT(15)
	IS=RLMAP(K)
	IF (IS.EQ.0) GOTO 1000
	IF (IDIST(IS,LOC).GE.ID) GOTO 1000
	IF (CODEFU(K-1500).NE.9) GOTO 1000
	ID=IDIST(IS,LOC)
	IF (ID.LT.10) GOTO 1200
	KDORK=IS
1000	CONTINUE
	IF (KDORK.EQ.0) GOTO 1200
1100	IF (IDIST(KDORK,LOC).LT.1) GOTO 1200
	LOC=LOC+IARROW(MOV(LOC,KDORK)+1)
comment	**
	IF (IDIST(KDORK,LOC).GT.19) GOTO 1100
	AD=EMAP(LOC)
	IF ((AD.NE.' ').AND.(AD.NE.'.')) GOTO 1100
	IFO=6
	ILA=LOC
	GOTO 1300
1200	CONTINUE
C 
C RANDOM DIRECTION SELECTION
C
	IF (IFO.EQ.7) GOTO 1300
	IFO=7
	KDORK=0
	ILA=irand(8)+1
comment	**
C 
C NOW PICK THE MOVE SPECIFIED BY IFO AND ILA
C
1300	IF (IFO.EQ.8) GOTO 1500
	IF (IFO.NE.7) GOTO 1400
	MOVE=ILA
	 GOTO 1700
1400	IF (IFO.NE.6) GOTO 1600
	IF (ILA.NE.Z6) GOTO 1500
	IFO=9
	GOTO 1600
1500	MOVE=PATH(Z6,ILA,DIR,OKC,FLAG)
	GOTO 1700
1600	IF (Z6.NE.ILA) MOVE=MOV(Z6,ILA)
	IF (Z6.EQ.ILA) MOVE=irand(8)+1
comment	**
C 
C MOVE CORRECTION
C
1700	AGGR=0
	IF ((NUMBER(7).GT.3).AND.(IFO.NE.9)) AGGR=5
	MOVE=MOVCOR(IFO,TURN,Z6,MOVE,H1,1,AGGR,'c',1,DIR,-1,ORIG,8)
	IF (IFO.EQ.7) ILA=IABS(MOVE)
	CODEFU(Y+ICA2-1500)=IFO
	CODELA(Y+ICA2-1500)=ILA
	IF (CODER.EQ.7) PRINT 998,IFO,ILA
998	FORMAT(1X,I)
C 
C MOVE EVALUATION
C
	Z6=Z6+IARROW(IABS(MOVE)+1)
	IF (OMAP(Z7).NE.'*') RMAP(Z7)=OMAP(Z7)
	AB=RMAP(Z6)
	IF (AB.EQ.'.') GOTO 2000
	IF (AB.EQ.'X') GOTO 2100
	IF ((AB.GE.'A').AND.(AB.LE.'T')) GOTO 1900
	PRINT 997,OWN1,Z6,AB
997	FORMAT(' ENEMY ',A1,' AT ',I4,' RAN AGROUND ON ',A1)
1800	H1=0
	GOTO 2200
1900	H2=30
	P='S'
	OWN2=AB
	CALL FIND(OWN2,Z6,Z8,H2)
	CALL FGHT(Z6,H1,H2,'c',OWN2)
	CALL FIND(OWN2,Z6,Z8,H2)
	IF (H1.LE.0) GOTO 2200
2000	RMAP(Z6)=OWN1
2100	RLMAP(Y+ICA2)=Z6
	J1TS(Y+ICA2H)=H1
	IF (TURN.EQ.1) NUMBER(7)=NUMBER(7)+1
2200	N=0
	IF (P.EQ.'S') CALL SENSOR(Z6)
	DO 2300 I=1,LIMIT(10)
	IF (Z7.NE.RLMAP(I+2000)) GOTO 2300
	IF (N+1.GT.H1) THEN
	  IF (RMAP(Z7).NE.'X') RLMAP(I+2000)=0
	  GOTO 2300
	ENDIF
	N=N+1
	RLMAP(I+2000)=Z6
2300	CONTINUE
	IF (H1.LE.0) GOTO 2400
	MONKEY=Y
	GOTO 2500
2400	RLMAP(Y+ICA2)=0
	CODEFU(Y+ICA2-1500)=0
	CODELA(Y+ICA2-1500)=0
	J1TS(ICA2H+Y)=0
2500	CALL SONAR(Z6)
2600	CONTINUE
2700	CONTINUE
	LIMIT(15)=MONKEY
	RETURN
	END
SHAR_EOF
if test 3558 -ne "`wc -c < 'carier.f'`"
then
	echo shar: error transmitting "'carier.f'" '(should have been 3558 characters)'
fi
fi # end of overwriting check
if test -f 'c_common.h'
then
	echo shar: will not over-write existing file "'c_common.h'"
else
cat << \SHAR_EOF > 'c_common.h'
#define IAR			0
#define IFI			500
#define IDE			700
#define ISU			900
#define ITT			1100
#define ICR			1200
#define ICA			1300
#define IBA			1400
#define IAR2			1500
#define IFI2			2000
#define IDE2			2200
#define ISU2			2400
#define ITT2			2600
#define ICR2			2700
#define ICA2			2800
#define IBA2			2900
#define IDEH			0
#define ISUH			200
#define ITTH			400
#define ICRH			500
#define ICAH			600
#define IBAH			700
#define IDE2H			800
#define ISU2H			1000
#define ITT2H			1200
#define ICR2H			1300
#define ICA2H			1400
#define IBA2H			1500

typedef int			LOGICAL;

extern int		lines_, cols_;
extern int		x_[70];
extern int		g2_[100];
extern int		__hits_[15], tipe_[15], crahit_[15], craloc_[15];
extern int		index_[15];
extern int		cmytbl_[9], kbfudg_[9];
extern int		lopmax_[15];
extern int		comscn_[40];
extern int		nshprf_[4][6];
extern int		prior_[7];
extern int		range_[200], ar2s_[500];
extern int		armtot_[20], codefu_[1500], codela_[1500], target_[70], 
			limit_[16];
extern int		arrow_[9];
extern int		d2_[3];
extern int		mycode_[1500];
extern int		rang_[200];
extern int		iotab_[16];
extern int		phazee_[8];
extern int		ptr_;
extern int		rlmap_[3000];
extern int		ph_[8], ovrpop_[2][16];
extern int		iarrow_[10];
extern int		cities[128];

extern int		movedflag_[1500];
extern int		j1ts_[1600];
extern int		d_[667];
extern int		owner_[70];
extern int		found_[70];
extern int		phase_[70];
extern int		fipath_[70];
extern int		loci_[11][10];
extern int		number_[18];
extern int		troopt[5][6];

extern char		ab_, ac_, ad_, ao_, e_, own1_, own2_, own_;
extern char		kbtbl_[9], ab9_[9];
extern char		comm_[30], phaze_[8];
extern char		ifile_[11], kill_;
extern char		comman_[20], oka_[5], okb_[5], okc_[5];
extern char		tty_[20];
extern char		emap_[6000], rmap_[6000], pmap_[6000], omap_[6000];
extern char		pamela_[8], reeed_[9];
extern char		jnkbuf_[80];

extern LOGICAL		specal_,  pass_,  automv_;

/*
 * aggr: this is a measure of the enemy ships aggressiveness,
 *  this value is added to the cost-effectiveness of attacking an
 *  enemy unit to determine if the ship will attack or run from the
 *  enemy.
 * all cities are referenced by city number, as in x_[n]=loc of city #n
 * codfu/codela: contains a number that determines what that computer craft
 *  is assigned to do, is seperated into 2 numbers, ifo and ila. ifo
 *  gives the function, ila gives details.
 * coder: used for debug flag
 * crowd: used if city is surrounded by armies
 * d: original map, encoded in mod 3
 * explor: this is set to 1 if the enemy ship is to explore unknown
 *  territory adjacent to it, 0 if not.
 * fipath: stasis # to be given to fighter in that city
 * found: completion dates for cities
 * iadjst: subtracted from z6 so cursor will not be moved off screen
 * iarrow: added to z6 so moves [1,2,3,4,5,6,7,8,9] are converted
 *  to [+1,-99,-100,-101,etc.]
 * isec: sector terminal is showing
 * izap:  .true.=save game, .false.=initialize
 * jector: sector program is looking at
 * kursor: set to position of cursor
 * mode: 1=in mode 2, 0=in mode 1
 * owner: who owns the city: 0>nobody, 1>player, 2>computer
 * pass: set to .true. if it is a privileged user
 * phase: phase of city
 * x: locations of cities
 */
SHAR_EOF
if test 3220 -ne "`wc -c < 'c_common.h'`"
then
	echo shar: error transmitting "'c_common.h'" '(should have been 3220 characters)'
fi
fi # end of overwriting check
if test -f 'citfnd.c'
then
	echo shar: will not over-write existing file "'citfnd.c'"
else
cat << \SHAR_EOF > 'citfnd.c'
#include "c_common.h"

/*
 * FIND CITY AT LOCATION Z6, RETURN INDEX INTO X()
 */
citfnd_(z6)
	int	*z6;
{
	int	i, three = 3;

	for (i = 0; i < 70; i++)
		if (x_[i] == *z6)
			return (i+1);
	if (pass_)
		topmsg_(&three, "Citfnd error, get help!");
	return (0);
}
SHAR_EOF
if test 261 -ne "`wc -c < 'citfnd.c'`"
then
	echo shar: error transmitting "'citfnd.c'" '(should have been 261 characters)'
fi
fi # end of overwriting check
if test -f 'cityct.f'
then
	echo shar: will not over-write existing file "'cityct.f'"
else
cat << \SHAR_EOF > 'cityct.f'
	SUBROUTINE CITYCT
C
	IMPLICIT INTEGER(A-Z)

	include 'common.h'
C
C
	NUMBER(9)=0
	DO 100 I=11,18
100	NUMBER(I)=0
	DO 200 I=1,70
	IF (OWNER(I).NE.2) GOTO 200
	NUMBER(9)=NUMBER(9)+1
	IF (PHASE(I).LE.0) GOTO 200
comment	HANDLES JUST CAPTURED CITY
	INDEXX=INDEX(PHASE(I))
	NUMBER(INDEXX)=NUMBER(INDEXX)+1
200	CONTINUE
C 
C NOW LET NUMBER(10)=LAST FILLED SLOT IN TARGET
C
	DO 300 I=70,1,-1
	IF (TARGET(I).EQ.0) GOTO 300
	NUMBER(10)=I
	GOTO 400
300	CONTINUE
	NUMBER(10)=0
400	RETURN
	END
SHAR_EOF
if test 483 -ne "`wc -c < 'cityct.f'`"
then
	echo shar: error transmitting "'cityct.f'" '(should have been 483 characters)'
fi
fi # end of overwriting check
if test -f 'cityph.f'
then
	echo shar: will not over-write existing file "'cityph.f'"
else
cat << \SHAR_EOF > 'cityph.f'
	SUBROUTINE CITYPH(I)
C
	IMPLICIT INTEGER(A-Z)

	include 'common.h'
C
C 
C NUMBER(1-8): NUMBERS OF UNITS
C NUMBER(11-18): NUMBERS OF CITIES WITH EACH PHASE
C NUMBER(9): NUMBER OF CITIES
C NUMBER(10): NUMBER OF TARGET CITIES
C 
	INT=PHASE(I)
	IF (PHASE(I).NE.-1) GOTO 100
	PHASE(I)=1
	GOTO 1400
100	EDGE=EDGER(X(I))
C 
C IF WE HAVE A PHASE OF 0, MAKE SOMETHING
comment	
C
	IF (PHASE(I).EQ.0) GOTO 600
C 
C IF CITY IS SURROUNDED BY ARMIES, MAKE SOMETHING ELSE
C
	IF (PHASE(I).NE.1) GOTO 300
	DO 200 J=1,8
200	IF (RMAP(X(I)+IARROW(J+1)).EQ.'+') GOTO 300
comment	**
	GOTO 600
C 
C IF CRAFT NUMBERS ARE GETTING GROSSLY LARGE, PRODUCE SOMETHING ELSE
C
300	IF (NUMBER(OVRPOP(PHASE(I)+1,1)).GT.
     1	OVRPOP(PHASE(I)+1,2)) GOTO 600
comment	**
C 
	IF (EDGE.NE.8) GOTO 400
	IF ((NUMBER(9).GT.1).AND.(PHASE(I).EQ.1)) GOTO 1100
	IF (NUMBER(9).GT.1) GOTO 1400
	IF (NUMBER(5).LT.1) PHASE(I)=6
	IF (NUMBER(5).GT.0) PHASE(I)=1
	GOTO 1400
C 
400	IF (PHASE(I).NE.1) GOTO 600
	N=0
	DO 500 J=IAR2+1,IAR2+LIMIT(9)
	Z=RLMAP(J)
	IF (Z.EQ.0) GOTO 500
	IF (IDIST(X(I),Z).GT.6) GOTO 500
	IF (EMAP(Z).EQ.'t') GOTO 500
	MOVE=PATH(X(I),Z,1,OKA,FLAG)
	IF (FLAG.EQ.0) GOTO 500
	N=N+1
	IF ((N.GT.6).AND.(NUMBER(11).GT.1)) GOTO 800
500	CONTINUE
	IF ((N.GT.3).AND.(NUMBER(11).GT.1)) GOTO 600
	GOTO 1400
C 
C SELECT A NEW PHASE FOR THE CITY
C
600	CONTINUE
C
C IF THERE ARE ENEMY ARMIES ON THE CONTINENT, PRODUCE ARMIES
comment	
C
	IF (EDGE.EQ.8) GOTO 1050
	DO 700 J=1,10
	IF (LOCI(J,2).EQ.0) GOTO 700
	MOVE=PATH(X(I),LOCI(J,2),1,OKA,FLAG)
	IF (FLAG.EQ.0) GOTO 700
	PHASE(I)=1
	GOTO 1300
700	CONTINUE
C 
800	PHASE(I)=2
	IF (EDGE.GT.0) GOTO 900
comment	IF NOT LANDLOCKED
	IF (NUMBER(1).LE.3*NUMBER(2)) PHASE(I)=1
comment	IF SMALL .NE. OF ARMIES
	GOTO 1300
C 
900	PHASE(I)=1
	N=0
	DO 1000 J=IAR2+1,IAR2+LIMIT(9)
	Z=RLMAP(J)
	IF (Z.EQ.0) GOTO 1000
	IF (IDIST(X(I),Z).GT.6) GOTO 1000
	IF (EMAP(Z).EQ.'t') GOTO 1000
comment	IF ON TROOP TRANSPORT
	MOVE=PATH(X(I),Z,1,OKA,FLAG)
	IF (FLAG.EQ.0) GOTO 1000
	N=N+1
1000	CONTINUE
	IF (N.LT.3) GOTO 1300
1050	PHASE(I)=2
	IF (NUMBER(2)*2.GT.NUMBER(9)) GOTO 1100
	IF ((NUMBER(5).LT.3).AND.(NUMBER(15).LT.2)) GOTO 1100
	IF (NUMBER(2)*4.LT.NUMBER(9)) GOTO 1300
	IF (INT.EQ.2) GOTO 1300
	IF (INT.GT.2) GOTO 1100
	IF (irand(100).LT.50) GOTO 1300
C 
C SELECT A SHIP, GUARANTEEING AT LEAST TWO CITIES PRODUCING TROOP TRANSPORTS
C
1100	PHASE(I)=PH(8)
	DO 1200 J=8,4,-1
1200	IF (NUMBER(J+10).GE.NUMBER(J+9)) PHASE(I)=PH(J-1)
	IF (INT.GT.2) PHASE(I)=INT
	IF (NUMBER(17).EQ.0) PHASE(I)=12
	IF (NUMBER(15).LT.2) PHASE(I)=6
C 
1300	IF ((NUMBER(9).GT.1).AND.(NUMBER(15).EQ.0).AND.(EDGE.GT.0))
     1	PHASE(I)=6
1400	FOUND(I)=5*PHASE(I)+MDATE
	IF (INT.EQ.PHASE(I)) GOTO 1500
	FOUND(I)=6*PHASE(I)+MDATE
	CALL CITYCT
	IF (CODER.NE.9) GOTO 1500
	CALL tpos(2,1)
	PRINT 999,X(I),INT,PHASE(I),EDGE
999	FORMAT('+CITY:',I4,' FROM:',I2,' TO:',I2,' EDGE:',I1,3X,$)
	CALL GETCHX(E)
1500	RETURN
	END
SHAR_EOF
if test 2874 -ne "`wc -c < 'cityph.f'`"
then
	echo shar: error transmitting "'cityph.f'" '(should have been 2874 characters)'
fi
fi # end of overwriting check
if test -f 'compar.f'
then
	echo shar: will not over-write existing file "'compar.f'"
else
cat << \SHAR_EOF > 'compar.f'
	FUNCTION COMPAR(AB,Z62,OKVECT)
C
C USED BY PATH, CHECKS IF AB OR LOCATION Z62 IS A TYPE CONTAINED IN OKVECT
C 
	IMPLICIT INTEGER(A-Z)
	character OKVECT(5),AB
	character OMAP(6000)
	COMMON/OMAP/OMAP
C
	COMPAR = 1
	IF (AB .EQ. OKVECT(1)) RETURN
	IF (OMAP(Z62) .EQ. OKVECT(1)) RETURN
	IF (AB .EQ. OKVECT(2)) RETURN
	IF (AB .EQ. OKVECT(3)) RETURN
	IF (AB .EQ. OKVECT(4)) RETURN
	IF (AB .EQ. OKVECT(5)) RETURN
	COMPAR = 0
	RETURN
	END
SHAR_EOF
if test 431 -ne "`wc -c < 'compar.f'`"
then
	echo shar: error transmitting "'compar.f'" '(should have been 431 characters)'
fi
fi # end of overwriting check
if test -f 'contained.c'
then
	echo shar: will not over-write existing file "'contained.c'"
else
cat << \SHAR_EOF > 'contained.c'
#include <curses.h>

/*
 * returns true (1) if sector "inside" is all inside of sector "outside"
 */
contained_(inside, outside)
	int	*inside, *outside;
{
	int	minX, minY, maxX, maxY;
	int	lowX, lowY, highX, highY;

	minY = kline_(&minX, outside);
	minY /= 100;

	maxX = minX + (COLS - 10) - 1;
	maxY = minY + (LINES - 4) - 1;

	lowY = old_kline_(&lowX, inside);
	lowY /= 100;

	highX = lowX + 70 - 1;
	highY = lowY + 20 - 1;

	if (minX <= lowX && minY <= lowY && maxX >= highX && maxY >= highY)
		return (1);
	else
		return (0);
}

/*
 * Changes jector (0->9) to ki (x offset) and line (returned) * 100
 */
old_kline_(ki, jector)
	int	*ki, *jector;
{
	int	ject;

	*ki = 0;
	ject = *jector;
	if ( *jector > 4) {
		*ki = 30;
		ject = ject - 5;
	}
	return ((ject * 10) *  100);
}
SHAR_EOF
if test 778 -ne "`wc -c < 'contained.c'`"
then
	echo shar: error transmitting "'contained.c'" '(should have been 778 characters)'
fi
fi # end of overwriting check
if test -f 'cost.f'
then
	echo shar: will not over-write existing file "'cost.f'"
else
cat << \SHAR_EOF > 'cost.f'
	function cost(own,h)

	implicit integer(a-z)
	integer	cosval ( 14 )
	character costab ( 14 ), own
	data cosval /  0,  2,  4,  6,  3,  5,  4,  1,  3,  3,  7,
     *	  5, 11, 11/
	data costab /'F','D','S','T','R','C','B','f','d','s','t',
     *	'r','c','b'/

	do 100 i = 1, 14
100	if ( own .eq. costab ( i )) goto 200
	pause 'BAD CALL TO FUNCTION COST!'
	cost = 0
	return
200	cost = cosval ( i )
	if ( i .ge. 9 ) cost = cost - h
	return
	end
SHAR_EOF
if test 441 -ne "`wc -c < 'cost.f'`"
then
	echo shar: error transmitting "'cost.f'" '(should have been 441 characters)'
fi
fi # end of overwriting check
if test -f 'cursor.f'
then
	echo shar: will not over-write existing file "'cursor.f'"
else
cat << \SHAR_EOF > 'cursor.f'

ccc cursor - position cursor to map location
	subroutine cursor ( n )
	integer n
c
c synopsis
c
c   call cursor ( n )
c
c	n - map location
c
	integer i, j

	i = n / 100 + 1
	j = mod ( n, 100 ) + 1
	call tpos ( i, j )
	call cflush
	return
	end
SHAR_EOF
if test 244 -ne "`wc -c < 'cursor.f'`"
then
	echo shar: error transmitting "'cursor.f'" '(should have been 244 characters)'
fi
fi # end of overwriting check
if test -f 'data.c'
then
	echo shar: will not over-write existing file "'data.c'"
else
cat << \SHAR_EOF > 'data.c'
#include "c_common.h"

char	comman_[20] = {
	'S','R','I','K','O','L','F','G','P','H',
	'Y','T','V','J','?','\0','\0','U','N','+'
};

char	comm_[30] = {
	'D','E','W','Q','A','Z','X','C','S',
	'L','B','F','T','G','V','J','U',-1,-1,
	'O','P','R','I','M','K','N','S','?','Y','H'
};

int	iotab_[16] = {
	0,500,700,900,1100,1200,1300,1400,1500,2000,
	2200,2400,2600,2700,2800,2900
};

int	ovrpop_[2][16] = {
	{ 9,001,002,9,003,004,05,9,9,9,06,9,07,9,9,08,},
	{ 0,499,199,0,199,199,83,0,0,0,99,0,99,0,0,99}
};

int	comscn_[40] = {
	'M','N','O','S','T','V','P','Y','C','L','H','J',
	'1','R','@','Q','+','A',0,0,
	'LO','NU','LI','TR','AR','TA','PA','A1',
	'T3','A0','CO','CH','Q0','Q1','JE','CY','EX',0,0,0
};

int	arrow_[9] = {
	-101,-100,-99,-1,0,1,99,100,101
};

int	cmytbl_[9] = {
	6104,6103,6102,6105,6101,6106,6107,6108,0
};
int	crahit_[15] = {
	0,0,0,0, 200, 400,0,0,0, 500,0, 600,0,0, 700
};
int	craloc_[15] = {
	0,500,0,700,900,1100,0,0,0,1200,0,1300,0,0,1400
};
int	__hits_[15] = {
	1,1,0,3,2,3,0,0,0,8,0,8,0,0,12
};
int	iarrow_[10] = {
	0,1,-99,-100,-101,-1,99,100,101,0
};
int	index_[15] = {
	11,12,0,13,14,15,0,0,0,16,0,17,0,0,18
};
int	kbfudg_[9] = {
	-101,-100,-99,-1,1,99,100,101,0
};
char	kbtbl_[9] = {
	'Q','W','E','A','D','Z','X','C',' '
};
int	lopmax_[15] = {
	500,200,0,200,200,100,0,0,0,100,0,100,0,0,100