command_dump.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifdef DEBUG
  2. /*
  3. * command_dump.c
  4. */
  5. #include "lub/dump.h"
  6. #include "private.h"
  7. /*--------------------------------------------------------- */
  8. void clish_command_dump(const clish_command_t * this)
  9. {
  10. unsigned i;
  11. lub_dump_printf("command(%p)\n", this);
  12. lub_dump_indent();
  13. lub_dump_printf("name : %s\n", this->name);
  14. lub_dump_printf("text : %s\n", this->text);
  15. lub_dump_printf("link : %s\n",
  16. this->link ?
  17. clish_command__get_name(this->link) : LUB_DUMP_NULL);
  18. lub_dump_printf("alias : %s\n", LUB_DUMP_STR(this->alias));
  19. lub_dump_printf("alias_view : %s\n", LUB_DUMP_STR(this->alias_view));
  20. lub_dump_printf("paramc : %d\n",
  21. clish_paramv__get_count(this->paramv));
  22. lub_dump_printf("detail : %s\n", LUB_DUMP_STR(this->detail));
  23. lub_dump_printf("access : %s\n", LUB_DUMP_STR(this->access));
  24. clish_action_dump(this->action);
  25. clish_config_dump(this->config);
  26. /* Get each parameter to dump their details */
  27. for (i = 0; i < clish_paramv__get_count(this->paramv); i++) {
  28. clish_param_dump(clish_command__get_param(this, i));
  29. }
  30. lub_dump_undent();
  31. }
  32. /*--------------------------------------------------------- */
  33. #endif /* DEBUG */