coan 4.2.4
The Main component

Files

file  main.c

Functions

static void ready (void)
static void process (void)
int main (int argc, char *argv[])
static void line_debug (int line)
static void node_proc (file_tree_h ft, char const *name, file_tree_traverse_state_t context)

Detailed Description

This component implements the Coan program


Function Documentation

static void line_debug ( int  line) [static]

Debugging function to facilitate debug break when a known line of an input file is reached

Definition at line 83 of file main.c.

References GET_PUBLIC.

Referenced by node_proc().

int main ( int  argc,
char *  argv[] 
)

The main program.

Definition at line 68 of file main.c.

References exit_diagnostics(), finish_args(), give_up_confused(), parse_args(), parse_executable(), process(), and ready().

Here is the call graph for this function:

static void node_proc ( file_tree_h  ft,
char const *  name,
file_tree_traverse_state_t  context 
) [static]

The file_tree_callback_t that is iterated over the input file tree to process files.

Parameters:
ftThe currently processed node of the input file tree.
nameThe absolute name of the file or directory reprtesented by the node ft.
contextThe symbolic constant denoting the context of the call, one of:-
  • FT_ENTERING_TREE
  • FT_LEAVING_TREE
  • FT_ENTERING_DIR
  • FT_LEAVING_DIR
  • FT_AT_FILE

Definition at line 129 of file main.c.

References chew_toplevel(), close_io(), debug(), file_tree_count_t::dirs, drop(), entering_dir(), eval_line(), exceptions_enabled, file_tree_count(), file_tree_is_empty(), file_tree_count_t::files, FT_AT_FILE, FT_COUNT_ALL, FT_COUNT_CHILDREN, FT_ENTERING_DIR, FT_LEAVING_DIR, if_control_toplevel(), io_toplevel(), leaving_dir(), line_debug(), LT_DIRECTIVE_DROP, LT_EOF, open_io(), processing_file(), STDIN_NAME, and transition().

Referenced by process().

Here is the call graph for this function:

static void process ( void  ) [static]

Execute a coan process

Definition at line 193 of file main.c.

References exitcode(), file_tree_traverse(), GET_PUBLIC, and node_proc().

Referenced by main().

Here is the call graph for this function:

static void ready ( void  ) [static]

Perform all component initialisations

Definition at line 95 of file main.c.

References INITIALISE, and report().

Referenced by main().

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines