> This is correct. However, the form.tcl is not optimal code. You > don't need to go through and search each line. You start at the > beginning and break into parts by doing > > string first \n$bound\n $string
I thought about this. There's no reason it wouldn't work, but you'd have to be careful. For example, if you were using a block size of, say, 1000 characters, and your boundary was 20 characters long, you'd need to read the first 1000 characters, do a string first, then get the 1000 characters starting at 980 -- because the boundary may have started at 990 and ended at 1010, in which case the string first would not have found it in the first 1000 characters. That's a convoluted way of saying it. > Before you do and spend a lot of time coding form.tcl in C though, > I would recommend seeing what the AOLServer head is doing. I didn't > examine it closely, but it's only about 20 lines of Tcl now. I suppose you have a good point. I'll take a look at it. This is not Simos' problem, though, he is having problems with plain ns_cptofp. I myself have never had problems with this, even with large files. So I'm curious about it.