2 mala-glibc.h - declarations for the glibc implementation of MaLa
4 Copyright (C) 2004, Christian Thaeter <chth@gmx.net>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License version 2 as
8 published by the Free Software Foundation.
10 This program 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.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, contact me.
23 #include "engine/mala_types.h"
24 #include "engine/engine.h"
25 #include "engine/action.h"
26 #include "engine/actiondesc.h"
27 #include "engine/strings.h"
28 //#include "engine/mala_types.h"
35 /*TODO macros for common parsers MALA_SUBSTITUTE_PARSER("FOO","BAR") etc */
38 #define MALA_CHECK_NOTNEGATED \
39 if (mala_engine_is_negated (eng)) \
40 return mala_engine_exception (eng, pptr, pptr, "--ERROR-NEGATED")
42 #define MALA_CHECK_HASARG \
43 if (llist_get_next ((LList) pptr) == mala_engine_getprogram (eng)) \
44 return mala_engine_exception (eng, pptr, pptr, "--ERROR-MISSINGARG")
46 #define MALA_CHECK_HASARGS(n) \
47 if (llist_distance ((LList) pptr, mala_engine_getprogram (eng)) < n) \
48 return mala_engine_exception (eng, pptr, \
49 llist_get_tail (mala_engine_getprogram (eng)), \
57 // c-file-style: "gnu"
59 // arch-tag: bf4fcf70-efe9-4c6e-baab-629a8e195bc3