From 9511a8c76370f21e839114007dcd2b25c69b009a Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Sat, 8 Nov 2008 17:35:48 +0000 Subject: Work in progress on SECS stuff. Have been holding it off until after 0.6 release. Still messy as hell and doesn't really work yet. Will undergo dramatic changes. AND MOST IMPORTANTLY: Will be conformed to work in coop with todays DNE and XEngine, hopefully one day providing a common interface for all components. --- .../DotNetEngine/Compilers/CILCompiler.cs | 186 +++++++++++++++++++++ .../DotNetEngine/Compilers/Compiler_CS.cs | 34 +++- .../DotNetEngine/Compilers/Compiler_JS.cs | 20 ++- .../DotNetEngine/Compilers/Compiler_LSL.cs | 21 ++- .../DotNetEngine/Compilers/Compiler_VB.cs | 20 ++- .../DotNetEngine/Compilers/Compiler_YP.cs | 55 ++++++ .../DotNetEngine/Compilers/LSL/LSL2CS.cs | 44 +++++ .../Components/DotNetEngine/Compilers/YP/YP2CS.cs | 54 ++++++ 8 files changed, 418 insertions(+), 16 deletions(-) create mode 100644 OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/CILCompiler.cs create mode 100644 OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_YP.cs create mode 100644 OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/LSL/LSL2CS.cs create mode 100644 OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/YP/YP2CS.cs (limited to 'OpenSim/ScriptEngine/Components/DotNetEngine/Compilers') diff --git a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/CILCompiler.cs b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/CILCompiler.cs new file mode 100644 index 0000000..e221e1b --- /dev/null +++ b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/CILCompiler.cs @@ -0,0 +1,186 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSim Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +using System; +using System.CodeDom.Compiler; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Text.RegularExpressions; +using log4net; +using OpenSim.ScriptEngine.Shared; +using ScriptAssemblies; + +namespace OpenSim.ScriptEngine.Components.DotNetEngine.Compilers +{ + public abstract class CILCompiler + { + internal static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private string ScriptEnginesPath = "ScriptEngines"; + private string Name { get { return "SECS.DotNetEngine.CILCompiler"; } } + internal string ScriptAssemblyName { get; set; } + + // Default inherit + protected string ScriptInheritFrom = typeof(ScriptAssemblies.ScriptBase).Name; + private readonly System.Security.Cryptography.MD5CryptoServiceProvider MD5Sum = new System.Security.Cryptography.MD5CryptoServiceProvider(); + protected CodeDomProvider CompileProvider; + + //private string[] AppDomainAssemblies = new string[] { "OpenSim.Region.ScriptEngine.Shared.dll", "OpenSim.Region.ScriptEngine.Shared.Script.dll", "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll" }; + private readonly string[] AppDomainAssemblies = new string[] { + Assembly.GetAssembly(typeof(Int32)).Location, + "OpenSim.ScriptEngine.Shared.dll", + "OpenSim.ScriptEngine.Shared.Script.dll", + Path.Combine("ScriptEngines", "OpenSim.Region.ScriptEngine.Shared.dll") + }; + + public abstract string PreProcessScript(ref string script); + + public CILCompiler() + { + } + + private static readonly Regex FileNameFixer = new Regex(@"[^a-zA-Z0-9\.\-]", RegexOptions.Compiled | RegexOptions.Singleline); + public string Compile(ScriptMetaData data, ref string _script) + { + // Add "using", "inherit", default constructor, etc around script. + string script = PreProcessScript(ref _script); + + // Get filename based on content + string md5Sum = System.Convert.ToBase64String( + MD5Sum.ComputeHash( + System.Text.Encoding.ASCII.GetBytes(script) + )); + // Unique name for this assembly + ScriptAssemblyName = "SECS_Script_" + FileNameFixer.Replace(md5Sum, "_"); + + string OutFile = Path.Combine(ScriptEnginesPath, ScriptAssemblyName + ".dll"); + + // Make sure target dir exist + if (!Directory.Exists(ScriptEnginesPath)) + try { Directory.CreateDirectory(ScriptEnginesPath); } + catch { } + + // Already exist? No point in recompiling + if (File.Exists(OutFile)) + return OutFile; + + // + // Dump source code + // + string dumpFile = OutFile + ".txt"; + try + { + if (File.Exists(dumpFile)) + File.Delete(dumpFile); + File.WriteAllText(dumpFile, script); + } + catch (Exception e) + { + m_log.DebugFormat("[{0}] Exception trying to dump script source code to file \"{1}\": {2}", Name, dumpFile, e.ToString()); + } + + // + // COMPILE + // + + CompilerParameters parameters = new CompilerParameters(); + parameters.IncludeDebugInformation = true; + string rootPath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); + + foreach (string file in AppDomainAssemblies) + { + parameters.ReferencedAssemblies.Add(file); + m_log.DebugFormat("[{0}] Adding reference for compile: \"{1}\".", Name, file); + } + //lock (commandProvider) + //{ + // foreach (string key in commandProvider.Keys) + // { + // IScriptCommandProvider cp = commandProvider[key]; + // string + // file = cp.GetType().Assembly.Location; + // parameters.ReferencedAssemblies.Add(file); + // m_log.DebugFormat("[{0}] Loading command provider assembly \"{1}\" into AppDomain: \"{2}\".", Name, + // key, file); + // } + //} + + parameters.GenerateExecutable = false; + parameters.OutputAssembly = OutFile; + parameters.IncludeDebugInformation = true; + //parameters.WarningLevel = 1; // Should be 4? + parameters.TreatWarningsAsErrors = false; + + // Do compile + CompilerResults results = CompileProvider.CompileAssemblyFromSource(parameters, script); + + + // + // WARNINGS AND ERRORS + // + //TODO + int display = 5; + if (results.Errors.Count > 0) + { + string errtext = String.Empty; + foreach (CompilerError CompErr in results.Errors) + { + // Show 5 errors max + // + if (display <= 0) + break; + display--; + + string severity = "Error"; + if (CompErr.IsWarning) + severity = "Warning"; + + //TODO: Implement + KeyValuePair lslPos = new KeyValuePair(); + + //lslPos = "NOT IMPLEMENTED";// FindErrorPosition(CompErr.Line, CompErr.Column); + + string text = CompErr.ErrorText; + + // The Second Life viewer's script editor begins + // countingn lines and columns at 0, so we subtract 1. + errtext += String.Format("Line ({0},{1}): {4} {2}: {3}\n", + lslPos.Key - 1, lslPos.Value - 1, + CompErr.ErrorNumber, text, severity); + } + + if (!File.Exists(OutFile)) + { + throw new Exception(errtext); + } + } + + // TODO: Process errors + return OutFile; + } + + } +} diff --git a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_CS.cs b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_CS.cs index 9c72359..1286dc5 100644 --- a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_CS.cs +++ b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_CS.cs @@ -25,20 +25,46 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; +using System.CodeDom.Compiler; using System.Collections.Generic; using System.Text; -using OpenSim.ApplicationPlugins.ScriptEngine.Components; +using Microsoft.CSharp; +using OpenSim.ScriptEngine.Shared; namespace OpenSim.ScriptEngine.Components.DotNetEngine.Compilers { - public class Compiler_CS: CompilerBase + public class Compiler_CS : CILCompiler, IScriptCompiler { - public override void Start() + private string[] ScriptUsing = new string[] + { + "System", + "OpenSim.ScriptEngine.Shared", + "OpenSim.Region.ScriptEngine.Shared", + "System.Collections.Generic" + }; + + public Compiler_CS() { + CompileProvider = new CSharpCodeProvider(); } - public override void Close() + public override string PreProcessScript(ref string script) { + string s = ""; + foreach (string u in ScriptUsing) + { + s += "using " + u + ";"; + } + + s += "\r\n" + + String.Empty + "namespace ScriptAssemblies { " + + String.Empty + "public class UserScript" + " : " + ScriptInheritFrom + " { \r\n" + + @"public Script() { } " + + script + + "} }\r\n"; + + return s; } + } } diff --git a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_JS.cs b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_JS.cs index 3dc8d86..5e9bfba 100644 --- a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_JS.cs +++ b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_JS.cs @@ -25,20 +25,32 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; +using System.CodeDom.Compiler; using System.Collections.Generic; using System.Text; -using OpenSim.ApplicationPlugins.ScriptEngine.Components; +using Microsoft.JScript; +using OpenSim.ScriptEngine.Shared; namespace OpenSim.ScriptEngine.Components.DotNetEngine.Compilers { - public class Compiler_JS : CompilerBase + public class Compiler_JS : CILCompiler, IScriptCompiler { - public override void Start() + + public Compiler_JS() { + CompileProvider = new JScriptCodeProvider() as CodeDomProvider; } - public override void Close() + public override string PreProcessScript(ref string script) { + return + "import OpenSim.Region.ScriptEngine.Shared; import System.Collections.Generic;\r\n" + + "package SecondLife {\r\n" + + "class Script extends OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass { \r\n" + + script + + "} }\r\n"; + } + } } diff --git a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_LSL.cs b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_LSL.cs index 3354ce9..d631c99 100644 --- a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_LSL.cs +++ b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_LSL.cs @@ -26,19 +26,32 @@ */ using System; using System.Collections.Generic; +using System.Reflection; using System.Text; -using OpenSim.ApplicationPlugins.ScriptEngine.Components; +using OpenSim.ScriptEngine.Components.DotNetEngine.Compilers.LSL; +using OpenSim.ScriptEngine.Shared; namespace OpenSim.ScriptEngine.Components.DotNetEngine.Compilers { - public class Compiler_LSL : CompilerBase + public class Compiler_LSL : IScriptCompiler { - public override void Start() + + + private readonly Compiler_CS m_Compiler_CS = new Compiler_CS(); + private readonly LSL2CS m_LSL2CS = new LSL2CS(); + + public string Compile(ScriptMetaData scriptMetaData, ref string script) { + // Convert script to CS + string scriptCS = m_LSL2CS.Convert(ref script); + // Use CS compiler to compile it + return m_Compiler_CS.Compile(scriptMetaData, ref scriptCS); } - public override void Close() + public string PreProcessScript(ref string script) { + // This is handled by our converter + return script; } } } diff --git a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_VB.cs b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_VB.cs index c7078cf..3975fa3 100644 --- a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_VB.cs +++ b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_VB.cs @@ -25,20 +25,32 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ using System; +using System.CodeDom.Compiler; using System.Collections.Generic; using System.Text; -using OpenSim.ApplicationPlugins.ScriptEngine.Components; +using Microsoft.VisualBasic; +using OpenSim.ScriptEngine.Shared; namespace OpenSim.ScriptEngine.Components.DotNetEngine.Compilers { - public class Compiler_VB : CompilerBase + public class Compiler_VB : CILCompiler, IScriptCompiler { - public override void Start() + + public Compiler_VB() { + CompileProvider = new VBCodeProvider() as CodeDomProvider; } - public override void Close() + public override string PreProcessScript(ref string script) { + return + "Imports OpenSim.Region.ScriptEngine.Shared: Imports System.Collections.Generic: " + + String.Empty + "NameSpace SecondLife:" + + String.Empty + "Public Class Script: Inherits OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass: " + + "\r\nPublic Sub New()\r\nEnd Sub: " + + script + + ":End Class :End Namespace\r\n"; } } } + diff --git a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_YP.cs b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_YP.cs new file mode 100644 index 0000000..c81ad76 --- /dev/null +++ b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/Compiler_YP.cs @@ -0,0 +1,55 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSim Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text; +using OpenSim.ScriptEngine.Components.DotNetEngine.Compilers.YP; +using OpenSim.ScriptEngine.Shared; + +namespace OpenSim.ScriptEngine.Components.DotNetEngine.Compilers +{ + public class Compiler_YP: IScriptCompiler + { + + private readonly Compiler_CS m_Compiler_CS = new Compiler_CS(); + + public string Compile(ScriptMetaData scriptMetaData, ref string script) + { + // Convert script to CS + string scriptCS = YP2CS.Convert(ref script); + // Use CS compiler to compile it + return m_Compiler_CS.Compile(scriptMetaData, ref scriptCS); + } + + public string PreProcessScript(ref string script) + { + // This is handled by our converter + return script; + } + } +} diff --git a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/LSL/LSL2CS.cs b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/LSL/LSL2CS.cs new file mode 100644 index 0000000..0e8052d --- /dev/null +++ b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/LSL/LSL2CS.cs @@ -0,0 +1,44 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSim Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +using System; +using System.Collections.Generic; +using System.Text; +using OpenSim.Region.ScriptEngine.Shared.CodeTools; + +namespace OpenSim.ScriptEngine.Components.DotNetEngine.Compilers.LSL +{ + public class LSL2CS + { + private ICodeConverter Converter = new CSCodeGenerator(); + + public string Convert(ref string script) + { + //m_positionMap = ((CSCodeGenerator) LSL_Converter).PositionMap; + return Converter.Convert(script); + } + } +} diff --git a/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/YP/YP2CS.cs b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/YP/YP2CS.cs new file mode 100644 index 0000000..e25a800 --- /dev/null +++ b/OpenSim/ScriptEngine/Components/DotNetEngine/Compilers/YP/YP2CS.cs @@ -0,0 +1,54 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSim Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +using System; +using System.Collections.Generic; +using System.Text; + +namespace OpenSim.ScriptEngine.Components.DotNetEngine.Compilers.YP +{ + public class YP2CS + { + public static string Convert(ref string script) + { + return script; + } + + public string PreProcessScript(ref string script) + { + return + "using OpenSim.Region.ScriptEngine.Shared.YieldProlog; " + + "using OpenSim.Region.ScriptEngine.Shared; using System.Collections.Generic;\r\n" + + String.Empty + "namespace SecondLife { " + + String.Empty + "public class Script : OpenSim.Region.ScriptEngine.Shared.ScriptBase.ScriptBaseClass { \r\n" + + //@"public Script() { } " + + @"static OpenSim.Region.ScriptEngine.Shared.YieldProlog.YP YP=null; " + + @"public Script() { YP= new OpenSim.Region.ScriptEngine.Shared.YieldProlog.YP(); } " + + script + + "} }\r\n"; + } + } +} -- cgit v1.1