aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2001-02-05 04:39:42 +0000
committernyamatongwe <devnull@localhost>2001-02-05 04:39:42 +0000
commitbc28310ef52287aef419d8edf728a1c6f47fe27e (patch)
treeabedd8d80bacfd6f5c9e754109c8687ab98d10ec
parent6fbd45ca439f4e3e744a183a9bbaaa012fea98c9 (diff)
downloadscintilla-mirror-bc28310ef52287aef419d8edf728a1c6f47fe27e.tar.gz
Patch from John to make GTK+ version build on Win32.
Modified by me to avoid pointless warnings and print error message if try to build with Borland C++.
-rw-r--r--gtk/PlatGTK.cxx6
-rw-r--r--gtk/ScintillaGTK.cxx12
-rw-r--r--gtk/scintilla.mak291
-rw-r--r--include/Platform.h3
-rw-r--r--src/PropSet.cxx28
-rw-r--r--win32/ScintillaWin.cxx4
6 files changed, 336 insertions, 8 deletions
diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx
index bb1e1c291..a9b24ad23 100644
--- a/gtk/PlatGTK.cxx
+++ b/gtk/PlatGTK.cxx
@@ -14,6 +14,12 @@
#include "ScintillaWidget.h"
#include "Scintilla.h"
+/* Use fast way of getting char data on win32 to work around problems
+ with gdk_string_extents. */
+#ifdef G_OS_WIN32
+#define FAST_WAY
+#endif
+
Point Point::FromLong(long lpoint) {
return Point(
Platform::LowShortFromLong(lpoint),
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index f4050b544..bbe385f90 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -31,10 +31,16 @@
#include "ViewStyle.h"
#include "Document.h"
#include "Editor.h"
+#include "SString.h"
#include "ScintillaBase.h"
#include "gtk/gtksignal.h"
+#ifdef _MSC_VER
+// Constant conditional expressions are because of GTK+ headers
+#pragma warning(disable: 4127)
+#endif
+
class ScintillaGTK : public ScintillaBase {
_ScintillaObject *sci;
Window scrollbarv;
@@ -58,6 +64,10 @@ class ScintillaGTK : public ScintillaBase {
GdkIC *ic;
GdkICAttr *ic_attr;
+ // Private so ScintillaGTK objects can not be copied
+ ScintillaGTK(const ScintillaGTK &) {}
+ ScintillaGTK &operator=(const ScintillaGTK &) { return *this; }
+
public:
ScintillaGTK(_ScintillaObject *sci_);
virtual ~ScintillaGTK();
@@ -372,7 +382,7 @@ gint ScintillaGTK::FocusOut(GtkWidget *widget, GdkEventFocus * /*event*/) {
return FALSE;
}
-void ScintillaGTK::SizeRequest(GtkWidget */*widget*/, GtkRequisition *requisition) {
+void ScintillaGTK::SizeRequest(GtkWidget * /*widget*/, GtkRequisition *requisition) {
requisition->width = 1000;
requisition->height = 1000;
}
diff --git a/gtk/scintilla.mak b/gtk/scintilla.mak
new file mode 100644
index 000000000..6398b4122
--- /dev/null
+++ b/gtk/scintilla.mak
@@ -0,0 +1,291 @@
+# Make file for GTK+/Scintilla on Windows Visual C++
+# Borland C++ does not work
+# Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
+# The License.txt file describes the conditions under which this software may be distributed.
+# This makefile is for using Visual C++ with nmake or Borland C++ with make depending on
+# the setting of the VENDOR macro. If no VENDOR is defined n the command line then
+# the tool used is automatically detected.
+# Usage for Microsoft:
+# nmake -f scintilla.mak
+# Usage for Borland:
+# make -f scintilla.mak
+# For debug versions define DEBUG on the command line, for Borland:
+# make DEBUG=1 -f scintilla.mak
+# The main makefile uses mingw32 gcc and may be more current than this file.
+
+.SUFFIXES: .cxx
+
+DIR_O=.
+DIR_BIN=..\bin
+
+COMPONENT=$(DIR_BIN)\Scintilla.dll
+LEXCOMPONENT=$(DIR_BIN)\SciLexer.dll
+STATIC_LIB=$(DIR_BIN)\Scintilla-static.lib
+
+!IFNDEF VENDOR
+!IFDEF _NMAKE_VER
+#Microsoft nmake so make default VENDOR MICROSOFT
+VENDOR=MICROSOFT
+!ELSE
+VENDOR=BORLAND
+!ENDIF
+!ENDIF
+
+!IF "$(VENDOR)"=="MICROSOFT"
+
+CC=cl
+RC=rc
+LD=link
+
+GTK_TOP= ../../win32gtk
+GTK_INCLUDES= -I $(GTK_TOP)/gtk+ -I $(GTK_TOP)/gtk+/gdk -I $(GTK_TOP)/glib
+GTK_LIBS=$(GTK_TOP)/gtk+/gtk/gtk-1.3.lib \
+ $(GTK_TOP)/gtk+/gdk/gdk-1.3.lib \
+ $(GTK_TOP)/glib/gmodule/gmodule-1.3.lib \
+ $(GTK_TOP)/glib/glib-1.3.lib
+
+INCLUDEDIRS=-I ../include -I ../src $(GTK_INCLUDES)
+CXXFLAGS=/TP /W4 -DGTK
+# For something scary:/Wp64
+CXXDEBUG=/Zi /Od /MDd -DDEBUG
+CXXNDEBUG=/Ox /MD -DNDEBUG
+NAMEFLAG=-Fo
+LDFLAGS=/opt:nowin98
+LDDEBUG=/DEBUG
+#LIBS=KERNEL32.lib USER32.lib GDI32.lib IMM32.lib OLE32.LIB
+LIBS=$(GTK_LIBS)
+
+!IFDEF QUIET
+CC=@$(CC)
+CXXDEBUG=$(CXXDEBUG) /nologo
+CXXNDEBUG=$(CXXNDEBUG) /nologo
+LDFLAGS=$(LDFLAGS) /nologo
+!ENDIF
+
+!ELSE
+# BORLAND
+!error Borland C++ not supported
+
+CC=bcc32
+RC=brcc32 -r
+LD=ilink32
+
+INCLUDEDIRS=-I../include -I../src
+CXXFLAGS = -v
+CXXFLAGS=-P -tWM -w -w-prc -w-inl -RT- -x-
+# Above turns off warnings for clarfying parentheses and inlines with for not expanded
+CXXDEBUG=-v -DDEBUG
+CXXNDEBUG=-O1 -DNDEBUG
+NAMEFLAG=-o
+LDFLAGS=
+LDDEBUG=-v
+LIBS=import32 cw32mt
+
+!ENDIF
+
+!IFDEF DEBUG
+CXXFLAGS=$(CXXFLAGS) $(CXXDEBUG)
+LDFLAGS=$(LDDEBUG) $(LDFLAGS)
+!ELSE
+CXXFLAGS=$(CXXFLAGS) $(CXXNDEBUG)
+!ENDIF
+
+#ALL: $(STATIC_LIB) $(COMPONENT) $(LEXCOMPONENT) $(DIR_O)\ScintillaGTKS.obj $(DIR_O)\WindowAccessor.obj
+ALL: $(STATIC_LIB) $(DIR_O)\ScintillaGTKS.obj $(DIR_O)\WindowAccessor.obj
+
+clean:
+ -del /q $(DIR_O)\*.obj $(DIR_O)\*.pdb $(COMPONENT) $(LEXCOMPONENT) $(DIR_O)\*.res $(DIR_BIN)\*.map
+
+SOBJS=\
+ $(DIR_O)\AutoComplete.obj \
+ $(DIR_O)\CallTip.obj \
+ $(DIR_O)\CellBuffer.obj \
+ $(DIR_O)\ContractionState.obj \
+ $(DIR_O)\Document.obj \
+ $(DIR_O)\Editor.obj \
+ $(DIR_O)\Indicator.obj \
+ $(DIR_O)\KeyMap.obj \
+ $(DIR_O)\LineMarker.obj \
+ $(DIR_O)\PlatGTK.obj \
+ $(DIR_O)\ScintillaBase.obj \
+ $(DIR_O)\ScintillaGTK.obj \
+ $(DIR_O)\Style.obj \
+ $(DIR_O)\UniConversion.obj \
+ $(DIR_O)\ViewStyle.obj
+
+LEXOBJS=\
+ $(DIR_O)\LexConf.obj \
+ $(DIR_O)\LexCPP.obj \
+ $(DIR_O)\LexHTML.obj \
+ $(DIR_O)\LexLua.obj \
+ $(DIR_O)\LexOthers.obj \
+ $(DIR_O)\LexPascal.obj \
+ $(DIR_O)\LexPerl.obj \
+ $(DIR_O)\LexPython.obj \
+ $(DIR_O)\LexSQL.obj \
+ $(DIR_O)\LexVB.obj
+
+LOBJS=\
+ $(DIR_O)\AutoComplete.obj \
+ $(DIR_O)\CallTip.obj \
+ $(DIR_O)\CellBuffer.obj \
+ $(DIR_O)\ContractionState.obj \
+ $(DIR_O)\Document.obj \
+ $(DIR_O)\DocumentAccessor.obj \
+ $(DIR_O)\Editor.obj \
+ $(DIR_O)\Indicator.obj \
+ $(DIR_O)\KeyMap.obj \
+ $(DIR_O)\KeyWords.obj \
+ $(DIR_O)\LineMarker.obj \
+ $(DIR_O)\PlatGTK.obj \
+ $(DIR_O)\PropSet.obj \
+ $(DIR_O)\ScintillaBaseL.obj \
+ $(DIR_O)\ScintillaGTKL.obj \
+ $(DIR_O)\Style.obj \
+ $(DIR_O)\UniConversion.obj \
+ $(DIR_O)\ViewStyle.obj \
+ $(LEXOBJS)
+
+!IF "$(VENDOR)"=="MICROSOFT"
+
+$(STATIC_LIB): $(LOBJS) #$(DIR_O)\ScintRes.res
+ lib.exe /OUT:$@ $(LOBJS) $(LIBS)
+
+$(COMPONENT): $(SOBJS) #$(DIR_O)\ScintRes.res
+ $(LD) $(LDFLAGS) /DLL /OUT:$@ $(SOBJS) $(LIBS)
+
+$(DIR_O)\ScintRes.res : ScintRes.rc
+ $(RC) /fo$@ $(*B).rc
+
+$(LEXCOMPONENT): $(LOBJS) #$(DIR_O)\ScintRes.res
+ $(LD) $(LDFLAGS) /DLL /OUT:$@ $(LOBJS) $(LIBS)
+
+!ELSE
+
+$(STATIC_LIB): $(LOBJS) #$(DIR_O)\ScintRes.res
+ $(LD) /OUT:$@ $(LOBJS) $(LIBS)
+
+$(COMPONENT): $(SOBJS) ScintRes.res
+ $(LD) $(LDFLAGS) -Tpd -c c0d32 $(SOBJS), $@, , $(LIBS), , ScintRes.res
+
+$(DIR_O)\ScintRes.res: ScintRes.rc
+ $(RC) $*.rc
+
+$(LEXCOMPONENT): $(LOBJS)
+ $(LD) $(LDFLAGS) -Tpd -c c0d32 $(LOBJS), $@, , $(LIBS), , ScintRes.res
+
+!ENDIF
+
+# Define how to build all the objects and what they depend on
+
+# Most of the source is in ..\src with a couple in this directory
+{..\src}.cxx{$(DIR_O)}.obj:
+ $(CC) $(INCLUDEDIRS) $(CXXFLAGS) -c $(NAMEFLAG)$@ $<
+{.}.cxx{$(DIR_O)}.obj:
+ $(CC) $(INCLUDEDIRS) $(CXXFLAGS) -c $(NAMEFLAG)$@ $<
+
+# Some source files are compiled into more than one object because of different conditional compilation
+$(DIR_O)\ScintillaBaseL.obj: ..\src\ScintillaBase.cxx
+ $(CC) $(INCLUDEDIRS) $(CXXFLAGS) -DSCI_LEXER -c $(NAMEFLAG)$@ ..\src\ScintillaBase.cxx
+
+$(DIR_O)\ScintillaGTKL.obj: ScintillaGTK.cxx
+ $(CC) $(INCLUDEDIRS) $(CXXFLAGS) -DSCI_LEXER -c $(NAMEFLAG)$@ ScintillaGTK.cxx
+
+$(DIR_O)\ScintillaGTKS.obj: ScintillaGTK.cxx
+ $(CC) $(INCLUDEDIRS) $(CXXFLAGS) -DSTATIC_BUILD -c $(NAMEFLAG)$@ ScintillaGTK.cxx
+
+# Dependencies
+$(DIR_O)\AutoComplete.obj: ..\src\AutoComplete.cxx ..\include\Platform.h ..\src\AutoComplete.h
+
+$(DIR_O)\CallTip.obj: ..\src\CallTip.cxx ..\include\Platform.h ..\src\CallTip.h
+
+$(DIR_O)\CellBuffer.obj: ..\src\CellBuffer.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\CellBuffer.h
+
+$(DIR_O)\ContractionState.obj: ..\src\ContractionState.cxx ..\include\Platform.h ..\src\ContractionState.h
+
+$(DIR_O)\Document.obj: ..\src\Document.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\CellBuffer.h \
+ ..\src\Document.h
+
+$(DIR_O)\DocumentAccessor.obj: ..\src\DocumentAccessor.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\src\DocumentAccessor.h ..\include\Scintilla.h
+
+$(DIR_O)\Editor.obj: ..\src\Editor.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\ContractionState.h \
+ ..\src\CellBuffer.h ..\src\KeyMap.h ..\src\Indicator.h ..\src\LineMarker.h ..\src\Style.h ..\src\ViewStyle.h \
+ ..\src\Document.h ..\src\Editor.h
+
+$(DIR_O)\Indicator.obj: ..\src\Indicator.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\Indicator.h
+
+$(DIR_O)\KeyMap.obj: ..\src\KeyMap.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\KeyMap.h
+
+$(DIR_O)\KeyWords.obj: ..\src\KeyWords.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
+ ..\include\Scintilla.h ..\include\SciLexer.h
+
+$(DIR_O)\LexCPP.obj: ..\src\LexCPP.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
+ ..\include\Scintilla.h ..\include\SciLexer.h
+
+$(DIR_O)\LexConf.obj: ..\src\LexConf.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
+ ..\include\Scintilla.h ..\include\SciLexer.h
+
+$(DIR_O)\LexHTML.obj: ..\src\LexHTML.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
+ ..\include\Scintilla.h ..\include\SciLexer.h
+
+$(DIR_O)\LexLua.obj: ..\src\LexLua.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
+ ..\include\Scintilla.h ..\include\SciLexer.h
+
+$(DIR_O)\LexOthers.obj: ..\src\LexOthers.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
+ ..\include\Scintilla.h ..\include\SciLexer.h
+
+$(DIR_O)\LexPerl.obj: ..\src\LexPerl.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
+ ..\include\Scintilla.h ..\include\SciLexer.h
+
+$(DIR_O)\LexPascal.obj: ..\src\LexPascal.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
+ ..\include\Scintilla.h ..\include\SciLexer.h
+
+$(DIR_O)\LexPython.obj: ..\src\LexPython.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
+ ..\include\Scintilla.h ..\include\SciLexer.h
+
+$(DIR_O)\LexSQL.obj: ..\src\LexSQL.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
+ ..\include\Scintilla.h ..\include\SciLexer.h
+
+$(DIR_O)\LexVB.obj: ..\src\LexVB.cxx ..\include\Platform.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h \
+ ..\include\Scintilla.h ..\include\SciLexer.h
+
+$(DIR_O)\LineMarker.obj: ..\src\LineMarker.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\LineMarker.h
+
+$(DIR_O)\PlatWin.obj: PlatWin.cxx ..\include\Platform.h PlatformRes.h ..\src\UniConversion.h
+
+$(DIR_O)\PropSet.obj: ..\src\PropSet.cxx ..\include\Platform.h ..\include\PropSet.h
+
+$(DIR_O)\ScintillaBase.obj: ..\src\ScintillaBase.cxx ..\include\Platform.h ..\include\Scintilla.h \
+ ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \
+ ..\src\LineMarker.h ..\src\Style.h ..\src\ViewStyle.h ..\src\AutoComplete.h ..\src\Document.h ..\src\Editor.h \
+ ..\src\ScintillaBase.h
+
+$(DIR_O)\ScintillaBaseL.obj: ..\src\ScintillaBase.cxx ..\include\Platform.h ..\include\Scintilla.h ..\include\SciLexer.h \
+ ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \
+ ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \
+ ..\src\ScintillaBase.h ..\include\PropSet.h ..\include\Accessor.h ..\src\DocumentAccessor.h ..\include\KeyWords.h
+
+$(DIR_O)\ScintillaWin.obj: ScintillaWin.cxx ..\include\Platform.h ..\include\Scintilla.h \
+ ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \
+ ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \
+ ..\src\ScintillaBase.h ..\src\UniConversion.h
+
+$(DIR_O)\ScintillaWinL.obj: ScintillaWin.cxx ..\include\Platform.h ..\include\Scintilla.h ..\include\SciLexer.h \
+ ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \
+ ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \
+ ..\src\ScintillaBase.h ..\include\PropSet.h ..\include\Accessor.h ..\include\KeyWords.h ..\src\UniConversion.h
+
+$(DIR_O)\ScintillaWinS.obj: ScintillaWin.cxx ..\include\Platform.h ..\include\Scintilla.h \
+ ..\src\ContractionState.h ..\src\CellBuffer.h ..\src\CallTip.h ..\src\KeyMap.h ..\src\Indicator.h \
+ ..\src\LineMarker.h ..\src\Style.h ..\src\AutoComplete.h ..\src\ViewStyle.h ..\src\Document.h ..\src\Editor.h \
+ ..\src\ScintillaBase.h ..\src\UniConversion.h
+
+$(DIR_O)\Style.obj: ..\src\Style.cxx ..\include\Platform.h ..\src\Style.h
+
+$(DIR_O)\ViewStyle.obj: ..\src\ViewStyle.cxx ..\include\Platform.h ..\include\Scintilla.h ..\src\Indicator.h \
+ ..\src\LineMarker.h ..\src\Style.h ..\src\ViewStyle.h
+
+$(DIR_O)\UniConversion.obj: ..\src\UniConversion.cxx ..\src\UniConversion.h
+
+$(DIR_O)\WindowAccessor.obj: ..\src\WindowAccessor.cxx ..\include\Platform.h ..\include\PropSet.h \
+ ..\include\Accessor.h ..\include\WindowAccessor.h ..\include\Scintilla.h
diff --git a/include/Platform.h b/include/Platform.h
index c951b5533..3e650f4e6 100644
--- a/include/Platform.h
+++ b/include/Platform.h
@@ -35,6 +35,9 @@
// Include the main header for each platform
#if PLAT_GTK
+#ifdef _MSC_VER
+#pragma warning(disable: 4505 4514 4710 4800)
+#endif
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#endif
diff --git a/src/PropSet.cxx b/src/PropSet.cxx
index 368d2a484..fa26d3133 100644
--- a/src/PropSet.cxx
+++ b/src/PropSet.cxx
@@ -16,7 +16,11 @@
bool EqualCaseInsensitive(const char *a, const char *b) {
#if PLAT_GTK
+# ifdef G_OS_WIN32
+ return 0 == stricmp(a, b);
+# else
return 0 == strcasecmp(a, b);
+# endif
#elif PLAT_WIN
return 0 == stricmp(a, b);
#elif PLAT_WX
@@ -24,6 +28,20 @@ bool EqualCaseInsensitive(const char *a, const char *b) {
#endif
}
+bool EqualNCaseInsensitive(const char *a, const char *b, int len) {
+#if PLAT_GTK
+# ifdef G_OS_WIN32
+ return 0 == strnicmp(a, b, len);
+# else
+ return 0 == strncasecmp(a, b, len);
+# endif
+#elif PLAT_WIN
+ return 0 == strnicmp(a, b, len);
+#elif PLAT_WX
+ return 0 == wxStrnicmp(a, b, len);
+#endif
+}
+
inline unsigned int HashString(const char *s) {
unsigned int ret = 0;
while (*s) {
@@ -360,7 +378,7 @@ int cmpString(const void *a1, const void *a2) {
int cmpStringNoCase(const void *a1, const void *a2) {
// Can't work out the correct incantation to use modern casts here
- return strcasecmp(*(char**)(a1), *(char**)(a2));
+ return EqualCaseInsensitive(*(char**)(a1), *(char**)(a2));
}
static void SortWordList(char **words, char **wordsNoCase, unsigned int len) {
@@ -425,7 +443,7 @@ const char *WordList::GetNearestWord(const char *wordStart, int searchLen /*= -1
while (start <= end) { // binary searching loop
pivot = (start + end) >> 1;
word = wordsNoCase[pivot];
- cond = strncasecmp(wordStart, word, searchLen);
+ cond = EqualNCaseInsensitive(wordStart, word, searchLen);
if (!cond && nonFuncChar(word[searchLen])) // maybe there should be a "non-word character" test here?
return word; // result must not be freed with free()
else if (cond >= 0)
@@ -485,7 +503,7 @@ char *WordList::GetNearestWords(const char *wordStart, int searchLen /*= -1*/, b
while (start <= end) { // binary searching loop
pivot = (start + end) >> 1;
word = wordsNoCase[pivot];
- cond = strncasecmp(wordStart, word, searchLen);
+ cond = EqualNCaseInsensitive(wordStart, word, searchLen);
if (!cond) {
oldpivot = pivot;
do { // browse sequentially the rest after the hit
@@ -520,14 +538,14 @@ char *WordList::GetNearestWords(const char *wordStart, int searchLen /*= -1*/, b
if (++pivot > end)
break;
word = wordsNoCase[pivot];
- } while (!strncasecmp(wordStart, word, searchLen));
+ } while (!EqualNCaseInsensitive(wordStart, word, searchLen));
pivot = oldpivot;
for (;;) { // browse sequentially the rest before the hit
if (--pivot < start)
break;
word = wordsNoCase[pivot];
- if (strncasecmp(wordStart, word, searchLen))
+ if (EqualNCaseInsensitive(wordStart, word, searchLen))
break;
brace = strchr(word, '(');
if (brace)
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx
index e3290c3af..b10193d4c 100644
--- a/win32/ScintillaWin.cxx
+++ b/win32/ScintillaWin.cxx
@@ -100,7 +100,7 @@ class ScintillaWin :
bool capturedMouse;
- bool hasOKText;
+ bool hasOKText;
CLIPFORMAT cfColumnSelect;
@@ -193,7 +193,7 @@ ScintillaWin::ScintillaWin(HWND hwnd) {
capturedMouse = false;
- hasOKText = false;
+ hasOKText = false;
// There does not seem to be a real standard for indicating that the clipboard contains a rectangular
// selection, so copy Developer Studio.