Overview
| Artifact ID: | dad36c987f406600b2b28cc1755ffe08d27aa8a5 |
|---|---|
| Ticket: | 1399062fffffffffffffffffffffffffffffffff
gets with limited line length |
| User & Date: | nobody on 2006-01-13 22:09:22 |
Changes
- icomment:
Logged In: NO Are you sure it SEGV'd? Or was it a panic due to not being able to malloc/realloc enough memory? Also from an interface point of view it might be better to put the limit on the filehandle and not the call to gets. ie. make it fconfigure'able, with Tcl providing a default of something suitably big. Not sure what the best course for it to do if it hit the limit. Either (a) return a partial line, or (b) throw an error. I think (b) is preferable as (a) allows silent bugs to creep in and a catch-able exception is preferable to a panic! Although, how often do you see multi million long character lines :-)
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"