Fixes to compile in Linux, gcc 4.3.2
[rice.git] / include / riceeasy.h
blob41edde3e0adef07c11ed4b3d30bc7467ae2f12de
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 * RICE 4.0x Copyright (C) 1993 Rene' Jager *
3 * *
4 * *
5 * This toolbox is free software; you can redistribute it and/or *
6 * modify it under the terms of the GNU General Public License as *
7 * published by the Free Software Foundation; either version 2 of *
8 * the License, or (at your option) any later version. *
9 * *
10 * This toolbox is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this toolbox; if not, write to the: *
17 * *
18 * Free Software Foundation, Inc. *
19 * 675 Mass Ave, Cambridge *
20 * MA 02139, USA. *
21 * *
22 * See the RICE documentation for more information on the toolbox. *
23 * The file COPYING for the complete GNU General Public License. *
24 * *
25 * You can reach me by (preferably e-mail): *
26 * *
27 * Rene' Jager *
28 * *
29 * Delft University of Technology *
30 * Department of Electrical Engineering *
31 * Control Laboratory *
32 * *
33 * Room ET 12.06 *
34 * *
35 * Mekelweg 4 *
36 * P.O.Box 5031 *
37 * 2600 GA Delft *
38 * The Netherlands *
39 * *
40 * e-mail: R.Jager@ET.TUDelft.NL *
41 * phone: +31-15-78 51 14 *
42 * fax: +31-15-62 67 38 *
43 * telex: 38151 butud nl *
44 * *
45 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
48 File: riceeasy.h
49 Author: Rene' Jager
50 Update: December 30, 1992
51 Info: include file for easy use of RICE, see file rice.doc
52 Modif: Miry, May 1999, solved some problem with #error's
56 /* prevent unnecessary compilation */
58 #ifndef _RICEEASY_H_
59 #define _RICEEASY_H_
62 /* include rice.h */
64 #include <rice.h>
67 /* truth constants */
69 #if defined(TRUE) || defined(FALSE) || defined(UNKNOWN)
70 # "error RICE easy macro's conflict with environment."
71 #endif
73 #define TRUE RICE_TRUE
74 #define FALSE RICE_FALSE
75 #define UNKNOWN RICE_UNKNOWN
78 /* message constants */
80 #if defined(ERROR) || defined(WARNING) || defined(MESSAGE)
81 # error "RICE easy macro's conflict with environment."
82 #endif
84 #define ERROR RICE_ERROR
85 #define WARNING RICE_WARNING
86 #define MESSAGE RICE_MESSAGE
89 /* linker macro's */
91 #if defined(NORM) || defined(LINKER) || defined(Linker) || defined(Link)
92 # error "RICE easy macro's conflict with environment."
93 #endif
95 #define NORM RICE_NORM
96 #define LINKER RICE_LINKER
97 #define Linker RICE_Linker
98 #define Link RICE_Link
101 /* arguments macro's */
103 #if defined(grade) || defined(argc) || defined(argv)
104 # error "RICE easy macro's conflict with environment."
105 #endif
107 #define GRADE RICE_grade
108 #define ARGC RICE_argc
109 #define ARGV RICE_argv
112 /* adjustment macro's */
114 #if defined(Set) || defined(Reset) || defined(Switch)
115 # error "RICE easy macro's conflict with environment."
116 #endif
118 #if defined(Redirect) || defined(Use) || defined(Explain)
119 # error "RICE easy macro's conflict with environment."
120 #endif
122 #if defined(SetAdaptive) || defined(ResetAdaptive) || defined(SwitchAdaptive)
123 # error "RICE easy macro's conflict with environment."
124 #endif
126 #if defined(SetRepetitive) || defined(ResetRepetitive) || defined(SwitchRepetitive)
127 # error "RICE easy macro's conflict with environment."
128 #endif
130 #if defined(SetInteractive) || defined(ResetInteractive) || defined(SwitchInteractive)
131 # error "RICE easy macro's conflict with environment."
132 #endif
134 #if defined(SetRecursive) || defined(ResetRecursive) || defined(SwitchRecursive)
135 # error "RICE easy macro's conflict with environment."
136 #endif
138 #if defined(SetSelective) || defined(ResetSelective) || defined(SwitchSelective)
139 # error "RICE easy macro's conflict with environment."
140 #endif
142 #if defined(UseLinker) || defined(UseIntersection) || defined(UseUnion)
143 # error "RICE easy macro's conflict with environment."
144 #endif
146 #if defined(ExplainHow) || defined(ExplainWhy)
147 # error "RICE easy macro's conflict with environment."
148 #endif
150 #define Explain(kb, typ, fct, dpt) RICE_MERGE(rice_Explain, typ(kb, fct, dpt))
151 #define Redirect(kb, nam, fnc) RICE_MERGE(rice_Redirect, nam(kb, fnc))
152 #define Set(kb, nam) RICE_MERGE(rice_Set, nam(kb, 1))
153 #define Reset(kb, nam) RICE_MERGE(rice_Set, nam(kb, 0))
154 #define Switch(kb, nam) RICE_MERGE(rice_Set, nam(kb, -1))
155 #define Use(kb, nam, num, ptr) RICE_MERGE(rice_Use, nam(kb, num, ptr))
156 #define SetAdaptive(kb) rice_SetAdaptive(kb, 1)
157 #define ResetAdaptive(kb) rice_SetAdaptive(kb, 0)
158 #define SwitchAdaptive(kb) rice_SetAdaptive(kb, -1)
159 #define SetRepetitive(kb) rice_SetRepetitive(kb, 1)
160 #define ResetRepetitive(kb) rice_SetRepetitive(kb, 0)
161 #define SwitchRepetitive(kb) rice_SetRepetitive(kb, -1)
162 #define SetInteractive(kb) rice_SetInteractive(kb, 1)
163 #define ResetInteractive(kb) rice_SetInteractive(kb, 0)
164 #define SwitchInteractive(kb) rice_SetInteractive(kb, -1)
165 #define SetRecursive(kb) rice_SetRecursive(kb, 1)
166 #define ResetRecursive(kb) rice_SetRecursive(kb, 0)
167 #define SwitchRecursive(kb) rice_SetRecursive(kb, -1)
168 #define SetSelective(kb) rice_SetSelective(kb, 1)
169 #define ResetSelective(kb) rice_SetSelective(kb, 0)
170 #define SwitchSelective(kb) rice_SetSelective(kb, -1)
171 #define UseLinker(kb, num, lnk) rice_UseLinker(kb, num, lnk)
172 #define UseIntersection(kb, num, lnk) rice_UseIntersection(kb, num, lnk)
173 #define UseUnion(kb, num, lnk) rice_UseUnion(kb, num, lnk)
174 #define ExplainHow(kb, fct, dpt) rice_ExplainHow(kb, fct, dpt)
175 #define ExplainWhy(kb, fct, dpt) rice_ExplainWhy(kb, fct, dpt)
178 /* redirection macro's */
180 #if defined(RedirectAsk) || defined(RedirectInform) || defined(RedirectReport)
181 # error "RICE easy macro's conflict with environment."
182 #endif
184 #if defined(RedirectProtect) || defined(RedirectAbandon)
185 # error "RICE easy macro's conflict with environment."
186 #endif
188 #define RedirectAsk(kb, fnc) rice_RedirectAsk(kb, fnc)
189 #define RedirectInform(kb, fnc) rice_RedirectInform(kb, fnc)
190 #define RedirectReport(kb, fnc) rice_RedirectReport(kb, fnc)
191 #define RedirectExplain(kb, fnc) rice_RedirectExplain(kb, fnc)
192 #define RedirectProtect(kb, fnc) rice_RedirectProtect(kb, fnc)
193 #define RedirectAbandon(kb, fnc) rice_RedirectAbandon(kb, fnc)
196 /* KB interfacing macro's */
198 #if defined(CompileKB) || defined(AppendKB) || defined(SwapKB)
199 # error "RICE easy macro's conflict with environment."
200 #endif
202 #if defined(LoadKB) || defined(SaveKB) || defined(RebuildKB)
203 # error "RICE easy macro's conflict with environment."
204 #endif
206 #if defined(DestroyKB) || defined(ClearKB) || defined(InferKB)
207 # error "RICE easy macro's conflict with environment."
208 #endif
210 #if defined(CopyKB) || defined(MoveKB)
211 # error "RICE easy macro's conflict with environment."
212 #endif
214 #define AppendKB(kb, str) rice_AppendKB(kb, str)
215 #define ClearKB(kb) rice_ClearKB(kb)
216 #define CompileKB(kb, str) rice_CompileKB(kb, str)
217 #define CopyKB(kb1, kb2) rice_CopyKB(kb1, kb2)
218 #define DestroyKB(kb) rice_DestroyKB(kb)
219 #define InferKB(kb) rice_InferKB(kb)
220 #define LoadKB(kb, str) rice_LoadKB(kb, str)
221 #define MoveKB(kb1, kb2) rice_MoveKB(kb1, kb2)
222 #define RebuildKB(kb, str) rice_RebuildKB(kb, str)
223 #define SaveKB(kb, str) rice_SaveKB(kb, str)
224 #define SwapKB(kb) rice_SwapKB(kb)
227 /* ES interfacing macro's */
229 #if defined(SwitchES) || defined(CopyES) || defined(MoveES)
230 # error "RICE easy macro's conflict with environment."
231 #endif
233 #if defined(CheckES) || defined(DeleteES) || defined(CreateES)
234 # error "RICE easy macro's conflict with environment."
235 #endif
237 #define CheckES(es) rice_CheckES(es)
238 #define CopyES(es1, es2) rice_CopyES(es1, es2)
239 #define CreateES() rice_CreateES()
240 #define DeleteES(es) rice_DeleteES(es)
241 #define MoveES(es1, es2) rice_MoveES(es1, es2)
242 #define SwitchES(es) rice_SwitchES(es)
245 #endif /* _RICEEASY_H_ */