[m-dev.] [for review] handle_options.m diff -u

doug.auclair at logicaltypes.com doug.auclair at logicaltypes.com
Fri Mar 3 08:54:49 AEDT 2006


usage/2 calls display_compiler_version/2, long_usage/2 contains an exact duplicate
of the code in display_compiler_version/2.  Redundant code is a Bad Thing(tm);
so I present this code change for your review.

Sincerely,
Doug Auclair

--- handle_options.sav	2006-03-02 16:35:10.000000000 -0500
+++ handle_options.m	2006-03-02 16:35:06.000000000 -0500
@@ -1869,10 +1869,7 @@
     % long_usage is called from only one place, so can't print duplicate
     % copies of the long usage message. We can print both a short and along
     % usage message, but there is no simple way to avoid that.
-    library__version(Version),
-    io__write_strings(["Mercury Compiler, version ", Version, "\n"], !IO),
-    io__write_string("Copyright (C) 1993-2006 " ++
-        "The University of Melbourne\n", !IO),
+    display_compiler_version(!IO),
     io__write_string("Usage: mmc [<options>] <arguments>\n", !IO),
     io__write_string("Arguments:\n", !IO),
     io__write_string("\tArguments ending in `.m' " ++


--------------------------------------------------------------------------
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