OSI/TS Management Programming Manual
Sample Programs
056786 Tandem Computers Incorporated C–29
#define EVT_TEXT_LEN 78
#define NUM_EVT_LINES 2
char evt_text_buf[EVT_TEXT_LEN * NUM_EVT_LINES];
int actual_len[NUM_EVT_LINES];
/* Declare subsystem IDs. */
zems_val_ssid_def zems_val_ssid;
zos4_val_ssid_def zos4_val_ssid;
char coll_name[25] = "$0 ";
char filt_name[25];
#pragma PAGE "init_startup()"
/************************************************************
 * init_startup *
 ************************************************************
 *
 * Recreate the startup structure discarded by C.
 * C retains the information we need, and it can be accessed
 * by GETENV().
 * Pass: nothing
 * Return: a pointer to the dynamic storage for the CI
 * startup message
 */
CISTART *init_startup(void)
{
 CISTART *ci_startup;
 lowmem char ExternFile[34];
 lowmem int TempDefaults[9];
 ci_startup = (CISTART *) malloc( sizeof(CISTART) );
 if (ci_startup == NULL)
 DEBUG();
 /* Note that the following code is order-dependent, since
 * using FNAMEEXPAND to directly set the defaults field
 * overwrites the front of "infile."
 */
 strcpy((char *)TempDefaults, "$SYSTEM SYSTEM ");
 strcpy(ExternFile, (char *)getenv("DEFAULTS"));
 strcat(ExternFile, ".X");
 FNAMEEXPAND(ExternFile, ci_startup->defaults,
 TempDefaults);
 strcpy(ExternFile, (char *)getenv("STDIN"));
 FNAMEEXPAND(ExternFile, ci_startup->infile, TempDefaults);
 strcpy(ExternFile, (char *)getenv("STDOUT"));
 FNAMEEXPAND(ExternFile, ci_startup->outfile, TempDefaults);
 /* Set the message code to -1 (startup message). */
 ci_startup->msgcode = -1;
 /* Insert a null character at beginning of parameters. */
 ci_startup->params[0] = 0;
 return(ci_startup);










