command_dump.c 1.1 KB

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