parg.c 564 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * parg.c
  3. */
  4. #include "private.h"
  5. #include "lub/string.h"
  6. #include "lub/argv.h"
  7. #include "lub/system.h"
  8. #include <stdlib.h>
  9. #include <string.h>
  10. #include <stdio.h>
  11. #include <assert.h>
  12. CLISH_GET_STR(parg, value);
  13. /*--------------------------------------------------------- */
  14. _CLISH_GET_STR(parg, name)
  15. {
  16. if (!inst)
  17. return NULL;
  18. return clish_param__get_name(inst->param);
  19. }
  20. /*--------------------------------------------------------- */
  21. _CLISH_GET(parg, clish_ptype_t *, ptype)
  22. {
  23. if (!inst)
  24. return NULL;
  25. return clish_param__get_ptype(inst->param);
  26. }