At 10:58 AM +0200 5/6/02, Peter Gibbs wrote: >The COWing of substrings requires a major interface change: >*** All references to the data in a STRING must use the new strstart pointer >instead of bufstart ***
Actually, we don't. (Sez the man catching up on altogether too much mail) Since we're putting the COW stuff at the tail end, substrings of COW strings are fine. You set the bufstart to where the substring starts, buflen set so it goes to the end of the original buffer, and the string length bit holds the real string length. That way you start where you need to, but you can still find the COW marker off the end of the original buffer. Yeah, the substring loses the bits of the original string that are before the substring's beginning, but I don't think that'll be a problem. -- Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk