SHF_EOF
shf->flags &= ~(SHF_EOF | SHF_READING);
if (shf->flags & (SHF_EOF | SHF_ERROR)) {
shf->flags |= SHF_EOF;
shf->flags &= ~SHF_EOF;
shf->flags &= ~SHF_EOF;
#define shf_eof(shf) ((shf)->flags & SHF_EOF)
#define shf_clearerr(shf) ((shf)->flags &= ~(SHF_EOF | SHF_ERROR))