📄 state.c
字号:
void Set_Cursor_Style (int mode)
{
switch (mode) {
case INSERT :
_CH = 6;
_CL = 7;
_AH = 1;
geninterrupt(0x10);
break;
case REPLACE :
_CH = 0;
_CL = 7;
_AH = 1;
geninterrupt(0x10);
break;
case HIDE :
_CH = 8;
_CL = 0;
_AH = 1;
geninterrupt(0x10);
break;
}
return;
}
void Put_State(int ins_mode)
{
TEXEL tmp;
char * state;
unsigned char attr;
int i;
if ( ins_mode == INSERT ) {
Set_Cursor_Style(INSERT);
state = " INS ";
}
if ( ins_mode == REPLACE ) {
Set_Cursor_Style(REPLACE);
state = " REP ";
}
attr = attr3;
if ( ins_mode == HIDE ) {
Set_Cursor_Style(HIDE);
attr = attr1;
state = " ";
}
for ( i=76; i<=80; i++) {
gettext(i,1,i,1,&tmp);
tmp.attr = attr;
tmp.ch = *(state+i-76);
puttext(i,1,i,1,&tmp);
}
return;
}
void Dec_State(int mode)
{
TEXEL tmp;
char * state;
unsigned char attr;
int i;
if ( mode == DEC )
state = " DEC ";
if ( mode == OCT )
state = " OCT ";
if ( mode == BIN )
state = " BIN ";
attr = attr3;
if ( mode == HIDE ) {
attr = attr1;
state = " ";
}
for ( i=71; i<=75; i++) {
gettext(i,1,i,1,&tmp);
tmp.attr = attr;
tmp.ch = *(state+i-71);
puttext(i,1,i,1,&tmp);
}
return;
}
void Ang_State(int mode)
{
TEXEL tmp;
char * state;
unsigned char attr;
int i;
if ( mode == ANG )
state = " ANG ";
if ( mode == RAD )
state = " RAD ";
attr = attr3;
if ( mode == HIDE ) {
attr = attr1;
state = " ";
}
for ( i=66; i<=70; i++) {
gettext(i,1,i,1,&tmp);
tmp.attr = attr;
tmp.ch = *(state+i-66);
puttext(i,1,i,1,&tmp);
}
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -