diff --git a/tconfpy.py b/tconfpy.py index 66c8610..20e8463 100755 --- a/tconfpy.py +++ b/tconfpy.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "tconfpy" -RCSID = "$Id: tconfpy.py,v 2.108 2005/01/19 23:03:25 tundra Exp $" +RCSID = "$Id: tconfpy.py,v 2.109 2005/01/19 23:24:19 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -437,13 +437,11 @@ SymTable.Templates.Symbols = copy.copy(Templates.Symbols) - # Initialize the globals + # Initialize the control structures SymTable.ALLOWNEWVAR = AllowNewVars - SymTable.Templates = Templates SymTable.TEMPONLY = TemplatesOnly SymTable.LITERALVARS = LiteralVars - SymTable.INLITERAL = False SymTable.DEBUG = Debug # Load the predefined symbols @@ -531,6 +529,7 @@ retval.ErrMsgs = copy.copy(SymTable.ErrMsgs) retval.WarnMsgs = copy.copy(SymTable.WarnMsgs) retval.LiteralLines = copy.copy(SymTable.LiteralLines) + retval.TotalLines = copy.copy(SymTable.TotalLines) return retval @@ -657,19 +656,16 @@ global SymTable - - linenum=0 - try: cf = open(cfgfile) # Process and massage the configuration file for line in cf.read().splitlines(): - linenum += 1 + SymTable.TotalLines += 1 # Parse this line - ParseLine(line, cfgfile, linenum) + ParseLine(line, cfgfile, SymTable.TotalLines) # Close the config file cf.close() @@ -689,15 +685,14 @@ global SymTable - linenum=0 - # Process and massage the configuration file + for line in cfglist: - linenum += 1 + SymTable.TotalLines += 1 # Parse this line - ParseLine(line, INMEMORY, linenum) + ParseLine(line, INMEMORY, SymTable.TotalLines) # End of 'ParseInMemory()'