updated test.sh for nobug compatibility, has still problems with joined stderr and...
[mala.git] / includes / mala.h
blobb1a1d2206e4e13eb3dbc0f3bd8a32811cfb73192
1 /*
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.
20 #ifndef MALA_H
21 #define MALA_H
23 #include "engine/mala_types.h"
24 #include "engine/engine.h"
25 #include "engine/action.h"
26 #include "engine/strings.h"
27 #include "engine/program.h"
30 * Macros for parsers
32 /*TODO macros for common parsers MALA_SUBSTITUTE_PARSER("FOO","BAR") etc */
34 #if 0
35 #define MALA_CHECK_NOTNEGATED \
36 if (mala_engine_is_negated (eng)) \
37 return mala_engine_exception (eng, pptr, pptr, "--ERROR-NEGATED")
39 #define MALA_CHECK_HASARG \
40 if (llist_get_next ((LList) pptr) == mala_engine_getprogram (eng)) \
41 return mala_engine_exception (eng, pptr, pptr, "--ERROR-MISSINGARG")
43 #define MALA_CHECK_HASARGS(n) \
44 if (llist_distance ((LList) pptr, mala_engine_getprogram (eng)) < n) \
45 return mala_engine_exception (eng, pptr, \
46 llist_get_tail (mala_engine_getprogram (eng)), \
47 "--ERROR-MISSINGARG")
48 #endif
50 #endif
52 // Local Variables:
53 // mode: C
54 // c-file-style: "gnu"
55 // End:
56 // arch-tag: bf4fcf70-efe9-4c6e-baab-629a8e195bc3
57 // end_of_file