[Ttssh2-commit] [4009] trunk から r3926 をいったんひっこめる

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
2010年 8月 17日 (火) 23:55:08 JST


Revision: 4009
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4009
Author:   maya
Date:     2010-08-17 23:55:08 +0900 (Tue, 17 Aug 2010)

Log Message:
-----------
trunk から r3926 をいったんひっこめる

Modified Paths:
--------------
    trunk/installer/release/TERATERM.INI
    trunk/teraterm/common/tttypes.h
    trunk/teraterm/teraterm/clipboar.c
    trunk/teraterm/teraterm/commlib.c
    trunk/teraterm/teraterm/ttermpro.vcproj
    trunk/teraterm/teraterm/ttwinman.h
    trunk/teraterm/teraterm/vtwin.cpp
    trunk/teraterm/ttpcmn/language.c
    trunk/teraterm/ttpcmn/language.h
    trunk/teraterm/ttpcmn/ttcmn.c
    trunk/teraterm/ttpcmn/ttpcmn.def
    trunk/teraterm/ttpcmn/ttpcmn.vcproj
    trunk/teraterm/ttpset/ttset.c


-------------- next part --------------
Modified: trunk/installer/release/TERATERM.INI
===================================================================
--- trunk/installer/release/TERATERM.INI	2010-08-17 14:19:24 UTC (rev 4008)
+++ trunk/installer/release/TERATERM.INI	2010-08-17 14:55:08 UTC (rev 4009)
@@ -106,9 +106,6 @@
 ; CodePage for Unicode
 CodePage=
 
-; Pure UTF-8 encoding
-PureUTF8=off
-
 ; Background color of text uses background color of screen (on/off)
 UseNormalBGColor=on
 

Modified: trunk/teraterm/common/tttypes.h
===================================================================
--- trunk/teraterm/common/tttypes.h	2010-08-17 14:19:24 UTC (rev 4008)
+++ trunk/teraterm/common/tttypes.h	2010-08-17 14:55:08 UTC (rev 4009)
@@ -497,7 +497,6 @@
 	char ConfirmChangePasteStringFile[MAX_PATH];
 	DWORD Baud;
 	WORD LogBinary;
-	int pureutf8;
 	WORD DisableMenuDuplicateSession;
 	WORD DisableMenuNewConnection;
 };
@@ -888,8 +887,6 @@
 	BOOL Flush;
 
 	BOOL TelLineMode;
-
-	int *pureutf8;
 	_locale_t locale;
 } TComVar;
 typedef TComVar far *PComVar;
@@ -935,7 +932,6 @@
  * when you change TMap or member of TMap.
  *
  * - At version 4.67, ttset_memfilemap was replaced with ttset_memfilemap_13.
- *   added tttset.pureutf8.
  *   added NextShownWin/PrevShownWin shortcut key.
  *   added tttset.DisableMenuDuplicateSession.
  *   added tttset.DisableMenuNewConnection.

Modified: trunk/teraterm/teraterm/clipboar.c
===================================================================
--- trunk/teraterm/teraterm/clipboar.c	2010-08-17 14:19:24 UTC (rev 4008)
+++ trunk/teraterm/teraterm/clipboar.c	2010-08-17 14:55:08 UTC (rev 4009)
@@ -16,7 +16,6 @@
 
 #include "clipboar.h"
 #include "tt_res.h"
-#include "language.h"
 
 // for clipboard copy
 static HGLOBAL CBCopyHandle = NULL;
