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