From 64a98c736848de6099254f23483058668273c1a5 Mon Sep 17 00:00:00 2001 From: gareth Date: Mon, 14 May 2007 03:13:47 +0000 Subject: Finished off adding the new management API to gridserver Updated VersionInfo.cs finally Updated prebuild and rebuilt nant build files Completed Management agent basics --- ExportBot/Parsing.cs | 61 ---------------------------------------------------- 1 file changed, 61 deletions(-) delete mode 100644 ExportBot/Parsing.cs (limited to 'ExportBot/Parsing.cs') diff --git a/ExportBot/Parsing.cs b/ExportBot/Parsing.cs deleted file mode 100644 index 1e081c1..0000000 --- a/ExportBot/Parsing.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace libsecondlife.TestClient { - class Parsing { - public static string[] ParseArguments(string str) { - List list = new List(); - string current = ""; - string trimmed = null; - bool withinQuote = false; - bool escaped = false; - foreach (char c in str) { - if (c == '"') { - if (escaped) { - current += '"'; - escaped = false; - } else { - current += '"'; - withinQuote = !withinQuote; - } - } else if (c == ' ' || c == '\t') { - if (escaped || withinQuote) { - current += c; - escaped = false; - } else { - trimmed = current.Trim(); - if (trimmed.StartsWith("\"") && trimmed.EndsWith("\"")) { - trimmed = trimmed.Remove(0, 1); - trimmed = trimmed.Remove(trimmed.Length - 1); - trimmed = trimmed.Trim(); - } - if (trimmed.Length > 0) - list.Add(trimmed); - current = ""; - } - } else if (c == '\\') { - if (escaped) { - current += '\\'; - escaped = false; - } else { - escaped = true; - } - } else { - if (escaped) - throw new FormatException(c.ToString() + " is not an escapable character."); - current += c; - } - } - trimmed = current.Trim(); - if (trimmed.StartsWith("\"") && trimmed.EndsWith("\"")) { - trimmed = trimmed.Remove(0, 1); - trimmed = trimmed.Remove(trimmed.Length - 1); - trimmed = trimmed.Trim(); - } - if (trimmed.Length > 0) - list.Add(trimmed); - return list.ToArray(); - } - } -} -- cgit v1.1