?? no_redir.c
字號:
#include <stdio.h>
#include <dos.h>
void main (void)
{
union REGS inregs, outregs;
// check the stdin handle first
inregs.x.ax = 0x4400;
inregs.x.bx = 0; // stdin is handle 0
intdos (&inregs, &outregs);
if ((outregs.x.dx & 1) && (outregs.x.dx & 128))
fprintf (stderr, "stdin has not been redirected\n");
else
fprintf (stderr, "stdin is redirected\n");
// Now check stdout
inregs.x.ax = 0x4400;
inregs.x.bx = 1; // stdout is handle 1
intdos (&inregs, &outregs);
if ((outregs.x.dx & 2) && (outregs.x.dx & 128))
fprintf (stderr, "stdout has not been redirected\n");
else
fprintf (stderr, "stdout is redirected\n");
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -