aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2007-12-01 23:36:34 +0000
committernyamatongwe <devnull@localhost>2007-12-01 23:36:34 +0000
commitdfbac9a40bfdfebd8e4cab01149b3b4a52fedfd2 (patch)
tree25805863750e9199e79dac8f260adbbfce93ade3
parent08f2d073c69ec8a5824d873ec402d4624a42de45 (diff)
downloadscintilla-mirror-dfbac9a40bfdfebd8e4cab01149b3b4a52fedfd2.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.cxx14
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,