X25AM Programming Manual

PTP Applications
X25AM Programming Manual527201-001
3-80
Text of C Example
if( fprintf( stderr, "%s: Invalid input\n", prog_name ) < 0 )
{
DEBUG();
}; /* if fprintf( stderr ) */
goto L_PROMPT;
}; /* if strcmp() */
/*
*------------------------------------------------------------------
* Step 4: Set communication line's parameter, and check for errors.
*------------------------------------------------------------------
*/
if( SETMODE( comm_file, 30, 1 ) != CCE )
{
FILEINFO( comm_file, &error );
ReportCommError( error );
exit( EXIT_FAILURE );
}; /* if setmode() */
/*
*------------------------------------------------------------------
* Step 5: Post a read on the communication line.
*------------------------------------------------------------------
*/
if( READ( comm_file, comm_buffR, MAX_COMM_READ, , READ_TAG ) != CCE )
{
FILEINFO( comm_file, &error );
ReportCommError( error );
}; /* if read() */
} /* ConnectLine() */
/*
*----------------------------------------------------------------------
* FILE_NAME FUNCTION
* ------------------
*
* This function extracts the file name from the given string, assuming
* it is in a valid file name format.
*
*----------------------------------------------------------------------
*/