2 action.h - MaLa action handler
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 <sys/queue.h>
24 #include "mala_types.h"
26 #define mala_substitute_parser mala_null_parser
27 #define mala_expand_parser mala_null_parser
28 #define mala_macro_parser mala_null_parser
31 mala_actioninit_struct
34 MalaParserFunc parser
;
35 MalaDataDestructor destructor
;
41 #define MALA_ACTIONS_END {NULL,NULL,NULL,NULL,NULL,NULL}
43 struct mala_action_struct
46 MalaParserFunc parser
;
47 MalaDataDestructor destructor
;
52 mala_childstack childs
;
53 LIST_ENTRY(mala_action_struct
) cldnode
;
55 LIST_ENTRY(mala_action_struct
) stknode
;
60 mala_action_new_actioninit (MalaActionInit init
, MalaStringBucket bucket
);
63 mala_action_free (MalaAction self
);
66 //mala_action_destroy (MalaAction self);
69 mala_action_attach (MalaAction self
);
73 mala_action_new (MalaString name
, void * data
,
74 MalaParserFunc
, MalaDataDestructor
);
77 mala_action_new_brief (MalaActionInit init
, MalaAction parent
, MalaStringBucket bucket
);
80 mala_action_new_help (MalaActionInit init
, MalaAction parent
, MalaStringBucket bucket
);
83 mala_action_execute (MalaAction self
, MalaStringListNode pptr
, MalaEngine eng
);
91 mala_action_getname (MalaAction self
);
99 #endif /*MALA_ACTION_H*/
103 // c-file-style: "gnu"
105 // arch-tag: d8b425b7-18c1-4dc8-a19b-cdd095873e70