plugin_dump.c 908 B

12345678910111213141516171819202122232425262728293031323334353637
  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("plugin(%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_indent();
  24. /* Iterate child elements */
  25. for(iter = lub_list__get_head(this->syms);
  26. iter; iter = lub_list_node__get_next(iter)) {
  27. sym = (clish_sym_t *)lub_list_node__get_data(iter);
  28. clish_sym_dump(sym);
  29. }
  30. lub_dump_undent();
  31. }
  32. /*--------------------------------------------------------- */