The ardent F77 implementation differs from the standard one in four respects:

1) Fortran subroutine names are mapped to upper case loader names with no
underscores.  The C pre-processor can't do this mapping, so some of the
source files in $QPE have to be run through m4.

2) Fortran character strings are passed around using dope vectors.  This
means that conditional compilation code is needed in a couple of qpe source
files.  The rest of the the S source code compiles smoothly enough,
but a bit kludging was necessary.  This will affect you if you try to
do anything fancy with the divert() macro.

3) Recursive F77 calls don't work.  The versions of gtds and ptds in
this directory fix this.

4) Double quoted strings don't work.


In addition, several temporary warts have been added to bypass system bugs:

1) The vectorizing compiler (V2.0) is buggy, and is not used.
2) The ulimit shell command is broken. (take it out of $A/SYSGEN)
3) The ar command cannot handle many .o files.

============

Execute the following commands:
	rm -f $P/natst.r ; cp natst.C $P
	rm -f $I/u/ardent.m ; cp ardent.m $I/u/ardent.m
	rm -f $I/u/cdefs.m ; cp cdefs.m $I/u/cdefs.m
	rm -f $I/u/cstack.m ; cp cstack.m $I/u/cstack.m
	rm -f $I/u/dope.h ; cp dope.h $I/dope.h
	rm -f $S/gtds.r ; cp gtds.r $S/gtds.r
	rm -f $S/ptds.r ; cp ptds.r $S/ptds.r
	rm -f $A/LIBRARY ; cp LIBRARY $A/LIBRARY

Change $C/makehead macros as follows:
	F77COMPILE=/bin/fc
	F77=/bin/fc
	BIGF77=
	CFLAGS=-O0
	FFLAGS=-O0

Also, change the RATFOR rules in $C/makehead to transliterate
all quotes into apostrophes, using
	tr '"' "'"

Change $QPE/S_makefile and $QPE/Makefile
	SYSLIB= -lmF77 -luF77 -lm
	F77=/bin/fc
	CCFLAGS=-O0
	FFLAGS=-O0

Execute the following commands:

ed - $QPE/Makefile <<'!'
/^\.SUFFIXES/s/:.*$/: .o .n .r .f .e .c .l .y .C .h .H
a
.C.c:
	$(M4) $$I/u/ardent.m $*.C > $*.c
.H.h:
	$(M4) $$I/u/ardent.m $*.H > $*.h
.
/^nofortran/s+$+ $P/natst.o+
/-o qpe/s+no_S\.o+& $P/natst.o+
w
!

QQ="S_ld_init S_ld_local device graphics Shp2623 Shpgl Spost Sprinter \
	Stek4014 Stek4105 Spic mgr no_S str_utils debug c_support ftn_utils \
	interface sys_funs ok_x11 ok_news Stty5620"
for i in $QQ
do
	if test ! -r $QPE/$i.C
	then
		echo "$i.o : $i.c" >> $QPE/Makefile
		mv $QPE/$i.c $QPE/$i.C
	fi
done
QQ="graphics interface"
for i in $QQ
do
	if test ! -r $QPE/$i.H
	then
		mv $QPE/$i.h $QPE/$i.H
	fi
done
