diff options
| -rw-r--r-- | doc/ScintillaDoc.html | 7 | ||||
| -rw-r--r-- | doc/ScintillaHistory.html | 4 | ||||
| -rw-r--r-- | doc/index.html | 4 | ||||
| -rw-r--r-- | lexlib/WordList.cxx | 28 | 
4 files changed, 29 insertions, 14 deletions
| diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 19bbd5129..c733db471 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -79,7 +79,7 @@      <h1>Scintilla Documentation</h1> -    <p>Last edited 26/July/2011 NH</p> +    <p>Last edited 1/August/2011 NH</p>      <p>There is <a class="jump" href="Design.html">an overview of the internal design of      Scintilla</a>.<br /> @@ -4466,8 +4466,9 @@ struct Sci_TextToFind {       </p>      <p>The <code>SCI_SCROLLTO[START|END]</code> commands scroll the document to the start -    or end without changing the selection. This is the expected behaviour of the <code>home</code> and -    <code>end</code> keys on OS X. +    or end without changing the selection. These commands match OS X platform conventions for the behaviour of the +    <code>home</code> and <code>end</code> keys. Scintilla can be made to match OS X applications +    by binding the <code>home</code> and <code>end</code> keys to these commands.       </p>      <h2 id="KeyBindings">Key bindings</h2> diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 5058ad21e..5f2575fc4 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -396,7 +396,7 @@      </h3>      <ul>  	<li> -	Released 20 August 2011. +	Released 1 August 2011.  	</li>  	<li>  	GTK+ Cairo support works back to GTK+ version 2.8. Requires changing Scintilla source code to enable before GTK+ 2.22. @@ -432,7 +432,7 @@  	<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3324644&group_id=2439">Bug #3324644.</a>  	</li>  	<li> -	Cobol supports fixed format comments.. +	Cobol supports fixed format comments.  	<a href="https://sourceforge.net/tracker/?func=detail&atid=102439&aid=3014850&group_id=2439">Bug #3014850.</a>  	</li>  	<li> diff --git a/doc/index.html b/doc/index.html index 4ff05b216..815f35d91 100644 --- a/doc/index.html +++ b/doc/index.html @@ -9,7 +9,7 @@      <meta name="keywords" content="Scintilla, SciTE, Editing Component, Text Editor" />      <meta name="Description"      content="www.scintilla.org is the home of the Scintilla editing component and SciTE text editor application." /> -    <meta name="Date.Modified" content="20110820" /> +    <meta name="Date.Modified" content="20110801" />      <style type="text/css">          #versionlist {              margin: 0; @@ -56,7 +56,7 @@          </td>          <td width="40%" align="right">            <font color="#FFCC99" size="3"> Release version 2.28<br /> -           Site last modified August 20 2011</font> +           Site last modified August 1 2011</font>          </td>          <td width="20%">              diff --git a/lexlib/WordList.cxx b/lexlib/WordList.cxx index cda35ece7..9c2c9653b 100644 --- a/lexlib/WordList.cxx +++ b/lexlib/WordList.cxx @@ -11,6 +11,8 @@  #include <stdio.h>  #include <stdarg.h> +#include <algorithm> +  #include "WordList.h"  #ifdef SCI_NAMESPACE @@ -86,22 +88,34 @@ void WordList::Clear() {  	len = 0;  } -extern "C" int cmpString(const void *a1, const void *a2) { -	// Can't work out the correct incantation to use modern casts here -	return strcmp(*(char **)(a1), *(char **)(a2)); +#ifdef _MSC_VER + +static bool cmpWords(const char *a, const char *b) { +	return strcmp(a, b) == -1; +} + +#else + +static int cmpWords(const void *a, const void *b) { +	return strcmp(*static_cast<const char * const *>(a), *static_cast<const char * const *>(b));  }  static void SortWordList(char **words, unsigned int len) { -	qsort(reinterpret_cast<void *>(words), len, sizeof(*words), -	      cmpString); +	qsort(reinterpret_cast<void *>(words), len, sizeof(*words), cmpWords);  } +#endif +  void WordList::Set(const char *s) {  	Clear();  	list = new char[strlen(s) + 1];  	strcpy(list, s);  	words = ArrayFromWordList(list, &len, onlyLineEnds); +#ifdef _MSC_VER +	std::sort(words, words + len, cmpWords); +#else  	SortWordList(words, len); +#endif  	for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++)  		starts[k] = -1;  	for (int l = len - 1; l >= 0; l--) { @@ -121,7 +135,7 @@ bool WordList::InList(const char *s) const {  	unsigned char firstChar = s[0];  	int j = starts[firstChar];  	if (j >= 0) { -		while ((unsigned char)words[j][0] == firstChar) { +		while (static_cast<unsigned char>(words[j][0]) == firstChar) {  			if (s[1] == words[j][1]) {  				const char *a = words[j] + 1;  				const char *b = s + 1; @@ -163,7 +177,7 @@ bool WordList::InListAbbreviated(const char *s, const char marker) const {  	unsigned char firstChar = s[0];  	int j = starts[firstChar];  	if (j >= 0) { -		while (words[j][0] == firstChar) { +		while (static_cast<unsigned char>(words[j][0]) == firstChar) {  			bool isSubword = false;  			int start = 1;  			if (words[j][1] == marker) { | 
