Skip to content
Tcl Source Code Artifact [ba2848232f]
Login

Artifact [ba2848232f]

Artifact ba2848232f73aed8ab4a0b31e8cbe11fa7c95396:

Ticket change [ba2848232f] - Closed ticket [219282ffffffffff|219282ffff]: <i>Tcl_SetChannelOption (-buffering line) working incorrectly</i> plus 7 other changes by andreas_kupries on 2001-07-20 01:10:19.
D 2001-07-20T01:10:19
J closedate 2001-07-19T18:10:19
J closer andreas_kupries
J icomment Logged\sIn:\sYES\s\nuser_id=75003\n\nI\shave\sto\sdeclare\sthis\sitem\sas\sinvalid.\sHere\scomes\sthe\s\nexplanation.\n\nputs\s<some-data>\stranslates\sinto\sa\scall\s\nto\s"Tcl_PutsObjCmd",\swhich\sin\sturn\scalls\s"Tcl_WriteObj",\s\nwhich\sin\sturn\scalls\s"WriteChars"\s(in\s"tclIO.c").\sThe\slast\s\nprocedure\snow\sdoes\sseveral\sthings:\sEOL\stranslation\sand\s\nconversion\sof\sthe\sinternal\sUTF-8\sto\sthe\sexternal\sencoding.\n\nFor\sthe\sfirst\saction\s(EOL-translation)\sthe\ssystem\sgoes\sover\s\nthe\sinput,\stranslates\sand\sstores\sthe\sresult\sin\sa\sstaging\s\nbuffer.\sWhenever\sthe\sstaging\sbuffer\sis\sfull\sthe\sresult\sis\s\nhanded\sto\sthe\sUTF-8\sconversion.\sThis\sstages\sappends\sthe\s\nresult\sof\sthe\sconversion\sto\sthe\scurrent\sbuffer\sin\sthe\sout\s\nqueue,\sor\sallocates\sa\snew\sone\sif\sthe\squeue\swas\sempty.\n\nAll\sof\sthe\sabove\scan\sresult\sin\sbreaking\sapart\sthe\sdata\sto\s\nwrite\sinto\sseveral\schunks,\seach\sin\sits\sown\sbuffer.\sSo\sit\sis\s\npossible\sfor\sthe\sfirst\sbuffer\sto\scontain\ssome\sfull\slines\sof\s\nthe\sdata\sto\swrite\sand\sa\spartial\sline,\swithout\sa\sclosing\s\\n.\s\nStill,\sthe\sbuffer\sdoes\s_contain\sfull\slines_\sand\sthus\shas\sto\s\nbe\sflushed\saccording\sto\sthe\sset\sbuffering\spolicy.\n\nSo\sit\sis\spossible\sthat\sa\sbuffer\sis\swritten\swhich\sis\snot\s\nclosed\swith\sa\s\\n,\seven\sif\spolicy\s"line"\sis\sset.\sIt\sjust\shas\s\nto\scontain\sat\sleast\sone\sfull\sline.\sThat\sa\spartial\sline\s\nfollows\sdoes\snot\sdetract\sfrom\sthe\srequirement\sto\sflush\sthis\s\nbuffer.\sThe\sassumption\syou\sassert\supon\s(end\sof\sbuffer\s==\s\n\\n)\sis\ssimply\snot\strue.\n\n
J login andreas_kupries
J mimetype text/plain
J resolution Invalid
J status Closed
J username andreas_kupries
K 219282ffffffffffffffffffffffffffffffffff
U andreas_kupries
Z 807da0f71f2ebeba143ea64dcec23b78