plugin_dump.c 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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_printf("permanent : %s\n",
  16. this->permanent ? "true" : "false");
  17. lub_dump_printf("plugin : %p\n", this->plugin);
  18. lub_dump_undent();
  19. }
  20. /*--------------------------------------------------------- */
  21. void clish_plugin_dump(const clish_plugin_t *this)
  22. {
  23. lub_list_node_t *iter;
  24. clish_sym_t *sym;
  25. lub_dump_printf("plugin(%p)\n", this);
  26. lub_dump_indent();
  27. lub_dump_printf("name : %s\n", this->name);
  28. lub_dump_printf("file : %s\n", this->file);
  29. lub_dump_printf("dlhan : %p\n", this->dlhan);
  30. lub_dump_indent();
  31. /* Iterate child elements */
  32. for(iter = lub_list__get_head(this->syms);
  33. iter; iter = lub_list_node__get_next(iter)) {
  34. sym = (clish_sym_t *)lub_list_node__get_data(iter);
  35. clish_sym_dump(sym);
  36. }
  37. lub_dump_undent();
  38. lub_dump_undent();
  39. }
  40. /*--------------------------------------------------------- */