title: reading ini files using fscanf in c
body: <p>I'm having a problem parsing an <code>.ini</code> <code>file</code>. I know there are lots of post on this topic, and I have read many of them. my <code>ini</code> <code>file</code> have only one <code>entry</code>:</p>
  
  <pre><code>font=tahoma.ttf
  </code></pre>
  
  <p>Source Code:</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  
  static FILE *ini_file;
  char font[20];
  
  void LoadConfig()
  {
      char Setting[20],Value[20];
      int EndOfFile = 0;
      if ((ini_file = fopen("config.ini", "r")))
      {
          EndOfFile = fscanf(ini_file, "%[^=]=%s", Setting, &amp;Value);
          while (EndOfFile != EOF)
          {
              if(strcmp(Setting,"font") == 0)
              {
                  strcpy(font,Value);
              }
              EndOfFile = fscanf(ini_file, "%[^=]=%s", Setting, &amp;Value);
          }
          fclose(ini_file);
      }
  }
  </code></pre>
  
  <p>The problem is that, the value is not never read into the <code>font</code> <code>variable</code>.</p>