clearerr() clears both EOF and error flags, so do it only for error and not for EOF or loop test becomes while(1)
clearerr() clears both EOF and error flags, so do it only for
error and not for EOF or loop test becomes while(1)

Should go into 2.2
Submitted by: Gregory Neil Shapiro <gshapiro@WPI.EDU>

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase