Okay, I seem to have things at least mostly working. For anyone interested, I've created a new3/ directory, parallel to the new2/ I mentioned upthread, with my current version in it. I think I've fixed most of the issues people have raised; the major exception that comes to mind is that it's still not MPSAFE. (I've commented the places I noticed that depend on the giantlock for correctness; there are doubtless others I haven't noticed.)
/~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML mo...@rodents-montreal.org / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B