Allegro 5 api
#include <allegro5/allegro.h> bool al_ferror(ALLEGRO_FILE *f)
Returns true if the error indicator is set on the given file, i.e. there was some sort of previous error.
al_feof(3alleg5), al_fclearerr(3alleg5)