proto.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. /* -*- buffer-read-only: t -*- vi: set ro:
  2. *
  3. * Prototypes for autoopts
  4. * Generated Mon Aug 29 14:35:37 PDT 2016
  5. */
  6. #ifndef AUTOOPTS_PROTO_H_GUARD
  7. #define AUTOOPTS_PROTO_H_GUARD 1
  8. /*
  9. * Extracted from alias.c
  10. */
  11. static tSuccess
  12. too_many_occurrences(tOptions * opts, tOptDesc * od);
  13. /*
  14. * Extracted from autoopts.c
  15. */
  16. static void *
  17. ao_malloc(size_t sz);
  18. static void *
  19. ao_realloc(void *p, size_t sz);
  20. static char *
  21. ao_strdup(char const *str);
  22. static tSuccess
  23. handle_opt(tOptions * opts, tOptState * o_st);
  24. static tSuccess
  25. next_opt(tOptions * opts, tOptState * o_st);
  26. static tSuccess
  27. regular_opts(tOptions * opts);
  28. /*
  29. * Extracted from check.c
  30. */
  31. static bool
  32. is_consistent(tOptions * pOpts);
  33. /*
  34. * Extracted from configfile.c
  35. */
  36. static void
  37. intern_file_load(tOptions * opts);
  38. static char const *
  39. parse_attrs(tOptions * opts, char const * txt, tOptionLoadMode * pMode,
  40. tOptionValue * pType);
  41. /*
  42. * Extracted from env.c
  43. */
  44. static void
  45. doPrognameEnv(tOptions * pOpts, teEnvPresetType type);
  46. static void
  47. env_presets(tOptions * pOpts, teEnvPresetType type);
  48. /*
  49. * Extracted from find.c
  50. */
  51. static tSuccess
  52. opt_find_long(tOptions * opts, char const * opt_name, tOptState * state);
  53. static tSuccess
  54. opt_find_short(tOptions * pOpts, uint_t optValue, tOptState * pOptState);
  55. static tSuccess
  56. get_opt_arg(tOptions * opts, tOptState * o_st);
  57. static tSuccess
  58. find_opt(tOptions * opts, tOptState * o_st);
  59. /*
  60. * Extracted from init.c
  61. */
  62. static tSuccess
  63. validate_struct(tOptions * opts, char const * pname);
  64. static tSuccess
  65. immediate_opts(tOptions * opts);
  66. static bool
  67. ao_initialize(tOptions * opts, int a_ct, char ** a_v);
  68. /*
  69. * Extracted from load.c
  70. */
  71. static void
  72. munge_str(char * txt, tOptionLoadMode mode);
  73. static void
  74. load_opt_line(tOptions * opts, tOptState * opt_state, char * line,
  75. tDirection direction, tOptionLoadMode load_mode );
  76. /*
  77. * Extracted from makeshell.c
  78. */
  79. static noreturn void
  80. option_exits(int exit_code);
  81. static noreturn void
  82. ao_bug(char const * msg);
  83. static void
  84. fserr_warn(char const * prog, char const * op, char const * fname);
  85. static noreturn void
  86. fserr_exit(char const * prog, char const * op, char const * fname);
  87. /*
  88. * Extracted from nested.c
  89. */
  90. static void
  91. unload_arg_list(tArgList * arg_list);
  92. static tOptionValue *
  93. optionLoadNested(char const * text, char const * name, size_t nm_len);
  94. static int
  95. get_special_char(char const ** ppz, int * ct);
  96. static void
  97. emit_special_char(FILE * fp, int ch);
  98. /*
  99. * Extracted from sort.c
  100. */
  101. static void
  102. optionSort(tOptions * opts);
  103. /*
  104. * Extracted from stack.c
  105. */
  106. static void
  107. addArgListEntry(void ** ppAL, void * entry);
  108. /*
  109. * Extracted from usage.c
  110. */
  111. static void
  112. set_usage_flags(tOptions * opts, char const * flg_txt);
  113. #endif /* AUTOOPTS_PROTO_H_GUARD */