You should be able to do this using "select()", perhaps something like this:
Sorry if this is a late reply, but I got sidetracked.Code:bool checkifdata(FILE *f) { int fno = fileno(f); fd_set fdset; FD_ZERO(fdset); FD_SET(fno, fdset); return select(fno+1, fdset, NULL, NULL, NULL); }
--
Mats