• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision7305 (tree)
Zeit2006-08-23 15:44:11
Autorstefankueng

Log Message

Update to scintilla version 1.71.

Ändern Zusammenfassung

Diff

--- trunk/src/Utils/scintilla/doc/ScintillaDoc.html (revision 7304)
+++ trunk/src/Utils/scintilla/doc/ScintillaDoc.html (revision 7305)
@@ -4546,7 +4546,7 @@
45464546 struct SCNotification {
45474547 struct NotifyHeader nmhdr;
45484548 int position;
4549- // SCN_STYLENEEDED, SCN_MODIFIED, SCN_DWELLSTART,
4549+ // SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_DWELLSTART,
45504550 // SCN_DWELLEND, SCN_CALLTIPCLICK,
45514551 // SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK
45524552 int ch; // SCN_CHARADDED, SCN_KEY
@@ -4558,7 +4558,7 @@
45584558 int message; // SCN_MACRORECORD
45594559 uptr_t wParam; // SCN_MACRORECORD
45604560 sptr_t lParam; // SCN_MACRORECORD
4561- int line; // SCN_MODIFIED
4561+ int line; // SCN_MODIFIED, SCN_DOUBLECLICK
45624562 int foldLevelNow; // SCN_MODIFIED
45634563 int foldLevelPrev; // SCN_MODIFIED
45644564 int margin; // SCN_MARGINCLICK
@@ -4656,7 +4656,8 @@
46564656 than 256.</p>
46574657
46584658 <p><b id="SCN_DOUBLECLICK">SCN_DOUBLECLICK</b><br />
4659- The mouse button was double clicked in editor. There is no additional information.</p>
4659+ The mouse button was double clicked in editor. The <code>position</code> field is set to the text position of the
4660+ double click and the <code>line</code> field is set to the line of the double click.</p>
46604661
46614662 <p><b id="SCN_UPDATEUI">SCN_UPDATEUI</b><br />
46624663 Either the text or styling of the document has changed or the selection range has changed. Now
--- trunk/src/Utils/scintilla/doc/ScintillaDownload.html (revision 7304)
+++ trunk/src/Utils/scintilla/doc/ScintillaDownload.html (revision 7305)
@@ -25,9 +25,9 @@
2525 <table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
2626 <tr>
2727 <td>
28- <font size="4"> <a href="http://prdownloads.sourceforge.net/scintilla/scintilla170.zip?download">
28+ <font size="4"> <a href="http://prdownloads.sourceforge.net/scintilla/scintilla171.zip?download">
2929 Windows</a>&nbsp;&nbsp;
30- <a href="http://prdownloads.sourceforge.net/scintilla/scintilla170.tgz?download">
30+ <a href="http://prdownloads.sourceforge.net/scintilla/scintilla171.tgz?download">
3131 GTK+/Linux</a>&nbsp;&nbsp;
3232 </font>
3333 </td>
@@ -41,7 +41,7 @@
4141 containing very few restrictions.
4242 </p>
4343 <h3>
44- Release 1.70
44+ Release 1.71
4545 </h3>
4646 <h4>
4747 Source Code
@@ -49,8 +49,8 @@
4949 The source code package contains all of the source code for Scintilla but no binary
5050 executable code and is available in
5151 <ul>
52- <li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla170.zip?download">zip format</a> (720K) commonly used on Windows</li>
53- <li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla170.tgz?download">tgz format</a> (620K) commonly used on Linux and compatible operating systems</li>
52+ <li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla171.zip?download">zip format</a> (720K) commonly used on Windows</li>
53+ <li><a href="http://prdownloads.sourceforge.net/scintilla/scintilla171.tgz?download">tgz format</a> (620K) commonly used on Linux and compatible operating systems</li>
5454 </ul>
5555 Instructions for building on both Windows and Linux are included in the readme file.
5656 <h4>
--- trunk/src/Utils/scintilla/doc/ScintillaHistory.html (revision 7304)
+++ trunk/src/Utils/scintilla/doc/ScintillaHistory.html (revision 7305)
@@ -220,6 +220,7 @@
220220 <li>Martin Stone</li>
221221 <li>Fabien Proriol</li>
222222 <li>mimir</li>
223+ <li>Nicola Civran</li>
223224 </ul>
224225 <p>
225226 Images used in GTK+ version
@@ -231,6 +232,59 @@
231232 </li>
232233 </ul>
233234 <h3>
235+ <a href="http://prdownloads.sourceforge.net/scintilla/scite171.zip?download">Release 1.71</a>
236+ </h3>
237+ <ul>
238+ <li>
239+ Released on 21 August 2006.
240+ </li>
241+ <li>
242+ On GTK+ drag and drop defaults to move rather than copy.
243+ </li>
244+ <li>
245+ Double click notification includes line and position.
246+ </li>
247+ <li>
248+ VB lexer bugs fixed for preprocessor directive below a comment or some other states and
249+ to use string not closed style back to the starting quote when there are internal doubled quotes.
250+ </li>
251+ <li>
252+ C++ lexer allows identifiers to contain '$' and non-ASCII characters such as UTF-8.
253+ The '$' character can be disallowed with lexer.cpp.allow.dollars=0.
254+ </li>
255+ <li>
256+ Perl lexer allows UTF-8 identifiers and has some other small improvements.
257+ </li>
258+ <li>
259+ SciTE's $(CurrentWord) uses word.characters.&lt;filepattern&gt; to define the word
260+ rather than a hardcoded list of word characters.
261+ </li>
262+ <li>
263+ SciTE Export as HTML adds encoding information for UTF-8 file and fixes DOCTYPE.
264+ </li>
265+ <li>
266+ SciTE session and .recent files default to the user properties directory rather than global
267+ properties directory.
268+ </li>
269+ <li>
270+ Left and right scroll events handled correctly on GTK+ and horizontal scroll bar has more sensible
271+ distances for page and arrow clicks.
272+ </li>
273+ <li>
274+ SciTE on GTK+ tab bar fixed to work on recent versions of GTK+.
275+ </li>
276+ <li>
277+ On GTK+, if the approximate character set conversion is unavailable, a second attempt is made
278+ without approximations. This may allow keyboard input and paste to work on older systems.
279+ </li>
280+ <li>
281+ SciTE on GTK+ can redefine the Insert key.
282+ </li>
283+ <li>
284+ SciTE scripting interface bug fixed where some string properties could not be changed.
285+ </li>
286+ </ul>
287+ <h3>
234288 <a href="http://prdownloads.sourceforge.net/scintilla/scite170.zip?download">Release 1.70</a>
235289 </h3>
236290 <ul>
@@ -239,7 +293,7 @@
239293 </li>
240294 <li>
241295 On GTK+, character set conversion is performed using an option that allows approximate conversions rather
242- than failures when a character can not be converted. This may lead to similar characters being inserted or
296+ than failures when a character can not be converted. This may lead to similar characters being inserted or
243297 when no similar character is available a '?' may be inserted.
244298 </li>
245299 <li>
--- trunk/src/Utils/scintilla/doc/index.html (revision 7304)
+++ trunk/src/Utils/scintilla/doc/index.html (revision 7305)
@@ -9,7 +9,7 @@
99 <meta name="keywords" content="Scintilla, SciTE, Editing Component, Text Editor" />
1010 <meta name="Description"
1111 content="www.scintilla.org is the home of the Scintilla editing component and SciTE text editor application." />
12- <meta name="Date.Modified" content="20060620" />
12+ <meta name="Date.Modified" content="20060821" />
1313 <style type="text/css">
1414 .versionlist {
1515 color: #FFCC99;
@@ -36,8 +36,8 @@
3636 GTK+</font>
3737 </td>
3838 <td width="40%" align="right">
39- <font color="#FFCC99" size="3"> Release version 1.70<br />
40- Site last modified June 20 2006</font>
39+ <font color="#FFCC99" size="3"> Release version 1.71<br />
40+ Site last modified August 21 2006</font>
4141 </td>
4242 <td width="20%">
4343 &nbsp;
@@ -54,6 +54,12 @@
5454 <table bgcolor="#000000" width="100%" cellspacing="0" cellpadding="6" border="0">
5555 <tr>
5656 <td width="100%">
57+ <span class="versionlist">Version 1.71 defaults mouse drag to be move on GTK+
58+ and GTK+ also has some internationalisation fixes.</span>
59+ </td>
60+ </tr>
61+ <tr>
62+ <td width="100%">
5763 <span class="versionlist">Version 1.70 allows, on GTK+, approximate character set conversions
5864 for pasting and uses internationalised input at all times.</span>
5965 </td>
@@ -81,40 +87,6 @@
8187 with Pango 1.8.</span>
8288 </td>
8389 </tr>
84- <tr>
85- <td width="100%">
86- <span class="versionlist">Version 1.65 contains minor enhancements and bug fixes. </span>
87- </td>
88- </tr>
89- <tr>
90- <td width="100%">
91- <span class="versionlist">Version 1.64 supports
92- TADS3, Smalltalk, Rebol, Flagship (Clipper / XBase), and CSound. </span>
93- </td>
94- </tr>
95- <tr>
96- <td width="100%">
97- <span class="versionlist"> Version 1.63 improves autocompletion on Windows,
98- can line wrap Asian languages better and adds lexers for BlitzBasic, Haskell,
99- Objective Caml, and PureBasic. </span>
100- </td>
101- </tr>
102- <tr>
103- <td width="100%">
104- <span class="versionlist"> Version 1.62 adds lexers for VHDL and ASN.1 and
105- is more supportive of screen reader applications on Windows. </span>
106- </td>
107- </tr>
108- <tr>
109- <td width="100%">
110- <span class="versionlist"> Version 1.61 improves selection handling on GTK+. </span>
111- </td>
112- </tr>
113- <tr>
114- <td width="100%">
115- <span class="versionlist"> Version 1.60 includes continuation markers on wrapped lines. </span>
116- </td>
117- </tr>
11890 </table>
11991 <table bgcolor="#CCCCCC" width="100%" cellspacing="0" cellpadding="8" border="0">
12092 <tr>
--- trunk/src/Utils/scintilla/gtk/Converter.h (revision 7304)
+++ trunk/src/Utils/scintilla/gtk/Converter.h (revision 7305)
@@ -23,6 +23,16 @@
2323 */
2424 class Converter {
2525 ConverterHandle iconvh;
26+ void OpenHandle(const char *fullDestination, const char *charSetSource) {
27+#if GTK_MAJOR_VERSION >= 2
28+ iconvh = g_iconv_open(fullDestination, charSetSource);
29+#else
30+ iconvh = iconv_open(fullDestination, charSetSource);
31+#endif
32+ }
33+ bool Succeeded() const {
34+ return iconvh != iconvhBad;
35+ }
2636 public:
2737 Converter() {
2838 iconvh = iconvhBad;
@@ -35,25 +45,26 @@
3545 Close();
3646 }
3747 operator bool() const {
38- return iconvh != iconvhBad;
48+ return Succeeded();
3949 }
4050 void Open(const char *charSetDestination, const char *charSetSource, bool transliterations=true) {
4151 Close();
4252 if (*charSetSource) {
43- char fullDest[200];
44- strcpy(fullDest, charSetDestination);
53+ // Try allowing approximate transliterations
4554 if (transliterations) {
55+ char fullDest[200];
56+ strcpy(fullDest, charSetDestination);
4657 strcat(fullDest, "//TRANSLIT");
58+ OpenHandle(fullDest, charSetSource);
4759 }
48-#if GTK_MAJOR_VERSION >= 2
49- iconvh = g_iconv_open(fullDest, charSetSource);
50-#else
51- iconvh = iconv_open(fullDest, charSetSource);
52-#endif
60+ if (!Succeeded()) {
61+ // Transliterations failed so try basic name
62+ OpenHandle(charSetDestination, charSetSource);
63+ }
5364 }
5465 }
5566 void Close() {
56- if (iconvh != iconvhBad) {
67+ if (Succeeded()) {
5768 #if GTK_MAJOR_VERSION >= 2
5869 g_iconv_close(iconvh);
5970 #else
@@ -63,7 +74,7 @@
6374 }
6475 }
6576 size_t Convert(char** src, size_t *srcleft, char **dst, size_t *dstleft) const {
66- if (iconvh == iconvhBad) {
77+ if (!Succeeded()) {
6778 return (size_t)(-1);
6879 } else {
6980 #if GTK_MAJOR_VERSION >= 2
--- trunk/src/Utils/scintilla/gtk/PlatGTK.cxx (revision 7304)
+++ trunk/src/Utils/scintilla/gtk/PlatGTK.cxx (revision 7305)
@@ -319,7 +319,7 @@
319319 case SC_CHARSET_VIETNAMESE:
320320 return "*-*";
321321 case SC_CHARSET_THAI:
322- return "*-1";
322+ return "iso8859-11";
323323 case SC_CHARSET_8859_15:
324324 return "iso8859-15";
325325 default:
@@ -781,7 +781,7 @@
781781 case SC_CHARSET_VIETNAMESE:
782782 return "";
783783 case SC_CHARSET_THAI:
784- return "ISO-8859-1";
784+ return "ISO-8859-11";
785785 case SC_CHARSET_8859_15:
786786 return "ISO-8859-15";
787787 default:
--- trunk/src/Utils/scintilla/gtk/ScintillaGTK.cxx (revision 7304)
+++ trunk/src/Utils/scintilla/gtk/ScintillaGTK.cxx (revision 7305)
@@ -800,7 +800,7 @@
800800 }
801801
802802 #ifdef USE_CONVERTER
803-static char *ConvertText(int *lenResult, char *s, size_t len, const char *charSetDest,
803+static char *ConvertText(int *lenResult, char *s, size_t len, const char *charSetDest,
804804 const char *charSetSource, bool transliterations) {
805805 *lenResult = 0;
806806 char *destForm = 0;
@@ -1150,10 +1150,16 @@
11501150 if (horizEndPreferred < 0)
11511151 horizEndPreferred = 0;
11521152 unsigned int pageWidth = rcText.Width();
1153+ unsigned int pageIncrement = pageWidth / 3;
1154+ unsigned int charWidth = vs.styles[STYLE_DEFAULT].aveCharWidth;
11531155 if (GTK_ADJUSTMENT(adjustmenth)->upper != horizEndPreferred ||
1154- GTK_ADJUSTMENT(adjustmenth)->page_size != pageWidth) {
1156+ GTK_ADJUSTMENT(adjustmenth)->page_size != pageWidth ||
1157+ GTK_ADJUSTMENT(adjustmenth)->page_increment != pageIncrement ||
1158+ GTK_ADJUSTMENT(adjustmenth)->step_increment != charWidth) {
11551159 GTK_ADJUSTMENT(adjustmenth)->upper = horizEndPreferred;
1160+ GTK_ADJUSTMENT(adjustmenth)->step_increment = charWidth;
11561161 GTK_ADJUSTMENT(adjustmenth)->page_size = pageWidth;
1162+ GTK_ADJUSTMENT(adjustmenth)->page_increment = pageIncrement;
11571163 gtk_adjustment_changed(GTK_ADJUSTMENT(adjustmenth));
11581164 modified = true;
11591165 }
@@ -1227,8 +1233,6 @@
12271233 if (key < 256) {
12281234 NotifyKey(key, modifiers);
12291235 return 0;
1230- //~ AddChar(key);
1231- //~ return 1;
12321236 } else {
12331237 // Pass up to container in case it is an accelerator
12341238 NotifyKey(key, modifiers);
@@ -1744,13 +1748,13 @@
17441748 return FALSE;
17451749 }
17461750 } else if (event->button == 4) {
1747- // Wheel scrolling up (only xwin gtk does it this way)
1751+ // Wheel scrolling up (only GTK 1.x does it this way)
17481752 if (ctrl)
17491753 SetAdjustmentValue(adjustmenth, (xOffset / 2) - 6);
17501754 else
17511755 SetAdjustmentValue(adjustmentv, topLine - 3);
17521756 } else if (event->button == 5) {
1753- // Wheel scrolling down (only xwin gtk does it this way)
1757+ // Wheel scrolling down (only GTK 1.x does it this way)
17541758 if (ctrl)
17551759 SetAdjustmentValue(adjustmenth, (xOffset / 2) + 6);
17561760 else
@@ -1790,8 +1794,8 @@
17901794 return FALSE;
17911795 }
17921796
1793-// win32gtk has a special wheel mouse event for whatever reason and doesn't
1794-// use the button4/5 trick used under X windows.
1797+// win32gtk and GTK >= 2 use SCROLL_* events instead of passing the
1798+// button4/5/6/7 events to the GTK app
17951799 #if PLAT_GTK_WIN32 || (GTK_MAJOR_VERSION >= 2)
17961800 gint ScintillaGTK::ScrollEvent(GtkWidget *widget,
17971801 GdkEventScroll *event) {
@@ -1821,7 +1825,7 @@
18211825 cLineScroll = 4;
18221826 sciThis->wheelMouseIntensity = cLineScroll;
18231827 }
1824- if (event->direction == GDK_SCROLL_UP) {
1828+ if (event->direction == GDK_SCROLL_UP || event->direction == GDK_SCROLL_LEFT) {
18251829 cLineScroll *= -1;
18261830 }
18271831 g_get_current_time(&sciThis->lastWheelMouseTime);
@@ -1837,21 +1841,23 @@
18371841 return FALSE;
18381842 }
18391843
1844+ // Horizontal scrolling
1845+ if (event->direction == GDK_SCROLL_LEFT || event->direction == GDK_SCROLL_RIGHT) {
1846+ sciThis->HorizontalScrollTo(sciThis->xOffset + cLineScroll);
1847+
18401848 // Text font size zoom
1841- if (event->state & GDK_CONTROL_MASK) {
1849+ } else if (event->state & GDK_CONTROL_MASK) {
18421850 if (cLineScroll < 0) {
18431851 sciThis->KeyCommand(SCI_ZOOMIN);
1844- return TRUE;
18451852 } else {
18461853 sciThis->KeyCommand(SCI_ZOOMOUT);
1847- return TRUE;
18481854 }
18491855
18501856 // Regular scrolling
18511857 } else {
18521858 sciThis->ScrollTo(sciThis->topLine + cLineScroll);
1853- return TRUE;
18541859 }
1860+ return TRUE;
18551861 }
18561862 #endif
18571863
--- trunk/src/Utils/scintilla/src/Editor.cxx (revision 7304)
+++ trunk/src/Utils/scintilla/src/Editor.cxx (revision 7305)
@@ -3612,9 +3612,11 @@
36123612 NotifyParent(scn);
36133613 }
36143614
3615-void Editor::NotifyDoubleClick(Point, bool) {
3615+void Editor::NotifyDoubleClick(Point pt, bool) {
36163616 SCNotification scn = {0};
36173617 scn.nmhdr.code = SCN_DOUBLECLICK;
3618+ scn.line = LineFromLocation(pt);
3619+ scn.position = PositionFromLocationClose(pt);
36183620 NotifyParent(scn);
36193621 }
36203622
--- trunk/src/Utils/scintilla/src/LexCPP.cxx (revision 7304)
+++ trunk/src/Utils/scintilla/src/LexCPP.cxx (revision 7305)
@@ -20,28 +20,45 @@
2020 #include "Scintilla.h"
2121 #include "SciLexer.h"
2222
23-#define KEYWORD_BOXHEADER 1
24-#define KEYWORD_FOLDCONTRACTED 2
23+#define SET_LOWER "abcdefghijklmnopqrstuvwxyz"
24+#define SET_UPPER "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
25+#define SET_DIGITS "0123456789"
2526
26-static bool IsOKBeforeRE(int ch) {
27- return (ch == '(') || (ch == '=') || (ch == ',');
28-}
27+class SetOfCharacters {
28+ int size;
29+ bool valueAfter;
30+ bool *bset;
31+public:
32+ SetOfCharacters(const char *setOfCharacters, int size_=0x80, bool valueAfter_=false) {
33+ size = size_;
34+ valueAfter = valueAfter_;
35+ bset = new bool[size];
36+ for (int i=0; i < size; i++) {
37+ bset[i] = false;
38+ }
39+ for (const char *cp=setOfCharacters; *cp; cp++) {
40+ int val = static_cast<unsigned char>(*cp);
41+ PLATFORM_ASSERT(val >= 0);
42+ PLATFORM_ASSERT(val < size);
43+ bset[val] = true;
44+ }
45+ }
46+ ~SetOfCharacters() {
47+ delete []bset;
48+ bset = 0;
49+ size = 0;
50+ }
51+ void Add(int val) {
52+ PLATFORM_ASSERT(val >= 0);
53+ PLATFORM_ASSERT(val < size);
54+ bset[val] = true;
55+ }
56+ bool Contains(int val) {
57+ PLATFORM_ASSERT(val >= 0);
58+ return (val < size) ? bset[val] : valueAfter;
59+ }
60+};
2961
30-static inline bool IsAWordChar(int ch) {
31- return (ch < 0x80) && (isalnum(ch) || ch == '.' || ch == '_');
32-}
33-
34-static inline bool IsAWordStart(int ch) {
35- return (ch < 0x80) && (isalpha(ch) || ch == '_');
36-}
37-
38-static inline bool IsADoxygenChar(int ch) {
39- return (ch < 0x80 && islower(ch)) || ch == '$' || ch == '@' ||
40- ch == '\\' || ch == '&' || ch == '<' ||
41- ch == '>' || ch == '#' || ch == '{' ||
42- ch == '}' || ch == '[' || ch == ']';
43-}
44-
4562 static bool IsSpaceEquiv(int state) {
4663 return (state <= SCE_C_COMMENTDOC) ||
4764 // including SCE_C_DEFAULT, SCE_C_COMMENT, SCE_C_COMMENTLINE
@@ -59,6 +76,17 @@
5976
6077 bool stylingWithinPreprocessor = styler.GetPropertyInt("styling.within.preprocessor") != 0;
6178
79+ SetOfCharacters setOKBeforeRE("(=,");
80+
81+ SetOfCharacters setDoxygen("$@\\&<>#{}[]" SET_LOWER);
82+
83+ SetOfCharacters setWordStart("_" SET_LOWER SET_UPPER, 0x80, true);
84+ SetOfCharacters setWord("._" SET_LOWER SET_UPPER SET_DIGITS, 0x80, true);
85+ if (styler.GetPropertyInt("lexer.cpp.allow.dollars", 1) != 0) {
86+ setWordStart.Add('$');
87+ setWord.Add('$');
88+ }
89+
6290 int chPrevNonWhite = ' ';
6391 int visibleChars = 0;
6492 bool lastWordWasUUID = false;
@@ -97,7 +125,7 @@
97125
98126 if (sc.atLineStart) {
99127 if (sc.state == SCE_C_STRING) {
100- // Prevent SCE_C_STRINGEOL from leaking back to previous line which
128+ // Prevent SCE_C_STRINGEOL from leaking back to previous line which
101129 // ends with a line continuation by locking in the state upto this position.
102130 sc.SetState(SCE_C_STRING);
103131 }
@@ -126,12 +154,12 @@
126154 break;
127155 case SCE_C_NUMBER:
128156 // We accept almost anything because of hex. and number suffixes
129- if (!IsAWordChar(sc.ch)) {
157+ if (!setWord.Contains(sc.ch)) {
130158 sc.SetState(SCE_C_DEFAULT);
131159 }
132160 break;
133161 case SCE_C_IDENTIFIER:
134- if (!IsAWordChar(sc.ch) || (sc.ch == '.')) {
162+ if (!setWord.Contains(sc.ch) || (sc.ch == '.')) {
135163 char s[1000];
136164 if (caseSensitive) {
137165 sc.GetCurrent(s, sizeof(s));
@@ -201,7 +229,7 @@
201229 sc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR);
202230 sc.Forward();
203231 sc.ForwardSetState(SCE_C_DEFAULT);
204- } else if (!IsADoxygenChar(sc.ch)) {
232+ } else if (!setDoxygen.Contains(sc.ch)) {
205233 char s[100];
206234 if (caseSensitive) {
207235 sc.GetCurrent(s, sizeof(s));
@@ -208,7 +236,7 @@
208236 } else {
209237 sc.GetCurrentLowered(s, sizeof(s));
210238 }
211- if (!isspace(sc.ch) || !keywords3.InList(s + 1)) {
239+ if (!IsASpace(sc.ch) || !keywords3.InList(s + 1)) {
212240 sc.ChangeState(SCE_C_COMMENTDOCKEYWORDERROR);
213241 }
214242 sc.SetState(styleBeforeDCKeyword);
@@ -283,7 +311,7 @@
283311 } else {
284312 sc.SetState(SCE_C_NUMBER);
285313 }
286- } else if (IsAWordStart(sc.ch) || (sc.ch == '@')) {
314+ } else if (setWordStart.Contains(sc.ch) || (sc.ch == '@')) {
287315 if (lastWordWasUUID) {
288316 sc.SetState(SCE_C_UUID);
289317 lastWordWasUUID = false;
@@ -303,7 +331,7 @@
303331 sc.SetState(SCE_C_COMMENTLINEDOC);
304332 else
305333 sc.SetState(SCE_C_COMMENTLINE);
306- } else if (sc.ch == '/' && IsOKBeforeRE(chPrevNonWhite)) {
334+ } else if (sc.ch == '/' && setOKBeforeRE.Contains(chPrevNonWhite)) {
307335 sc.SetState(SCE_C_REGEX); // JavaScript's RegEx
308336 } else if (sc.ch == '\"') {
309337 sc.SetState(SCE_C_STRING);
@@ -428,7 +456,7 @@
428456 levelMinCurrent = levelCurrent;
429457 visibleChars = 0;
430458 }
431- if (!isspacechar(ch))
459+ if (!IsASpace(ch))
432460 visibleChars++;
433461 }
434462 }
--- trunk/src/Utils/scintilla/src/LexPerl.cxx (revision 7304)
+++ trunk/src/Utils/scintilla/src/LexPerl.cxx (revision 7305)
@@ -68,14 +68,22 @@
6868 return keywords.InList(s);
6969 }
7070
71+// Note: as lexer uses chars, UTF-8 bytes are considered as <0 values
72+// Note: iswordchar() was used in only one place in LexPerl, it is
73+// unnecessary as '.' is processed as the concatenation operator, so
74+// only isWordStart() is used in LexPerl
75+
76+static inline bool isWordStart(char ch) {
77+ return !isascii(ch) || isalnum(ch) || ch == '_';
78+}
79+
7180 static inline bool isEndVar(char ch) {
72- return !isalnum(ch) && ch != '#' && ch != '$' &&
81+ return isascii(ch) && !isalnum(ch) && ch != '#' && ch != '$' &&
7382 ch != '_' && ch != '\'';
7483 }
7584
76-
7785 static inline bool isNonQuote(char ch) {
78- return isalnum(ch) || ch == '_';
86+ return !isascii(ch) || isalnum(ch) || ch == '_';
7987 }
8088
8189 static inline char actualNumStyle(int numberStyle) {
@@ -284,7 +292,7 @@
284292 }
285293
286294 if (state == SCE_PL_DEFAULT) {
287- if (isdigit(ch) || (isdigit(chNext) &&
295+ if ((isascii(ch) && isdigit(ch)) || (isascii(chNext) && isdigit(chNext) &&
288296 (ch == '.' || ch == 'v'))) {
289297 state = SCE_PL_NUMBER;
290298 backflag = BACK_NONE;
@@ -295,7 +303,7 @@
295303 numState = PERLNUM_HEX;
296304 } else if (chNext == 'b') {
297305 numState = PERLNUM_BINARY;
298- } else if (isdigit(chNext)) {
306+ } else if (isascii(chNext) && isdigit(chNext)) {
299307 numState = PERLNUM_OCTAL;
300308 }
301309 if (numState != PERLNUM_DECIMAL) {
@@ -306,7 +314,7 @@
306314 } else if (ch == 'v') { // vector
307315 numState = PERLNUM_V_VECTOR;
308316 }
309- } else if (iswordstart(ch)) {
317+ } else if (isWordStart(ch)) {
310318 // if immediately prefixed by '::', always a bareword
311319 state = SCE_PL_WORD;
312320 if (chPrev == ':' && styler.SafeGetCharAt(i - 2) == ':') {
@@ -338,7 +346,7 @@
338346 Quote.New(1);
339347 kw++;
340348 } else if (ch == 'x' && (chNext == '=' || // repetition
341- (chNext != '_' && !isalnum(chNext)) ||
349+ !isWordStart(chNext) ||
342350 (isdigit(chPrev) && isdigit(chNext)))) {
343351 state = SCE_PL_OPERATOR;
344352 }
@@ -347,7 +355,7 @@
347355 // otherwise it is always a bareword and we skip a lot of scanning
348356 // note: keywords assumed to be limited to [_a-zA-Z] only
349357 if (state == SCE_PL_WORD) {
350- while (iswordstart(styler.SafeGetCharAt(kw))) kw++;
358+ while (isWordStart(styler.SafeGetCharAt(kw))) kw++;
351359 if (!isPerlKeyword(styler.GetStartSegment(), kw, keywords, styler)) {
352360 state = SCE_PL_IDENTIFIER;
353361 }
@@ -371,7 +379,7 @@
371379 if (ch2 == '{' && !moreback) {
372380 // {bareword: possible variable spec
373381 brace = true;
374- } else if ((ch2 == '&')
382+ } else if ((ch2 == '&' && styler.SafeGetCharAt(j - 1) != '&')
375383 // &bareword: subroutine call
376384 || (ch2 == '>' && styler.SafeGetCharAt(j - 1) == '-')
377385 // ->bareword: part of variable spec
@@ -403,7 +411,7 @@
403411 backflag = BACK_NONE;
404412 // an identifier or bareword
405413 if (state == SCE_PL_IDENTIFIER) {
406- if ((!iswordchar(chNext) && chNext != '\'')
414+ if ((!isWordStart(chNext) && chNext != '\'')
407415 || (chNext == '.' && chNext2 == '.')) {
408416 // We need that if length of word == 1!
409417 // This test is copied from the SCE_PL_WORD handler.
@@ -462,7 +470,8 @@
462470 styler.ColourTo(i, SCE_PL_SCALAR);
463471 } else {
464472 state = SCE_PL_SCALAR;
465- if (chNext == '`' && chNext2 == '`') {
473+ if ((chNext == '`' && chNext2 == '`')
474+ || (chNext == ':' && chNext2 == ':')) {
466475 i += 2;
467476 ch = styler.SafeGetCharAt(i);
468477 chNext = styler.SafeGetCharAt(i + 1);
@@ -474,9 +483,14 @@
474483 }
475484 backflag = BACK_NONE;
476485 } else if (ch == '@') {
477- if (isalpha(chNext) || chNext == '#' || chNext == '$'
486+ if (!isascii(chNext) || isalpha(chNext) || chNext == '#' || chNext == '$'
478487 || chNext == '_' || chNext == '+' || chNext == '-') {
479488 state = SCE_PL_ARRAY;
489+ } else if (chNext == ':' && chNext2 == ':') {
490+ state = SCE_PL_ARRAY;
491+ i += 2;
492+ ch = styler.SafeGetCharAt(i);
493+ chNext = styler.SafeGetCharAt(i + 1);
480494 } else if (chNext != '{' && chNext != '[') {
481495 styler.ColourTo(i, SCE_PL_ARRAY);
482496 } else {
@@ -484,12 +498,17 @@
484498 }
485499 backflag = BACK_NONE;
486500 } else if (ch == '%') {
487- if (isalpha(chNext) || chNext == '#' || chNext == '$'
501+ if (!isascii(chNext) || isalpha(chNext) || chNext == '#' || chNext == '$'
488502 || chNext == '_' || chNext == '!' || chNext == '^') {
489503 state = SCE_PL_HASH;
490504 i++;
491505 ch = chNext;
492506 chNext = chNext2;
507+ } else if (chNext == ':' && chNext2 == ':') {
508+ state = SCE_PL_HASH;
509+ i += 2;
510+ ch = styler.SafeGetCharAt(i);
511+ chNext = styler.SafeGetCharAt(i + 1);
493512 } else if (chNext == '{') {
494513 styler.ColourTo(i, SCE_PL_HASH);
495514 } else {
@@ -500,8 +519,13 @@
500519 char strch[2];
501520 strch[0] = chNext;
502521 strch[1] = '\0';
503- if (isalpha(chNext) || chNext == '_' ||
504- NULL != strstr("^/|,\\\";#%^:?<>)[]", strch)) {
522+ if (chNext == ':' && chNext2 == ':') {
523+ state = SCE_PL_SYMBOLTABLE;
524+ i += 2;
525+ ch = styler.SafeGetCharAt(i);
526+ chNext = styler.SafeGetCharAt(i + 1);
527+ } else if (!isascii(chNext) || isalpha(chNext) || chNext == '_'
528+ || NULL != strstr("^/|,\\\";#%^:?<>)[]", strch)) {
505529 state = SCE_PL_SYMBOLTABLE;
506530 i++;
507531 ch = chNext;
@@ -748,9 +772,9 @@
748772 if (!isdigit(chNext)) {
749773 goto numAtEnd;
750774 }
751- } else if (isalnum(ch)) {
775+ } else if (!isascii(ch) || isalnum(ch)) {
752776 if (numState == PERLNUM_VECTOR || numState == PERLNUM_V_VECTOR) {
753- if (isalpha(ch)) {
777+ if (!isascii(ch) || isalpha(ch)) {
754778 if (dotCount == 0) { // change to word
755779 state = SCE_PL_IDENTIFIER;
756780 } else { // vector then word
@@ -765,7 +789,7 @@
765789 ch = chNext;
766790 chNext = chNext2;
767791 }
768- } else if (!isdigit(ch)) { // number then word
792+ } else if (!isascii(ch) || !isdigit(ch)) { // number then word
769793 goto numAtEnd;
770794 }
771795 } else if (numState == PERLNUM_FLOAT) {
@@ -798,7 +822,7 @@
798822 goto restartLexer;
799823 }
800824 } else if (state == SCE_PL_IDENTIFIER) {
801- if (!iswordstart(chNext) && chNext != '\'') {
825+ if (!isWordStart(chNext) && chNext != '\'') {
802826 styler.ColourTo(i, SCE_PL_IDENTIFIER);
803827 state = SCE_PL_DEFAULT;
804828 ch = ' ';
@@ -994,7 +1018,7 @@
9941018 }
9951019 } else if (ch == Quote.Up /*&& chPrev != '\\'*/) {
9961020 Quote.Count++;
997- } else if (!isalpha(chNext)) {
1021+ } else if (!isascii(chNext) || !isalpha(chNext)) {
9981022 if (Quote.Rep <= 0) {
9991023 styler.ColourTo(i, state);
10001024 state = SCE_PL_DEFAULT;
@@ -1028,7 +1052,7 @@
10281052 if (isspacechar(ch)) {
10291053 // Keep going
10301054 }
1031- else if (isalnum(ch)) {
1055+ else if (!isascii(ch) || isalnum(ch)) {
10321056 styler.ColourTo(i, state);
10331057 state = SCE_PL_DEFAULT;
10341058 ch = ' ';
@@ -1040,7 +1064,7 @@
10401064 if (Quote.Count == 0) {
10411065 Quote.Rep--;
10421066 }
1043- if (!isalpha(chNext)) {
1067+ if (!isascii(chNext) || !isalpha(chNext)) {
10441068 if (Quote.Rep <= 0) {
10451069 styler.ColourTo(i, state);
10461070 state = SCE_PL_DEFAULT;
@@ -1052,7 +1076,7 @@
10521076 }
10531077 } else if (ch == Quote.Up /*&& chPrev != '\\'*/) {
10541078 Quote.Count++;
1055- } else if (!isalpha(chNext)) {
1079+ } else if (!isascii(chNext) || !isalpha(chNext)) {
10561080 if (Quote.Rep <= 0) {
10571081 styler.ColourTo(i, state);
10581082 state = SCE_PL_DEFAULT;
--- trunk/src/Utils/scintilla/src/LexVB.cxx (revision 7304)
+++ trunk/src/Utils/scintilla/src/LexVB.cxx (revision 7305)
@@ -118,20 +118,27 @@
118118 // VB doubles quotes to preserve them, so just end this string
119119 // state now as a following quote will start again
120120 if (sc.ch == '\"') {
121- if (tolower(sc.chNext) == 'c') {
121+ if (sc.chNext == '\"') {
122122 sc.Forward();
123+ } else {
124+ if (tolower(sc.chNext) == 'c') {
125+ sc.Forward();
126+ }
127+ sc.ForwardSetState(SCE_B_DEFAULT);
123128 }
124- sc.ForwardSetState(SCE_B_DEFAULT);
125129 } else if (sc.atLineEnd) {
130+ visibleChars = 0;
126131 sc.ChangeState(SCE_B_STRINGEOL);
127132 sc.ForwardSetState(SCE_B_DEFAULT);
128133 }
129134 } else if (sc.state == SCE_B_COMMENT) {
130135 if (sc.atLineEnd) {
136+ visibleChars = 0;
131137 sc.ForwardSetState(SCE_B_DEFAULT);
132138 }
133139 } else if (sc.state == SCE_B_PREPROCESSOR) {
134140 if (sc.atLineEnd) {
141+ visibleChars = 0;
135142 sc.ForwardSetState(SCE_B_DEFAULT);
136143 }
137144 } else if (sc.state == SCE_B_FILENUMBER) {
@@ -157,6 +164,7 @@
157164 }
158165 } else if (sc.state == SCE_B_DATE) {
159166 if (sc.atLineEnd) {
167+ visibleChars = 0;
160168 sc.ChangeState(SCE_B_STRINGEOL);
161169 sc.ForwardSetState(SCE_B_DEFAULT);
162170 } else if (sc.ch == '#') {
--- trunk/src/Utils/scintilla/src/PropSet.cxx (revision 7304)
+++ trunk/src/Utils/scintilla/src/PropSet.cxx (revision 7305)
@@ -825,12 +825,12 @@
825825 memcpy(wordsNoCase, words, (len + 1) * sizeof (*words));
826826 }
827827
828-int cmpString(const void *a1, const void *a2) {
828+extern "C" int cmpString(const void *a1, const void *a2) {
829829 // Can't work out the correct incantation to use modern casts here
830830 return strcmp(*(char**)(a1), *(char**)(a2));
831831 }
832832
833-int cmpStringNoCase(const void *a1, const void *a2) {
833+extern "C" int cmpStringNoCase(const void *a1, const void *a2) {
834834 // Can't work out the correct incantation to use modern casts here
835835 return CompareCaseInsensitive(*(char**)(a1), *(char**)(a2));
836836 }
--- trunk/src/Utils/scintilla/src/StyleContext.h (revision 7304)
+++ trunk/src/Utils/scintilla/src/StyleContext.h (revision 7305)
@@ -107,16 +107,16 @@
107107 return static_cast<unsigned char>(styler.SafeGetCharAt(currentPos+n));
108108 }
109109 bool Match(char ch0) {
110- return ch == ch0;
110+ return ch == static_cast<unsigned char>(ch0);
111111 }
112112 bool Match(char ch0, char ch1) {
113- return (ch == ch0) && (chNext == ch1);
113+ return (ch == static_cast<unsigned char>(ch0)) && (chNext == static_cast<unsigned char>(ch1));
114114 }
115115 bool Match(const char *s) {
116- if (ch != *s)
116+ if (ch != static_cast<unsigned char>(*s))
117117 return false;
118118 s++;
119- if (chNext != *s)
119+ if (chNext != static_cast<unsigned char>(*s))
120120 return false;
121121 s++;
122122 for (int n=2; *s; n++) {
@@ -127,14 +127,14 @@
127127 return true;
128128 }
129129 bool MatchIgnoreCase(const char *s) {
130- if (tolower(ch) != *s)
130+ if (tolower(ch) != static_cast<unsigned char>(*s))
131131 return false;
132132 s++;
133- if (tolower(chNext) != *s)
133+ if (tolower(chNext) != static_cast<unsigned char>(*s))
134134 return false;
135135 s++;
136136 for (int n=2; *s; n++) {
137- if (*s !=
137+ if (static_cast<unsigned char>(*s) !=
138138 tolower(static_cast<unsigned char>(styler.SafeGetCharAt(currentPos+n))))
139139 return false;
140140 s++;
--- trunk/src/Utils/scintilla/version.txt (revision 7304)
+++ trunk/src/Utils/scintilla/version.txt (revision 7305)
@@ -1 +1 @@
1-170
1+171
--- trunk/src/Utils/scintilla/win32/ScintillaWin.cxx (revision 7304)
+++ trunk/src/Utils/scintilla/win32/ScintillaWin.cxx (revision 7305)
@@ -416,7 +416,8 @@
416416
417417 bool IsOcxCtrl = (wParam != 0); // if wParam != 0, it contains
418418 // a PAINSTRUCT* from the OCX
419- PLATFORM_ASSERT(hRgnUpdate == NULL);
419+ // Removed since this interferes with reporting other assertions as it occurs repeatedly
420+ //PLATFORM_ASSERT(hRgnUpdate == NULL);
420421 hRgnUpdate = ::CreateRectRgn(0, 0, 0, 0);
421422 if (IsOcxCtrl) {
422423 pps = reinterpret_cast<PAINTSTRUCT*>(wParam);
Show on old repository browser