1
0

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", LUB_DUMP_STR(this->name));
  13. lub_dump_printf("text : %s\n", LUB_DUMP_STR(this->text));
  14. lub_dump_printf("link : %s\n", this->link ?
  15. clish_command__get_name(this->link) : LUB_DUMP_NULL );
  16. lub_dump_printf("alias : %s\n", LUB_DUMP_STR(this->alias));
  17. lub_dump_printf("alias_view : %s\n", this->alias_view ?
  18. clish_view__get_name(this->alias_view) : LUB_DUMP_NULL);
  19. lub_dump_printf("paramc : %d\n",
  20. clish_paramv__get_count(this->paramv));
  21. lub_dump_printf("detail : %s\n", LUB_DUMP_STR(this->detail));
  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. /*--------------------------------------------------------- */