D 2008-11-07T07:01:36
J icomment I\sfind\sdiff\s-u\sis\susually\sa\sbetter\sformat\sthan\sthe\sdefault\sas\sit\sprovides\smore\scontext.\nThis\spatch\slooks\sgood\s-\sit\sdefinately\simproves\sthe\sbinary\sinit\sfunction!\sYou\sshould\sglance\sthrough\sthe\stcl\sstyle\sguide\ssometime\sthough.\sTcl\ssources\suse\san\sindent\sof\s4\sand\sa\stab\sspace\sof\s8.\sWhen\srefactoring\scode\stry\sto\savoid\srenaming\svariables\sspuriosly.\sIn\sthe\sensemble\screation\sreworking\syou\sdidn't\sneed\sto\sredo\ssome\sof\sthe\sinner\sbits\sand\sits\sactually\smore\sefficient\sto\sstick\swith\sTcl_DString*\sfunctions\sfor\ssome\sof\sthis\sstring\smanipulation.\nI've\scleaned\sup\sthe\spatch\sa\sbit\sand\sattached\sit\sso\syou\scan\ssee\swhat\sI\schanged.\sI'd\sapply\sit\salready\sexcept\sI\sget\sa\stest\sfailure:\nbinary.test\n\n\n====\sbinary-63.2\sNaN\sFAILED\n====\sContents\sof\stest\scase:\n\n\s\s\s\sbinary\sscan\s[binary\sformat\sq\s-NaN]\sw\sw\n\s\s\s\sformat\s0x%016lx\s[expr\s{$w\s&\s0xfff3ffffffffffff}]\n\n----\sResult\swas:\n0xfff3ffffffffffff\n----\sResult\sshould\shave\sbeen\s(exact\smatching):\n0xfff0000000000000\n====\sbinary-63.2\sFAILED\n\nOnce\sI\swork\sout\swhy\swe\sshould\sbe\sgood\sto\sgo.\n
J login patthoyts
J mimetype text/plain
J username patthoyts
K 2215022fffffffffffffffffffffffffffffffff
U patthoyts
Z 9e0c2228bfd381eee66a130588e36029