Here is the function where the failure occurs
/*
* Gets data from a file to fill output argument
* Returns standard error code: 1 => successful input, 0 => error,
* negative EOF value => end of file
*/
int
fscan_unit(FILE *filep, /* input - input file pointer */
unit_t *unitp) /* output - unit_t structure to fill */
{
int status;
status = fscanf(filep, "%s%s%s%lf", unitp->name,
unitp->abbrev,
unitp->class,
&unitp->standard);
if (status == 4)
status = 1;
else if (status != EOF)
status = 0;
return (status);
The line in blue is reached by the program during execution but the very next line never executes.