Download Site - A Language and System For Configuring

Transcript
Chapter 4
Implementation and Reference
53
int listiterinit(L1STP Iistp, ITERP iterp);
r
* Initialize the list iterator "iterp" for "listp"
*1
caddr_t listiter(L1STP Iistp, ITERP iterp);
r
* Get the next element in the iteration
* ("listerinitO" should be called before using this)
*1
int Iistlen(L1STP Iistp);
r
* return the current number of elements in "Iistp"
*1
int Iistcap(L1STP Iistp);
r
* return the capacity "listp". This is the "max" value
* supplied to 'listinitO'.
*1
int listtype(L1STP Iistp);
1*
* return the type (LIST_*) of the list
*1
caddr_t listrnem(L1STP Iistp, int nx);
r
* Return the "nx"th object in "listp"
*1
caddr_t listfirst(L1STP Iistp);
r
* Return the first object in "listp"
*1
Figure 4.5: LIST Reading Functions
4.3.2. Variables - var*O
'This module implements access to Sitefile variable entries. The interface consists of the func­
tions described in Figure 4.6. Internal to Site a Sitefile variable is represented by a C variable of type
VAR. A VAR describes the variable entry from the Sitefile and describes the Sitefile variable name,
the Sitefile type name and the body of the variable entry.