Take into account the number of pushed-back bytes (ungetc).