simplify file:file:... stuff
KNF, since this is no longer script generated
add braces missed when fixing leaks
More KNF.
define RFILE only in the file that needs it
unistd.h for protos where needed