📄 raw_cio3.c
字号:
/* *---------------------------------------------------------------------- * T-Kernel / Standard Extension * * Copyright (C) 2006 by Ken Sakamura. All rights reserved. * T-Kernel / Standard Extension is distributed * under the T-License for T-Kernel / Standard Extension. *---------------------------------------------------------------------- * * Version: 1.00.00 * Released by T-Engine Forum(http://www.t-engine.org) at 2006/8/11. * *---------------------------------------------------------------------- *//* * @(#)raw_cio3.c * * The console I/O (on the side of use) */#include <basic.h>#include <sys/consio.h>EXPORT W __MyConsPort = 0;#define MyPort ((__MyConsPort <= 0) ? __GetMyPort() : __MyConsPort)/*---------------------------------------------------------------------- Get the console port----------------------------------------------------------------------*/EXPORT W __GetMyPort( void ){ if (__MyConsPort <= 0) { if (console_conf(CS_GETPORT, (UW*)&__MyConsPort) < 0) { __MyConsPort = CONSOLE_PORT; } } return __MyConsPort;}/*---------------------------------------------------------------------- IOCTL of the console----------------------------------------------------------------------*/W cons_ioctl(W req, W arg){ return console_ctl(MyPort, req, arg);}/*---------------------------------------------------------------------- Initialize the console port----------------------------------------------------------------------*/void cons_init( void ){ __MyConsPort = 0; __GetMyPort();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -