Human68k CUI emulator with sound.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cmdline.h 541B

12345678910111213141516171819202122232425262728
  1. #ifndef CMDLINE_H_
  2. #define CMDLINE_H_
  3. struct cmdline_option {
  4. int opt_char;
  5. char *opt_long;
  6. char *opt_help;
  7. char *arg_name;
  8. enum {
  9. TYPE_END = 0,
  10. TYPE_SWITCH,
  11. TYPE_REQUIRED,
  12. TYPE_OPTIONAL
  13. } option_type;
  14. enum {
  15. TYPE_NONE,
  16. TYPE_INT,
  17. TYPE_FLOAT,
  18. TYPE_STRING
  19. } option_argument_type;
  20. void *target;
  21. };
  22. #define CMDLINE_ARG_TERMINATOR { 0, 0, 0, 0, TYPE_END, 0, 0 }
  23. int cmdline_parse_args(int argc, char **argv, struct cmdline_option opts[], int num_required_args, int max_args, char *args_text);
  24. #endif /* CMDLINE_H_ */