From be9946dca27a2e222cd807e6c6de0a77ea297be4 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Sun, 5 Oct 2003 00:37:24 +0000 Subject: [PATCH] 2003-10-04 Mike Kestner * generator/CallbackGen.cs : remove CloseWriter call. * generator/GenBase.cs : kill CreateWriter and CloseWriter. svn path=/trunk/gtk-sharp/; revision=18616 --- ChangeLog | 5 +++++ generator/CallbackGen.cs | 5 ++--- generator/GenBase.cs | 33 --------------------------------- 3 files changed, 7 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 14f555756..a93b7b8ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-10-04 Mike Kestner + + * generator/CallbackGen.cs : remove CloseWriter call. + * generator/GenBase.cs : kill CreateWriter and CloseWriter. + 2003-10-04 Mike Kestner * generator/AliasGen.cs : stub new Generate overload. diff --git a/generator/CallbackGen.cs b/generator/CallbackGen.cs index 021cff8d5..4d7c0a533 100644 --- a/generator/CallbackGen.cs +++ b/generator/CallbackGen.cs @@ -170,11 +170,10 @@ namespace GtkSharp.Generation { sw.WriteLine ("\t\t\tNativeDelegate = new {0} (NativeCallback);", wrapper); sw.WriteLine ("\t\t\t_managed = managed;"); sw.WriteLine ("\t\t}"); - sw.WriteLine ("\t}"); - sw.WriteLine ("#endregion"); - CloseWriter (sw); + sw.WriteLine ("}"); + sw.Close (); return ns + "Sharp." + Name + "Wrapper"; } diff --git a/generator/GenBase.cs b/generator/GenBase.cs index da60686c1..5f63f8b5d 100644 --- a/generator/GenBase.cs +++ b/generator/GenBase.cs @@ -63,39 +63,6 @@ namespace GtkSharp.Generation { } } - protected StreamWriter CreateWriter () - { - char sep = Path.DirectorySeparatorChar; - string dir = ".." + sep + NS.ToLower() + sep + "generated"; - if (!Directory.Exists(dir)) { - Console.WriteLine ("creating " + dir); - Directory.CreateDirectory(dir); - } - String filename = dir + sep + Name + ".cs"; - // Console.WriteLine ("creating " + filename); - - FileStream stream = new FileStream (filename, FileMode.Create, FileAccess.Write); - StreamWriter sw = new StreamWriter (stream); - - sw.WriteLine ("// This file was generated by the Gtk# code generator."); - sw.WriteLine ("// Any changes made will be lost if regenerated."); - sw.WriteLine (); - sw.WriteLine ("namespace " + NS + " {"); - sw.WriteLine (); - sw.WriteLine ("\tusing System;"); - sw.WriteLine (); - - return sw; - } - - protected void CloseWriter (StreamWriter sw) - { - sw.WriteLine (); - sw.WriteLine ("}"); - sw.Flush(); - sw.Close(); - } - public void AppendCustom (StreamWriter sw, string custom_dir) { char sep = Path.DirectorySeparatorChar;