you do not need this function.  you can use feof(init_file) to test for the end of the file