OSI/FTAM Programming Reference Manual

NonStop FTAM Programming Examples
HP NonStop OSI/FTAM Programming Reference Manual528611-001
G-225
Translation Application Example
118 zspi_ddl_error_def spi_error;
119
120 typedef short BOOL;
121 #define TRUE -1
122 #define FALSE 0
123 #pragma PAGE "OpenRcvFile"
124 /**********************************************************************/
125 /* */
126 /* Name: OpenRcvFile */
127 /* */
128 /* Desc: Opens the $RECEIVE file. Failure returns FALSE. */
129 /* */
130 /**********************************************************************/
131 BOOL OpenRcvFile (void)
132 {
133 sLastError = FILE_OPEN_ (DOLLAR_RECEIVE,
134 (short) strlen (DOLLAR_RECEIVE),
135 &sRcvFnum, , , , 1);
136 if (sLastError)
137 printf ("Error opening $RECEIVE: %d\n", sLastError);
138 return (sLastError == 0);
139 }
140
141
142 #pragma PAGE "OpenResponderFile"
143 /**********************************************************************/
144 /* */
145 /* Name: OpenResponderFile */
146 /* */
147 /* Desc: Opens the Responder process SPI port. Failure returns FALSE. */
148 /* */
149 /**********************************************************************/
150 BOOL OpenResponderFile (void)
151 {
152 char*zResponderParam,
153 zFilename [36];
154 shortsLen;
155 zsys_ddl_phandle_def ThisProcessHandle;
156 if (sSpiFnum == -1)/* If not already open, open it *