parser_local_proto.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #ifndef __PARSER_LOCAL_PROTO_H__
  2. #define __PARSER_LOCAL_PROTO_H__
  3. #include <stdio.h>
  4. #include <grass/gis.h>
  5. #define KEYLENGTH 64
  6. struct Item
  7. {
  8. struct Option *option;
  9. struct Flag *flag;
  10. struct Item *next_item;
  11. };
  12. struct state {
  13. int no_interactive;
  14. int n_opts;
  15. int n_flags;
  16. int n_keys;
  17. int n_keys_alloc;
  18. int overwrite;
  19. int quiet;
  20. int has_required;
  21. int suppress_required;
  22. int suppress_overwrite;
  23. struct GModule module_info; /* general information on the corresponding module */
  24. const char *pgm_name;
  25. const char *pgm_path;
  26. struct Flag first_flag; /* First flag in a linked list */
  27. struct Flag *current_flag; /* Pointer for traversing list */
  28. struct Option first_option;
  29. struct Option *current_option;
  30. struct Item first_item;
  31. struct Item *current_item;
  32. int n_items;
  33. char **error;
  34. int n_errors;
  35. struct Key_Value *renamed_options;
  36. };
  37. extern struct state *st;
  38. /* functions which are used by several parser functions in different files */
  39. void G__usage_xml(void);
  40. void G__usage_html(void);
  41. void G__usage_rest(void);
  42. void G__usage_text(void);
  43. void G__script(void);
  44. char *G__json(void);
  45. void G__wps_print_process_description(void);
  46. int G__uses_new_gisprompt(void);
  47. void G__print_keywords(FILE *, void (*)(FILE *, const char *));
  48. void G__split_gisprompt(const char *, char *, char *, char *);
  49. void G__check_option_rules(void);
  50. void G__describe_option_rules(void);
  51. int G__has_required_rule(void);
  52. void G__describe_option_rules_xml(FILE *);
  53. #endif