sio_eof
int sio_eof(struct sio_hdl *);
if (sio_eof(hdl)) {
if (!sio_eof(d->sio.hdl) && !sio_flush(d->sio.hdl)) {