[m-dev.] trivial diff: mkinit.c
Zoltan Somogyi
zs at cs.mu.OZ.AU
Tue Dec 21 17:11:45 AEDT 1999
util/mkinit.c:
Simplify the conditional code for setting up the debugger-relevant
globals, testing each condition just once. This is to make it clear
where future insertions into this list should go.
Zoltan.
cvs diff: Diffing .
Index: mkinit.c
===================================================================
RCS file: /home/mercury1/repository/mercury/util/mkinit.c,v
retrieving revision 1.58
diff -u -b -r1.58 mkinit.c
--- mkinit.c 1999/12/20 14:04:12 1.58
+++ mkinit.c 1999/12/21 06:09:13
@@ -161,29 +161,26 @@
" MR_io_stderr_stream = ML_io_stderr_stream;\n"
" MR_io_print_to_cur_stream = ML_io_print_to_cur_stream;\n"
" MR_io_print_to_stream = ML_io_print_to_stream;\n"
- "#if MR_TRACE_ENABLED\n"
- " MR_address_of_trace_getline = MR_trace_getline;\n"
- "#else\n"
- " MR_address_of_trace_getline = NULL;\n"
"#endif\n"
- "#ifdef MR_USE_EXTERNAL_DEBUGGER\n"
- " #if MR_TRACE_ENABLED\n"
- " MR_address_of_trace_init_external = MR_trace_init_external;\n"
- " MR_address_of_trace_final_external = MR_trace_final_external;\n"
- " #else\n"
- " MR_address_of_trace_init_external = NULL;\n"
- " MR_address_of_trace_final_external = NULL;\n"
- " #endif\n"
- "#endif\n"
"#if MR_TRACE_ENABLED\n"
" MR_trace_func_ptr = MR_trace_real;\n"
+ " MR_register_module_layout = MR_register_module_layout_real;\n"
+ " MR_address_of_trace_getline = MR_trace_getline;\n"
" MR_address_of_trace_interrupt_handler =\n"
" MR_trace_interrupt_handler;\n"
- " MR_register_module_layout = MR_register_module_layout_real;\n"
+ " #ifdef MR_USE_EXTERNAL_DEBUGGER\n"
+ " MR_address_of_trace_init_external = MR_trace_init_external;\n"
+ " MR_address_of_trace_final_external = MR_trace_final_external;\n"
+ " #endif\n"
"#else\n"
" MR_trace_func_ptr = MR_trace_fake;\n"
- " MR_address_of_trace_interrupt_handler = NULL;"
" MR_register_module_layout = NULL;\n"
+ " MR_address_of_trace_getline = NULL;\n"
+ " MR_address_of_trace_interrupt_handler = NULL;"
+ " #ifdef MR_USE_EXTERNAL_DEBUGGER\n"
+ " MR_address_of_trace_init_external = NULL;\n"
+ " MR_address_of_trace_final_external = NULL;\n"
+ " #endif\n"
"#endif\n"
"#if defined(USE_GCC_NONLOCAL_GOTOS) && !defined(USE_ASM_LABELS)\n"
" do_init_modules();\n"
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list