Seppo Mustonen : Programming Survo in C

Functions in library SURVO.LIB

s_init
Summary

int s_init(address)
char *address;       /* address of SURVO 84C pointers as a string */
Description

The s_init function copies the SURVO 84C system parameters from the SURVO 84C main module (parent process) to the current module (child process). The 4-byte address of pointers is passed from the parent to the child in a form of a string address and in practice always replaced by argv[1]. After the s_init call, which should take place once in the beginning of each SURVO 84C module the following variables and parameters are available with their current values:

char *z;            /* pointer to edit field */
int ed1;            /* length of edit line + control column */
int ed2;            /* number of lines in edit field */
int edshad;         /* max. # of shadow lines in edit field */
int r;              /* current line on the screen */
int r1;             /* first visible edit line on the screen */
int r2;             /* =ed2 */
int r3;             /* # number of edit lines on the screen */
int c;              /* current column on the screen */
int c1;             /* first visible column on the screen */
int c2;             /* =ed1-1 (length of edit line) */
int c3;             /* # of columns on the screen */
char *edisk;        /* current data disk (path) */
char *esysd;        /* SURVO 84C system disk (path) */
char *eout;         /* output file/device */
int etu;            /* tutorial mode indicator */
char *etufile;      /* current sucro file (when etu>0) */
int etu1,etu2,etu3; /* tutorial mode parameters */
long tutpos;        /* pointer to sucro file */
int *zs;            /* indices of shadow lines */
int zshn;           /* # of shadow lines */
int erun;           /* run mode indicator (1=run mode on) */
int edisp;          /* display mode after exit from current module */
char *sapu;         /* buffer for SURVO.APU parameters */
char *info;         /* string for information between modules */
char **key_label;   /* key label pointers */
char *key_lab;      /* key label buffer */
char *survo_id;     /* owner of the SURVO 84C copy */
char **disp_string; /* display string pointers */
int speclist;       /* size of buffer for specifications */
int specmax;        /* max # of specifications */
char *active_data;  /* current SURVO 84C DATA */
int scale_check;    /* scale type checking level */
int accuracy;       /* accuracy for printouts */
int scroll_line;    /* first scroll line for temporary displays */
int space_break;    /* break indicator for space bar (1=on) */
int sdisp;          /* current shadow character (display mode) */
Return Value

There is no return value.

See Also

hae_apu, s_end, tut_init

Example

A typical start of the main function in a SURVO 84C module is:

main(argc,argv)
int argc; char *argv[1];
        {
        if (argc==1) return;
        s_init(argv[1]);
/*  ..........  */
        }


Front page of Survo C libraries