.BG
.VE $Header: /usr3/s/current/s/.help/RCS/System,v 1.4 84/01/05 12:16:34 rab Exp $
.FN System
.TL
S System File and Source Code Organization
.PP
S organizes its system files for source code, libraries, utilities and
functions by exploiting the hierarchical file structure in the UNIX
operating system.  The various directories to be described each
contain files related to specialized parts of S.
.PP
Source code for interface routines resides in files
with names ending in ".i", and algorithm source file names will end ".r".
Include files end with ".m", C programs that use the S `m4' macros end in ".C",
and standard C programs end in ".c".
.PP
On any installation, all the S files will be under the S home
directory.
The S home directory is divided into subdirectories:
adm, cmd, doc, graph, newfun, s, and src.
.PP
.IP adm:
The portion of the file system used by the S administrator.
.IP adm/bkup:
Back-up versions of S functions from s/x.
.IP adm/cmd:
Administrator utilities,  used in compiling S, etc.
.IP adm/test:
Files which can be used to test the installation
of S; test runs and the expected output.
.IP cmd:
The executable commands (utilities) in S.  The command
`S name'
executes file "name" in this directory.
This directory also contains the S executive.
.IP doc:
Miscellaneous documents for use with S.
Subdirectory `man' contains the manual page documentation for S
(accessed by `S MAN').
.IP graph
Used for stand-alone graphics routines.
.IP graph/bin:
Stand-alone graphics device drivers.
.IP graph/lib:
Libraries for specific device drivers.
.IP newfun
This branch of the hierarchy is necessary if users are to be able to
create new S functions.
.IP newfun/include:
Include files used by the `m4' macro processor.
Provides facilities for the interface and
algorithm languages.  Accessed by the INCLUDE statement.
.IP newfun/lib:
Libraries of algorithms.
.IP s:
This directory contains the important portions of the S sytem.
.IP s/.help:
All function detailed documentation.
.IP s/data:
The shared data directory. Includes datasets and macros.
.IP s/data/.help:
Detailed documentation for datasets and macros.
.IP s/msg.d:
The "message of the day" for S users.  Printed whenever S is started.
.IP s/x:
All S functions that run as independent processes.
This always includes graphics device drivers.
.IP src
Source code for all of S.
.IP src/fun:
Contains many sub-directories; in general, one directory per
S function.  That directory contains all source code for that
function and a makefile for constructing it.
Also contains directories for each graphics device driver.
.IP src/graph:
Source code for the device-independent graphics algorithms.
.IP src/icomp:
Source for the S interface language compiler.
.IP src/lang:
Basic S support algorithms.
.IP src/main:
Source for the S executive: the parser and interpreter.
.IP src/psl:
Source for basic algorithms used by S for printing, storage allocation,
numerical computations, etc.
These routines can be used independently of S; see `S PROGRAM'.
.IP src/util:
Source for stand-alone S utilities, such as `extract' and  `scandata'.
.PP
Note that some installations may not have certain of the
S directories, either to conserve space or because of binary-only licenses.
.PP
The S home directory name differs depending on the local
installation.  
The utility
.sp
     S SHOME
.sp
will print the name of the S home directory on the standard output.
.KW special
.KW UNIX
.WR
