trivial diff: single digit stage numbers

Zoltan Somogyi zs at cs.mu.oz.au
Fri Dec 19 15:31:16 AEDT 1997


After Oliver's request:

mercury_compile.m:
	Allow single digit numbers in dump stage names, by automatically
	prefixing them with a zero (e.g. -d1 is equivalent to -d01, which
	is what used to be required).

Zoltan.

Index: mercury_compile.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.62
diff -u -u -r1.62 mercury_compile.m
--- 1.62	1997/12/07 21:10:25
+++ mercury_compile.m	1997/12/19 04:27:19
@@ -2073,9 +2073,15 @@
 mercury_compile__maybe_dump_hlds(HLDS, StageNum, StageName) -->
 	globals__io_lookup_accumulating_option(dump_hlds, DumpStages),
 	(
-		{ list__member(StageNum, DumpStages)
-		; list__member(StageName, DumpStages)
-		; list__member("all", DumpStages)
+		{
+			list__member(StageNum, DumpStages)
+		;
+			list__member(StageName, DumpStages)
+		;
+			list__member("all", DumpStages)
+		;
+			string__append("0", StrippedStageNum, StageNum),
+			list__member(StrippedStageNum, DumpStages)
 		}
 	->
 		{ module_info_name(HLDS, ModuleName) },



More information about the developers mailing list