This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/fwide.c

17 lines
301 B
C

#include <stdio.h>
#include <wchar.h>
void main( void )
{
FILE *fp;
int mode;
fp = fopen( "file", "r" );
if( fp != NULL ) {
mode = fwide( fp, -33 );
printf( "orientation: %s\n",
mode > 0 ? "wide" :
mode < 0 ? "byte" : "none" );
}
}