This code has been lying around for ages, and I'm not sure about
its provenance. It could be my own work, but I might also have
gotten most of it from somewhere (at least 6 years old in any case).
All I did today was to package it up, @ the internal commands and
add some links and comments.