Appendix K:
The IRIS Terminal programming environment makefile's are set up so that
simplest change — adding a single routine to the remote graphics library —
requires
changing
$IRIS/src/term/local.c. local.c contains the source code for all the additional
routines, and lib.prim describes the parameters and return values of each of the
IRIS Graphics Library routines.
lib.prim is used by awk scripts to generate both the dispatch table in the IRIS
terminal program and the remote graphics library for C and FORTRAN. The
first part of the file contains documentation for the table entries, and serves as
a good source of examples. Most routines can be added to the list by following
the pattern of a similar existing entry. Details of the lib.prim entry format are
provided in the next section.
The position of an entry in the lib.prim file determines its dispatch number.
New routines should therefore be added to the end of the list, or all previously
compiled programs may become incompatible. Additions or deletions from the
middle of the list will cause this problem. To delete a routine from the
standard library, replace the entry with:
V:V:bogus( )
Note that there are already some bogus entries in the list. They hold places for
commands from older versions of the IRIS Graphics Library that have changed
or disappeared. At the end of the list is another special entry called lastone.
New entries to lib.prim should be made just before this special entry.
The makefile in the $IRIS/src/term directory assumes that all additional source
code for the IRIS terminal program appears in the file local.c. If the IRIS
terminal program additions are extensive, you can add files to this makefile.
K.5 lib.prim Entries
This section describes the entries in the lib.prim file. It is much easier to follow
the discussion below with a copy of lib.prim in front of you. For most routines,
a complete understanding of this section is unnecessary.
Each entry in the lib.prim file has the following general form:
returntype
<
The <procedurename> is the name of the routine, and should be unique in the
first six characters. The <parameterdescription> is a list of entries from the table
of defined types in the comment at the beginning of the lib.prim file. The
<returntype> is slightly different and will be described later.
Each entry in the <parameterdescription> is either a pair or a triplet separated
by colons. The first letter in each pair or triplet describes the type that will
be generated by the awk script. In the C version, for example, a generates type
char, k generates type Colorindex, and so on.
Version 1.0
only
two
procedurename
>:<
>( <
IRIS WORKSTATION GUIDE
files.
These
parameterdescription
> )
are
$IRIS/lib/lib.prim
151
and
Need help?
Do you have a question about the IRIS Workstation and is the answer not in the manual?