Remove check_eof(), make peek() mimic the C function

* peek() returns an int in 0..255, or -1 on eof or error