setmode
函数名:setmode
功 能: 设置打开文件方式
用 法:int setmode(int handle, unsigned mode);
程序例:
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
int main(void)
{
int result;
result = setmode(fileno(stdprn), O_TEXT);
if (result == -1)
perror("Mode not available
");
else
printf("Mode successfully switched
");
return 0;
}