Seppo Mustonen : Programming Survo in C

Functions in library SURVO.LIB

sp_init
Summary

int sp_init(editline)
int editline;           /* # of edit line */
Description

The sp_init function finds all the specifications from the subfield around editline and secondarily from the *GLOBAL* subfield.

sp_init forms the arrays char **spa,**spb and **spshad consisting of the names (**spa on the left-hand side), values (**spb on the right-hand side) and their shadow characters (**spshad on the right-hand side) of the specifications of the form

<name> = <value>

After the sp_init call the function spfind can be used to find the values of the specifications.
Return Value

sp_init returns 1 if there is enough space for all specifications. Otherwise -1 is returned.

See Also

spec_init, spfind

Example

int i;
i=sp_init(r1+r-1);  /* r1+r-1 is the current line in the edit field */
if (i<0) return;


Front page of Survo C libraries