@@ -111,11 +110,7 @@
 	}
 
 	if (BuffSize==0) { // for clipboar
-		if (in_utf(ts) && 
-			IsClipboardFormatAvailable(CF_UNICODETEXT)) {
-			// UTF-8‚̏ꍇAUnicode(wchar_t)‚̂܂܎󂯎æ‚éB
-			Cf = CF_UNICODETEXT;
-		} else if (IsClipboardFormatAvailable(CF_TEXT)) {
+		if (IsClipboardFormatAvailable(CF_TEXT)) {
 			Cf = CF_TEXT;
 		}
 		else if (IsClipboardFormatAvailable(CF_OEMTEXT)) {
@@ -207,10 +202,6 @@
 	static char BracketEnd[] = "\033[201~";
 	static int BracketPtr = 0;
 	DWORD now;
-	char *ptr;
-	wchar_t *wptr;
-	char *mptr;
-	int mlen;
 
 	if (CBMemHandle==NULL) {
 		return;
@@ -243,26 +234,11 @@
 		}
 	}
 
-	ptr = GlobalLock(CBMemHandle);
-	if (ptr==NULL) {
+	CBMemPtr = GlobalLock(CBMemHandle);
+	if (CBMemPtr==NULL) {
 		return;
 	}
 
-	mptr = NULL;
-	if (in_utf(ts)) {
-		/* Unicode‚©‚çUTF-8‚Ö•ÏŠ·‚·‚éBÅŒã‚É null ‚ð’ljÁ‚·‚é•K—v‚ª‚ ‚é‚̂ŁA
-		 * +1 ‚µ‚Ä‚¢‚邱‚Æ‚É’ˆÓB
-		 */
-		wptr = (wchar_t *)ptr;
-		convert_wchar_to_utf8(wptr, wcslen(wptr) + 1, NULL, &mlen);
-		mptr = malloc(sizeof(char) * mlen);
-		convert_wchar_to_utf8(wptr, wcslen(wptr) + 1, mptr, &mlen);
-		CBMemPtr = mptr;
-
-	} else {
-		CBMemPtr = ptr;
-	}
-
 	do {
 		if (CBSendCR && (CBMemPtr[CBMemPtr2]==0x0a)) {
 			CBMemPtr2++;
@@ -313,8 +289,6 @@
 		}
 		else {
 			CBEndPaste();
-			if (mptr)
-				free(mptr);
 			return;
 		}
 
@@ -334,10 +308,7 @@
 	}
 	while (c>0);
 
-	if (mptr)
-		free(mptr);
-
-	if (ptr !=NULL) {
+	if (CBMemPtr!=NULL) {
 		GlobalUnlock(CBMemHandle);
 		CBMemPtr=NULL;
 	}

Modified: trunk/teraterm/teraterm/commlib.c
===================================================================
--- trunk/teraterm/teraterm/commlib.c	2010-08-17 14:19:24 UTC (rev 4008)
+++ trunk/teraterm/teraterm/commlib.c	2010-08-17 14:55:08 UTC (rev 4009)
@@ -295,7 +295,6 @@
 	cv->Flush = FALSE;
 	cv->FlushLen = 0;
 	cv->TelLineMode = FALSE;
-	cv->pureutf8 = &ts->pureutf8;
 
 	if ((ts->PortType!=IdSerial) && (strlen(ts->HostName)==0))
 	{

Modified: trunk/teraterm/teraterm/ttermpro.vcproj
===================================================================
--- trunk/teraterm/teraterm/ttermpro.vcproj	2010-08-17 14:19:24 UTC (rev 4008)
+++ trunk/teraterm/teraterm/ttermpro.vcproj	2010-08-17 14:55:08 UTC (rev 4009)
@@ -49,7 +49,7 @@
 				Name="VCCLCompilerTool"
 				AdditionalOptions="/D"_CRT_SECURE_NO_DEPRECATE""
 				Optimization="0"
-				AdditionalIncludeDirectories="..\common;..\ttpfile;..\ttpcmn"
+				AdditionalIncludeDirectories="..\common;..\ttpfile"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
 				RuntimeLibrary="1"
 				UsePrecompiledHeader="0"
@@ -149,7 +149,7 @@
 				AdditionalOptions="/D"_CRT_SECURE_NO_DEPRECATE""
 				Optimization="2"
 				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\common;..\ttpfile;..\ttpcmn"
+				AdditionalIncludeDirectories="..\common;..\ttpfile"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				StringPooling="true"
 				RuntimeLibrary="0"

Modified: trunk/teraterm/teraterm/ttwinman.h
===================================================================
--- trunk/teraterm/teraterm/ttwinman.h	2010-08-17 14:19:24 UTC (rev 4008)
+++ trunk/teraterm/teraterm/ttwinman.h	2010-08-17 14:55:08 UTC (rev 4009)
@@ -38,9 +38,6 @@
 
 extern int SerialNo;
 
-#define in_cv_utf(pure, lang) (pure && (lang == IdUtf8))
-#define in_utf(ts) in_cv_utf(ts.pureutf8, ts.Language)
-
 #ifdef __cplusplus
 }
 #endif

Modified: trunk/teraterm/teraterm/vtwin.cpp
===================================================================
--- trunk/teraterm/teraterm/vtwin.cpp	2010-08-17 14:19:24 UTC (rev 4008)
+++ trunk/teraterm/teraterm/vtwin.cpp	2010-08-17 14:55:08 UTC (rev 4009)
@@ -53,7 +53,6 @@
 #include "tt_res.h"
 #include "vtwin.h"
 #include "addsetting.h"
-#include "language.h"
 
 #define VTClassName "VTWin32"
 
@@ -2893,25 +2892,15 @@
 		//lpstr = (LPSTR)GlobalLock(hstr);
 		lpstr = (wchar_t *)GlobalLock(hstr);
 		if (lpstr!=NULL) {
-			if (in_utf(ts)) {
-				convert_wchar_to_utf8(lpstr, wcslen(lpstr), NULL, &mlen);
-			} else {
-				mlen = wcstombs(NULL, lpstr, 0);
-			}
+			mlen = wcstombs(NULL, lpstr, 0);
 			mbstr = (char *)malloc(sizeof(char) * (mlen + 1));
 			if (mbstr == NULL) {
 				goto skip;
 			}
+			Len = wcstombs(mbstr, lpstr, mlen + 1);
 
-			if (in_utf(ts)) {
-				convert_wchar_to_utf8(lpstr, wcslen(lpstr), mbstr, &mlen);
-				Len = mlen;
-			} else {
-				Len = wcstombs(mbstr, lpstr, mlen + 1);
-				// add this string into text buffer of application
-				Len = strlen(mbstr);
-			}
-
+			// add this string into text buffer of application
+			Len = strlen(mbstr);
 			if (Len==1) {
 				switch (mbstr[0]) {
 				case 0x20:

Modified: trunk/teraterm/ttpcmn/language.c
===================================================================
--- trunk/teraterm/ttpcmn/language.c	2010-08-17 14:19:24 UTC (rev 4008)
+++ trunk/teraterm/ttpcmn/language.c	2010-08-17 14:55:08 UTC (rev 4009)
@@ -8,46 +8,9 @@
 #include "tttypes.h"
 #include <mbstring.h>
 #include <locale.h>
-#include "language.h"
 
 #include "sjis2uni.map"
 
-// ƒf[ƒ^‘—MŽžAUTF-16LE ‚©‚ç UTF-8 ‚Ö•ÏŠ·‚·‚éB
-void PASCAL convert_wchar_to_utf8(wchar_t *wbuf, int wbuflen, char *linebuf, int *linesize)
-{
-	char *p;
-	int i;
-	wchar_t ch;
-	int ratio = 3;
-
-	if (linebuf == NULL) {
-		*linesize = wbuflen * ratio * sizeof(wchar_t);
-		return;
-	}
-
-	p = linebuf;
-	for (i = 0 ; i < wbuflen ; i++) {
-		ch = wbuf[i];
-		// TODO: ƒTƒƒQ[ƒgƒyƒA‚Í–¢ƒTƒ|[ƒg
-		if ((ch&0xF800) == 0xD800) 
-			ch = '.';
-
-		if (ch < 0x80) {
-			*p++ = (char)(ch);
-	    } else if (ch < 0x800) {
-			*p++ = (0xC0 | (ch >> 6));
-			*p++ = (0x80 | (ch & 0x3F));
-	    } else {
-			*p++ = (0xE0 | (ch >> 12));
-			*p++ = (0x80 | ((ch >> 6) & 0x3F));
-			*p++ = (0x80 | (ch & 0x3F));
-	    }
-	}
-
-	*linesize = p - linebuf;
-}
-
-
 unsigned short ConvertUnicode(unsigned short code, codemap_t *table, int tmax)
 {
 	int low, mid, high;

Modified: trunk/teraterm/ttpcmn/language.h
===================================================================
--- trunk/teraterm/ttpcmn/language.h	2010-08-17 14:19:24 UTC (rev 4008)
+++ trunk/teraterm/ttpcmn/language.h	2010-08-17 14:55:08 UTC (rev 4009)
@@ -9,7 +9,6 @@
 #endif
 
 /* proto types */
-void PASCAL convert_wchar_to_utf8(wchar_t *wbuf, int wbuflen, char *linebuf, int *linesize);
 unsigned int FAR PASCAL SJIS2UTF8(WORD KCode, int *byte, char *locale);
 WORD FAR PASCAL SJIS2JIS(WORD KCode);
 WORD FAR PASCAL SJIS2EUC(WORD KCode);

Modified: trunk/teraterm/ttpcmn/ttcmn.c
===================================================================
--- trunk/teraterm/ttpcmn/ttcmn.c	2010-08-17 14:19:24 UTC (rev 4008)
+++ trunk/teraterm/ttpcmn/ttcmn.c	2010-08-17 14:55:08 UTC (rev 4009)
@@ -17,7 +17,6 @@
 #include <locale.h>
 
 #include "compat_w95.h"
-#include "ttwinman.h"
 
 /* first instance flag */
 static BOOL FirstInstance = TRUE;
@@ -1472,17 +1471,12 @@
 		return C;
 	}
 
-	if (in_cv_utf(cv->pureutf8, cv->Language)) {
-			// fall through
-
-	} else {
-		switch (cv->Language) {
-		  case IdUtf8:
-		  case IdJapanese:
-		  case IdKorean:
-			return TextOutMBCS(cv, B, C);
-			break;
-		}
+	switch (cv->Language) {
+	  case IdUtf8:
+	  case IdJapanese:
+	  case IdKorean:
+		return TextOutMBCS(cv, B, C);
+		break;
 	}
 
 	Full = FALSE;

Modified: trunk/teraterm/ttpcmn/ttpcmn.def
===================================================================
--- trunk/teraterm/ttpcmn/ttpcmn.def	2010-08-17 14:19:24 UTC (rev 4008)
+++ trunk/teraterm/ttpcmn/ttpcmn.def	2010-08-17 14:55:08 UTC (rev 4009)
@@ -44,5 +44,3 @@
   
   is_NT4 @50
   doSelectFolder @51
-  convert_wchar_to_utf8 @53
-  

Modified: trunk/teraterm/ttpcmn/ttpcmn.vcproj
===================================================================
--- trunk/teraterm/ttpcmn/ttpcmn.vcproj	2010-08-17 14:19:24 UTC (rev 4008)
+++ trunk/teraterm/ttpcmn/ttpcmn.vcproj	2010-08-17 14:55:08 UTC (rev 4009)
@@ -49,7 +49,7 @@
 				AdditionalOptions="/D&quot;_CRT_SECURE_NO_DEPRECATE&quot;"
 				Optimization="2"
 				InlineFunctionExpansion="1"
-				AdditionalIncludeDirectories="..\common;..\teraterm"
+				AdditionalIncludeDirectories="..\common"
 				PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
 				StringPooling="true"
 				RuntimeLibrary="0"
@@ -148,7 +148,7 @@
 				Name="VCCLCompilerTool"
 				AdditionalOptions="/D&quot;_CRT_SECURE_NO_DEPRECATE&quot;"
 				Optimization="0"
-				AdditionalIncludeDirectories="..\common;..\teraterm"
+				AdditionalIncludeDirectories="..\common"
 				PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
 				RuntimeLibrary="1"
 				UsePrecompiledHeader="0"

Modified: trunk/teraterm/ttpset/ttset.c
===================================================================
--- trunk/teraterm/ttpset/ttset.c	2010-08-17 14:19:24 UTC (rev 4008)
+++ trunk/teraterm/ttpset/ttset.c	2010-08-17 14:55:08 UTC (rev 4009)
@@ -1169,9 +1169,6 @@
 		GetPrivateProfileInt(Section, "CodePage ", DEFAULT_CODEPAGE,
 		                     FName);
 
-	ts->pureutf8 =
-		GetOnOff(Section, "PureUTF8", FName, FALSE);
-
 	// UI language message file
 	GetPrivateProfileString(Section, "UILanguageFile", "lang\\Default.lng",
 	                        Temp, sizeof(Temp), FName);
@@ -1579,9 +1576,6 @@
 	_snprintf_s(Temp, sizeof(Temp), _TRUNCATE, "%d", ts->CodePage);
 	WritePrivateProfileString(Section, "CodePage", Temp, FName);
 
-	WriteOnOff(Section, "PureUTF8", FName,
-	           ts->pureutf8);
-
 	// ANSI color(2004.9.5 yutaka)
 	Temp[0] = '\0';
 	for (i = 0; i < 15; i++) {



Ttssh2-commit メーリングリストの案内
Zurück zum Archiv-Index