{"comment":{"url":"https://api.github.com/repos/mhoran/tbd/comments/15555214","html_url":"https://github.com/mhoran/tbd/commit/90d82fb4bd8df0fbbb89d8ce7506c0ab716fccfe#commitcomment-15555214","id":15555214,"user":{"login":"mhoran","id":5330,"avatar_url":"https://avatars.githubusercontent.com/u/5330?v=3","gravatar_id":"","url":"https://api.github.com/users/mhoran","html_url":"https://github.com/mhoran","followers_url":"https://api.github.com/users/mhoran/followers","following_url":"https://api.github.com/users/mhoran/following{/other_user}","gists_url":"https://api.github.com/users/mhoran/gists{/gist_id}","starred_url":"https://api.github.com/users/mhoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhoran/subscriptions","organizations_url":"https://api.github.com/users/mhoran/orgs","repos_url":"https://api.github.com/users/mhoran/repos","events_url":"https://api.github.com/users/mhoran/events{/privacy}","received_events_url":"https://api.github.com/users/mhoran/received_events","type":"User","site_admin":false},"position":58,"line":103,"path":"src/main_linux.c","commit_id":"90d82fb4bd8df0fbbb89d8ce7506c0ab716fccfe","created_at":"2016-01-20T11:44:17Z","updated_at":"2016-01-20T11:44:17Z","body":"I need to know if I've reached EOF in order to quit. If EOF is reached in the middle of the stream, fgets won't tell me (without checking feof). So I just used feof. \n\n\nOn January 20, 2016 2:51:16 AM EST, Mike Burns <notifications@github.com> wrote:\n>How about checking the return from fgets(3) instead of checking feof(3)\n>manually? Like:\n>\n>```c\n>if (fgets(buffer, sizeof(buffer), stdin) == NULL)\n>  return;\n>```\n>\n>---\n>Reply to this email directly or view it on GitHub:\n>https://github.com/mhoran/tbd/commit/90d82fb4bd8df0fbbb89d8ce7506c0ab716fccfe#commitcomment-15550702\n\n-- \nSent from my mobile device."}}