diff --git a/tconfpy.py b/tconfpy.py index b2b9ed2..144d979 100755 --- a/tconfpy.py +++ b/tconfpy.py @@ -6,7 +6,7 @@ # Program Information PROGNAME = "tconfpy" -RCSID = "$Id: tconfpy.py,v 1.176 2004/04/16 05:48:53 tundra Exp $" +RCSID = "$Id: tconfpy.py,v 1.177 2004/04/16 20:23:22 tundra Exp $" VERSION = RCSID.split()[2] # Copyright Information @@ -309,15 +309,15 @@ Messages["eEQUIVEXTRA"] = FILENUM + "Only a single '%s' Or '%s' Operator Permitted" % (EQUIV, NOTEQUIV) Messages["eIFEXTRATXT"] = FILENUM + "Extra Text On Line. '%s' Only Accepts Variable References As Arguments" Messages["eNOTLEGALVAL"] = FILENUM + "'%s' Not Found In List Of Legal Values For Variable '%s'" -Messages["eSTRINGLONG"] = FILENUM + "Right-Hand-Side Too Long. '%s' Must Be No More Than %s Characters Long" -Messages["eSTRINGSHORT"] = FILENUM + "Right-Hand-Side Too Short. '%s' Must Be At Least %s Characters Long" +Messages["eSTRINGLONG"] = FILENUM + "'%s' Too Long For Variable '%s'. Maximum Length Is %s" +Messages["eSTRINGSHORT"] = FILENUM + "'%s' Too Short For Variable '%s'. Minimum Length is %s" Messages["eSYMBADCHAR"] = FILENUM + "Symbol '%s' Contains Illegal Character '%s'" Messages["eSYMBADSTART"] = FILENUM + "Symbol '%s' Begins With An Illegal Character" Messages["eSYMNAMESPC"] = FILENUM + "Symbol Names May Not Contain Whitespace" Messages["eSYMNONAME"] = FILENUM + "Symbol Name Evaluates To Null String. Not Permitted" Messages["eTYPEBAD"] = FILENUM + "Type Mismatch. '%s' Must Be Assigned Values Of Type %s Only" -Messages["eVALLARGE"] = FILENUM + "%s Is Larger Than The Maximum Allowed, %s, For Variable '%s'" -Messages["eVALSMALL"] = FILENUM + "%s Is Smaller Than The Minimum Allowed, %s, For Variable '%s'" +Messages["eVALLARGE"] = FILENUM + "%s Too Large For Variable '%s'. Maximum Allowed is %s" +Messages["eVALSMALL"] = FILENUM + "%s Too Small For Variable '%s'. Minimum Allowed is %s" Messages["eVARNEW"] = FILENUM + "New Variable Creation Not Permitted" Messages["eVARREADONLY"] = FILENUM + "Variable '%s' Is Read-Only. Cannot Change Its Value" Messages["eVARREFNEST"] = FILENUM + "Nested Variable References Are Not Permitted" @@ -413,7 +413,7 @@ # Public API To Module # #----------------------------------------------------------# -def ParseConfig(cfgfile, InitialSymTable={}, AllowNewVars=True, Debug=False, LiteralVars=False): +def ParseConfig(cfgfile, InitialSymTable={}, AllowNewVars=True, LiteralVars=False, Debug=False): global DebugMsgs, ErrMsgs, WarnMsgs, LiteralLines global CondStack, ALLOWNEWVAR, DEBUG, SymTable, TotalLines, LITERALVARS, INLITERAL @@ -1339,11 +1339,11 @@ if update and typ in (TYPE_FLOAT, TYPE_INT): if low != None and r < low: - ErrorMsg("eVALSMALL", (cfgfile, linenum, r, low, l)) + ErrorMsg("eVALSMALL", (cfgfile, linenum, r, l, low)) update = False if up != None and r > up: - ErrorMsg("eVALLARGE", (cfgfile, linenum, r, up, l)) + ErrorMsg("eVALLARGE", (cfgfile, linenum, r, l, up)) update = False # Check bounds for strings - these are min/max string lengths, if present @@ -1351,11 +1351,11 @@ if update and typ == TYPE_STRING: if low != None and len(r) < low: - ErrorMsg("eSTRINGSHORT", (cfgfile, linenum, l, low)) + ErrorMsg("eSTRINGSHORT", (cfgfile, linenum, r, l, low)) update = False if up != None and len(r) > up: - ErrorMsg("eSTRINGLONG", (cfgfile, linenum, l, up)) + ErrorMsg("eSTRINGLONG", (cfgfile, linenum, r, l, up)) update = False return update