/******************************************************************************* Copyright by Telesoft Europe AB 1990, 1991. Copyright by Telelogic Malmoe AB 1991, 1992, 1993, 1994. Copyright by Telelogic AB 1994 - 1998. This Program is owned by Telelogic and is protected by national copyright laws and international copyright treaties. Telelogic grants you the right to use this Program on one computer or in one local computer network at any one time. Under this License you may only modify the source code for the purpose of adapting it to your environment. You must reproduce and include any copyright and trademark notices on all copies of the source code. You may not use, copy, merge, modify or transfer the Program except as provided in this License. Telelogic does not warrant that the Program will meet your requirements or that the operation of the Program will be uninterrupted and error free. You are solely responsible that the selection of the Program and the modification of the source code will achieve your intended results and that the results are actually obtained. *******************************************************************************/ SYNTYPE LongInt = Integer /*#ADT(T A(S) E(S) D(H) W(H) R(H)) #TYPE typedef long int #(LongInt); #HEADING #define yDef_#(LongInt)(yVar) *(yVar) = 0 #ifdef XREADANDWRITEF static char yCTemp_Longint[20]; extern int yRead_#(LongInt) XPP((void * Result)); extern char *yWri_#(LongInt) XPP((void * C)); #endif #BODY #ifdef XREADANDWRITEF #ifndef XNOPROTO extern int yRead_#(LongInt)( void * Result) #else extern int yRead_#(LongInt)( Result ) void * Result; #endif { #(LongInt) temp; xxToken Token; int Negative; Token = xPromptQuestionMark(" (LongInt) : ", " (LongInt) : ", yCTemp_Longint); Negative = 0; if (Token == xxPlus) Token = xScanToken(yCTemp_Longint); else if (Token == xxMinus) { Token = xScanToken(yCTemp_Longint); Negative = 1; } if (Token == xxId && sscanf(yCTemp_Longint, "%ld", &temp) >= 1) { if (Negative) *(#(LongInt) *)Result = -temp; else *(#(LongInt) *)Result = temp; return 1; } xPrintString("Illegal LongInt value\n"); return 0; } #ifndef XNOPROTO extern char *yWri_#(LongInt)( void * C) #else extern char *yWri_#(LongInt)( C ) void * C; #endif { sprintf(yCTemp_Longint, "%ld", *(#(LongInt) *)C); return yCTemp_Longint; } #endif */ ENDSYNTYPE;