Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/teraterm/teraterm/vtterm.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5118 by doda, Wed Feb 6 03:46:10 2013 UTC revision 5316 by doda, Tue Jun 11 18:03:59 2013 UTC
# Line 55  void ParseFirst(BYTE b); Line 55  void ParseFirst(BYTE b);
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    
# Line 160  int FilterTop, FilterBottom, FilterLeft, Line 161  int FilterTop, FilterBottom, FilterLeft,
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;
# Line 293  void ResetTerminal() /*reset variables b Line 299  void ResetTerminal() /*reset variables b
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()
# Line 871  void ParseControl(BYTE b) Line 883  void ParseControl(BYTE b)
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;
# Line 1370  void ParseEscape(BYTE b) /* b is the fin Line 1374  void ParseEscape(BYTE b) /* b is the fin
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 */
# Line 5131  void VisualBell() { Line 5135  void VisualBell() {
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);

Legend:
Removed from v.5118  
changed lines
  Added in v.5316

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26