[Mono-devel-list] [RFA] Mono.GetOptions Patch

Jambunathan Jambunathan kjambunathan at novell.com
Mon Aug 9 11:13:45 EDT 2004


Rafael

On Cygwin when I invoke the VBCodeCompiler it generates following
command line 
mbas /target:exe /out:"c:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\58253.exe"
/r:"Microsoft.VisualBasic"  -- "HelloWorld.vb" 

In OptionsList.NormalizeArgs,

if (MaybeAnOption(arg))
{
	result.AddRange(arg.Split(':','='));
	continue;
}

gets triggered which splits the /out argument in an unfriendly way.  Is
it OK to commit the following patch ?

Regards,
Jambunathan K.


Index: OptionList.cs
===================================================================
RCS file: /cvs/public/mcs/class/Mono.GetOptions/OptionList.cs,v
retrieving revision 1.12
diff -u -r1.12 OptionList.cs
--- OptionList.cs	8 Aug 2004 18:48:29 -0000	1.12
+++ OptionList.cs	9 Aug 2004 14:05:59 -0000
@@ -334,7 +334,14 @@
 
 						if (MaybeAnOption(arg))
 						{
-							result.AddRange(arg.Split(':','='));
+							int pos =
arg.IndexOfAny(":=".ToCharArray());
+
+							if(pos < 0)
+								result.Add(arg);
+							else {
+								result.Add(arg.Substring(0,
pos));
+								result.Add(arg.Substring(pos+1));
+							}
 							continue;
 						}
 					}
@@ -359,8 +366,9 @@
 			bool OptionWasProcessed;
 
 			list.Sort();
-
 			args = NormalizeArgs(args);
+			foreach(string str in args)
+				Console.WriteLine(str);
 
 			try
 			{





More information about the Mono-devel-list mailing list