svnno****@sourc*****
svnno****@sourc*****
2012年 11月 27日 (火) 18:45:20 JST
Revision: 5077 http://sourceforge.jp/projects/ttssh2/scm/svn/commits/5077 Author: doda Date: 2012-11-27 18:45:19 +0900 (Tue, 27 Nov 2012) Log Message: ----------- SGR 38:2 で、rgb値のチェックを行うようにした。 SGR 38:5 で、パレット番号のチェックを行うようにした。 Modified Paths: -------------- trunk/teraterm/teraterm/vtdisp.c trunk/teraterm/teraterm/vtterm.c trunk/teraterm/teraterm/vtwin.cpp -------------- next part -------------- Modified: trunk/teraterm/teraterm/vtdisp.c =================================================================== --- trunk/teraterm/teraterm/vtdisp.c 2012-11-27 06:51:25 UTC (rev 5076) +++ trunk/teraterm/teraterm/vtdisp.c 2012-11-27 09:45:19 UTC (rev 5077) @@ -3777,10 +3777,12 @@ int i, color, diff_r, diff_g, diff_b, diff, min; char buff[1024]; - min = 0xfffffff; color = 0; + if (red < 0 || red > 255 || green < 0 || green > 255 || blue < 0 || blue > 255) + return -1; + for (i=0; i<256; i++) { diff_r = red - GetRValue(ANSIColor[i]); diff_g = green - GetGValue(ANSIColor[i]); Modified: trunk/teraterm/teraterm/vtterm.c =================================================================== --- trunk/teraterm/teraterm/vtterm.c 2012-11-27 06:51:25 UTC (rev 5076) +++ trunk/teraterm/teraterm/vtterm.c 2012-11-27 09:45:19 UTC (rev 5077) @@ -1974,7 +1974,7 @@ } break; } - if (color >= 0) { + if (color >= 0 && color < 256) { CharAttr.Attr2 |= Attr2Fore; CharAttr.Fore = color; BuffSetCurCharAttr(CharAttr); @@ -2056,7 +2056,7 @@ } break; } - if (color >= 0) { + if (color >= 0 && color < 256) { CharAttr.Attr2 |= Attr2Back; CharAttr.Back = color; BuffSetCurCharAttr(CharAttr); Modified: trunk/teraterm/teraterm/vtwin.cpp =================================================================== --- trunk/teraterm/teraterm/vtwin.cpp 2012-11-27 06:51:25 UTC (rev 5076) +++ trunk/teraterm/teraterm/vtwin.cpp 2012-11-27 09:45:19 UTC (rev 5077) @@ -2654,6 +2654,7 @@ char e = ESC; char Code; unsigned int i; + static int origHideTitle = -1; #ifdef WINDOW_MAXMIMUM_ENABLED // ALT + x\x82\xF0\x89\x9F\x89\xBA\x82\xB7\x82\xE9\x82\xC6 WM_SYSCHAR \x82\xAA\x94\xF2\x82\xF1\x82ł\xAD\x82\xE9\x81B @@ -2661,7 +2662,18 @@ if ((nFlags&0x2000) != 0 && nChar == CR) { if (IsZoomed()) { // window is maximum ShowWindow(SW_RESTORE); + if (origHideTitle != -1 && ts.HideTitle != origHideTitle) { + ts.HideTitle = origHideTitle; + ChangeWin(); + } + origHideTitle = -1; } else { + if (origHideTitle == -1 && ts.HideTitle == 0) { + origHideTitle = ts.HideTitle; + ts.HideTitle = 1; + OnChangeMenu(0, NULL); + OnChangeTBar(0, NULL); + } ShowWindow(SW_MAXIMIZE); } }