diff options
| author | Neil <nyamatongwe@gmail.com> | 2015-01-11 08:58:03 +1100 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2015-01-11 08:58:03 +1100 | 
| commit | 10802b6407b8136c7b793b33e1bf596d9f26075e (patch) | |
| tree | d9c8739089c5d13f656081ba05ce3ffbcad7727b | |
| parent | cf60b6799dcf30c8b5cbc1cbb1f48eb45abfaf29 (diff) | |
| download | scintilla-mirror-10802b6407b8136c7b793b33e1bf596d9f26075e.tar.gz | |
Support removed for Windows 95, 98, and ME.
| -rw-r--r-- | doc/ScintillaHistory.html | 3 | ||||
| -rw-r--r-- | win32/PlatWin.cxx | 48 | ||||
| -rw-r--r-- | win32/PlatWin.h | 1 | ||||
| -rw-r--r-- | win32/ScintillaWin.cxx | 67 | 
4 files changed, 25 insertions, 94 deletions
| diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index b51dc04bd..103a34b69 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -484,6 +484,9 @@  	Released 2 December 2014.  	</li>  	<li> +	Support removed for Windows 95, 98, and ME. +	</li> +	<li>  	Lexers added for Motorola S-Record files, Intel hex files, and Tektronix extended hex files with folding for Intel hex files.  	<a href="http://sourceforge.net/p/scintilla/feature-requests/1091/">Feature #1091.</a>  	<a href="http://sourceforge.net/p/scintilla/feature-requests/1093/">Feature #1093.</a> diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 7407d64f0..b0a5fb512 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -67,7 +67,6 @@ typedef BOOL (WINAPI *GetMonitorInfoSig)(HMONITOR, LPMONITORINFO);  static CRITICAL_SECTION crPlatformLock;  static HINSTANCE hinstPlatformRes = 0; -static bool onNT = false;  static HMODULE hDLLImage = 0;  static AlphaBlendSig AlphaBlendFn = 0; @@ -83,10 +82,6 @@ static HCURSOR reverseArrowCursor = NULL;  namespace Scintilla {  #endif -bool IsNT() { -	return onNT; -} -  Point Point::FromLong(long lpoint) {  	return Point(static_cast<short>(LOWORD(lpoint)), static_cast<short>(HIWORD(lpoint)));  } @@ -516,8 +511,6 @@ class SurfaceGDI : public Surface {  	int maxLenText;  	int codePage; -	// If 9x OS and current code page is same as ANSI code page. -	bool win9xACPSame;  	void BrushColor(ColourDesired back);  	void SetFont(Font &font_); @@ -579,14 +572,11 @@ SurfaceGDI::SurfaceGDI() :  	brush(0), brushOld(0),  	font(0), 	fontOld(0),  	bitmap(0), bitmapOld(0) { -	// Windows 9x has only a 16 bit coordinate system so break after 30000 pixels -	maxWidthMeasure = IsNT() ? INT_MAX : 30000; -	// There appears to be a 16 bit string length limit in GDI on NT and a limit of -	// 8192 characters on Windows 95. -	maxLenText = IsNT() ? 65535 : 8192; +	maxWidthMeasure = INT_MAX; +	// There appears to be a 16 bit string length limit in GDI on NT. +	maxLenText = 65535;  	codePage = 0; -	win9xACPSame = false;  }  SurfaceGDI::~SurfaceGDI() { @@ -910,7 +900,7 @@ void SurfaceGDI::DrawTextCommon(PRectangle rc, Font &font_, XYPOSITION ybase, co  	// If it does fail, slice up into segments and draw each segment.  	const int maxSegmentLength = 0x200; -	if ((!unicodeMode) && (IsNT() || (codePage==0) || win9xACPSame)) { +	if (!unicodeMode) {  		// Use ANSI calls  		int lenDraw = Platform::Minimum(len, maxLenText);  		if (!::ExtTextOutA(hdc, x, yBaseInt, fuOptions, &rcw, s, lenDraw, NULL)) { @@ -974,7 +964,7 @@ void SurfaceGDI::DrawTextTransparent(PRectangle rc, Font &font_, XYPOSITION ybas  XYPOSITION SurfaceGDI::WidthText(Font &font_, const char *s, int len) {  	SetFont(font_);  	SIZE sz={0,0}; -	if ((!unicodeMode) && (IsNT() || (codePage==0) || win9xACPSame)) { +	if (!unicodeMode) {  		::GetTextExtentPoint32A(hdc, s, Platform::Minimum(len, maxLenText), &sz);  	} else {  		const TextWide tbuf(s, len, unicodeMode, codePage); @@ -1026,7 +1016,7 @@ void SurfaceGDI::MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *  		while (i<len) {  			positions[i++] = lastPos;  		} -	} else if (IsNT() || (codePage==0) || win9xACPSame) { +	} else {  		// Zero positions to avoid random behaviour on failure.  		std::fill(positions, positions + len, 0.0f);  		// len may be larger than platform supports so loop over segments small enough for platform @@ -1052,28 +1042,6 @@ void SurfaceGDI::MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *  			positions += lenBlock;  			s += lenBlock;  		} -	} else { -		// Support Asian string display in 9x English -		const TextWide tbuf(s, len, unicodeMode, codePage); -		TextPositionsI poses(tbuf.tlen); -		for (int widthSS=0; widthSS<tbuf.tlen; widthSS++) { -			::GetTextExtentPoint32W(hdc, tbuf.buffer, widthSS+1, &sz); -			poses.buffer[widthSS] = sz.cx; -		} - -		int ui = 0; -		for (int i=0; i<len;) { -			if (Platform::IsDBCSLeadByte(codePage, s[i])) { -				positions[i] = static_cast<XYPOSITION>(poses.buffer[ui]); -				positions[i + 1] = static_cast<XYPOSITION>(poses.buffer[ui]); -				i += 2; -			} else { -				positions[i] = static_cast<XYPOSITION>(poses.buffer[ui]); -				i++; -			} - -			ui++; -		}  	}  } @@ -1144,7 +1112,6 @@ void SurfaceGDI::SetUnicodeMode(bool unicodeMode_) {  void SurfaceGDI::SetDBCSMode(int codePage_) {  	// No action on window as automatically handled by system.  	codePage = codePage_; -	win9xACPSame = !IsNT() && ((unsigned int)codePage == ::GetACP());  }  #if defined(USE_D2D) @@ -3259,9 +3226,6 @@ int Platform::Clamp(int val, int minVal, int maxVal) {  #endif  void Platform_Initialise(void *hInstance) { -	OSVERSIONINFO osv = {sizeof(OSVERSIONINFO),0,0,0,0,TEXT("")}; -	::GetVersionEx(&osv); -	onNT = osv.dwPlatformId == VER_PLATFORM_WIN32_NT;  	::InitializeCriticalSection(&crPlatformLock);  	hinstPlatformRes = reinterpret_cast<HINSTANCE>(hInstance);  	// This may be called from DllMain, in which case the call to LoadLibrary diff --git a/win32/PlatWin.h b/win32/PlatWin.h index c284d42d3..e5913ba17 100644 --- a/win32/PlatWin.h +++ b/win32/PlatWin.h @@ -12,7 +12,6 @@  namespace Scintilla {  #endif -extern bool IsNT();  extern void Platform_Initialise(void *hInstance);  extern void Platform_Finalise(bool fromDllMain); diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 0dd715d6d..3bafee4bf 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -2561,20 +2561,6 @@ void ScintillaWin::CopyToClipboard(const SelectionText &selectedText) {  	}  	if (uniText) { -		if (!IsNT()) { -			// Copy ANSI text to clipboard on Windows 9x -			// Convert from Unicode text, so other ANSI programs can -			// paste the text -			// Windows NT, 2k, XP automatically generates CF_TEXT -			GlobalMemory ansiText; -			ansiText.Allocate(selectedText.LengthWithTerminator()); -			if (ansiText) { -				::WideCharToMultiByte(CP_ACP, 0, static_cast<wchar_t *>(uniText.ptr), -1, -					static_cast<char *>(ansiText.ptr), -					static_cast<int>(selectedText.LengthWithTerminator()), NULL, NULL); -				ansiText.SetClip(CF_TEXT); -			} -		}  		uniText.SetClip(CF_UNICODETEXT);  	} else {  		// There was a failure - try to copy at least ANSI text @@ -2952,43 +2938,22 @@ bool ScintillaWin::Register(HINSTANCE hInstance_) {  	bool result;  	// Register the Scintilla class -	if (IsNT()) { - -		// Register Scintilla as a wide character window -		WNDCLASSEXW wndclass; -		wndclass.cbSize = sizeof(wndclass); -		wndclass.style = CS_GLOBALCLASS | CS_HREDRAW | CS_VREDRAW; -		wndclass.lpfnWndProc = ScintillaWin::SWndProc; -		wndclass.cbClsExtra = 0; -		wndclass.cbWndExtra = sizeof(ScintillaWin *); -		wndclass.hInstance = hInstance; -		wndclass.hIcon = NULL; -		wndclass.hCursor = NULL; -		wndclass.hbrBackground = NULL; -		wndclass.lpszMenuName = NULL; -		wndclass.lpszClassName = L"Scintilla"; -		wndclass.hIconSm = 0; -		scintillaClassAtom = ::RegisterClassExW(&wndclass); -		result = 0 != scintillaClassAtom; -	} else { - -		// Register Scintilla as a normal character window -		WNDCLASSEX wndclass; -		wndclass.cbSize = sizeof(wndclass); -		wndclass.style = CS_GLOBALCLASS | CS_HREDRAW | CS_VREDRAW; -		wndclass.lpfnWndProc = ScintillaWin::SWndProc; -		wndclass.cbClsExtra = 0; -		wndclass.cbWndExtra = sizeof(ScintillaWin *); -		wndclass.hInstance = hInstance; -		wndclass.hIcon = NULL; -		wndclass.hCursor = NULL; -		wndclass.hbrBackground = NULL; -		wndclass.lpszMenuName = NULL; -		wndclass.lpszClassName = scintillaClassName; -		wndclass.hIconSm = 0; -		scintillaClassAtom = ::RegisterClassEx(&wndclass); -		result = 0 != scintillaClassAtom; -	} +	// Register Scintilla as a wide character window +	WNDCLASSEXW wndclass; +	wndclass.cbSize = sizeof(wndclass); +	wndclass.style = CS_GLOBALCLASS | CS_HREDRAW | CS_VREDRAW; +	wndclass.lpfnWndProc = ScintillaWin::SWndProc; +	wndclass.cbClsExtra = 0; +	wndclass.cbWndExtra = sizeof(ScintillaWin *); +	wndclass.hInstance = hInstance; +	wndclass.hIcon = NULL; +	wndclass.hCursor = NULL; +	wndclass.hbrBackground = NULL; +	wndclass.lpszMenuName = NULL; +	wndclass.lpszClassName = L"Scintilla"; +	wndclass.hIconSm = 0; +	scintillaClassAtom = ::RegisterClassExW(&wndclass); +	result = 0 != scintillaClassAtom;  	if (result) {  		// Register the CallTip class | 
