parser_local_proto.h 1.3 KB

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