Capture any fgets results/errors

return 0 for EOF, -1 for error as far as I can tell from the translation of the description.
Capture any fgets results/errors
Capture any fgets results/errors
Capture any fscanf errors
Capture any system errors for print call
Collect system result to satisfy compiler
Capture any fread errors
Capture all fscanf/fgets/fread errors/results