diff --git a/tren.py b/tren.py index 2a31edd..13c5176 100755 --- a/tren.py +++ b/tren.py @@ -7,7 +7,7 @@ PROGNAME = "tren.py" PROGENV = PROGNAME.split(".py")[0].upper() -RCSID = "$Id: tren.py,v 1.126 2010/01/30 19:13:04 tundra Exp $" +RCSID = "$Id: tren.py,v 1.127 2010/01/30 19:41:15 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -17,7 +17,7 @@ OWNER = "TundraWare Inc." COPYRIGHT = "Copyright %s %s %s " % (CPRT, DATE, OWNER) -PROGVER = PROGNAME + " " + VERSION + (" - %s" % COPYRIGHT) +PROGVER = PROGNAME + " " + VERSION + (" - %s\n" % COPYRIGHT) #----------------------------------------------------------# @@ -540,17 +540,23 @@ def ProcessIncludes(OPTIONS): + # Make sure the include argument has trailing space or the + # code below will break. + + OPTIONS = " ".join(OPTIONS).replace(INCL, INCL+" ").split() + # Resolve include file references allowing for nested includes. # This has to be done here separate from the command line options so # that getopt() processing below will "see" the included statements. + NUMINCLUDES = 0 while " ". join(OPTIONS).find(INCL) > -1: # Get the index of the next include to process. # It cannot be the last item because this means the filename # to include is missing. - + i = OPTIONS.index(INCL) if i == len(OPTIONS)-1: ErrorMsg(eBADARG % eBADINCL)