(search & replace). Please feel free to add your name to any files to which you added any contributions. ALL SOURCECODE IS LICENCED UNDER THE TERMS AND CONDITIONS OF THE GPL (2 and above)
urrgh. this was rather tough to get right. Main problem is avoiding switch-on-type.