Setting up the use of this module.
§1. The following constant exists only in tools which use this module:
define CORE_MODULE TRUE
§2. Like all modules, this one must define a start and end function:
void CoreModule::start(void) { Writers::register_writer_I('B', &CoreModule::writer); CorePreform::set_core_internal_NTIs(); CoreSyntax::declare_annotations(); } void CoreModule::end(void) { }
§3. The %B string escape prints the build number, lying about it when we want to produce predictable output for easier testing.
void CoreModule::writer(OUTPUT_STREAM, char *format_string, int wn) { if (Time::fixed()) { if (wn) WRITE("9Z99"); else WRITE("Inform 7.99.99"); } else { if (wn) WRITE("[[Build Number]]"); else WRITE("Inform [[Version Number]]"); } }