Node:Atari Using, Previous:Atari Compiling, Up:Atari Installation
gawkon the Atari ST
An executable version of
gawk should be placed, as usual,
anywhere in your
PATH where your shell can find it.
While executing, the Atari version of
gawk creates a number of temporary files. When
gcc libraries for TOS,
gawk looks for either of
the environment variables,
TMPDIR, in that order.
If either one is found, its value is assumed to be a directory for
temporary files. This directory must exist, and if you can spare the
memory, it is a good idea to put it on a RAM drive. If neither
TMPDIR are found, then
gawk uses the
current directory for its temporary files.
The ST version of
gawk searches for its program files, as described in
AWKPATH Environment Variable.
The default value for the
AWKPATH variable is taken from
DEFPATH defined in
Makefile. The sample
Makefile for the ST in the distribution sets
".,c:\lib\awk,c:\gnu\lib\awk". The search path can be
modified by explicitly setting
AWKPATH to whatever you want.
Note that colons cannot be used on the ST to separate elements in the
AWKPATH variable, since they have another reserved meaning.
Instead, you must use a comma to separate elements in the path. When
recompiling, the separating character can be modified by initializing
envsep variable in
unsupported/atari/gawkmisc.atr to another
awk allows great flexibility in doing I/O redirections
from within a program, this facility should be used with care on the ST
running under TOS. In some circumstances, the OS routines for file-handle
pool processing lose track of certain events, causing the
computer to crash and requiring a reboot. Often a warm reboot is
sufficient. Fortunately, this happens infrequently and in rather
esoteric situations. In particular, avoid having one part of an
awk program using
/dev/stdout, while other
gawk is compiled with the ST version of
gcc and its
usual libraries, it accepts both
\ as path separators.
While this is convenient, it should be remembered that this removes one
technically valid character (
/) from your file name.
It may also create problems for external programs called via the
function, which may not support this convention. Whenever it is possible
that a file created by
gawk will be used by some other program,
use only backslashes. Also remember that in
awk, backslashes in
strings have to be doubled in order to get literal backslashes
(see Escape Sequences).