X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fmcs%2Fsettings.cs;h=13abbd67c67425faf5f9b3701068ea4c9a2aefc2;hb=631d194f74cdf9feb8684931805a813d3e6fb40a;hp=9ba66c1613e6e861e7b548e13cddf1e5ab0bd741;hpb=dacc3f8c5d4331f7a40413f3a802ec4049da1e2e;p=mono.git diff --git a/mcs/mcs/settings.cs b/mcs/mcs/settings.cs index 9ba66c1613e..13abbd67c67 100644 --- a/mcs/mcs/settings.cs +++ b/mcs/mcs/settings.cs @@ -150,6 +150,8 @@ namespace Mono.CSharp { public bool BreakOnInternalError; #endregion + public List GetResourceStrings; + public bool ShowFullPaths; // @@ -581,15 +583,21 @@ namespace Mono.CSharp { { bool valid = true; foreach (string wid in text.Split (numeric_value_separator, StringSplitOptions.RemoveEmptyEntries)) { + var warning = wid; + if (warning.Length == 6 && warning [0] == 'C' && warning [1] == 'S') + warning = warning.Substring (2); + int id; - if (!int.TryParse (wid, NumberStyles.AllowLeadingWhite, CultureInfo.InvariantCulture, out id)) { - report.Error (1904, "`{0}' is not a valid warning number", wid); - valid = false; + if (!int.TryParse (warning, NumberStyles.AllowLeadingWhite, CultureInfo.InvariantCulture, out id)) { continue; } - if (report.CheckWarningCode (id, Location.Null)) + if (report.CheckWarningCode (id, Location.Null)) { action (id); + } else { + report.Error (1904, "`{0}' is not a valid warning number", wid); + valid = false; + } } return valid; @@ -1448,7 +1456,7 @@ namespace Mono.CSharp { return ParseResult.Success; default: - if (arg.StartsWith ("--fatal", StringComparison.Ordinal)){ + if (arg.StartsWith ("--fatal", StringComparison.Ordinal)) { int fatal = 1; if (arg.StartsWith ("--fatal=", StringComparison.Ordinal)) int.TryParse (arg.Substring (8), out fatal); @@ -1476,6 +1484,20 @@ namespace Mono.CSharp { return ParseResult.Success; } + if (arg.StartsWith ("--getresourcestrings:", StringComparison.Ordinal)) { + string file = arg.Substring (21).Trim (); + if (file.Length < 1) { + Error_RequiresArgument (arg); + return ParseResult.Error; + } + + if (settings.GetResourceStrings == null) + settings.GetResourceStrings = new List (); + + settings.GetResourceStrings.Add (file); + return ParseResult.Success; + } + return ParseResult.UnknownOption; } } @@ -1545,7 +1567,7 @@ namespace Mono.CSharp { " -help Lists all compiler options (short: -?)\n" + " -keycontainer:NAME The key pair container used to sign the output assembly\n" + " -keyfile:FILE The key file used to strongname the ouput assembly\n" + - " -langversion:TEXT Specifies language version: ISO-1, ISO-2, 3, 4, 5, Default or Future\n" + + " -langversion:TEXT Specifies language version: ISO-1, ISO-2, 3, 4, 5, Default or Experimental\n" + " -lib:PATH1[,PATHn] Specifies the location of referenced assemblies\n" + " -main:CLASS Specifies the class with the Main method (short: -m)\n" + " -noconfig Disables implicitly referenced assemblies\n" +