X25AM Programming Manual

PTP Applications
X25AM Programming Manual527201-001
3-82
Text of C Example
{
if( *ext_defaults != '.' )
{
*wp = *ext_defaults;
wp++;
count--;
}
else
{
for( ; count > 0; count--, wp++ )
{
*wp = ' ';
}; /* for count */
count = 8;
}; /* if *wp++ != '.' */
ext_defaults++;
}; /* while (*wp != EOS ) */
} /* GetDefaults() */
/*
*----------------------------------------------------------------------
* INITIALIZE_IO FUNCTION
* ----------------------
* Close the standard input/output files opened by the start-up function
* of C run-time routine so that the device reopens with appropriate I/O
* characteristics.
* This function will do the following:
* 1) opens the remote X.25 subdevice;
* 2) calls ConnectLine() function to establish connection;
* 3) closes & reopens the stdin (standard input) for nowait I/O;
* 4) prompts the user for terminal input.
*----------------------------------------------------------------------
*/
void InitializeIO( char *in_device, char *out_device )
{
short error = 0;
short x25_line[ MAX_INT_FNAME_LEN ];
short std_in [ MAX_INT_FNAME_LEN ];
short defaults[ MAX_INT_FNAME_LEN ];