| 55 |
#define DecLocatorButtonUp 8 |
#define DecLocatorButtonUp 8 |
| 56 |
#define DecLocatorFiltered 16 |
#define DecLocatorFiltered 16 |
| 57 |
|
|
| 58 |
|
void RingBell(int type); |
| 59 |
void VisualBell(); |
void VisualBell(); |
| 60 |
BOOL DecLocatorReport(int Event, int Button); |
BOOL DecLocatorReport(int Event, int Button); |
| 61 |
|
|
| 161 |
/* IME Status */ |
/* IME Status */ |
| 162 |
BOOL IMEstat; |
BOOL IMEstat; |
| 163 |
|
|
| 164 |
|
/* Beep over-used */ |
| 165 |
|
static DWORD BeepStartTime = 0; |
| 166 |
|
static DWORD BeepSuppressTime = 0; |
| 167 |
|
static DWORD BeepOverUsedCount = 0; |
| 168 |
|
|
| 169 |
/* OSC String buffer */ |
/* OSC String buffer */ |
| 170 |
#define MAXOSCBUFFSIZE 4096 |
#define MAXOSCBUFFSIZE 4096 |
| 171 |
static char *OSCStrBuff; |
static char *OSCStrBuff; |
| 299 |
// previous received character |
// previous received character |
| 300 |
PrevCharacter = -1; // none |
PrevCharacter = -1; // none |
| 301 |
PrevCRorLFGeneratedCRLF = FALSE; |
PrevCRorLFGeneratedCRLF = FALSE; |
| 302 |
|
|
| 303 |
|
// Beep over-used |
| 304 |
|
BeepStartTime = GetTickCount(); |
| 305 |
|
BeepSuppressTime = BeepStartTime - ts.BeepSuppressTime * 1000; |
| 306 |
|
BeepStartTime -= (ts.BeepOverUsedTime * 1000); |
| 307 |
|
BeepOverUsedCount = ts.BeepOverUsedCount; |
| 308 |
} |
} |
| 309 |
|
|
| 310 |
void ResetCharSet() |
void ResetCharSet() |
| 883 |
CommBinaryOut(&cv,&(ts.Answerback[0]),ts.AnswerbackLen); |
CommBinaryOut(&cv,&(ts.Answerback[0]),ts.AnswerbackLen); |
| 884 |
break; |
break; |
| 885 |
case BEL: |
case BEL: |
| 886 |
switch (ts.Beep) { |
if (ts.Beep != IdBeepOff) { |
| 887 |
case IdBeepOff: |
RingBell(ts.Beep); |
|
/* nothing to do */ |
|
|
break; |
|
|
case IdBeepOn: |
|
|
MessageBeep(0); |
|
|
break; |
|
|
case IdBeepVisual: |
|
|
VisualBell(); |
|
|
break; |
|
| 888 |
} |
} |
| 889 |
break; |
break; |
| 890 |
case BS: BackSpace(); break; |
case BS: BackSpace(); break; |
| 1374 |
CommResetSerial(&ts, &cv, TRUE); |
CommResetSerial(&ts, &cv, TRUE); |
| 1375 |
break; |
break; |
| 1376 |
case 'g': /* Visual Bell (screen original?) */ |
case 'g': /* Visual Bell (screen original?) */ |
| 1377 |
VisualBell(); |
RingBell(IdBeepVisual); |
| 1378 |
break; |
break; |
| 1379 |
case 'n': Glr[0] = 2; break; /* LS2 */ |
case 'n': Glr[0] = 2; break; /* LS2 */ |
| 1380 |
case 'o': Glr[0] = 3; break; /* LS3 */ |
case 'o': Glr[0] = 3; break; /* LS3 */ |
| 5135 |
CSQExchangeColor(); |
CSQExchangeColor(); |
| 5136 |
} |
} |
| 5137 |
|
|
| 5138 |
|
void RingBell(int type) { |
| 5139 |
|
DWORD now; |
| 5140 |
|
|
| 5141 |
|
now = GetTickCount(); |
| 5142 |
|
if (now - BeepSuppressTime < ts.BeepSuppressTime * 1000) { |
| 5143 |
|
BeepSuppressTime = now; |
| 5144 |
|
} |
| 5145 |
|
else { |
| 5146 |
|
if (now - BeepStartTime < ts.BeepOverUsedTime * 1000) { |
| 5147 |
|
if (BeepOverUsedCount <= 1) { |
| 5148 |
|
BeepSuppressTime = now; |
| 5149 |
|
} |
| 5150 |
|
else { |
| 5151 |
|
BeepOverUsedCount--; |
| 5152 |
|
} |
| 5153 |
|
} |
| 5154 |
|
else { |
| 5155 |
|
BeepStartTime = now; |
| 5156 |
|
BeepOverUsedCount = ts.BeepOverUsedCount; |
| 5157 |
|
} |
| 5158 |
|
|
| 5159 |
|
switch (ts.Beep) { |
| 5160 |
|
case IdBeepOff: |
| 5161 |
|
/* nothing to do */ |
| 5162 |
|
break; |
| 5163 |
|
case IdBeepOn: |
| 5164 |
|
MessageBeep(0); |
| 5165 |
|
break; |
| 5166 |
|
case IdBeepVisual: |
| 5167 |
|
VisualBell(); |
| 5168 |
|
break; |
| 5169 |
|
} |
| 5170 |
|
} |
| 5171 |
|
} |
| 5172 |
|
|
| 5173 |
void EndTerm() { |
void EndTerm() { |
| 5174 |
if (CLocale) { |
if (CLocale) { |
| 5175 |
_free_locale(CLocale); |
_free_locale(CLocale); |