[Mono-devel-list] [RFA] Mono.GetOptions Patch
Rafael Teixeira
monoman at gmail.com
Tue Aug 10 15:35:59 EDT 2004
Sure, please do it! (just cut out the Console.WriteLines...)
It is a good thing because that also solves partially a problem with
things like "/define:TRUE=1" that we will need to integrate with your
#Const work.
Thanks,
On Mon, 09 Aug 2004 09:13:45 -0600, Jambunathan Jambunathan
<kjambunathan at novell.com> wrote:
> 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
> {
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
--
Rafael "Monoman" Teixeira
---------------------------------------
Cognition is not a representation of an objectively existing world
but is a bringing forth of a world in the process of living.
-- Fritjof Capra, citing
Humberto Maturana and Francisco Varella's "Santiago Theory of Cognition"
More information about the Mono-devel-list
mailing list