Sorry, I should have searched further before posting. <rope.h> is
more-or-less what I'm looking for; I just have to figure out how it
works to see if it's appropriate.
I modified bastring.{h,cc} to take an allocator, though. I can supply
the diffs if anybody's interested.
d.