fix inconsistent line endings

svn path=/trunk/gtk-sharp/; revision=122798
This commit is contained in:
Mike Kestner 2009-01-08 18:00:47 +00:00
parent 4e1837a017
commit 3030c6d535
5 changed files with 33 additions and 33 deletions

View File

@ -71,7 +71,7 @@ namespace GtkSharp.Generation {
void GenerateStatic (GenerationInfo gen_info) void GenerateStatic (GenerationInfo gen_info)
{ {
StreamWriter sw = gen_info.Writer; StreamWriter sw = gen_info.Writer;
sw.WriteLine("\t\t" + Protection + " static " + Safety + Modifiers + name + " " + StaticName + "(" + Signature + ")"); sw.WriteLine("\t\t" + Protection + " static " + Safety + Modifiers + name + " " + StaticName + "(" + Signature + ")");
sw.WriteLine("\t\t{"); sw.WriteLine("\t\t{");
Body.Initialize(gen_info, false, false, ""); Body.Initialize(gen_info, false, false, "");
@ -100,7 +100,7 @@ namespace GtkSharp.Generation {
if (IsStatic) if (IsStatic)
GenerateStatic (gen_info); GenerateStatic (gen_info);
else { else {
sw.WriteLine("\t\t{0} {1}{2} ({3}) {4}", Protection, Safety, name, Signature.ToString(), needs_chaining ? ": base (IntPtr.Zero)" : ""); sw.WriteLine("\t\t{0} {1}{2} ({3}) {4}", Protection, Safety, name, Signature.ToString(), needs_chaining ? ": base (IntPtr.Zero)" : "");
sw.WriteLine("\t\t{"); sw.WriteLine("\t\t{");
if (needs_chaining) { if (needs_chaining) {

View File

@ -49,16 +49,16 @@ namespace GtkSharp.Generation {
} }
} }
public bool IsInternal { public bool IsInternal {
get { get {
if (elem.HasAttribute ("internal")) { if (elem.HasAttribute ("internal")) {
string attr = elem.GetAttribute ("internal"); string attr = elem.GetAttribute ("internal");
return attr == "1" || attr == "true"; return attr == "1" || attr == "true";
} }
return false; return false;
} }
} }
public string LibraryName { public string LibraryName {
get { get {
return ns.GetAttribute ("library"); return ns.GetAttribute ("library");

View File

@ -170,7 +170,7 @@ namespace GtkSharp.Generation {
sw.WriteLine (); sw.WriteLine ();
sw.WriteLine ("\t\tpublic {0}Adapter ({0}Implementor implementor)", Name); sw.WriteLine ("\t\tpublic {0}Adapter ({0}Implementor implementor)", Name);
sw.WriteLine ("\t\t{"); sw.WriteLine ("\t\t{");
sw.WriteLine ("\t\t\tif (implementor == null)"); sw.WriteLine ("\t\t\tif (implementor == null)");
sw.WriteLine ("\t\t\t\tthrow new ArgumentNullException (\"implementor\");"); sw.WriteLine ("\t\t\t\tthrow new ArgumentNullException (\"implementor\");");
sw.WriteLine ("\t\t\tthis.implementor = implementor;"); sw.WriteLine ("\t\t\tthis.implementor = implementor;");
sw.WriteLine ("\t\t}"); sw.WriteLine ("\t\t}");

View File

@ -229,7 +229,7 @@ namespace GtkSharp.Generation {
if (IsDeprecated) if (IsDeprecated)
gen_info.Writer.WriteLine("\t\t[Obsolete]"); gen_info.Writer.WriteLine("\t\t[Obsolete]");
gen_info.Writer.Write("\t\t"); gen_info.Writer.Write("\t\t");
if (Protection != "") if (Protection != "")
gen_info.Writer.Write("{0} ", Protection); gen_info.Writer.Write("{0} ", Protection);
GenerateDeclCommon (gen_info.Writer, implementor); GenerateDeclCommon (gen_info.Writer, implementor);

View File

@ -33,7 +33,7 @@ namespace GtkSharp.Generation {
bool is_static = false; bool is_static = false;
string mods = String.Empty; string mods = String.Empty;
string name; string name;
private string protection = "public"; private string protection = "public";
protected MethodBase (XmlElement elem, ClassBase container_type) protected MethodBase (XmlElement elem, ClassBase container_type)
{ {
@ -44,18 +44,18 @@ namespace GtkSharp.Generation {
IsStatic = elem.GetAttribute ("shared") == "true"; IsStatic = elem.GetAttribute ("shared") == "true";
if (elem.HasAttribute ("new_flag")) if (elem.HasAttribute ("new_flag"))
mods = "new "; mods = "new ";
if (elem.HasAttribute ("accessibility")) { if (elem.HasAttribute ("accessibility")) {
string attr = elem.GetAttribute ("accessibility"); string attr = elem.GetAttribute ("accessibility");
switch (attr) { switch (attr) {
case "public": case "public":
case "protected": case "protected":
case "internal": case "internal":
case "private": case "private":
case "protected internal": case "protected internal":
protection = attr; protection = attr;
break; break;
} }
} }
} }
protected string BaseName { protected string BaseName {
@ -148,12 +148,12 @@ namespace GtkSharp.Generation {
return parms; return parms;
} }
} }
public string Protection { public string Protection {
get { return protection; } get { return protection; }
set { protection = value; } set { protection = value; }
} }
protected string Safety { protected string Safety {
get { get {
return Body.ThrowsException && !(container_type is InterfaceGen) ? "unsafe " : ""; return Body.ThrowsException && !(container_type is InterfaceGen) ? "unsafe " : "";