| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 
 | /* fwide example */
#include <stdio.h>
#include <wchar.h>
int main ()
{
  FILE * pFile;
  int ret;
  pFile = fopen ("myfile.txt","a");
  if (pFile) {
    fwide (pFile,1);
    ret = fwide (pFile,0);
    if (ret>0) puts ("The stream is wide-oriented");
    else if (ret<0) puts ("The stream is byte-oriented");
    else puts ("The stream is not oriented");
    fclose (pFile);
  }
  return 0;
}
 |