> > >That could be so, but I'd prefer that our code didn't do anything that >could fail, even theoretically. We shouldn't call functions with >arguments that invoke undefined or uncertain behavior. > >It should be a simple matter of adding a test for EOF. > You're right, I can not do testing on all hosts and libc. Attached a new proposal. In the case of "'\r'EOF" we keep EOF in "c" variable and we exit the while just below anyway. Denis