1
0

plugin_dump.c 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * plugin_dump.c
  3. */
  4. #include "private.h"
  5. #include "lub/dump.h"
  6. #include "lub/list.h"
  7. #include "clish/plugin.h"
  8. /*--------------------------------------------------------- */
  9. void clish_sym_dump(const clish_sym_t *this)
  10. {
  11. lub_dump_printf("sym(%p)\n", this);
  12. lub_dump_indent();
  13. lub_dump_printf("name : %s\n", this->name);
  14. lub_dump_printf("func : %p\n", this->func);
  15. lub_dump_undent();
  16. }
  17. /*--------------------------------------------------------- */
  18. void clish_plugin_dump(const clish_plugin_t *this)
  19. {
  20. lub_list_node_t *iter;
  21. clish_sym_t *sym;
  22. lub_dump_printf("plugin(%p)\n", this);
  23. lub_dump_printf("name : %s\n", this->name);
  24. lub_dump_printf("file : %s\n", this->file);
  25. lub_dump_printf("dlhan : %p\n", this->dlhan);
  26. lub_dump_indent();
  27. /* Iterate child elements */
  28. for(iter = lub_list__get_head(this->syms);
  29. iter; iter = lub_list_node__get_next(iter)) {
  30. sym = (clish_sym_t *)lub_list_node__get_data(iter);
  31. clish_sym_dump(sym);
  32. }
  33. lub_dump_undent();
  34. }
  35. /*--------------------------------------------------------- */