2010-08-08 10:06:34 +02:00
|
|
|
/* vi: set ts=2:
|
|
|
|
+-------------------+ Christian Schlittchen <corwin@amber.kn-bremen.de>
|
|
|
|
| | Enno Rehling <enno@eressea.de>
|
|
|
|
| Eressea PBEM host | Katja Zedel <katze@felidae.kn-bremen.de>
|
|
|
|
| (c) 1998 - 2003 | Henning Peters <faroul@beyond.kn-bremen.de>
|
|
|
|
| | Ingo Wilken <Ingo.Wilken@informatik.uni-oldenburg.de>
|
|
|
|
+-------------------+ Stefan Reich <reich@halbling.de>
|
|
|
|
|
|
|
|
This program may not be used, modified or distributed
|
|
|
|
without prior permission by the authors of Eressea.
|
|
|
|
|
|
|
|
*/
|
|
|
|
#ifndef H_UTIL_COMMAND_H
|
|
|
|
#define H_UTIL_COMMAND_H
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2011-03-07 08:02:35 +01:00
|
|
|
struct tnode;
|
|
|
|
struct locale;
|
|
|
|
struct order;
|
2010-08-08 10:06:34 +02:00
|
|
|
|
2011-03-07 08:02:35 +01:00
|
|
|
typedef struct syntaxtree {
|
|
|
|
const struct locale *lang;
|
|
|
|
struct tnode *root;
|
|
|
|
struct syntaxtree *next;
|
|
|
|
} syntaxtree;
|
2010-08-08 10:06:34 +02:00
|
|
|
|
2011-03-07 08:02:35 +01:00
|
|
|
typedef void (*parser) (const struct tnode *, void *, struct order *);
|
|
|
|
extern void add_command(struct tnode *troot, struct tnode *tnext,
|
|
|
|
const char *str, parser fun);
|
|
|
|
extern void do_command(const struct tnode *troot, void *u, struct order *);
|
2010-08-08 10:06:34 +02:00
|
|
|
|
2011-03-07 08:02:35 +01:00
|
|
|
extern struct syntaxtree *stree_create(void);
|
|
|
|
extern struct tnode *stree_find(const struct syntaxtree *stree,
|
|
|
|
const struct locale *lang);
|
2010-08-08 10:06:34 +02:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|