title: wchar_t vs wint_t
body: <p>This is an ANSI C question. I have the following code.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;locale.h&gt;
  #include &lt;wchar.h&gt;
  
    int main()
    {
      if (!setlocale(LC_CTYPE, "")) {
        printf( "Can't set the specified locale! "
                "Check LANG, LC_CTYPE, LC_ALL.\n");
        return -1;
      }
      wint_t c;
      while((c=getwc(stdin))!=WEOF)
        {
      printf("%lc",c);
        }
      return 0;
    }
  </code></pre>
  
  <p>I need full UTF-8 support, but even at this simplest level, can I improve this somehow? Why is <code>wint_t</code> used, and not <code>wchar</code>, with appropriate changes?</p>