title: Reading text-file until EOF using fgets in C
body: <p>what is the correct way to read a text file until EOF using fgets in C? Now I have this (simplified):</p>
  
  <pre><code>char line[100 + 1];
  while (fgets(line, sizeof(line), tsin) != NULL) { // tsin is FILE* input
     ... //doing stuff with line
  }
  </code></pre>
  
  <p>Specifically I'm wondering if there should be something else as the while-condition? Does the parsing from the text-file to "line" have to be carried out in the while-condition? </p>