home *** CD-ROM | disk | FTP | other *** search
- /*
- * Group of include files for input to rtt.
- * rtt reads these files for preprocessor directives and typedefs, but
- * does not output any code from them.
- */
- #include "../h/define.h"
- #include "../h/path.h"
- #include "../h/config.h"
- #include "../h/typedefs.h"
- #include "../h/version.h"
-
- /*
- * Macros that must be expanded by rtt.
- */
-
- #define AnyType (co_expression ++ cset ++ file ++ integer ++ list ++ null ++\
- procedure ++ real ++ record ++ set ++ string ++ table)
-
- /*
- * Declaration for library routine.
- */
- #begdef LibDcl(nm,n,pn)
- #passthru OpBlock(nm,n,pn,0)
-
- int O##nm(nargs,cargp)
- int nargs;
- register dptr cargp;
- #enddef
-
- /*
- * Error exit from non top-level routines. Set tentative values for
- * error number and error value; these errors will but put in
- * effect if the run-time error routine is called.
- */
- #begdef ReturnErrVal(err_num, offending_val, ret_val)
- {
- t_errornumber = err_num;
- t_errorvalue = offending_val;
- t_have_val = 1;
- return ret_val;
- }
- #enddef
-
- #begdef ReturnErrNum(err_num, ret_val)
- {
- t_errornumber = err_num;
- t_errorvalue = nulldesc;
- t_have_val = 0;
- return ret_val;
- }
- #enddef
-
- /*
- * Code expansions for exits from C code for top-level routines.
- */
- #define Fail return A_Resume
- #define Return return A_Continue
-
- /*
- * RunErr encapsulates a call to the function err_msg, followed
- * by Fail. The idea is to avoid the problem of calling
- * runerr directly and forgetting that it may actually return.
- */
-
- #define RunErr(n,dp) {\
- err_msg((int)n,dp);\
- Fail;\
- }
-
- /*
- * Protection macro.
- */
- #define Protect(notnull,orelse) if ((notnull)==NULL) orelse
-
-