The implementation of hGetLine, as given in the report, doesn't handle partial lines on unbuffered handles that well (not at all, as it turns out). Fixed.