| |
---|
| | # 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) |
---|
| |
---|
| | |