.
D 2000-10-26T01:05:06
J assignee nobody
J cmimetype text/plain
J comment OriginalBugID:\s2040\sRFE\nVersion:\s8.1\nSubmitDate:\s'1999-05-10'\nLastModified:\s'2000-05-10'\nSeverity:\sMED\nStatus:\sReleased\nSubmitter:\spat\nChangedBy:\shobbs\nOS:\sOther\nMachine:\sNA\nFixedDate:\s'2000-05-10'\nFixedInVersion:\s8.4a1\nClosedDate:\s'2000-10-25'\n\n\nName:\n\nJean-Claude\sWippler\n\n\n\nComments:\n\nThe\sability\sto\srun\sscripts\swhich\scontain\sadditional\sdata\s(even\sbinary\n\ndata)\safter\sthe\send\sof\sa\sscript\sfile\smakes\sit\spossible\sto\screate\n\n"scripted\sdocuments"\s-\si.e.\sscripts\swhich\sinclude\snon-script\sdata,\sor\n\neven\san\sentire\sdatabase.\s\sThis\sis\svery\ssimilar\sto\sthe\svarious\s"wrap"\n\ntools\scurrently\sin\sexistence,\swhich\sare\sbased\son\sthe\sfact\sthat\n\nexecutables\s(such\sas\sthose\sbased\son\sthe\s"ELF"\sformat)\salso\sallow\n\nappending\suninterpreted\sdata.\s\sFor\sa\sdescription\sof\sscripted\sdocuments,\n\nsee\shttp://216.71.55.6/cgi-bin/jcw/ScriptedDoc\s(this\smechanism\sis\n\nalready\sbeing\sused\sin\sa\snumber\sof\sprojects,\sincluding\sthe\sTcl'ers\sWiki).\n\nOne\sof\sthe\sunique\sfeatures\sof\sscripted\sdocuments\sis\sthat\sthey\scan\sbe\n\nused\sto\sdeploy\s"installation-less"\sand\sfully\sself-contained\scustom\n\napplications.\s\sNote:\sit\sis\scritical\sthat\sscript\sreading\sstops\sat\sCTRL/Z,\n\nsince\ssubsequent\sdata\smight\scontain\sinvalid\s-\sor\sin\sfact\seven\sunparsable\n\n-\sTcl\scode\s(such\sas\san\sunmatched\sright\sbrace).\n\n\n\nObservedBehavior:\n\nOn\sWindows,\stext\sfile\sreading\sstops\supon\sencountering\sa\sCTRL/Z\s(\\026)\n\ncharacter.\n\nOn\sUnix,\severything\selse\sis\salso\sread\sin.\n\n\n\nDesiredBehavior:\n\nConsistent\sbehavior\sacross\splatforms.\s\sThe\sproposed\sbehavior\sis\sto\sread\n\nup\sto\sCTRL/Z\son\sUnix\sas\swell.\s\sThe\spatch\ssubmitted\shere\sis\sa\sone-line\n\nchange\sto\sthe\sTcl\score\swhich\smaintains\s100%\scompatibility\s(assuming\n\nscripts\snever\s*include*\sa\sCTRL/Z,\swhich\swould\sfail\son\sWindows\sright\snow\n\nanyway).\n\n\n\nPatch:\n\n***\stests/source.test.orig\s\s\s\s\s\sThu\sApr\s29\s03:12:36\s1999\n\n---\stests/source.test\s\s\sSat\sMay\s\s8\s18:13:22\s1999\n\n***************\n\n***\s178,183\s****\n\n---\s178,189\s----\n\n\s\s\s\s\s\ssource\ssource.file\n\n\s\s\s\s\s\sstring\slength\s$x\n\n\s\s}\s5\n\n+\stest\ssource-6.2\s{source\sskips\severything\safter\sCtrl-Z}\s{\n\n+\s\s\s\s\sset\sx\s{}\n\n+\s\s\s\s\smakeFile\s[list\sset\sx\sab\\32c]\ssource.file\n\n+\s\s\s\s\ssource\ssource.file\n\n+\s\s\s\s\sstring\slength\s$x\n\n+\s}\s2\n\n\s\s\n\n\s\s#\scleanup\n\n\s\scatch\s{::tcltest::removeFile\ssource.file}\n\n***\sgeneric/tclIOUtil.c.orig\s\s\s\sThu\sApr\s29\s03:11:44\s1999\n\n---\sgeneric/tclIOUtil.c\sSat\sMay\s\s8\s17:59:49\s1999\n\n***************\n\n***\s306,311\s****\n\n---\s306,312\s----\n\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s"\\":\s",\sTcl_PosixError(interp),\s(char\s*)\sNULL);\n\n\s\s\s\s\s\s\s\sgoto\send;\n\n\s\s\s\s\s\s}\n\n+\s\s\s\s\sTcl_SetChannelOption(interp,\schan,\s"-eofchar",\s"\\32");\n\n\s\s\s\s\s\sif\s(Tcl_ReadChars(chan,\sobjPtr,\s-1,\s0)\s<\s0)\s{\n\n\s\s\s\s\s\s\s\s\s\sTcl_Close(interp,\schan);\n\n\s\s\s\s\s\s\s\sTcl_AppendResult(interp,\s"couldn't\sread\sfile\s\\"",\sfileName,\n\n\n\nPatchFiles:\n\nsource.test\n\n\s\s\s\stclIOUtil.c\n\n\n\n\n\n\s\s\s\s\s\s\s\sThis\spatch\sis\sincorrect.\sUnix\sfile\ssystems\sdo\snot\suse\sfile\n\s\s\s\s\s\s\s\stermination\scharacters.\sThe\s"fconfigure"\scommand\scan\sbe\sused\n\s\s\s\s\s\s\s\sto\sset\sthe\stermination\scharacter\safter\sthe\sfile\sis\sopen\sif\sthe\n\s\s\s\s\s\s\s\sscript\sneeds\sto\semulate\sWindows\sbehavior.\n\nJC's\sresponse:\nThis\sleads\sme\sto\sbelieve\sthat\sthe\smoderator/editor\sthought\sthis\sreport\nhad\sto\sdo\swith\sthe\sgeneral\scase\sof\sopening\stext\sfiles.\s\sThis\sis\snot\sthe\ncase\s-\smy\spurpose\sfor\ssubmitting\sthis\schange\srequest\smay\snot\shave\sbeen\nproperly\sdescribed\sin\sthe\scomments:\sthis\sis\sabout\sthe\sbehavior\sof\sTcl\nreading\sand\sexecuting\sscripts\sfrom\sfile\s(i.e.\s"source\s<file>").\s\sThe\nproposed\schange\stakes\sadvantage\sof\san\sexisting\splatform\sdifference\sto\nintroduce\sa\snew\sfeature\swhich\sopens\sup\sa\swhole\snew\sway\sof\srunning\sTcl\nscripts.\s\sSee\shttp://216.71.55.6/cgi-bin/metakit/18.html\sfor\sdetails.\nThere\sis\sno\sway\sone\scan\suse\sfconfigure\sin\sthe\scontext\sof\s"tclsh\s<file>".\n\nWith\sall\sdue\srespect:\swould\sit\sbe\spossible\sto\spass\sthis\sinformation\son\nto\swhoever\sreviewed\sissue\s2040\sand\sask\sfor\sa\sre-assessment?\s\sI\sdon't\nwant\sto\smake\sa\snuisance\sof\smyself,\sbut\sthe\sproposed\sone-line\schange\shas\ndeeper\simplications\s(and\suses)\sthan\smy\ssubmission\smight\shave\smade\sclear.\n\n--\sJean-Claude\n--\nThis\shas\sbeen\schanged\sto\sRFE,\sbecause\sthat\sis\sreally\swhat\sit\sis\n(asking\sto\schange\sthe\sdefault,\sfunctional,\sas\sexpected\sbehavior\nof\sUnix\sscripts).\n--\s05/25/1999\sredman\s\nI\sthink\sthis\swould\sbest\sbe\simplemented\swith\san\soption\sto\ssource\nlike\s'source\s-eofchar\s\\32\s...'.\s\sThere\sisn't\stime\sto\smake\sthis\ninto\s8.3.0,\sbut\swe'll\slook\sat\sit\sfollowing.\s\sIt\swould\sbe\snice\sto\ngo\sin\swith\sa\sgeneral\soverhaul\sof\ssource\sthat\salso\ssupported\n-encoding\sand\s-fid.\s\sThis\swould\sallow\susers\sto\sbe\scertain\sof\ncross-platform\scompatibility\sas\swell\sas\ssystem\slevel\scompatibility.\s\n--\s02/08/2000\shobbs\nJCW\snotes\sthat\ssuch\sa\sfeature\sneeds\sto\sbe\sas\spatched\sabove,\sbecause\nyou\swould\sneed\sto\shave\ssupport\sright\sfrom:\n\s\s\s\stclsh\sscript.tcl\nwhere\sscript.tcl\swill\shave\s^Z\sseparated\scode\sand\sdata\ssections.\s\n--\s02/08/2000\shobbs\nPatched,\sdoc'ed\s(Tcl_EvalFile\sand\ssource)\sand\stested\sfor\s8.4a1.\s\n--\s05/10/2000\shobbs
J foundin obsolete:\s8.1
J priority 5\sMedium
J resolution None
J status Open
J submitter nobody
J subsystem 81.\sBundled\sPackages
J title CTRL/Z\sdoes\snot\sterminate\sscript\son\sUnix\s(-eofchar\sfor\ssourc
J type RFE
K 218764ffffffffffffffffffffffffffffffffff
U nobody
Z 81dc5330f17fef39a20549821c25ef8e