Seppo Mustonen : Programming Survo in C

Functions in library SURVO.LIB

data_open2
Summary

int data_open2(name,data,p1,p2,p3)
char *name;       /* name of SURVO 84C DATA */
SURVO_DATA *data; /* pointer to data structure */
int p1;           /* space for variables indicator */
int p2;           /* name length indicator */
int p3;           /* text indicator */
Description

The data_open2 function opens the SURVO 84C data specified by name. data is a pointer to the SURVO_DATA structure (See data_open). The parameters p1,p2,p3 indicate various extensions when data is a SURVO 84C data file.

If p1=0,
space will be allocated for defined variables (fields) only (i.e. for data->m variables).
Otherwise space is available for all possible variables (i.e. for data->m1 variables).
If p2=0,
space will be allocated for short names (of 8 bytes) of variables (fields).
Otherwise space is available for full length (data->d2.l bytes) names of variables.
If p3=0,
no text information is loaded.
Otherwise space is allocated for general text information saved in the data file.
The text lines are referred to by pointers data->d2.fitext[i], i=0,1,...,data->d2.textn.
Return Value

data_open2 returns 1 if the file was succesfully opened and -1 otherwise. In the latter case the error message SURVO 84C data `name' not found! is displayed.

See Also

data_open, data_close, data_load, data_alpha_load

Example

int i;
SURVO_DATA dat;
i=data_open2("TEST",&dat,1,1,1);
if (i<0) return;


Front page of Survo C libraries