### 3 The Overall System

#### 3.1 The ADAM_PACKAGES Help Library

A Starlink HELP library giving general descriptions of all Starlink packages will be maintained in /star/help/adam_package.shl by the Starlink Software Librarian. The top-level topic will give a list, with a single line description, of all the standard and option packages and will be displayed if the user types:

ICL> HELP PACKAGES

The second level will be subtopics for the individual packages. Each subtopic will give a brief description of the package and describe how to start using it. Before any packages have been started up by the user, the command:

ICL> HELP package

will display the appropriate subtopic.

Environment variable ADAM_PACKAGES points to this help file.

#### 3.2 ICL Startup Command Files

ICL uses environment variables to identify files containing commands which it will obey automatically before taking input from any file specified as a parameter of the ICL command, or prompting for input. The environment variables, in the order they are accessed, are:

For Starlink sites, ICL_LOGIN_SYS points to a file, controlled by the Starlink Software Librarian which contains ICL commands which:

(1)
For all Starlink packages, define, for the ICL help system, the relevant entry in the ADAM_PACKAGES help library.
(2)
For each standard package, define an ICL Package Startup Command which, if issued by the user, will start up the package for use with ICL (usually by LOADing the Package Definition Command File).
(3)
For each option package, check whether the package is installed at the site by checking for the existence of an appropriate file (usually the Package Definition Command File). If the package is installed, an ICL Package Startup Command is defined as for standard packages; if not, an ICL Package Startup Command is defined which, if issued, will inform the user politely that the package is not available at the site1.
(4)
Check if environment variable LADAM_PACKAGES defines a file which exists and, if it does, LOAD the file (see Section 3.3).
(5)
Print a brief introductory message.

For example, for KAPPA (a standard package), on Unix it will contain:

{  Definitions for KAPPA }
DEFHELP KAPPA $ADAM_PACKAGES KAPPA DEFSTRING KAPPA LOAD$KAPPA_DIR/kappa

For CCDPACK (an option package), it contains:

{  CCDPACK  }
DEFHELP CCDPACK $ADAM_PACKAGES CCDPACK IF FILE_EXISTS("$CCDPACK_DIR/ccdpack.icl")
ELSE
DEFSTRING CCDPACK NOTINSTALLED CCDPACK
ENDIF

Where NOTINSTALLED is a procedure which politely tells the user that the package is not available. Note that, because IF statements can only be included in ICL procedures (and not directly in command files), the command file first defines a hidden procedure containing the appropriate code for all option packages and then obeys it to define the required Package Startup Command.

This is an environment variable pointing to an ICL command file which, if it exists, will be LOADed during the ICL_LOGIN_SYS sequence. The file is intended to define both the Package Startup Command and the source of introductory help for local packages.

LADAM_PACKAGES will be controlled by the local Site Manager and may also contain any other site-specific login commands.

The following environment variables are defined in /star/etc/login which must be ‘source’ed in order to use any Starlink software.
Shell Package Startup Commands are defined in /star/etc/cshrc which must be ‘source’ed in order to use any Starlink software. For standard packages a command is defined which will ‘source’ the Package Startup Script to start up the package for use from the shell. For option packages, the existence of an appropriate file within the package is checked to determine whether or not the package is installed. If it is, a Startup Command is defined as for standard packages; if not, a command is defined which will politely tell the user that the package has not been installed.