Fixed problem when user specified -I without a space before the filename following as in -Ifile.
1 parent ff5a7bf commit 2f2281cd26aefbec7c4bf63f23b160eef060d0a0
@tundra tundra authored on 30 Jan 2010
Showing 1 changed file
View
12
tren.py
# Program Information
 
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
 
DATE = "2010"
OWNER = "TundraWare Inc."
COPYRIGHT = "Copyright %s %s %s " % (CPRT, DATE, OWNER)
 
PROGVER = PROGNAME + " " + VERSION + (" - %s" % COPYRIGHT)
PROGVER = PROGNAME + " " + VERSION + (" - %s\n" % COPYRIGHT)
 
 
#----------------------------------------------------------#
# Variables User Might Change #
#####
 
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)
sys.exit(1)