From: Tim R. <ti...@us...> - 2004-11-05 15:45:57
|
Update of /cvsroot/csdopenglnet/csdOpenGL/generator In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20295/generator Modified Files: define.cs function.cs generator.cs typedef.cs Log Message: Kai forced me to remove the Debug-calls Index: typedef.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/typedef.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** typedef.cs 19 Sep 2004 18:51:03 -0000 1.7 --- typedef.cs 5 Nov 2004 15:45:37 -0000 1.8 *************** *** 1,5 **** using System; using System.Collections; - using System.Diagnostics; using System.IO; using System.Xml; --- 1,4 ---- *************** *** 38,44 **** */ public TypeDef( StreamWriter w, bool _quiet ) { - Debug.Indent(); - Debug.WriteLine( "Entering TypeDef.Define(StreamWriter)" ); - quiet = _quiet; writer = w; --- 37,40 ---- *************** *** 58,65 **** tList.Add( "double", "double" ); tList.Add( "long", "long" ); - - - Debug.WriteLine( "Exiting TypeDef.Define(StreamWriter)" ); - Debug.Unindent(); } --- 54,57 ---- *************** *** 169,173 **** tList.Add( n, n ); } catch (Exception e ) { ! Debug.WriteLine( e.ToString() ); } --- 161,166 ---- tList.Add( n, n ); } catch (Exception e ) { ! Console.Write( "TypeDef.addCallBack( "+param+", "+name+", "+c.ToString()+" ) #163: "); ! Console.WriteLine( e.ToString() ); } *************** *** 175,179 **** dList.Add( n, ret+" "+n+"( " + par + ")" ); } catch (Exception e ) { ! Debug.WriteLine( e.ToString() ); } } --- 168,173 ---- dList.Add( n, ret+" "+n+"( " + par + ")" ); } catch (Exception e ) { ! Console.Write( "TypeDef.addCallBack( "+param+", "+name+", "+c.ToString()+" ) #170: "); ! Console.WriteLine( e.ToString() ); } } *************** *** 220,226 **** */ public void write() { - Debug.Indent(); - Debug.WriteLine( "Entering TypeDef.write()" ); - Console.WriteLine( "Writing delegates" ); --- 214,217 ---- *************** *** 237,244 **** writer.Write( ";\n" ); } - - - Debug.WriteLine( "Exiting TypeDef.write()" ); - Debug.Unindent(); } --- 228,231 ---- *************** *** 249,255 **** */ public void add( string entry ) { - Debug.Indent(); - Debug.WriteLine( "Entering TypeDef.add(string)" ); - XmlDocument doc = new XmlDocument(); doc.LoadXml( entry ); // bringt entry into xml structure --- 236,239 ---- *************** *** 278,287 **** tList.Add( n, t ); // add typedef to list } catch (Exception e) { - Debug.WriteLine( e.ToString() ); } } - - Debug.WriteLine( "Exiting TypeDef.add(string)" ); - Debug.Unindent(); } --- 262,267 ---- Index: function.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/function.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** function.cs 19 Sep 2004 18:51:03 -0000 1.9 --- function.cs 5 Nov 2004 15:45:37 -0000 1.10 *************** *** 1,5 **** using System; using System.Collections; - using System.Diagnostics; using System.IO; using System.Xml; --- 1,4 ---- *************** *** 60,66 **** */ public Function( StreamWriter w, TypeDef t, string df, string da, string l, ArrayList _ignoreFunctions, bool _quiet ) { - Debug.Indent(); - Debug.WriteLine( "Entering Function.Function(StreamWriter)" ); - quiet = _quiet; dllFlags = df; --- 59,62 ---- *************** *** 88,94 **** listWrap = new ArrayList(); attrList = new SortedList(); - - Debug.WriteLine( "Exiting Function.Function(StreamWriter)" ); - Debug.Unindent(); } --- 84,87 ---- *************** *** 149,155 **** */ public void add( string entry ) { - Debug.Indent(); - Debug.WriteLine( "Entering Function.add(string)" ); - string t=""; string n=""; --- 142,145 ---- *************** *** 196,202 **** Console.WriteLine( n ); } - - Debug.WriteLine( "Exiting Function.add(string)" ); - Debug.Unindent(); } --- 186,189 ---- *************** *** 218,224 **** */ public void process() { - Debug.Indent(); - Debug.WriteLine( "Entering Function.process()" ); - Console.WriteLine( "Preparing Function statements" ); --- 205,208 ---- *************** *** 258,265 **** removeIntPtr( fs2 ); } - - Debug.WriteLine( "Exiting Function.process()" ); - Debug.Unindent(); - } --- 242,245 ---- *************** *** 311,317 **** */ public void write() { - Debug.Indent(); - Debug.WriteLine( "Entering Functions.write()" ); - IDictionaryEnumerator s = attrList.GetEnumerator(); while ( s.MoveNext() ) { --- 291,294 ---- *************** *** 410,416 **** } - - Debug.WriteLine( "Exiting Functions.write()" ); - Debug.Unindent(); } --- 387,390 ---- Index: define.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/define.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** define.cs 19 Sep 2004 18:51:03 -0000 1.2 --- define.cs 5 Nov 2004 15:45:37 -0000 1.3 *************** *** 35,47 **** */ public Define( StreamWriter w, bool _quiet ) { - Debug.Indent(); - Debug.WriteLine( "Entering Define.Define(StreamWriter)" ); - quiet = _quiet; writer = w; list = new SortedList( System.Collections.Comparer.Default ); - - Debug.WriteLine( "Exiting Define.Define(StreamWriter)" ); - Debug.Unindent(); } --- 35,41 ---- *************** *** 52,58 **** */ public void process() { - Debug.Indent(); - Debug.WriteLine( "Entering Define.process()" ); - Console.WriteLine( "Preparing define statements" ); --- 46,49 ---- *************** *** 83,89 **** } } - - Debug.WriteLine( "Exiting Define.process()" ); - Debug.Unindent(); } --- 74,77 ---- *************** *** 139,145 **** */ public void write() { - Debug.Indent(); - Debug.WriteLine( "Entering Define.write()" ); - Console.WriteLine( "Writing define statements" ); --- 127,130 ---- *************** *** 156,162 **** writer.Write( ";\n" ); } - - Debug.WriteLine( "Exiting Define.write()" ); - Debug.Unindent(); } --- 141,144 ---- *************** *** 167,173 **** */ public void add( string entry ) { - Debug.Indent(); - Debug.WriteLine( "Entering Define.add(string)" ); - string n = ""; string i = ""; --- 149,152 ---- *************** *** 199,205 **** } } - - Debug.WriteLine( "Exiting Define.add(string)" ); - Debug.Unindent(); } --- 178,181 ---- Index: generator.cs =================================================================== RCS file: /cvsroot/csdopenglnet/csdOpenGL/generator/generator.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** generator.cs 19 Sep 2004 18:51:03 -0000 1.10 --- generator.cs 5 Nov 2004 15:45:37 -0000 1.11 *************** *** 1,5 **** using System; using System.Collections; - using System.Diagnostics; using System.IO; using System.Xml; --- 1,4 ---- *************** *** 51,64 **** */ public Generator( string[] args ) { - Debug.Indent(); - Debug.WriteLine( "Entering Generator.Generator(string[])" ); - if (args.Length==1) { if (args[0] == "--createConfig") { ! Debug.WriteLine( "Writing sample configuration" ); config = new Configuration(); saveConfig( "generator.xml" ); } else { ! Debug.WriteLine( "Loading Configuration" ); loadConfig( args[0] ); createClass(); --- 50,60 ---- */ public Generator( string[] args ) { if (args.Length==1) { if (args[0] == "--createConfig") { ! Console.WriteLine( "Writing sample configuration..." ); config = new Configuration(); saveConfig( "generator.xml" ); } else { ! Console.WriteLine( "Loading Configuration..." ); loadConfig( args[0] ); createClass(); *************** *** 67,78 **** if ( (args[0] == "-q") || (args[0]=="--quiet") ) { quiet = true; ! Debug.WriteLine( "Loading Configuration" ); loadConfig( args[1] ); createClass(); } } - - Debug.WriteLine( "Exiting Generator.Generator(string[])" ); - Debug.Unindent(); } --- 63,71 ---- if ( (args[0] == "-q") || (args[0]=="--quiet") ) { quiet = true; ! Console.WriteLine( "Loading Configuration..." ); loadConfig( args[1] ); createClass(); } } } *************** *** 82,88 **** */ protected void createClass() { - Debug.Indent(); - Debug.WriteLine( "Entering Generator.createClass()" ); - FileStream fs = new FileStream( config.outputFile, FileMode.Create, FileAccess.Write ); // Open or create file with write access writer = new StreamWriter( fs ); // bind stream to file --- 75,78 ---- *************** *** 96,108 **** try { - Debug.WriteLine( "Initializing XmlTestReader" ); reader = new XmlTextReader( config.xmlInput ); } catch (Exception e) { ! Debug.WriteLine( "***** " + e.ToString() ); ! Console.WriteLine( "Error Opening inputfile '"+config.xmlInput+"'" ); } if ( (reader!=null) && (reader.ReadState!=ReadState.Error) && (reader.ReadState!=ReadState.Closed) ) { - Debug.WriteLine( "Creating Class" ); compile(); } --- 86,96 ---- try { reader = new XmlTextReader( config.xmlInput ); } catch (Exception e) { ! Console.Write( "Generator.createClass() #90: "); ! Console.WriteLine( e.ToString() ); } if ( (reader!=null) && (reader.ReadState!=ReadState.Error) && (reader.ReadState!=ReadState.Closed) ) { compile(); } *************** *** 110,116 **** writeFooter(); // write file footer writer.Close(); // close stream - - Debug.WriteLine( "Exiting Generator.createClass()" ); - Debug.Unindent(); } --- 98,101 ---- *************** *** 118,131 **** for ( int i=0; i<config.typedefFiles.Count; i++ ) { try { - Debug.WriteLine( "Initializing XmlTestReader" ); reader = new XmlTextReader( (string)config.typedefFiles[i] ); } catch (Exception e) { ! Debug.WriteLine( "***** " + e.ToString() ); Console.WriteLine( "Error Opening inputfile '"+(string)config.typedefFiles[i]+"'" ); } if ( (reader!=null) && (reader.ReadState!=ReadState.Error) && (reader.ReadState!=ReadState.Closed) ) { - Debug.WriteLine( "Loading typdef statements" ); - Console.Write( "Loading typedef statements in " ); Console.WriteLine( (string)config.typedefFiles[i] ); --- 103,114 ---- for ( int i=0; i<config.typedefFiles.Count; i++ ) { try { reader = new XmlTextReader( (string)config.typedefFiles[i] ); } catch (Exception e) { ! Console.Write( "Generator.loadTypeDefs() #107: "); ! Console.WriteLine( e.ToString() ); Console.WriteLine( "Error Opening inputfile '"+(string)config.typedefFiles[i]+"'" ); } if ( (reader!=null) && (reader.ReadState!=ReadState.Error) && (reader.ReadState!=ReadState.Closed) ) { Console.Write( "Loading typedef statements in " ); Console.WriteLine( (string)config.typedefFiles[i] ); *************** *** 145,149 **** } } catch (Exception e) { ! Debug.WriteLine( "***** " + e.ToString() ); Console.WriteLine( "Error Opening inputfile '"+(string)config.typedefFiles[i]+"'" ); } --- 128,133 ---- } } catch (Exception e) { ! Console.Write( "Generator.loadTypeDefs() #130: "); ! Console.WriteLine( e.ToString() ); Console.WriteLine( "Error Opening inputfile '"+(string)config.typedefFiles[i]+"'" ); } *************** *** 161,167 **** */ protected void compile() { - Debug.Indent(); - Debug.WriteLine( "Entering Generator.compile()" ); - Console.WriteLine( "Parsing Entries..." ); --- 145,148 ---- *************** *** 201,207 **** function.write(); // write functions } - - Debug.WriteLine( "Exiting Generater.compile()" ); - Debug.Unindent(); } --- 182,185 ---- *************** *** 211,217 **** */ protected void writeHeader() { - Debug.Indent(); - Debug.WriteLine( "Entering Generator.writeHeader(StreamWriter)" ); - // default usings writer.WriteLine( config.Header ); --- 189,192 ---- *************** *** 233,239 **** writer.Write( config.upperClass ); writer.WriteLine( " {" ); - - Debug.WriteLine( "Exiting Generator.writeHeader(StreamWriter)" ); - Debug.Unindent(); } --- 208,211 ---- *************** *** 244,262 **** */ protected void writeFooter() { - Debug.Indent(); - Debug.WriteLine( "Entering Generator.writeFooter(StreamWriter)" ); - writer.WriteLine( "}" ); // class footer if (config.Namespace.Trim()!="") writer.WriteLine( "}" ); writer.WriteLine( config.Footer ); - - Debug.WriteLine( "Exiting Generator.writeFooter(StreamWriter)" ); - Debug.Unindent(); } protected void saveConfig( string file ) { - Debug.Indent(); - Debug.WriteLine( "Entering Generator.saveConfig()" ); - try { // try, because of I/O-failure. XmlSerializer serializer = new XmlSerializer( typeof(Configuration) ); // initializing serializer object --- 216,225 ---- *************** *** 265,279 **** writer.Close(); } catch (Exception e) { ! Debug.WriteLine( e.Message ); } - - Debug.WriteLine( "Exiting Generator.saveConfig()" ); - Debug.Unindent(); } protected void loadConfig( string fileName ) { - Debug.Indent(); - Debug.WriteLine( "Entering Configuration.loadConfig()" ); - try { // try, because of I/O-failure XmlSerializer serializer = new XmlSerializer( typeof(Configuration) ); // initialize seriaizer object --- 228,237 ---- writer.Close(); } catch (Exception e) { ! Console.Write( "Generator.saveConfig( "+file+" ) #230: "); ! Console.WriteLine( e.ToString() ); } } protected void loadConfig( string fileName ) { try { // try, because of I/O-failure XmlSerializer serializer = new XmlSerializer( typeof(Configuration) ); // initialize seriaizer object *************** *** 282,290 **** stream.Close(); } catch (Exception e) { ! Debug.WriteLine( e.Message ); } - - Debug.WriteLine( "Exiting Configuration.loadConfig()" ); - Debug.Unindent(); } --- 240,246 ---- stream.Close(); } catch (Exception e) { ! Console.Write( "Generator.loadConfig( "+fileName+" ) #242: "); ! Console.WriteLine( e.ToString() ); } } *************** *** 295,300 **** */ public static void Main( string[] args) { - Debug.Listeners.Add( new TextWriterTraceListener( Console.Out ) ); - Debug.AutoFlush = true; new Generator(args); } --- 251,254 ---- |