shell_dump.c 866 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * shell_dump.c
  3. */
  4. #include "private.h"
  5. #include "lub/dump.h"
  6. /*--------------------------------------------------------- */
  7. void clish_shell_dump(clish_shell_t * this)
  8. {
  9. clish_view_t *v;
  10. clish_ptype_t *t;
  11. lub_bintree_iterator_t iter;
  12. lub_dump_printf("shell(%p)\n", this);
  13. lub_dump_printf("OVERVIEW:\n%s", this->overview);
  14. lub_dump_indent();
  15. v = lub_bintree_findfirst(&this->view_tree);
  16. /* iterate the tree of views */
  17. for (lub_bintree_iterator_init(&iter, &this->view_tree, v);
  18. v; v = lub_bintree_iterator_next(&iter)) {
  19. clish_view_dump(v);
  20. }
  21. /* iterate the tree of types */
  22. t = lub_bintree_findfirst(&this->ptype_tree);
  23. for (lub_bintree_iterator_init(&iter, &this->ptype_tree, t);
  24. t; t = lub_bintree_iterator_next(&iter)) {
  25. clish_ptype_dump(t);
  26. }
  27. lub_dump_undent();
  28. }
  29. /*--------------------------------------------------------- */