coan 4.2.4
|
![]() |
Modules | |
Macro-generated code | |
Files | |
file | report.c |
file | report.h |
Enumerations | |
enum | reason_code_t { MSGCLASS_SHIFT = 11, ISSUE_MASK = (1 << MSGCLASS_SHIFT) - 1, MSGCLASS_NONE = 0 << MSGCLASS_SHIFT, MSGCLASS_PROGRESS = 1 << MSGCLASS_SHIFT, MSGCLASS_INFO = 2 << MSGCLASS_SHIFT, MSGCLASS_WARNING = 4 << MSGCLASS_SHIFT, MSGCLASS_ERROR = 8 << MSGCLASS_SHIFT, MSGCLASS_ABEND = 16 << MSGCLASS_SHIFT, MSGCLASS_SUMMARY = 32 << MSGCLASS_SHIFT, MSGCLASS_MASK = 255 << MSGCLASS_SHIFT, MSGSEVERITY_MASK = MSGCLASS_MASK & ~MSGCLASS_SUMMARY, MSGEVENT_MASK = MSGSEVERITY_MASK & ~MSGCLASS_PROGRESS, EVENT_SUMMARY_MIN = 1, EVENT_SUMMARY_DROPPED_LINES = 1 | MSGCLASS_INFO | MSGCLASS_SUMMARY, EVENT_SUMMARY_CHANGED_LINES = 2 | MSGCLASS_INFO | MSGCLASS_SUMMARY, EVENT_SUMMARY_ERRORED_LINES = 4 | MSGCLASS_WARNING | MSGCLASS_SUMMARY, EVENT_SUMMARY_ERROR_OUTPUT = 8 | MSGCLASS_WARNING | MSGCLASS_SUMMARY, EVENT_SUMMARY_MAX = 16, EVENT_SUMMARY_MASK = EVENT_SUMMARY_MAX - 1, PROGRESS_SHIFT = 4, PROGRESS_PROCESSING_FILE = (45 << PROGRESS_SHIFT) | MSGCLASS_PROGRESS, PROGRESS_ENTERING_DIR = (46 << PROGRESS_SHIFT) | MSGCLASS_PROGRESS, PROGRESS_LEAVING_DIR = (47 << PROGRESS_SHIFT) | MSGCLASS_PROGRESS, PROGRESS_BUILDING_TREE = (49 << PROGRESS_SHIFT) | MSGCLASS_PROGRESS, PROGRESS_SEARCHING_DIR = (50 << PROGRESS_SHIFT) | MSGCLASS_PROGRESS, PROGRESS_ADDED_FILE = (51 << PROGRESS_SHIFT) | MSGCLASS_PROGRESS, PROGRESS_ADDED_DIR = (52 << PROGRESS_SHIFT) | MSGCLASS_PROGRESS, PROGRESS_FILE_TALLY = (53 << PROGRESS_SHIFT) | MSGCLASS_PROGRESS, PROGRESS_GOT_OPTIONS = (54 << PROGRESS_SHIFT) | MSGCLASS_PROGRESS, PROGRESS_SUMMARY_SHIFT = 4, PROGRESS_SUMMARY_FILES_REACHED, PROGRESS_SUMMARY_FILES_DROPPED, PROGRESS_SUMMARY_ALL_DONE, GRIPE_SHIFT = 4, GRIPE_DUPLICATE_MASK = (27 << GRIPE_SHIFT) | MSGCLASS_INFO, GRIPE_SYMLINK = (48 << GRIPE_SHIFT) | MSGCLASS_INFO, GRIPE_STRAIGHTENED_LINE = (12 << GRIPE_SHIFT) | MSGCLASS_INFO, GRIPE_REDUNDANT_OPTION = (49 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_DUPLICATE_ARGS = (1 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_DELETED_CONTRADICTION = (2 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_COMMENTED_CONTRADICTION = (3 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_ERRORED_CONTRADICTION = (4 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_DIFFERING_REDEF = (76 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_UNDEFING_DEFINED = (77 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_UNCONDITIONAL_ERROR_INPUT = (5 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_UNCONDITIONAL_ERROR_OUTPUT = (6 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_GARBAGE_AFTER_DIRECTIVE = (7 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_MISSING_EOF_NEWLINE = (18 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_CIRCULAR_SYM_DEF = (28 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_VERBOSE_ONLY = (29 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_ZERO_DIVIDE = (38 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_DIR_IGNORED = (41 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_EMPTY_SYMBOL = (58 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_UNKNOWN_DIRECTIVE = (60 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_INVALID_INCLUDE = (61 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_STRAY_ESCAPE = (62 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_FUNCTION_LIKE_MACRO_EXPANSION = (63 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_INT_OVERFLOW = (64 << GRIPE_SHIFT | MSGCLASS_WARNING), GRIPE_UNCLOSED_QUOTE = (65 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_NEGATIVE_SHIFT = (66 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_FORCED_UNSIGNED = (67 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_SIGN_CHANGED = (68 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_SHIFT_OVERFLOW = (69 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_CHAR_CONSTANT_TOO_LONG = (70 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_MULITBYTE_CHAR_CONSTANT = (71 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_TRANSIENT_SYMBOL_ADDED = (73 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_INSOURCE_FUNCTION_LIKE_MACRO_DEFINITION = (74 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_NO_SYMS = (75 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_BROKEN_SYMLINK = (79 << GRIPE_SHIFT) | MSGCLASS_WARNING, GRIPE_ORPHAN_ELIF = (8 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_ORPHAN_ELSE = (9 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_ORPHAN_ENDIF = (10 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_EOF_TOO_SOON = (11 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_EOF_IN_COMMENT = (13 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_EOF_IN_QUOTE = (14 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_NOTHING_TO_DO = (15 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_ONE_FILE_ONLY = (16 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_NEWLINE_IN_QUOTE = (17 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_INVALID_ARGS = (19 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_USAGE_ERROR = (20 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_TOO_DEEP = (21 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_MULTIPLE_ARGFILES = (31 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_GARBAGE_ARG = (32 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_NOT_IDENTIFIER = (33 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_UNBALANCED_PAREN = (59 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_GLOBAL_FUNCTION_LIKE_MACRO_DEFINITION = (72 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_IF_WITHOUT_COND = (78 << GRIPE_SHIFT) | MSGCLASS_ERROR, GRIPE_CANT_OPEN_INPUT = (22 << GRIPE_SHIFT) | MSGCLASS_ABEND, GRIPE_OUT_OF_MEMORY = (23 << GRIPE_SHIFT) | MSGCLASS_ABEND, GRIPE_FILENAME_TOO_LONG = (24 << GRIPE_SHIFT) | MSGCLASS_ABEND, GRIPE_EOF_IN_FILENAME = (25 << GRIPE_SHIFT) | MSGCLASS_ABEND, GRIPE_CONFUSED = (26 << GRIPE_SHIFT) | MSGCLASS_ABEND, GRIPE_CANT_READ_INPUT = (30 << GRIPE_SHIFT) | MSGCLASS_ABEND, GRIPE_CANT_WRITE_FILE = (39 << GRIPE_SHIFT) | MSGCLASS_ABEND, GRIPE_NO_FILE = (40 << GRIPE_SHIFT) | MSGCLASS_ABEND, GRIPE_ILLEGAL_FILENAME = (34 << GRIPE_SHIFT) | MSGCLASS_ABEND, GRIPE_CANT_DELETE_FILE = (35 << GRIPE_SHIFT) | MSGCLASS_ABEND, GRIPE_CANT_RENAME_FILE = (36 << GRIPE_SHIFT) | MSGCLASS_ABEND, GRIPE_NO_TEMPFILE = (37 << GRIPE_SHIFT) | MSGCLASS_ABEND, GRIPE_CANT_OPEN_DIR = (42 << GRIPE_SHIFT) | MSGCLASS_ABEND, GRIPE_CANT_READ_DIR = (43 << GRIPE_SHIFT) | MSGCLASS_ABEND } |
enum | dbg_code_t { DBG_1 = 1, DBG_2, DBG_3, DBG_4, DBG_5, DBG_6, DBG_8, DBG_7, DBG_9, DBG_10, DBG_11, DBG_12, DBG_13, DBG_14, DBG_15, DBG_16, DBG_17, DBG_18, DBG_19, DBG_20, DBG_21, DBG_22 } |
Functions | |
void | set_exit_flags (int bits, bool set) |
int | get_exit_flags (int bits) |
int | exitcode (void) |
size_t | line_len (char const *str) |
void | flatten_line (char *line) |
void | report (reason_code_t reason, heap_str *buf, const char *format,...) |
void | parse_error (int reason, const char *format,...) |
void | give_up_confused (void) |
void | vbail (int reason, const char *msg, va_list argp) |
void | bail (int retcode, const char *format,...) |
void | debugging (bool on) |
void | debug (dbg_code_t how,...) |
void | exit_diagnostics (void) |
void | orphan_elif (void) |
void | orphan_else (void) |
void | orphan_endif (void) |
void | early_eof (void) |
void | processing_file (char const *filename) |
void | entering_dir (char const *dirname) |
void | leaving_dir (char const *dirname) |
size_t | format_output (void *dest, int *buflen, int *startoff, char const *format,...) |
heap_str | concatenate (size_t count, char *strs[], int punctch) |
void | report_symbol (symbol_h sym) |
void | report_include (hash_include_const_h inc_arg) |
void | report_directive (canonical_string_const_h cl, directive_type_t directive_type) |
char * | format_int (int_spec_t const *int_spec) |
interface
enum dbg_code_t |
enum reason_code_t |
Enumeration of all diagnostic reason codes and auxiliary bit masks and offsets. A complete reason code consists or an or-combination of a message class code and an issue code. A range of issue codes are event summary codes, representing significant diagnostics accrued in the course of processing all inputs. Another range of issue codes are gripes, representing complaints specific to input fragments.
void bail | ( | int | retcode, |
const char * | format, | ||
... | |||
) |
Exit the program out with a specified return code and diagnostic message.
retcode | The code to be returned by exit() . |
format | A printf format from which to compose the diagnostic together with subsequent arguments. |
Definition at line 412 of file report.c.
References vbail().
Referenced by backup_infile(), configured_symbol_seek_const(), delete_infile(), eval_if(), eval_line(), eval_unary(), finish_args(), fs_file_or_dir(), fs_read_dir(), give_up_confused(), make_backup_name(), make_tempfile(), nest(), no_alloc_fail(), open_file(), parse_args_file(), read_filename(), readon(), replace_infile(), and report_symbol_configuration().
heap_str concatenate | ( | size_t | count, |
char * | strs[], | ||
int | punctch | ||
) |
Concatenate strings.
count | The number of strings to concatenate, |
strs | The array of strings to concatenate. |
punctch | Optional character with which to punctuate the concatenated strings, -1 == none. |
Definition at line 626 of file report.c.
References callocate(), ptr_vector::count, and zallocate().
Referenced by parse_command_args().
void debug | ( | dbg_code_t | how, |
... | |||
) |
Write debugging info on stderr
.
how | A code that selects how the function will compose debugging output from the subsequent arguments. |
Definition at line 427 of file report.c.
References get_comment_type_name(), get_linestate_name(), get_linetype_name(), GET_STATE, if_depth(), if_state_name(), linetype_name, MSGCLASS_NONE, report(), and vreport().
Referenced by configured_symbol_match_const(), eval_hash_define(), eval_hash_undef(), eval_if(), eval_line(), eval_table(), eval_unary(), and node_proc().
void debugging | ( | bool | on | ) |
Turn debugging output on or off
on | If true, debugging output is enabled; otherwise disabled. |
Definition at line 421 of file report.c.
References report(), and SET_STATE.
Referenced by parse_command_args().
void early_eof | ( | void | ) |
Diagnose unexpected end of input on stderr
Definition at line 602 of file report.c.
References GRIPE_EOF_TOO_SOON, and parse_error().
Referenced by read_more().
void entering_dir | ( | char const * | dirname | ) |
Report entering a directory file stderr
Definition at line 614 of file report.c.
References PROGRESS_ENTERING_DIR, and report().
Referenced by node_proc().
void exit_diagnostics | ( | void | ) |
Write summary diagnostics on stderr
at exit. The summary diagnostics will be output unless --gag
summary
is in force, which it is by default.
Definition at line 525 of file report.c.
References EVENT_SUMMARY_CHANGED_LINES, EVENT_SUMMARY_DROPPED_LINES, EVENT_SUMMARY_ERROR_OUTPUT, EVENT_SUMMARY_ERRORED_LINES, exitcode(), file_tree_count(), FT_COUNT_FILES, GET_PUBLIC, GET_STATE, if_control_toplevel(), io_toplevel(), ISSUE_MASK, MSGCLASS_ABEND, MSGCLASS_ERROR, MSGCLASS_INFO, MSGCLASS_WARNING, PROGRESS_SUMMARY_FILES_DROPPED, PROGRESS_SUMMARY_FILES_REACHED, and report().
Referenced by main().
int exitcode | ( | void | ) |
Convert the internal exit status to an exit code for exit()
, manipulating the bits so that the exit diagnostic bits are returned in the low order byte.
hash-errors
on output.Definition at line 323 of file report.c.
References EVENT_SUMMARY_CHANGED_LINES, EVENT_SUMMARY_DROPPED_LINES, EVENT_SUMMARY_MASK, GET_PUBLIC, GET_STATE, GRIPE_SHIFT, MSGCLASS_SHIFT, MSGCLASS_SUMMARY, report(), and SET_STATE.
Referenced by close_io(), exit_diagnostics(), process(), and vbail().
void flatten_line | ( | char * | line | ) |
Convert embedded linefeeds and tabs in string line to spaces for tidy printing in diagnostics.
line | String putatively containing embedded linefeeds or tabs. |
Definition at line 290 of file report.c.
References line_len().
Referenced by save_contradiction().
char* format_int | ( | int_spec_t const * | int_spec | ) |
Format an integer value as a numeral appropriately to its type.
Definition at line 710 of file report.c.
References clone(), INT_CHAR, INT_INT, INT_LLONG, INT_LONG, INT_SHORT, INT_UCHAR, INT_UINT, INT_ULLONG, INT_ULONG, INT_USHORT, int_spec::type, and int_spec::val.
Referenced by do_usual_conversions().
size_t format_output | ( | void * | dest, |
int * | buflen, | ||
int * | startoff, | ||
char const * | format, | ||
... | |||
) |
Compose an output message.
dest | Depending on buflen , either a pointer to a FILE to which the formatted output shall be written, or else a pointer to the address of a heap buffer in which to format the output. |
buflen | If *buflen < 0 then dest is a FILE* . Otherwise *buflen is current length of the buffer at *dest . |
startoff | If *buflen >= 0, *startoff is the offset into the buffer at which to format the message; otherwise ignored. |
format | The printf() format with which to compose the message using subsequent arguments. |
If *buflen
< 0 then the function writes output to the FILE
at dest
composed from format
and subsequent arguments.
Otherwise function attempts to compose output within the spare *buflen
- *startoff
bytes of the buffer. As long as the output will not fit the function reallocates the buffer to twice its current size and tries again. The final address of the buffer will be stored at dest
. The final length of the buffer will be stored at buflen
, and the address of the terminal nul of the formatted message with be stored at startoff
.
It is the caller's responsibility to free storage allocated at *dest
.
Definition at line 360 of file report.c.
References vformat_output().
Referenced by compose_contradiction_insert_format(), save_contradiction(), and vreport().
int get_exit_flags | ( | int | bits | ) |
Query the current event summary and severity flags.
bits | The bits to be queried. |
Definition at line 342 of file report.c.
References EVENT_SUMMARY_MASK, GET_STATE, MSGSEVERITY_MASK, and report().
Referenced by save_contradiction().
void give_up_confused | ( | void | ) |
Exit the program on an internal logic error with an aplogetic message. The function is called if the program recognises that it it has lost its bearings.
Definition at line 390 of file report.c.
References bail(), and GRIPE_CONFUSED.
Referenced by main().
void leaving_dir | ( | char const * | dirname | ) |
Report leaving a directory file stderr
Definition at line 620 of file report.c.
References PROGRESS_LEAVING_DIR, and report().
Referenced by node_proc().
size_t line_len | ( | char const * | str | ) |
Get the length of a string excluding any final newline.
str | The string to be measured. |
str
excluding any final newline. Definition at line 305 of file report.c.
References eol().
Referenced by ensure_buf(), eval_hash_define(), eval_hash_undef(), eval_line(), eval_unary(), flatten_line(), get_line(), PUBLIC_STATE_DEF(), readon(), save_contradiction(), and truncate_line().
void orphan_elif | ( | void | ) |
Diagnose an input orphan hash-elif on stderr
Definition at line 584 of file report.c.
References parse_error().
void orphan_else | ( | void | ) |
Diagnose an input orphan hash-else on stderr
Definition at line 590 of file report.c.
References GRIPE_ORPHAN_ELSE, and parse_error().
void orphan_endif | ( | void | ) |
Diagnose an input orphan hash-endif on stderr
Definition at line 596 of file report.c.
References GRIPE_ORPHAN_ENDIF, and parse_error().
void parse_error | ( | int | reason, |
const char * | format, | ||
... | |||
) |
Exit the program on a fatal parsing error with a diagnostic message.
reason | The reason code for the error. |
format | A printf format from which to compose the diagnostic together with subsequent arguments. |
Definition at line 381 of file report.c.
References vbail().
Referenced by chew_on(), done_file(), early_eof(), orphan_elif(), orphan_else(), and orphan_endif().
void processing_file | ( | char const * | filename | ) |
Report processing an input file stderr
Definition at line 608 of file report.c.
References PROGRESS_PROCESSING_FILE, and report().
Referenced by node_proc().
void report | ( | reason_code_t | reason, |
heap_str * | buf, | ||
const char * | format, | ||
... | |||
) |
Produce a diagnostic message.
reason | The reason code of the diagnostic |
buf | Either NULL or the address of a pointer at which storage shall be allocated to store the diagnostic. |
format | Either NULL or a printf format from which the diagnostic may be composed together with the ensuing unspecified arguments. |
The diagnostic is prefixed with the program name, and then the current input filename and line number, if any, that provoke the diagnostic.
Then follows one of:
progress reason
info reason
warning reason
error reason
abend reason
depending on the message class of reason.
Then follows the body of diagnostic composed from format and subsequent args.
Finally, if the diagnostic refers to an output line that is within the scope of a true hash-if condition from input line N
at nesting depth D
, a parenthesis is written of the form:
(if-line N, depth D)
The way in which production of the diagnostic is determined as follows:
If format is NULL then buf is assumed to be the address of a pointer to storage in which a previous call to the function has composed a diagnostic that is now to be output. In this case the diagnostic at that pointer is written to stderr, the pointer at buf is freed and set == NULL.
Otherwise, if buf == NULL
then a diagnostic composed from format and subsequent arguments is written to stderr.
Otherwise, if the pointer addressed by buf is not NULL, it is freed. Then a diagnostic composed from format and subsequent arguments is composed in heap storage and the address of this storage is stored at buf. If is the responsibility of the caller to ensure that this storage is freed.
Definition at line 372 of file report.c.
References vreport().
Referenced by add_files(), build_proc(), check_shift_validity(), chew_on(), chew_string(), chew_unbroken_string(), config_diagnostics(), debug(), debugging(), do_usual_conversions(), entering_dir(), eval_character_constant(), eval_hash_include(), eval_line(), eval_numeral(), eval_possible_symbol(), exit_diagnostics(), exitcode(), file_tree_add_symlink(), finish_args(), get_exit_flags(), get_line(), insert_pending_contradiction(), leaving_dir(), op_divide(), op_mod(), parse_command_args(), processing_file(), ready(), report_directive(), report_symbol_configuration(), save_contradiction(), set_exit_flags(), symbol_resolve(), vbail(), and vreport().
void report_directive | ( | canonical_string_const_h | cl, |
directive_type_t | directive_type | ||
) |
Record an occurrence of a directive in accordance with the options of the ifs
defs
, errors
or pragmas
command.
cl | The argument object of the directive in canonical_string_h form. |
directive_type | The type of the directive in whih the argument was found. |
The directive is listed in clean form on the standard outout. If --locate
is in force then the input filename and line number of the listed occurrence are appended.
Definition at line 693 of file report.c.
References canonical_string_text(), get_directive_keyword(), GET_PUBLIC, GET_STATE, HASH_COUNT, HASH_IF, HASH_UNKNOWN, and report().
Referenced by directive_tally().
void report_include | ( | hash_include_const_h | inc_arg | ) |
Record an occurrence of a hash-include directive. in accordance with the options of the includes
command.
inc_arg | The hash-include argument object of which an occurrence is to be reported. |
If this occurrence of the hash-include argument is eligible to be output it will be written on If --active
is in force then hash-includes will be reported only from active hash-includes.
If --inactive
is in force then hash-includes will be reported only from inactive hash-includes.
If --once
is in force then a hash-include will be reported only once for each distinct value of its argument. The argument can have different evaluations at different occurrences if it is a preprocessor symbol, which may for instance be defined at once ocurrence and not defined or differently defined at another occurrence.
If --locate
is in force then the input filename and line number is given with each reported occurrence.
Definition at line 678 of file report.c.
References canonical_string_text(), GET_PUBLIC, hash_include_definition, and hash_include_str.
Referenced by hash_include_tally().
void report_symbol | ( | symbol_h | sym | ) |
Report an occurrence of a preprocessor symbol in accordance with the options of the symbols
command.
sym | The symbol to be reported. |
If this occurrence of the symbol is eligible for reporting it will be listed on the standard output.
If --active
is in force then symbols will be reported only from active directives.
If --inactive
is in force then symbols will be reported only from inactive directives.
If --once
is in force then a symbol will be reported only once.
If --locate
is in force then the input filename and line number is given with each reported occurrence.
If --ifs
is in force then symbols will be listed from hash-if[[n][def]] and hash-elif directives.
If --defs
is in force then symbols will be listed from hash-define directives.
If --udefs
is in force then symbols will be listed from hash-undef directives.
Definition at line 655 of file report.c.
References canonical_string_text(), GET_PUBLIC, SET_REPORTED, symbol_name(), symbol_reported(), and symbol_resolve().
Referenced by eval_line(), eval_possible_symbol(), eval_unary(), symbol_evaluate_status(), and unconfigured_symbol_tally().
void set_exit_flags | ( | int | bits, |
bool | set | ||
) |
Set or clear event summary or severity flags in the exit status.
bits | The bits to be set or cleared |
set | If true, then bits are set in the exit status; otherwise they are cleared. |
Definition at line 349 of file report.c.
References EVENT_SUMMARY_MASK, MSGSEVERITY_MASK, report(), and SET_STATE.
Referenced by eval_line(), forget_contradiction(), and insert_pending_contradiction().
void vbail | ( | int | reason, |
const char * | msg, | ||
va_list | argp | ||
) |
Exit the program with a specified return code and diagnostic message. The function interface is the same as that of bail()
, with the exception that the parameter va_list argp
is a pointer that the caller has initialised with va_start()
to address a list of unspecified arguments.
All functions that terminate the program do so by calling this function
Definition at line 396 of file report.c.
References exceptions_enabled, exitcode(), MSGCLASS_ABEND, MSGEVENT_MASK, report(), SET_STATE, and vreport().
Referenced by bail(), parse_error(), and usage_error().