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 4023 by doda, Thu Aug 19 08:30:55 2010 UTC revision 4024 by doda, Thu Aug 19 08:41:25 2010 UTC
# Line 344  void ChangeTerminalSize(int Nx, int Ny) Line 344  void ChangeTerminalSize(int Nx, int Ny)
344  }  }
345    
346  void SendCSIstr(char *str, int len) {  void SendCSIstr(char *str, int len) {
347          if (str == NULL || len <= 0)          int l;
348    
349            if (str == NULL || len < 0)
350                  return;                  return;
351    
352            if (len == 0) {
353                    l = strlen(str);
354            }
355            else {
356                    l = len;
357            }
358    
359          if (Send8BitMode)          if (Send8BitMode)
360                  CommBinaryOut(&cv,"\233", 1);                  CommBinaryOut(&cv,"\233", 1);
361          else          else
362                  CommBinaryOut(&cv,"\033[", 2);                  CommBinaryOut(&cv,"\033[", 2);
363    
364          CommBinaryOut(&cv, str, len);          CommBinaryOut(&cv, str, l);
365  }  }
366    
367  void SendOSCstr(char *str, int len) {  void SendOSCstr(char *str, int len) {
368            int l;
369    
370          if (str == NULL || len <= 0)          if (str == NULL || len <= 0)
371                  return;                  return;
372    
373            if (len == 0) {
374                    l = strlen(str);
375            }
376            else {
377                    l = len;
378            }
379    
380          if (Send8BitMode) {          if (Send8BitMode) {
381                  CommBinaryOut(&cv,"\235", 1);                  CommBinaryOut(&cv,"\235", 1);
382                  CommBinaryOut(&cv, str, len);                  CommBinaryOut(&cv, str, l);
383                  CommBinaryOut(&cv,"\234", 1);                  CommBinaryOut(&cv,"\234", 1);
384          }          }
385          else {          else {
386                  CommBinaryOut(&cv,"\033]", 2);                  CommBinaryOut(&cv,"\033]", 2);
387                  CommBinaryOut(&cv, str, len);                  CommBinaryOut(&cv, str, l);
388                  CommBinaryOut(&cv,"\033\\", 2);                  CommBinaryOut(&cv,"\033\\", 2);
389          }          }
390    
# Line 1648  void CSScreenErase() Line 1666  void CSScreenErase()
1666      switch (Param[1]) {      switch (Param[1]) {
1667        case 5:        case 5:
1668          /* Device Status Report -> Ready */          /* Device Status Report -> Ready */
1669          SendCSIstr("0n", 2);          SendCSIstr("0n", 0);
1670          break;          break;
1671        case 6:        case 6:
1672          /* Cursor Position Report */          /* Cursor Position Report */
# Line 1925  void CSSetAttr()               // SGR Line 1943  void CSSetAttr()               // SGR
1943        case 14: /* get window size??? */        case 14: /* get window size??? */
1944          if (ts.WindowFlag & WF_WINDOWREPORT) {          if (ts.WindowFlag & WF_WINDOWREPORT) {
1945            /* this is not actual window size */            /* this is not actual window size */
1946            SendCSIstr("4;640;480t", 10);            SendCSIstr("4;640;480t", 0);
1947          }          }
1948          break;          break;
1949        case 18: /* get terminal size */        case 18: /* get terminal size */
# Line 1969  void CSSetAttr()               // SGR Line 1987  void CSSetAttr()               // SGR
1987              SendOSCstr(Report, len);              SendOSCstr(Report, len);
1988              break;              break;
1989            default: // IdTitleReportEmpty:            default: // IdTitleReportEmpty:
1990              SendOSCstr("L", 1);              SendOSCstr("L", 0);
1991              break;              break;
1992          }          }
1993          break;          break;
# Line 2000  void CSSetAttr()               // SGR Line 2018  void CSSetAttr()               // SGR
2018              SendOSCstr(Report, len);              SendOSCstr(Report, len);
2019              break;              break;
2020            default: // IdTitleReportEmpty:            default: // IdTitleReportEmpty:
2021              SendOSCstr("l", 1);              SendOSCstr("l", 0);
2022              break;              break;
2023          }          }
2024          break;          break;
# Line 2012  void CSSetAttr()               // SGR Line 2030  void CSSetAttr()               // SGR
2030      switch (b) {      switch (b) {
2031        case 'c': /* second terminal report (Secondary DA) */        case 'c': /* second terminal report (Secondary DA) */
2032          if (Param[1] < 1) {          if (Param[1] < 1) {
2033            SendCSIstr(">32;100;2c", 10); /* VT382 */            SendCSIstr(">32;100;2c", 0); /* VT382 */
2034          }          }
2035          break;          break;
2036        case 'J':        case 'J':
# Line 2342  void CSSetAttr()               // SGR Line 2360  void CSSetAttr()               // SGR
2360        switch (Param[1]) {        switch (Param[1]) {
2361          case 53:          case 53:
2362            /* Locator Device Status Report -> Ready */            /* Locator Device Status Report -> Ready */
2363            SendCSIstr("?50n", 4);            SendCSIstr("?50n", 0);
2364            break;            break;
2365        }        }
2366      }      }
# Line 3985  void FocusReport(BOOL focus) { Line 4003  void FocusReport(BOOL focus) {
4003    
4004    if (focus) {    if (focus) {
4005      // Focus In      // Focus In
4006      SendCSIstr("I", 1);      SendCSIstr("I", 0);
4007    } else {    } else {
4008      // Focus Out      // Focus Out
4009      SendCSIstr("O", 1);      SendCSIstr("O", 0);
4010    }    }
4011  }  }
4012    

Legend:
Removed from v.4023  
changed lines
  Added in v.4024

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