|
@@ -1,29 +1,36 @@
|
|
|
/*
|
|
|
- * hotkey_dump.c
|
|
|
+ * plugin_dump.c
|
|
|
*/
|
|
|
#include "private.h"
|
|
|
#include "lub/dump.h"
|
|
|
+#include "lub/list.h"
|
|
|
+#include "clish/plugin.h"
|
|
|
|
|
|
/*--------------------------------------------------------- */
|
|
|
-void clish_hotkey_dump(const clish_hotkey_t *this)
|
|
|
+void clish_sym_dump(const clish_sym_t *this)
|
|
|
{
|
|
|
- lub_dump_printf("hotkey(%p)\n", this);
|
|
|
+ lub_dump_printf("plugin(%p)\n", this);
|
|
|
|
|
|
lub_dump_indent();
|
|
|
- lub_dump_printf("key : %d\n", this->code);
|
|
|
- lub_dump_printf("cmd : %s\n", this->cmd);
|
|
|
+ lub_dump_printf("name : %s\n", this->name);
|
|
|
+ lub_dump_printf("func : %p\n", this->func);
|
|
|
lub_dump_undent();
|
|
|
}
|
|
|
|
|
|
/*--------------------------------------------------------- */
|
|
|
-void clish_hotkeyv_dump(const clish_hotkeyv_t *this)
|
|
|
+void clish_plugin_dump(const clish_plugin_t *this)
|
|
|
{
|
|
|
- unsigned int i;
|
|
|
+ lub_list_node_t *iter;
|
|
|
+ clish_sym_t *sym;
|
|
|
|
|
|
- lub_dump_printf("hotkeyv(%p)\n", this);
|
|
|
+ lub_dump_printf("plugin(%p)\n", this);
|
|
|
lub_dump_indent();
|
|
|
- for (i = 0; i < this->num; i++)
|
|
|
- clish_hotkey_dump(this->hotkeyv[i]);
|
|
|
+ /* Iterate child elements */
|
|
|
+ for(iter = lub_list__get_head(this->syms);
|
|
|
+ iter; iter = lub_list_node__get_next(iter)) {
|
|
|
+ sym = (clish_sym_t *)lub_list_node__get_data(iter);
|
|
|
+ clish_sym_dump(sym);
|
|
|
+ }
|
|
|
lub_dump_undent();
|
|
|
}
|
|
|
|