2 mala-impl.h - private declarations for 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.
24 MALA_TYPES(mala_actiondict
, MalaActionDict
);
25 //MALA_TYPES(mala_action, MalaAction);
27 struct mala_engine_struct
31 MalaActionDict actions
;
40 struct mala_action_struct
44 MalaDataDestructor destructor
;
56 mala_llistnode_malloc (void);
60 * abstraction of strings
67 mala_strlist_pushback_cstrings (LList self
, int count
, const char ** strs
);
70 mala_strlist_pushfront_cstrings (LList self
, int count
, const char ** strs
);
73 mala_strlist_erase_strings (LList self
);
76 mala_strlist_delete_string (LList self
);
79 mala_strlist_substitute_string (LList self
, const t_uchar
* newstr
);
82 mala_strlist_insert_before (LList self
, const char * str
);
85 mala_strlist_insert_after_cat2 (LList self
, const char * str1
, const char * str2
);
89 * Sorted/Stacked set of MalaActions
92 mala_actiondict_new (void);
95 mala_actiondict_destroy (MalaActionDict self
);
98 mala_actiondict_push (MalaActionDict self
, MalaAction data
);
101 mala_actiondict_destroy_action (MalaActionDict self
, MalaAction action
);
104 mala_actiondict_lookup (MalaActionDict self
, const t_uchar
* key
);
107 mala_actiondict_lookupaction (MalaActionDict self
, const t_uchar
* key
);
110 mala_actiondict_lookupprevaction (MalaActionDict self
, const t_uchar
* key
);
117 mala_engine_malloc (void);
120 mala_engine_new (void);
129 mala_action_malloc (void);
132 mala_action_new_actioninit (MalaActionInit
);
135 mala_action_new_brief (MalaActionInit
, MalaAction parent
);
138 mala_action_new_help (MalaActionInit
, MalaAction parent
);
141 mala_action_new (t_uchar
** name
, void ** data
,
142 MalaParseFunc
, MalaDataDestructor
);
145 mala_action_destroy (MalaAction self
);
148 mala_action_execute (MalaAction self
, LList pptr
, MalaEngine eng
);
151 mala_action_getname (MalaAction self
);
155 #endif /*MALA_IMPL_H*/
160 // c-file-style: "gnu"
162 // arch-tag: 3bca0ae4-0d5d-4f87-8957-158e4017ea44