diff options
| author | nyamatongwe <unknown> | 2007-12-01 23:36:34 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2007-12-01 23:36:34 +0000 | 
| commit | fda1f9e740b4a96b98aaa9813931f86ecb2559b1 (patch) | |
| tree | 25805863750e9199e79dac8f260adbbfce93ade3 | |
| parent | b3f1aa0a28843dd106d1fc88cce7ffcf44c5f856 (diff) | |
| download | scintilla-mirror-fda1f9e740b4a96b98aaa9813931f86ecb2559b1.tar.gz | |
Patch to use GTK+ g_snprintf for platforms that do not have snprintf.
From scintilla-interest thread "Compatibility patch for GTK part".
| -rw-r--r-- | gtk/PlatGTK.cxx | 14 | 
1 files changed, 5 insertions, 9 deletions
| diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index aaee173d7..725c35cae 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -31,10 +31,6 @@     with gdk_string_extents. */  #define FAST_WAY -#ifdef G_OS_WIN32 -#define snprintf _snprintf -#endif -  #if GTK_MAJOR_VERSION >= 2  #define USE_PANGO 1  #include "Converter.h" @@ -572,7 +568,7 @@ FontID FontCached::CreateNewFont(const char *fontName, int characterSet,  			                        faceName, sizeof(faceName),  			                        charset, sizeof(charset)); -			snprintf(fontspec, +			g_snprintf(fontspec,  			         sizeof(fontspec) - 1,  			         spec,  			         foundary, faceName, @@ -588,7 +584,7 @@ FontID FontCached::CreateNewFont(const char *fontName, int characterSet,  				strncat(fontset, fontspec, remaining - 1);  				remaining -= strlen(fontset); -				snprintf(fontspec, +				g_snprintf(fontspec,  				         sizeof(fontspec) - 1,  				         ",%s%s%s-o-*-*-*-%0d-*-*-*-*-%s",  				         foundary, faceName, @@ -623,7 +619,7 @@ FontID FontCached::CreateNewFont(const char *fontName, int characterSet,  	                        faceName, sizeof(faceName),  	                        charset, sizeof(charset)); -	snprintf(fontspec, +	g_snprintf(fontspec,  	         sizeof(fontspec) - 1,  	         "%s%s%s%s-*-*-*-%0d-*-*-*-*-%s",  	         foundary, faceName, @@ -634,7 +630,7 @@ FontID FontCached::CreateNewFont(const char *fontName, int characterSet,  	newid = LoadFontOrSet(fontspec, characterSet);  	if (!newid) {  		// some fonts have oblique, not italic -		snprintf(fontspec, +		g_snprintf(fontspec,  		         sizeof(fontspec) - 1,  		         "%s%s%s%s-*-*-*-%0d-*-*-*-*-%s",  		         foundary, faceName, @@ -645,7 +641,7 @@ FontID FontCached::CreateNewFont(const char *fontName, int characterSet,  		newid = LoadFontOrSet(fontspec, characterSet);  	}  	if (!newid) { -		snprintf(fontspec, +		g_snprintf(fontspec,  		         sizeof(fontspec) - 1,  		         "-*-*-*-*-*-*-*-%0d-*-*-*-*-%s",  		         size * 10, | 
