From: Michael A. C. <mi...@cl...> - 2006-10-31 05:26:10
|
On 10/30/06, Andreas Kupries <and...@ac...> wrote: > Ok, I also found an older RFE by Colin McCormack > > http://sourceforge.net/tracker/index.php?func=detail&aid=1399062&group_id=10894& > atid=360894 > gets with limited line-length > > I think this should be discussed in the TIP I haven't downloaded the patch attached to Colin's RFE yet to see (will do so tonight), but with the various ways one can call [gets] (0 to 3 arguments currently) the semantics seem like they could get a bit messy if -maxchars were supported in all flavors. Also I think you'd want to be able to distinguish between the case where you got -maxchars because that is exactly what was there to be read and when you got -maxchars because you hit the maximum. I suppose you could distinguish the case by requesting -maxchars [expr {$limit + 1}] and then testing [string length $line] to see if it were just $limit or ($limit + 1) ... Anyway, I think [chan available] is a good fit with the new [chan] ensembles in 8.5 and approving the TIP shouldn't preclude a separate TIP for changing [gets] in my opinion. Michael |