Running the Fortran-77 programs of HGS:

There are two plus one kinds of invocations:
  1.   program -option -option ...
  2.   program @ instruction-file [:target]
Examples for category 1 are 
jdc
tslist
A few cat.-2 programs can work in a pipe:
pgm | jdc [options] >
Examples for category 2
sasm031
urtapt
urtipgt
Inside a csh-script you can also
unsetenv tty term
program <<EOF
TER:
stdin
...
EOF
This helps to automatize a series of runs with varying run-time parameters, e.g. making a series of power-spectra with different kinds of data or windows or...
Look at  ~/Ttide/SCG/run_sasm031  as an example

Some cat-2 programs use interactive graphics (PGPLOT)
sasm01 (called from scripts  tsd  and  tsld )
sasm03
urtapt
Some programs with interactive graphics use ncurses functions for user dialog on the xterm. While other user responses are prompted for in the PGPLOT window.
Text prompting usually foregoes graphic prompting.
 


Making print statements to overprint a line:
setenv ABSOFT_RT_FLAGS '-defaultcarriage'
      print '(a1,a,i4,6i3.2,a)'
     &,'+','<Main-->>> Date & time: ',jdate,jhmss,char(13)
observe the '+' and the char(13)


Graphics peculiarities:

Many of my Fortran programs with interactive graphics need a palette in the cwd.
Here is one as an example:
~/util/standard.pal
   0  29   5  49   1  25  11  59  16   2  50  62  38  20   4  63
   0  29   5  49   1  25  11  32  16   2  50  62  38  20   4  63
   0  29   5  49   1  25  11  32  16   2  50  62  38  20   4  63
   0  29   5  49   1  25  11  32  16   2  50  62  38  20   4  63
   0  29   5  49   1  25  11  27  51   2  50  62  38  20  32  63
  24  29   5  49   1  25  11  27  51   2  50  62  38  20  32  63
  24  29   5  49   1  25  11  16  51   2  50  62  38  20  32  63
   0  29   5  49   1  25  11  15  16   2  50  62  38  20   4  63
   0  29   5  49   1  25  11  15  34   2  50  62  38  20   4  63
  63  62   5  49   1  25  11   1  34   2  50  61  38  20   4   0
  24  19   2   3   4   5   6   7   8   9  10  11  12  13  14  63
  63  29   5  49   1  25  11  59  16   2  50  62  38  20   4   0
Every row is a set of 16 colours (each 8-bits)

Compiling
PGPLOT routines are called using interface routines resembling old Microway's graphics library (Microway 1990 & 1991).
See  ~/pgplot522/pgplot/4mw/grex.f etc.
 
The Xwindows driver routine ~/pgplot522/pgplot/drivers/xwdriv.c has been extended for more functionality with keyboard and mouse.
Look for `HGSยด

A non-scalable but easy-to-read character set for graphics has been implemented (snatched from Microway):
~/pgplot522/pgplot/4mw/scrchars.dat

The text screen functions of Microway have (partly) been realized with ncurses.
Linker needs /usr/lib/libncurses.a

The interface libraries libgrex.a and libtexx.a are  placed in /usr/local/pgplot
Here is the important content:

/usr/local/pgplot:

libcpgplot.a   libgrex.a  libnogrex.a  libnotexx.a  libpgplot.a libtexx.a
grex.fh  keys.fh
cmwg.fc  rgb.txt  scrchars.dat
pgxwin_server
libgrex.a  libnogrex.a  libnotexx.a   are assembled in pgplot/4mw
Use   source compile-all.env

libtexx.a  libcurse.a  and libutilc.a  are assembled in ~/util/afor/c

libnotexx.a is assembled in ~/util/afor/p

It has been impossible to open and reserve a new xterm window for ncurses-based dialog.
This output goes instead to STDOUT and mixes with the Fortran print statements, which then miss the carriage-returns while ncurses has control.
How nice it would be with an  open_curses_window  subroutine in Fortran!

 


c

.bye