Ported voxlap.c up to line 6700.