[Ttssh2-commit] [3263] 制御シーケンス DECSCUSR に対応。制御シーケンスでカーソルの形状 / 点滅を変更できる。

svnno****@sourc***** svnno****@sourc*****
2009年 3月 31日 (火) 23:13:36 JST


Revision: 3263
          http://svn.sourceforge.jp/view?root=ttssh2&view=rev&rev=3263
Author:   doda
Date:     2009-03-31 23:13:35 +0900 (Tue, 31 Mar 2009)

Log Message:
-----------
制御シーケンス DECSCUSR に対応。制御シーケンスでカーソルの形状/点滅を変更できる。

  <CSI> Ps SP q
    SP=0: Block, Blink (1と同じ)
       1: Block, Blink
       2: Block, Steady
       3: Underline, Blink
       4: Underline, Steady

Modified Paths:
--------------
    trunk/teraterm/teraterm/vtterm.c


-------------- next part --------------
Modified: trunk/teraterm/teraterm/vtterm.c
===================================================================
--- trunk/teraterm/teraterm/vtterm.c	2009-03-30 10:37:13 UTC (rev 3262)
+++ trunk/teraterm/teraterm/vtterm.c	2009-03-31 14:13:35 UTC (rev 3263)
@@ -2109,6 +2109,38 @@
     }
   }
 
+  void CSSpace(BYTE b) {
+    switch (b) {
+      case 'q':
+        if (NParam > 0) {
+          if (Param[1] < 0) Param[1] = 0;
+          switch (Param[1]) {
+            case 0:
+            case 1:
+              ts.CursorShape = IdBlkCur;
+              ts.NonblinkingCursor = FALSE;
+              break;
+            case 2:
+              ts.CursorShape = IdBlkCur;
+              ts.NonblinkingCursor = TRUE;
+              break;
+            case 3:
+              ts.CursorShape = IdHCur;
+              ts.NonblinkingCursor = FALSE;
+              break;
+            case 4:
+              ts.CursorShape = IdHCur;
+              ts.NonblinkingCursor = TRUE;
+              break;
+	    default:
+	      return;
+          }
+	  ChangeCaret();
+        }
+        break;
+    }
+  }
+
 void PrnParseCS(BYTE b) // printer mode
 {
   ParseMode = ModeFirst;
@@ -2201,6 +2233,8 @@
     /* one intermediate char */
     case 1:
       switch (IntChar[1]) {
+        /* intermediate char = ' ' */
+	case ' ': CSSpace(b); break;
 	/* intermediate char = '!' */
 	case '!': CSExc(b); break;
 	/* intermediate char = '"' */



Ttssh2-commit メーリングリストの案内