Seppo Mustonen : Programming Survo in C

Functions in library SURVO.LIB


int edline2(label,j,error)
char *label;       /* null-terminated string */
int j;             /* first edit line to be scanned */
int error;         /* display of error */

The edline2 function searches for the first occurrence of label in the control column starting from line j in the edit field. If the edit line is not found, message Line `label' not found! is displayed. However, if error is 0, no message is produced.

label can be a line number 1,2,... or a line label consisting of one character or of the form END, END-1, END-2, END+1, etc., where END refers to the last non-empty line in the current edit field or of the form CUR, CUR+1, etc., where CUR refers to the current line. Thus edline2 covers all the possibilities the user may employ when referring to lines in SURVO 84C operations.

Return Value

edline2 returns the index of the first edit line found with label and 0, if no edit line with label exists in the current edit field.

See Also



Assume that we have in the edit field:

    1 *
    2 *
    3 *
    4 A This line should be found!
    5 *
unsigned int j;
returns j=4.

Front page of Survo C libraries