1
0

command_dump.c 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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",
  20. this->alias_view ?
  21. clish_view__get_name(this->alias_view) : LUB_DUMP_NULL);
  22. lub_dump_printf("paramc : %d\n",
  23. clish_paramv__get_count(this->paramv));
  24. lub_dump_printf("detail : %s\n", LUB_DUMP_STR(this->detail));
  25. lub_dump_printf("access : %s\n", LUB_DUMP_STR(this->access));
  26. clish_action_dump(this->action);
  27. clish_config_dump(this->config);
  28. /* Get each parameter to dump their details */
  29. for (i = 0; i < clish_paramv__get_count(this->paramv); i++) {
  30. clish_param_dump(clish_command__get_param(this, i));
  31. }
  32. lub_dump_undent();
  33. }
  34. /*--------------------------------------------------------- */
  35. #endif /* DEBUG */