ensure automatically generated files have a newline at the end
cleanup, use C99