coan 4.2.4
|
![]() |
Modules | |
Macro-generated code. | |
Files | |
file | args.c |
Enumerations | |
enum | discard_policy_t { DISCARD_DROP, DISCARD_BLANK, DISCARD_COMMENT } |
enum | command_codes { CMD_HELP = 1, CMD_VERSION, CMD_SOURCE, CMD_SYMBOLS, CMD_INCLUDES, CMD_DEFS, CMD_PRAGMAS, CMD_ERRORS, CMD_DIRECTIVES } |
enum | command_flags { CMD_HELP_MASK = 1 << (CMD_HELP - 1), CMD_VERSION_MASK = 1 << (CMD_VERSION - 1), CMD_SOURCE_MASK = 1 << (CMD_SOURCE - 1), CMD_SYMBOLS_MASK = 1 << (CMD_SYMBOLS - 1), CMD_INCLUDES_MASK = 1 << (CMD_INCLUDES - 1), CMD_DEFS_MASK = 1 << (CMD_DEFS - 1), CMD_PRAGMAS_MASK = 1 << (CMD_PRAGMAS - 1), CMD_ERRORS_MASK = 1 << (CMD_ERRORS - 1), CMD_DIRECTIVES_MASK } |
Functions | |
void | parse_executable (char **argv) |
void | parse_args (int argc, char *argv[]) |
void | finish_args (void) |
The interface provides acccess to the commandline arguments and operations to parse and analyse them.
enum command_codes |
Sequential symbolic constants for coan commands
enum command_flags |
Bitwise symbolic constants for coan commands
enum discard_policy_t |
void finish_args | ( | void | ) |
Analyse the component's state after parsing the commandline, diasgnose any errors and draw final conclusions.
Definition at line 1028 of file args.c.
References add_files(), bail(), CMD_INCLUDES, CMD_SOURCE, CMD_SYMBOLS, file_tree_count(), file_tree_is_empty(), FT_COUNT_FILES, GET_PUBLIC, GET_STATE, GRIPE_NOTHING_TO_DO, GRIPE_ONE_FILE_ONLY, GRIPE_USAGE_ERROR, PROGRESS_FILE_TALLY, read_filename(), report(), SET_PUBLIC, and usage_error().
Referenced by main().
void parse_args | ( | int | argc, |
char * | argv[] | ||
) |
Parse the commandline.
argc | The number of commandline arguments. |
argv | Array of commandline arguments. |
Populate the component's state by parsing the commandline arguments.
Definition at line 996 of file args.c.
References cmd_option::cmd_code, CMD_DEFS, CMD_DIRECTIVES, CMD_ERRORS, CMD_HELP, CMD_INCLUDES, CMD_PRAGMAS, CMD_SYMBOLS, CMD_VERSION, get_command_option(), GRIPE_USAGE_ERROR, line_despatch_no_op(), parse_command_args(), SET_PUBLIC, usage_error(), usage_help(), and version().
Referenced by main().
void parse_executable | ( | char ** | argv | ) |
Parse the full and short names of the executable.
argv | The array of commandline arguments. |
Element 0 of argv is parsed to find the complete pathname and filename of our executable and the addresses of these strings are stored respectively at exec_path
and prog_name
in the component's state.
Definition at line 983 of file args.c.
References PATH_DELIM, and SET_PUBLIC.
Referenced by main().