TempleOSTS_130707.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:45:45 +02:00
1 parent 17b71f1a2d
commit 1343005a29
617 files changed
+14399 -25130

No files matched your search

+17 -17
View File
@@ -28,7 +28,7 @@ U0 KbdCmdSend(I64 port, U8 val)
return;
}
}
throw (EXCEPT_LOCAL);
throw(EXCEPT_LOCAL);
}
I64 KbdCmdRead()
@@ -37,7 +37,7 @@ I64 KbdCmdRead()
while (tS<timeout)
if (InU8(KBD_CTRL)&1)
return InU8(KBD_PORT);
throw (EXCEPT_LOCAL);
throw(EXCEPT_LOCAL);
}
U0 KbdCmdFlush()
@@ -77,7 +77,7 @@ U0 KbdMouseCmdAck(U8 val)
}
} while (ack!=0xFA && --timeout);
if (!timeout)
throw (EXCEPT_LOCAL);
throw(EXCEPT_LOCAL);
}
U0 SetTypeMatic(U8 delay)
@@ -163,7 +163,7 @@ U8 scan_code_map[0x100]={
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,SC_CARRIAGE_RETURN,SC_CTRL,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,SC_ENTER,SC_CTRL,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0x35,0,0,SC_ALT,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,SC_HOME,SC_CURSOR_UP,SC_PAGE_UP,0,SC_CURSOR_LEFT,0,SC_CURSOR_RIGHT,0,SC_END,
@@ -184,7 +184,7 @@ U8 num_lock_map[0x100]={
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,SC_CARRIAGE_RETURN,SC_CTRL,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,SC_ENTER,SC_CTRL,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0x35,0,0,SC_ALT,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,SC_HOME,SC_CURSOR_UP,SC_PAGE_UP,0,SC_CURSOR_LEFT,0,SC_CURSOR_RIGHT,0,SC_END,
@@ -251,12 +251,12 @@ U8 *ScanCode2KeyName(I64 sc)
StrCat(buf,"ALT ");
if (sc&SCF_SHIFT)
StrCat(buf,"SHIFT ");
if (ch=ScanCode2A(sc.u8[0])) {
if (ch=ScanCode2A(sc&255)) {
st=A2KeyName(ch,FALSE);
StrCpy(buf+StrLen(buf),st);
Free(st);
} else {
switch (sc.u8[0]) {
switch (sc&255) {
case SC_BACKSPACE:StrCat(buf,"BACK"); break;
case SC_CAPS: StrCat(buf,"CAPS"); break;
case SC_NUM: StrCat(buf,"NUM"); break;
@@ -402,15 +402,15 @@ U0 KbdPktRead()
sc=KbdBuildSC(raw_byte,&last_raw_byte,&last_sc,&set_LEDs,&ctrl_alt);
if (ctrl_alt && sc) {
if (!(sc & SCF_KEY_UP)) {
if (sc.u8[0]==SC_DELETE)
if (sc&255==SC_DELETE)
CtrlAltDel(last_sc);
else {
if (sc.u8[0]==SC_ESC)
if (sc&255==SC_ESC)
ch='e';
else if (sc.u8[0]==SC_TAB)
else if (sc&255==SC_TAB)
ch='t';
else
ch=ScanCode2A(sc.u8[0]);
ch=ScanCode2A(sc&255);
if ('a'<=ch<='z' && fp_ctrl_alt_let_cbs[ch-'a'] &&
Bt(&ctrl_alt_let_in_irq_flags,ch-'a')) {
(*fp_ctrl_alt_let_cbs[ch-'a'])(last_sc);
@@ -489,12 +489,12 @@ U0 KbdHandler()
}
if (ctrl_alt) {
if (!(sc & SCF_KEY_UP)) {
if (sc.u8[0]==SC_ESC)
if (sc&255==SC_ESC)
ch='e';
else if (sc.u8[0]==SC_TAB)
else if (sc&255==SC_TAB)
ch='t';
else
ch=ScanCode2A(sc.u8[0]);
ch=ScanCode2A(sc&255);
if ('a'<=ch<='z' && fp_ctrl_alt_let_cbs[ch-'a'] &&
!Bt(&ctrl_alt_let_in_irq_flags,ch-'a'))
(*fp_ctrl_alt_let_cbs[ch-'a'])(sys_cur_scan_code);
@@ -516,7 +516,7 @@ U0 KbdHandler()
}
}
I64 KbdQueMsgs()
I64 KbdMsgsQue()
{
I64 p1,p2,msg_code=MSG_NULL;
CTask *task_focus;
@@ -524,11 +524,11 @@ I64 KbdQueMsgs()
while (FifoI64Rem(scan_code_fifo,&p2)) {
p1=ScanCode2A(p2);
if (p2 & SCF_KEY_UP) {
QueMsg(task_focus,0,
TaskMsgQue(task_focus,0,
MSG_KEY_UP,p1,p2,0);
msg_code=MSG_KEY_UP;
} else {
QueMsg(task_focus,0,
TaskMsgQue(task_focus,0,
MSG_KEY_DOWN,p1,p2,0);
msg_code=MSG_KEY_DOWN;
}
+19 -23
View File
@@ -1,7 +1,6 @@
U0 InputFilterTask()
{
U8 *st;
CTaskCmd *tempc,*tempc1;
CSrvCmd *tempc,*tempc1;
Bool old_filter;
I64 old_flags=GetFlags;
LBts(&Fs->task_flags,TASKf_USER);
@@ -10,26 +9,24 @@ U0 InputFilterTask()
old_filter=LBts(&Fs->last_input_filter_task->task_flags,TASKf_FILTER_INPUT);
LBEqu(&Fs->task_flags,TASKf_FILTER_INPUT,old_filter);
while (TRUE) {
ServantCmdsHandler;
SrvCmdsHandler;
Cli;
tempc1=&Fs->next_servant_cmd;
tempc1=&Fs->srv_ctrl.next_waiting;
tempc=tempc1->next;
if (tempc==tempc1)
break;
else {
if (tempc->cmd_code==TASKCT_TEXT_INPUT) {
if (tempc->cmd_code==SVCT_TEXT_INPUT) {
QueRem(tempc);
SetFlags(old_flags);
st=tempc->data;
Free(tempc);
if (!IsSysDeterministic)
Preempt(ON);
try
ExePutS(st);
ExePutS(tempc->aux_str);
catch
Fs->catch_except=TRUE;
Preempt(OFF);
Free(st);
SrvCmdDel(tempc);
} else
break;
}
@@ -44,28 +41,28 @@ U0 InputFilterTask()
I64 ScanMsg(I64 *_p1=NULL,I64 *_p2=NULL,I64 mask=~1,CTask *task=NULL)
{
I64 result,old_flags;
CTaskCmd *tempc,*tempc1;
CSrvCmd *tempc,*tempc1;
if (!task) task=Fs;
old_flags=GetFlags;
tempc1=&task->next_servant_cmd;
tempc1=&task->srv_ctrl.next_waiting;
while (TRUE) {
if (task==Fs)
ServantCmdsHandler;
SrvCmdsHandler;
Cli;
tempc=tempc1->next;
if (tempc==tempc1)
break;
else {
if (tempc->cmd_code==TASKCT_MSG) {
if (tempc->cmd_code==SVCT_MSG) {
QueRem(tempc);
SetFlags(old_flags);
result=tempc->msg_code;
if (_p1)
*_p1=tempc->p1;
*_p1=tempc->aux1;
if (_p2)
*_p2=tempc->p2;
Free(tempc);
if ((result!=MSG_KEY_DOWN || !(tempc->p2&SCF_KEY_DESC) ||
*_p2=tempc->aux2;
SrvCmdDel(tempc);
if ((result!=MSG_KEY_DOWN || !(tempc->aux2&SCF_KEY_DESC) ||
Bt(&mask,MSGF_ALLOW_KEY_DESC)) && Bt(&mask,result))
goto sm_done;
}
@@ -140,13 +137,12 @@ I64 GetKey(I64 *_scancode=NULL,Bool echo=FALSE,Bool raw_cursor=FALSE)
{
I64 ch,sc;
Bool old_preempt=Preempt(OFF),cursor_on=FALSE;
while (!ScanKey(&ch,&sc,FALSE)) {
if (IsRaw && raw_cursor) {
if (!cursor_on && Blink) {
if (!cursor_on && ToI64(GetTimeStamp*5/time_stamp_freq)&1) {
'Û';
cursor_on=TRUE;
} else if (cursor_on && !Blink) {
} else if (cursor_on && !(ToI64(GetTimeStamp*5/time_stamp_freq)&1)) {
'' CH_BACKSPACE;
cursor_on=FALSE;
}
@@ -159,7 +155,7 @@ I64 GetKey(I64 *_scancode=NULL,Bool echo=FALSE,Bool raw_cursor=FALSE)
PushFD;
Cli;
KbdMouseHandler(TRUE,FALSE);
KbdQueMsgs;
KbdMsgsQue;
PopFD;
if (old_preempt && GetFlags&1<<RFLAGf_INT)
Yield;
@@ -184,7 +180,7 @@ I64 GetChar(I64 *_scancode=NULL,Bool echo=TRUE,Bool raw_cursor=FALSE)
do ch1=GetKey(_scancode,FALSE,raw_cursor);
while (!ch1);
if (echo)
"$$FU$$%c$$FG$$",ch1;
"$$PT$$%c$$FG$$",ch1;
return ch1;
}
@@ -211,7 +207,7 @@ I64 GetS(U8 *buf,I64 size,Bool allow_ext=TRUE)
Free(st);
} else {
while (TRUE) {
ch=GetChar(NULL,FALSE,IsInDbg);
ch=GetChar(,FALSE,IsInDbg);
if (ch=='\n') {
'' ch;
break;