Skip to content
Tcl Source Code Artifact [0d48b16024]
Login

Artifact [0d48b16024]

Artifact 0d48b160249c7d4cc93ecaef6898a44a21d4fb71:

Ticket change [0d48b16024] - Ticket [2895565fffffffff|2895565fff] <i>Busyloop in vwait in innocent HTTP code</i> status still Open with 4 other changes by andreas_kupries on 2009-11-11 09:08:46.
D 2009-11-11T09:08:46
J icomment Ok,\shere\smy\snotes\safter\sreading\sCopyData\sand\srecursing\sinto\sthe\srelated\sfunctions,\si.e.\sDo*.\n\nDoReadChars\n\s\s\s\s\s\s\s\sRequest:\s'toRead'\s-\sNumber\sof\scharacters.\n\s\s\s\s\s\s\s\sResult:\s\sNumber\sof\scharacters\sread\n\s\s\s\s\s\s\s\sStorage:\sA\sTcl_Obj\n\s\s\s\s\s\s\s\sDoes\sEOL\stranslation\s(ReadBytes,\sReadChars\sbranches)\n\s\s\s\s\s\s\s\sDoes\sencoding\sconversion\s->\sResult\sis\sUTF8,\sReadChars\sbranch\n\nDoRead\n\s\s\s\s\s\s\s\sRequest:\s'toRead'\s-\sNumber\sof\s_bytes_\n\s\s\s\s\s\s\s\sResult:\sNumber\sof\sbytes\sread\s\s-\s(Comment\ssays\schars,\sis\sin\serror)\n\s\s\s\s\s\s\s\sStorage:\schar*\sarray\s(bytes).\n\s\s\s\s\s\s\s\sNOTE!\s\s\s\s\s\s\s\s\s\s\sNo\sencoding\sconversion\sapplied.\n\s\s\s\s\s\s\s\sDoes\s\s\s\s\s\s\s\s\s\s\s\sEOL\stranslation\s(GetInput\s+\sCopyAndTranslateBuffer)\n\nDoWriteChars\n\s\s\s\s\s\s\s\sRequest:\s\s\s\s\s\s\s\s#bytes\sto\swrite\n\s\s\s\s\s\s\s\sResult:\s\s\s\s\s\s\s\s\s#bytes\swritten\n\s\s\s\s\s\s\s\sStorage:\s\s\s\s\s\s\s\schar*\sarray,\sutf8\sencoded\scharacters\n\s\s\s\s\s\s\s\sDoes\sencoding\sconversion,\sdoes\sEOL\stranslation\n\s\s\s\s\s\s\s\s(WriteChars\s(E,\sEOL),\sWriteBytes\s(EOL)).\n\nDoWrite\n\s\s\s\s\s\s\s\sRequest:\s\s\s\s\s\s\s\s#bytes\sto\swrite.\n\s\s\s\s\s\s\s\sResult:\s\s\s\s\s\s\s\s\s#bytes\swritten\n\s\s\s\s\s\s\s\sStorage:\s\s\s\s\s\s\s\schar*\sarray\n\s\s\s\s\s\s\s\sDoes\sEOL\stranslation.\sNo\sencodings\sapplied.\n\nUse\sin\sCopyData\sseems\sto\sbe\sbyte-oriented\sall\sthe\sway,\smaking\strouble\nfor\sDoReadChars,\sDoWriteChars.\n\nI\sreadily\ssee\splaces\swhere\s#chars\sare\scompared\sto\s#bytes.\sGah.\s\sAnd\nthen\sthere\sis\sthe\spossibility\sof\sEOL\stranslations\schanging\ssizes\nunpredictably.\n\nI\sbelieve,\swhatever\swe\shave\swritten\sshould\shave\sno\sbearing\son\sthe\nnumber\sof\sthings\s'toRead'\sleft\s...\sWe\sare\sto\scopy\sN\schars/bytes,\sand\nit\sdoes\snot\smatter\show\smany\schars/bytes\sget\swritten\sto\sthe\sdestination\nfor\sK\schars/bytes\sof\sthe\sN\sfor\sthe\scounting\sdown\sof\show\smuch\sis\sleft.\n\n~~~~\n\nWe\sshould\smaybe\stry\sto\n\n\s\s\stypedef\sIntChars\sint;\n\s\s\stypedef\sIntBytes\sint;\n\nand\ssee\sif\sthe\scompiler\swarns\sif\swe\sassign\svariables\sof\sdifferent\sInt*\ntypes\sto\seach\sother.\sIf\sfear\sit\swill\snot\swarn.\n\nOr\schange\sthe\svarnames\sto\sreflect\sexactly\swhat\stype\sof\sthings\sthey\ncount.\n\nOr\smaybe\ssplit\sCopyData\sinto\sfour\sroutines,\sone\sfor\seach\scominbation\nof\sin/outBinary//sameEncoding.\sPossibly\seasier,\sfactor\sthe\sread\sand\nwrite\ssections\sof\sCopyData\sinto\sseparate\sfunctions,\sand\sthen\ssplit\neach\sof\sthese\sinto\stwo,\sbased\son\sthe\sencoding/binary\ssettings.\sThen\swe\ncould\swrite\seach\sfunction\sto\scount\sproperly,\swithout\slots\sof\nconditionals\sinside\sto\sswitch\sbetween\sthe\spossible\svariants.\n\nThis\spart\sof\stclIO\sfeels\sa\sbit\slike\sone\sof\sthe\sstables\sof\saugias(sp?).\n\n
J login andreas_kupries
J mimetype text/plain
J username andreas_kupries
K 2895565fffffffffffffffffffffffffffffffff
U andreas_kupries
Z 8c081e4ea5b157e77fa422096037bd3f