title: fseek passing negative offset and SEEK_CUR
body: <p>I have a bad performance running <code>fseek(..)</code> in a very big file.
  Every time a call <code>fseek</code> function, I need to move the file pointer position backward <code>100 bytes</code>:</p>
  
  <pre><code>  fseek(fp, -100, SEEK_CUR);
  </code></pre>
  
  <p>before, I was doing this:</p>
  
  <pre><code>  fseek(fp, (index)*100, SEEK_SET); // which makes basically the same...
  </code></pre>
  
  <p>My question is how fseek moves the pointer through the file and sets the file pointer in an specific position.</p>
  
  <p>I thought that it takes the file pointer and moves it backward, but now I think that what it really does, is</p>
  
  <ul>
  <li><p>get the current position (<code>cp</code>)</p></li>
  <li><p>add the negative index (<code>p = idx + cp</code>)</p></li>
  <li><p>and move the file pointer from the beginning of the file to that position (<code>fseek(fp, p, SEEK_SET)</code>)</p></li>
  </ul>