pargv_dump.c 903 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifdef DEBUG
  2. /*
  3. * pargv_dump.c
  4. */
  5. #include "private.h"
  6. #include "lub/dump.h"
  7. /*--------------------------------------------------------- */
  8. void clish_parg_dump(const clish_parg_t * this)
  9. {
  10. lub_dump_printf("parg(%p)\n", this);
  11. lub_dump_indent();
  12. lub_dump_printf("name : %s\n", clish_parg__get_name(this));
  13. lub_dump_printf("ptype: %s\n",
  14. clish_ptype__get_name(clish_parg__get_ptype(this)));
  15. lub_dump_printf("value: %s\n", clish_parg__get_value(this));
  16. lub_dump_undent();
  17. }
  18. /*--------------------------------------------------------- */
  19. void clish_pargv_dump(const clish_pargv_t * this)
  20. {
  21. unsigned i;
  22. lub_dump_printf("pargv(%p)\n", this);
  23. lub_dump_indent();
  24. for (i = 0; i < this->pargc; i++) {
  25. /* get the appropriate parameter definition */
  26. clish_parg_dump(this->pargv[i]);
  27. }
  28. lub_dump_undent();
  29. }
  30. /*--------------------------------------------------------- */
  31. #endif /* DEBUG */