turn some buffer macros into functions

also, add some asserts to buffer code
make struct buffer private to buffer.c

also, changed some whitespace in fint.c to match the surrounding code