Add the function prototypes, variables, and file opening functions for format.c