diff options
| author | nyamatongwe <unknown> | 2010-04-14 04:12:06 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2010-04-14 04:12:06 +0000 | 
| commit | 5f9f3335bc91898f9638e55e101b057fbbf8906a (patch) | |
| tree | fccc8327599d47cb8db2f69a5ed721caa41ca349 | |
| parent | 65bbd2f2a8d220bc9914a9925912e1315a369b9a (diff) | |
| download | scintilla-mirror-5f9f3335bc91898f9638e55e101b057fbbf8906a.tar.gz | |
Silence iconv warnings when creating case mapping tables.
Bug #2986850.
| -rw-r--r-- | gtk/ScintillaGTK.cxx | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index 45ab04e80..23837b9ea 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -701,7 +701,7 @@ void ScintillaGTK::StartDrag() {  }  static char *ConvertText(int *lenResult, char *s, size_t len, const char *charSetDest, -	const char *charSetSource, bool transliterations) { +	const char *charSetSource, bool transliterations, bool silent=false) {  	// s is not const because of different versions of iconv disagreeing about const  	*lenResult = 0;  	char *destForm = 0; @@ -714,7 +714,9 @@ static char *ConvertText(int *lenResult, char *s, size_t len, const char *charSe  		size_t outLeft = len*3+1;  		size_t conversions = conv.Convert(&pin, &inLeft, &pout, &outLeft);  		if (conversions == ((size_t)(-1))) { -fprintf(stderr, "iconv %s->%s failed for %s\n", charSetSource, charSetDest, static_cast<char *>(s)); +			if (!silent) +				fprintf(stderr, "iconv %s->%s failed for %s\n",  +					charSetSource, charSetDest, static_cast<char *>(s));  			delete []destForm;  			destForm = 0;  		} else { @@ -1104,7 +1106,7 @@ CaseFolder *ScintillaGTK::CaseFolderForEncoding() {  					if (mapped) {  						int mappedLength = strlen(mapped);  						const char *mappedBack = ConvertText(&mappedLength, mapped, -							mappedLength, charSetBuffer, "UTF-8", false); +							mappedLength, charSetBuffer, "UTF-8", false, true);  						if (mappedBack && (strlen(mappedBack) == 1) && (mappedBack[0] != sCharacter[0])) {  							pcf->SetTranslation(sCharacter[0], mappedBack[0]);  						} | 
