From 03ca54df2f99f16e623230a2e620568f9fce18f9 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 15 Nov 2004 13:56:34 +0000 Subject: [PATCH] Fix the handful of LF-only lines in otherwise CRLF files, so that emacs won't show the ^Ms on the other 99% of lines svn path=/trunk/gtk-sharp/; revision=36135 --- generator/ClassGen.cs | 4 ++-- generator/Method.cs | 34 +++++++++++++++++----------------- generator/ObjectGen.cs | 4 ++-- generator/Parser.cs | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/generator/ClassGen.cs b/generator/ClassGen.cs index ad5fcba6c..e22e1d891 100644 --- a/generator/ClassGen.cs +++ b/generator/ClassGen.cs @@ -50,8 +50,8 @@ namespace GtkSharp.Generation { sw.WriteLine ("\tusing System.Runtime.InteropServices;"); sw.WriteLine (); - sw.WriteLine ("#region Autogenerated code"); - if (IsDeprecated) + sw.WriteLine ("#region Autogenerated code"); + if (IsDeprecated) sw.WriteLine ("\t[Obsolete]"); sw.Write ("\tpublic class " + Name); sw.WriteLine (" {"); diff --git a/generator/Method.cs b/generator/Method.cs index 4cd7a2dee..d526afa5e 100644 --- a/generator/Method.cs +++ b/generator/Method.cs @@ -44,7 +44,7 @@ namespace GtkSharp.Generation { private string name, cname, safety; private string protection = "public"; private bool is_get, is_set; - private bool needs_ref = false; + private bool needs_ref = false; private bool deprecated = false; public Method (string libname, XmlElement elem, ClassBase container_type) @@ -52,9 +52,9 @@ namespace GtkSharp.Generation { this.elem = elem; if (elem["parameters"] != null) { parms = new Parameters (elem["parameters"], container_type.NS); - } - this.container_type = container_type; - if (!container_type.IsDeprecated && elem.HasAttribute ("deprecated")) + } + this.container_type = container_type; + if (!container_type.IsDeprecated && elem.HasAttribute ("deprecated")) deprecated = elem.GetAttribute ("deprecated") == "1"; this.name = elem.GetAttribute("name"); if (name == "GetType") @@ -68,12 +68,12 @@ namespace GtkSharp.Generation { if (elem.HasAttribute ("needs_ref")) this.needs_ref = (elem.GetAttribute ("needs_ref") == "1"); } - - public bool IsDeprecated { - get { - return deprecated; - } - } + + public bool IsDeprecated { + get { + return deprecated; + } + } public bool IsGetter { get { @@ -89,7 +89,7 @@ namespace GtkSharp.Generation { private bool IsShared { get { - return elem.HasAttribute("shared") && + return elem.HasAttribute("shared") && (elem.GetAttribute("shared") == "true"); } } @@ -219,8 +219,8 @@ namespace GtkSharp.Generation { } private void GenerateDeclCommon (StreamWriter sw, ClassBase implementor) - { - if (elem.HasAttribute("shared") && + { + if (elem.HasAttribute("shared") && (elem.GetAttribute("shared") == "true")) sw.Write("static "); sw.Write(safety); @@ -259,7 +259,7 @@ namespace GtkSharp.Generation { if (!Initialize ()) return; - if (elem.HasAttribute("shared") && + if (elem.HasAttribute("shared") && (elem.GetAttribute("shared") == "true")) return; @@ -312,7 +312,7 @@ namespace GtkSharp.Generation { if (!Initialize ()) return; - if (implementor != null && elem.HasAttribute("shared") && + if (implementor != null && elem.HasAttribute("shared") && (elem.GetAttribute ("shared") == "true")) return; @@ -338,8 +338,8 @@ namespace GtkSharp.Generation { GenerateImport (gen_info.Writer); if (comp != null && s_ret == comp.parms.AccessorReturnType) comp.GenerateImport (gen_info.Writer); - - if (IsDeprecated) + + if (IsDeprecated) gen_info.Writer.WriteLine("\t\t[Obsolete]"); gen_info.Writer.Write("\t\t"); if (protection != "") diff --git a/generator/ObjectGen.cs b/generator/ObjectGen.cs index f8ac8b10a..556b0fa06 100644 --- a/generator/ObjectGen.cs +++ b/generator/ObjectGen.cs @@ -127,8 +127,8 @@ namespace GtkSharp.Generation { SymbolTable table = SymbolTable.Table; - sw.WriteLine ("#region Autogenerated code"); - if (IsDeprecated) + sw.WriteLine ("#region Autogenerated code"); + if (IsDeprecated) sw.WriteLine ("\t[Obsolete]"); sw.Write ("\tpublic {0} class " + Name, IsAbstract ? "abstract" : ""); string cs_parent = table.GetCSType(Elem.GetAttribute("parent")); diff --git a/generator/Parser.cs b/generator/Parser.cs index 9cc65d45a..8c7013d33 100644 --- a/generator/Parser.cs +++ b/generator/Parser.cs @@ -30,7 +30,7 @@ namespace GtkSharp.Generation { public class Parser { private XmlDocument Load (string filename) - { + { Console.WriteLine (filename); XmlDocument doc = new XmlDocument ();