coan 4.2.4
|
![]() |
Modules | |
Macro-generated code | |
Files | |
file | line_despatch.c |
Defines | |
#define | LINE_UNSIMPLIFIED (GET_PUBLIC(line_edit,ops_cut) == false && GET_PUBLIC(line_edit,parens_deleted) == 0) |
Functions | |
static void | printline_fast (void) |
static void | printline_cut (void) |
static void | printline_restore_all_paren (void) |
static void | printline_slow (void) |
static void | printline (void) |
static void | printline_commented_out (void) |
static void | flushline_dummy (bool keep, const char *insert_text) |
static void | flushline_live (bool keep, char const *insert_text) |
#define LINE_UNSIMPLIFIED (GET_PUBLIC(line_edit,ops_cut) == false && GET_PUBLIC(line_edit,parens_deleted) == 0) |
Say whether the current line has been simplified
Definition at line 57 of file line_despatch.c.
Referenced by printline(), and printline_commented_out().
static void flushline_dummy | ( | bool | keep, |
const char * | insert_text | ||
) | [static] |
No-op implementation of flushline() selected when we are not executing a `source' command.
Definition at line 197 of file line_despatch.c.
Referenced by line_despatch_no_op().
static void flushline_live | ( | bool | keep, |
char const * | insert_text | ||
) | [static] |
Write a line to the output or drop it, according to command line options.
keep | Is the line to be kept of dropped? |
insert_text | Either NULL or a pointer to a null-terminated diagnostic that is to be written instead of the line-buffer. |
If insert_text
is non-null then this string is output.
Otherwise is keep
is true then the line-buffer is output unless the --complement
option is in force.
If keep
is false, or is true together with --complement
, the line buffer is dropped. If the --blank
is not in force then nothing is written to putput. Otherwise an empty line is written to output.
Definition at line 219 of file line_despatch.c.
References complement(), DISCARD_BLANK, DISCARD_DROP, GET_PUBLIC, printline(), printline_commented_out(), and SET_PUBLIC.
static void printline | ( | void | ) | [static] |
Print a line buffer to output.
The function selects a more specialised helper function to which it delegates.
Definition at line 153 of file line_despatch.c.
References LINE_UNSIMPLIFIED, printline_fast(), and printline_slow().
Referenced by flushline_live().
static void printline_commented_out | ( | void | ) | [static] |
Print a line buffer to output commented out with the prefix "//coan".
Definition at line 165 of file line_despatch.c.
References GET_PUBLIC, LINE_START, LINE_UNSIMPLIFIED, printline_fast(), printline_slow(), and SET_PUBLIC.
Referenced by flushline_live().
static void printline_cut | ( | void | ) | [static] |
Print a line buffer to output deleting chunks marked for unconditional deletion.
Definition at line 74 of file line_despatch.c.
References DELETEABLE, DISCARD_BLANK, DISCARD_COMMENT, GET_PUBLIC, LINE_START, and SET_PUBLIC.
Referenced by printline_slow().
static void printline_fast | ( | void | ) | [static] |
Print an unmodified line buffer to output with no complications
Definition at line 65 of file line_despatch.c.
References GET_PUBLIC.
Referenced by printline(), printline_commented_out(), and printline_restore_all_paren().
static void printline_restore_all_paren | ( | void | ) | [static] |
Print an output line buffer that may contain superfluous parentheses marked for deletion, but no other parts marked for deletion.
In this case we have not materially simplified the line and just restore the parentheses before printing the line.
Definition at line 123 of file line_despatch.c.
References printline_fast(), and restore_all_paren().
Referenced by printline_slow().
static void printline_slow | ( | void | ) | [static] |
Print an output line buffer containing chunks marked for deletion.
We will delete all these chunks only if and only if some of them represent truth-functional simplifications of the line. Otherwise the only logical deletions will represent superfluous parentheses. We will then restore those parentheses before printing the line.
Definition at line 138 of file line_despatch.c.
References GET_PUBLIC, printline_cut(), and printline_restore_all_paren().
Referenced by printline(), and printline_commented_out().