X25AM Programming Manual

PTP Applications
X25AM Programming Manual527201-001
3-74
Text of C Example
*----------------------------------------------------------------------
* FORWARD DECLARATIONS OF FUNCTIONS
* ---------------------------------
*
* The functions declared are listed alphabetically by name:
*
*----------------------------------------------------------------------
*/
void CheckTermError( short error );
void CommComplete( short count );
void ConnectLine( void );
char *FileName( char *file_name );
void GetDefaults( char *defaults );
void InitializeIO( char *in_device, char *out_device );
void PrintErrorMessage( short error );
void PromptTerminal( void );
void ReportCommError( short error );
void TerminalComplete( short count );
void WriteComm( short count );
/*
*----------------------------------------------------------------------
* CHECK_TERM_ERROR FUNCTION
* -------------------------
*
* This function checks for teminal error. If the end-of-file mark is
* received, it sets a flag to terminate the execution of this proram.
* If there is any error other than BREAK_ACCESS_ONLY & BREAK_HIT, this
* function then calls the system debugger on behalf of the user.
*
*----------------------------------------------------------------------
*/
void CheckTermError( short error )
{
if( error == BREAK_ACCESS_ONLY || error == BREAK_HIT )
{
DELAY( 100L );
PromptTerminal( );
}