The Fortran interface to EMS makes use of the Starlink mixed language programming package, CNF (see SUN/209), which must be available for building EMS and programs which use its Fortran interface.
The correct operation of
emsFacer) also requires the necessary facility message files to
be installed (see ‘Operating system specific routines’ below).
EMS is coded in ANSI C, according to the Starlink C coding conventions described in SGP/4. However, the following routines have system-specific features and may need re-implementing for new platforms. They may also produce differing results on different platforms.
On UNIX this is implemented using the MESSGEN system (see SUN/185) and thus relies on the required Starlink facility message files having been entered into the system.
EMS_FACER is called to to obtain the message associated with a given
it first works out the facility number from the
STATUS value. It then searches for a file with
_err (where facnum is the facility number). If environment variable
EMS_PATH is defined, it is taken to be a directory search path for the file; if not, a directory
search path of
../help relative to each of the directories on the user’s
PATH is used.
If the file cannot be found along the selected search path, or a message cannot be associated for any other reason, a ‘FACERR’ message is substituted giving as much information as possible. For example:
, error 147358667 (fac=200,messid=121)
where the given status value is 147358667 and 200 and 121 are the facility number and message number derived from it.
ident may be one of the following:
This will generally need to be rewritten for each new target platform. Current versions have the appropriate messages hardwired into the code.
This may need to be rewritten for a new target platform. At the moment UNIX platforms use the
same code which accesses
On UNIX platforms this accesses
sys_errlist to obtain the message.