Fix the return value of fgets().
Add a testcase to check the behavior of fgets on eol.
Add myself to AUTHORS
Merge pull request #945 from ting-yuan/incoming

Fix the return value of fgets().