[Ttssh2-commit] [5700] 以下の理由から NO_ANSI_COLOR_EXTENSION を廃止する。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2014年 11月 17日 (月) 15:29:16 JST


Revision: 5700
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5700
Author:   doda
Date:     2014-11-17 15:29:15 +0900 (Mon, 17 Nov 2014)
Log Message:
-----------
以下の理由から NO_ANSI_COLOR_EXTENSION を廃止する。
・そもそも define してると build に失敗する
・NO_ANSI_COLOR_EXTENSION を考慮していないコードがある
・tttset を変更する事になるため、プラグインの互換性が低下する
・サポートするメリットがない

Modified Paths:
--------------
    trunk/teraterm/common/tttypes.h
    trunk/teraterm/teraterm/vtdisp.c
    trunk/teraterm/ttpset/ttset.c

-------------- next part --------------
Modified: trunk/teraterm/common/tttypes.h
===================================================================
--- trunk/teraterm/common/tttypes.h	2014-11-16 02:57:38 UTC (rev 5699)
+++ trunk/teraterm/common/tttypes.h	2014-11-17 06:29:15 UTC (rev 5700)
@@ -467,9 +467,7 @@
 #ifndef NO_COPYLINE_FIX
 	WORD EnableContinuedLineCopy;
 #endif /* NO_COPYLINE_FIX */
-#ifndef NO_ANSI_COLOR_EXTENSION
 	COLORREF ANSIColor[16];
-#endif /* NO_ANSI_COLOR_EXTENSION */
 #ifndef NO_INET6
 	/* protocol used in connect() */
 	int ProtocolFamily;

Modified: trunk/teraterm/teraterm/vtdisp.c
===================================================================
--- trunk/teraterm/teraterm/vtdisp.c	2014-11-16 02:57:38 UTC (rev 5699)
+++ trunk/teraterm/teraterm/vtdisp.c	2014-11-17 06:29:15 UTC (rev 5700)
@@ -1741,26 +1741,12 @@
 void InitColorTable()
 {
   int i;
-#ifndef NO_ANSI_COLOR_EXTENSION
+
   DispApplyANSIColor();
-#else /* NO_ANSI_COLOR_EXTENSION */
-  for (i=0; i<=15; i++) {
-    ANSIColor[i] = RGB(DefaultColorTable[i][0], DefaultColorTable[i][1], DefaultColorTable[i][2]);
-  }
-#endif /* NO_ANSI_COLOR_EXTENSION */
+
   for (i=16; i<=255; i++) {
     ANSIColor[i] = RGB(DefaultColorTable[i][0], DefaultColorTable[i][1], DefaultColorTable[i][2]);
   }
-
-  if ((ts.ColorFlag & CF_USETEXTCOLOR)!=0) {
-#ifdef ALPHABLEND_TYPE2
-    ANSIColor[IdBack ] = BGVTColor[1]; // use background color for "Black"
-    ANSIColor[IdFore ] = BGVTColor[0]; // use text color for "white"
-#else
-    ANSIColor[IdBack ] = ts.VTColor[1]; // use background color for "Black"
-    ANSIColor[IdFore ] = ts.VTColor[0]; // use text color for "white"
-#endif
-  }
 }
 
 void DispSetNearestColors(int start, int end, HDC DispCtx) {
@@ -2494,13 +2480,8 @@
 
   if ((ts.ColorFlag & CF_USETEXTCOLOR)==0)
   {
-#ifndef NO_ANSI_COLOR_EXTENSION
     ANSIColor[IdFore ]   = ts.ANSIColor[IdFore ];
     ANSIColor[IdBack ]   = ts.ANSIColor[IdBack ];
-#else /* NO_ANSI_COLOR_EXTENSION */
-    ANSIColor[IdFore ]   = RGB(255,255,255);
-    ANSIColor[IdBack ]   = RGB(  0,  0,  0);
-#endif /* NO_ANSI_COLOR_EXTENSION */
   }
   else { // use text (background) color for "white (black)"
     ANSIColor[IdFore ]   = ts.VTColor[0];
@@ -3602,11 +3583,7 @@
 #endif
 			}
 			else {
-#ifndef NO_ANSI_COLOR_EXTENSION
 				ANSIColor[IdBack] = ts.ANSIColor[IdBack];
-#else /* NO_ANSI_COLOR_EXTENSION */
-				ANSIColor[IdBack] = RGB(DefaultColorTable[IdBack][0], DefaultColorTable[IdBack][1], DefaultColorTable[IdBack][2]);
-#endif
 			}
 			DispSetNearestColors(num, num, NULL);
 		}
@@ -3619,20 +3596,12 @@
 #endif
 			}
 			else {
-#ifndef NO_ANSI_COLOR_EXTENSION
 				ANSIColor[IdFore] = ts.ANSIColor[IdFore];
-#else /* NO_ANSI_COLOR_EXTENSION */
-				ANSIColor[IdFore] = RGB(DefaultColorTable[IdFore][0], DefaultColorTable[IdFore][1], DefaultColorTable[IdFore][2]);
-#endif
 			}
 			DispSetNearestColors(num, num, NULL);
 		}
   		else if (num <= 15) {
-#ifndef NO_ANSI_COLOR_EXTENSION
 			ANSIColor[num] = ts.ANSIColor[num];
-#else /* NO_ANSI_COLOR_EXTENSION */
-			ANSIColor[num] = RGB(DefaultColorTable[num][0], DefaultColorTable[num][1], DefaultColorTable[num][2]);
-#endif
 			DispSetNearestColors(num, num, NULL);
 		}
 		else if (num <= 255) {

Modified: trunk/teraterm/ttpset/ttset.c
===================================================================
--- trunk/teraterm/ttpset/ttset.c	2014-11-16 02:57:38 UTC (rev 5699)
+++ trunk/teraterm/ttpset/ttset.c	2014-11-17 06:29:15 UTC (rev 5700)
@@ -539,7 +539,6 @@
 		                      (BYTE) ts->TmpColor[0][i * 3 + 1],
 		                      (BYTE) ts->TmpColor[0][i * 3 + 2]);
 
-#ifndef NO_ANSI_COLOR_EXTENSION
 	/* ANSI color definition (in the case FullColor=on)  -- special option
 	   o UseTextColor should be off, or the background and foreground color of
 	   VTColor are assigned to color-number 0 and 7 respectively, even if
@@ -580,7 +579,6 @@
 				RGB((BYTE) r, (BYTE) g, (BYTE) b);
 		}
 	}
-#endif						/* NO_ANSI_COLOR_EXTENSION */
 
 	TmpDC = GetDC(0);			/* Get screen device context */
 	for (i = 0; i <= 1; i++)
@@ -595,10 +593,8 @@
 	for (i = 0; i <= 1; i++)
 		ts->URLColor[i] = GetNearestColor(TmpDC, ts->URLColor[i]);
 	/* end - ishizaki */
-#ifndef NO_ANSI_COLOR_EXTENSION
 	for (i = 0; i < 16; i++)
 		ts->ANSIColor[i] = GetNearestColor(TmpDC, ts->ANSIColor[i]);
-#endif						/* NO_ANSI_COLOR_EXTENSION */
 	ReleaseDC(0, TmpDC);
 	if (GetOnOff(Section, "EnableANSIColor", FName, TRUE))
 		ts->ColorFlag |= CF_ANSICOLOR;



Ttssh2-commit メーリングリストの案内
Back to archive index