1
0

shell_dump.c 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. clish_var_t *var;
  12. lub_bintree_iterator_t iter;
  13. lub_dump_printf("shell(%p)\n", this);
  14. lub_dump_printf("OVERVIEW:\n%s", LUB_DUMP_STR(this->overview));
  15. lub_dump_indent();
  16. v = lub_bintree_findfirst(&this->view_tree);
  17. /* iterate the tree of views */
  18. for (lub_bintree_iterator_init(&iter, &this->view_tree, v);
  19. v; v = lub_bintree_iterator_next(&iter)) {
  20. clish_view_dump(v);
  21. }
  22. /* iterate the tree of types */
  23. t = lub_bintree_findfirst(&this->ptype_tree);
  24. for (lub_bintree_iterator_init(&iter, &this->ptype_tree, t);
  25. t; t = lub_bintree_iterator_next(&iter)) {
  26. clish_ptype_dump(t);
  27. }
  28. /* iterate the tree of vars */
  29. var = lub_bintree_findfirst(&this->var_tree);
  30. for (lub_bintree_iterator_init(&iter, &this->var_tree, var);
  31. var; var = lub_bintree_iterator_next(&iter)) {
  32. clish_var_dump(var);
  33. }
  34. lub_dump_undent();
  35. }
  36. /*--------------------------------------------------------- */