X25AM Programming Manual
PTP Applications
X25AM Programming Manual—527201-001
3-75
Text of C Example
 else
 {
 if( error == END_OF_FILE )
 {
 end_program_flag = TRUE; /* exit the program */
 }
 else
 {
 DEBUG( );
 }; /* if end_of_file */
 }; /* if error */
} /* CheckTermError() */
/*
*----------------------------------------------------------------------
* COMM_COMPLETE FUNCTION
* ----------------------
*
* This function will do the following tasks. It also checks for errors
* for each I/O operation:
*
* 1) copies the data received from X.25 line into display buffer;
* 2) posts a new read on the X.25 line;
* 3) cancels previous read on the terminal device;
* 4) displays the line data on the terminal.
*
*----------------------------------------------------------------------
*/
void CommComplete( short count )
{
 short error;
 /*
 *------------------------------------------------------------------
 * Step 1: Copy data from comm read buffer into display buffer.
 *------------------------------------------------------------------
 */
 strncpy( term_buffs, comm_buffRs, count );
 term_buffs[count] = EOS;
 /* 










