datapath - The datapath to put a seplib binaries
#include <seplib.h> char *datapath(prefix) char *prefix
Datapath outputs an intelligent prefix character string that can be used to generate output file names. This prefix is generated according to the following priorities:
1) Look for datapath= on the command line.
2) Look for the environmental variable DATAPATH
3) Look for datapath= in a file named `.datapath' in the current directory.
4) Look for datapath= in a file named `.datapath' in the user's home directory.
5) Use the default datapath `DEFAULT_DATA_DIR/login_name/' . DEFAULT_DATA_DIR dir is defined when seplib is compiled. The default value is often ``/scr''.
A ``.datapath'' file has the following format. An entry consists of an (optional) host name followed by datapath=path, where path is the datapath you wish to use. If you wish to place files in a directory you should terminate the path component with a /. The first entry should contain no hostname, it is the default datapath for all hosts. If an entry is founds with a hostname that matches the initial part of the current hostname (without the domainname) then that datapath will be used instead.
e.g. datapath=/scr/dave/ oas datapath=/scr4/dave/ robson datapath=/scrx/dave
This will result in a datapath of ``/scr/dave/'' except on machines oas and robson.
If a datapath starts with a $ (e.g. datapath=$SCR/dave/ ) then the value of the environment variable will be used to start the datapath. See ``output'' for a description of how environment variables are handled in the information written to the header file.
The value returned by datapath is the address of the input string.
output, input, the slice manpage, seplib
Datapath terminates program execution with an appropriate error message if it has trouble reading a .datapath file.
The long list of rules is not easily remembered. It is an attempt, however, to mimic standard UNIX conventions such as csh or ex use to establish defaults.
datapath output file binary
sep