Next: main exit, Previous: main variables, Up: main [Contents][Index]
The invocation to this function must be the last line of code in the script. It does the following:
script_PROGNAME
in the message module using the function
mbfl_message_set_progname()
.
mbfl_main_create_exit_functions()
. Declaring exit codes.
This function searches for a declared action set with name MAIN
: if such set exists, it
expects the first command line argument to be an action identifier in the set.
script_before_parsing_options()
or the one selected by
mbfl_main_set_before_parsing_options()
.
mbfl_getopts_parse()
.
script_after_parsing_options()
or the one selected by
mbfl_main_set_after_parsing_options()
.
mbfl_main_SCRIPT_FUNCTION
, if
it exists, with no arguments; if its return value is non–zero: exit the script with the same code.
The default value is main
.
Select the main function storing funcname into mbfl_main_SCRIPT_FUNCTION
.
Global variable that holds the name of the custom main script function. The default name is
main
.
The name of the function to be called right before parsing command line options. This value can be customised by both the MBFL and the user script.
The default function name is: script_before_parsing_options
.
The name of the function to be called right after parsing command line options. This value can be customised by both the MBFL and the user script.
The default function name is: script_after_parsing_options
.
Next: main exit, Previous: main variables, Up: main [Contents][Index]