📄 stdio_rd.c
字号:
/* * Standard I/O redirection * * Author: Aaron Kunze, aaron.kunze@intel.com * * $Id: stdio_rd.c,v 1.1 1999/11/30 22:28:07 borkhuis Exp $ * */#define TO_SYSTEM_MONITOR 1#define TO_TARGET_SHELL 2#define TO_COMM3 3void RedirectStandardIO(IO_DIRECTION direction){ int op; switch (direction) { case TO_SYSTEM_MONITOR: op = open("/pcConsole/0", O_RDWR | O_CREAT, 0); if (op == ERROR) { puts("Error Redirecting Output to pcConsole"); } else { ioGlobalStdSet(STD_IN, op); ioGlobalStdSet(STD_OUT, op); ioGlobalStdSet(STD_ERR, op); } break; case TO_TARGET_SHELL: op = open("/vio/0", O_RDWR | O_CREAT, 0); if (op == ERROR) { puts("Error Redirecting Output to Target Shell"); } else { ioGlobalStdSet(STD_OUT, op); ioGlobalStdSet(STD_ERR, op); logFdSet(op); } break; case TO_COMM3: op = open("/tyCo/2", O_RDWR | O_CREAT, 0); if (op == ERROR) { puts("Error Redirecting Output to comm 3"); } else { ioGlobalStdSet(STD_IN, op); ioGlobalStdSet(STD_OUT, op); ioGlobalStdSet(STD_ERR, op); } break; }; // end of switch}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -