: <i>"subst" processes "return" incorrectly</i> plus 7 other changes
by
.
D 2000-11-02T04:45:26
J closedate 2000-11-01T21:45:26
J closer hobbs
J icomment Fixed\swith\sthe\sfollowing\spatch.\s\sThere\swas\svarying\sbehavior\sfrom\s7.6\sto\s8.2\sthat\s(in\s8.0+)\swas\sall\sbroken\sin\sone\sway\sor\sanother.\s\sThe\sfollowing\sallows\sfor\sthe\sbest\seffort,\skeeping\sclose\scompatability\swith\s7.6.\n\ncvs\sdiff\s-bc\sgeneric/tclParse.c\nIndex:\sgeneric/tclParse.c\n===================================================================\nRCS\sfile:\s/home/cvs/external/tcl/generic/tclParse.c,v\nretrieving\srevision\s1.13\ndiff\s-b\s-c\s-r1.13\stclParse.c\n***\stclParse.c\s\s1999/11/10\s02:51:57\s\s\s\s\s1.13\n---\stclParse.c\s\s2000/11/01\s21:43:50\n***************\n***\s1456,1470\s****\n\s\s\s\s\s\s\s\sTcl_DecrRefCount(objv[i]);\n\s\s\s\s\s\s}\n\s\s\s\s\s\sif\s(gotParse)\s{\n!\s\s\s\s\s\s\sp\s=\sparse.commandStart\s+\sparse.commandSize;\n\s\s\s\s\s\s\s\sTcl_FreeParse(&parse);\n!\s\s\s\s\s\s\sif\s((nested\s!=\s0)\s&&\s(p\s>\sscript)\s&&\s(p[-1]\s==\s']'))\s{\n\s\s\s\s\s\s\s\s\s\s\s\s/*\n\s\s\s\s\s\s\s\s\s\s\s\s\s*\sWe\sget\shere\sin\sthe\sspecial\scase\swhere\sthe\sTCL_BRACKET_TERM\n!\s\s\s\s\s\s\s\s\s\s\s\s*\sflag\swas\sset\sin\sthe\sinterpreter\sand\swe\sreached\sa\sclose\n!\s\s\s\s\s\s\s\s\s\s\s\s*\sbracket\sin\sthe\sscript.\s\sReturn\simmediately.\n\s\s\s\s\s\s\s\s\s\s\s\s\s*/\n\s\s\n\s\s\s\s\s\s\s\s\s\s\s\siPtr->termOffset\s=\s(p\s-\s1)\s-\sscript;\n\s\s\s\s\s\s\s\s}\selse\s{\n\s\s\s\s\s\s\s\s\s\s\s\siPtr->termOffset\s=\sp\s-\sscript;\n---\s1456,1506\s----\n\s\s\s\s\s\s\s\sTcl_DecrRefCount(objv[i]);\n\s\s\s\s\s\s}\n\s\s\s\s\s\sif\s(gotParse)\s{\n!\s\s\s\s\s\s\snext\s=\sparse.commandStart\s+\sparse.commandSize;\n!\s\s\s\s\s\s\sbytesLeft\s-=\snext\s-\sp;\n!\s\s\s\s\s\s\sp\s=\snext;\n\s\s\s\s\s\s\s\sTcl_FreeParse(&parse);\n!\s\n!\s\s\s\s\s\s\sif\s((nested\s!=\s0)\s&&\s(p\s>\sscript))\s{\n!\s\s\s\s\s\s\s\s\s\s\schar\s*nextCmd\s=\sNULL;\s\s\s\s\s\s\s/*\spointer\sto\sstart\sof\snext\scommand\s*/\n!\s\n\s\s\s\s\s\s\s\s\s\s\s\s/*\n\s\s\s\s\s\s\s\s\s\s\s\s\s*\sWe\sget\shere\sin\sthe\sspecial\scase\swhere\sthe\sTCL_BRACKET_TERM\n!\s\s\s\s\s\s\s\s\s\s\s\s*\sflag\swas\sset\sin\sthe\sinterpreter.\n!\s\s\s\s\s\s\s\s\s\s\s\s*\n!\s\s\s\s\s\s\s\s\s\s\s\s*\sAt\sthis\spoint,\swe\swant\sto\sfind\sthe\send\sof\sthe\sscript\n!\s\s\s\s\s\s\s\s\s\s\s\s*\s(either\send\sof\sscript\sor\sthe\sclosing\s']').\n!\s\s\s\s\s\s\s\s\s\s\s\s*/\n!\s\n!\s\s\s\s\s\s\s\s\s\s\swhile\s((p[-1]\s!=\s']')\s&&\sbytesLeft)\s{\n!\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sif\s(Tcl_ParseCommand(NULL,\sp,\sbytesLeft,\snested,\s&parse)\n!\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s!=\sTCL_OK)\s{\n!\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s/*\n!\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s*\sWe\swere\slooking\sfor\sthe\s']'\sto\sclose\sthe\sscript.\n!\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s*\sBut\sif\swe\sfind\sa\ssyntax\serror,\sit\sis\sok\sto\squit\n!\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s*\searly\ssince\sin\sthat\scase\swe\sno\slonger\sneed\sto\sknow\n!\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s*\swhere\sthe\s']'\sis\s(if\sthere\swas\sone).\s\sWe\sreset\sthe\n!\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s*\spointer\sto\sthe\sstart\sof\sthe\scommand\sthat\safter\sthe\n!\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s*\sone\scausing\sthe\sreturn.\s\s--\shobbs\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s*/\n\s\s\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sp\s=\s(nextCmd\s==\sNULL)\s?\sparse.commandStart\s:\snextCmd;\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sbreak;\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s}\n+\s\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sif\s(nextCmd\s==\sNULL)\s{\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\snextCmd\s=\sparse.commandStart;\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s}\n+\s\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s/*\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s*\sAdvance\sto\sthe\snext\scommand\sin\sthe\sscript.\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s*/\n+\s\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\snext\s=\sparse.commandStart\s+\sparse.commandSize;\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sbytesLeft\s-=\snext\s-\sp;\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sp\s=\snext;\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sTcl_FreeParse(&parse);\n+\s\s\s\s\s\s\s\s\s\s\s}\n\s\s\s\s\s\s\s\s\s\s\s\siPtr->termOffset\s=\s(p\s-\s1)\s-\sscript;\n\s\s\s\s\s\s\s\s}\selse\s{\n\s\s\s\s\s\s\s\s\s\s\s\siPtr->termOffset\s=\sp\s-\sscript;\n\n
J login hobbs
J mimetype text/plain
J resolution Fixed
J status Closed
J username hobbs
K 219829ffffffffffffffffffffffffffffffffff
U hobbs
Z f9b0de9f94a54dee3c1da83e389f70c5