im2reg works if the file length starts as zero. Crazy kernel problems if I try to write more. It's a mess
Lots of miscellaneous fixes to #defines, error checking, etc. Most importantly: IM-->REG works, aaah :D. Still lots of error checking to do/improve and lots of debug messages to clean.
lots of cleaning
about to svn-submit. Only remaining problem: regular->immediate file conversion scrambles file contents