Jspice3
inpmacs.h
Go to the documentation of this file.
1 /***************************************************************************
2 JSPICE3 adaptation of Spice3e2 - Copyright (c) Stephen R. Whiteley 1992
3 Copyright 1990 Regents of the University of California. All rights reserved.
4 Authors: UCB CAD Group
5  1992 Stephen R. Whiteley
6 ****************************************************************************/
7 
8 #include "misc.h"
9 
10 /* a couple of macros to make much of the input code
11  * much much shorter and easier to handle.
12  *
13  * First, call the simulator function 'func', giving it the arglist
14  * 'args' (must have its own parens!) and check the error returned.
15  * If necessary, get the proper error message and tack it on the current
16  * error
17  */
18 
19 #define IFC(func,args)\
20 error=(*(ft_sim->func))args;\
21 if(error)current->error = INPerrCat(current->error,INPerror(error));
22 
23 /* and one for calling more General functions that still return an
24  * error code as above
25  */
26 
27 #define GCA(func,args)\
28 error=func args;\
29 if(error)current->error = INPerrCat(current->error,INPerror(error));
30 
31 /* and one for putting our own error messages onto the current
32  * line's error string
33  */
34 
35 #define LITERR(text) current->error=INPerrCat(current->error,copy(text));
36 
37 
38 /* and now a special one for calling INPdevParse which returns an
39  * already concatenated list of error messages or NUL
40  */
41 
42 #define PARSECALL(args)\
43 current->error = INPerrCat(current->error,INPdevParse args );