X25AM Programming Manual

PTP Applications
X25AM Programming Manual527201-001
3-72
Text of C Example
comparison of the two examples easier. For example, both programs place the main
procedure following all of the subroutines, which is standard for TAL, but not for C.
Invoking the C Example
To invoke the following application program, named PTPMODE0, use the standard
Guardian System RUN command at the TACL prompt. The line $X25line.#ptp must be
previously defined using SCF. When the PTPMODE0 program completes, you return to
the TACL prompt.
RUN ptpmode0/IN terminal_name /$X25line.#ptp
Text of C Example
The remainder of this subsection contains the text of the application program written in
C for the PTP protocol, mode 0.
/*
*----------------------------------------------------------------------
* EXAMPLE OF PTP MODE 0 PROGRAM, IN C
*----------------------------------------------------------------------
*/
#pragma page “PTPMODE0 - Global Declarations”
#pragma noxmem, symbols, inspect, runnable
#include <fcntlh> nolist
#include <stdioh> nolist
#include <stdlibh> nolist
#include <stringh> nolist
#include <talh> nolist
#include <cextdecs( awaitio, cancel, control, debug, delay, fileinfo,\
fnameexpand, open, read, setmode, write \
)> nolist