[pango] Make a couple of functions reentrant
- From: Behdad Esfahbod <behdad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] Make a couple of functions reentrant
- Date: Tue, 28 Aug 2012 04:33:27 +0000 (UTC)
commit bb8bf13fea27a77c53e7692dce827e2839216fc6
Author: Alessandro Pignotti <a pignotti sssup it>
Date: Wed May 18 18:31:03 2011 +0200
Make a couple of functions reentrant
pango/pangowin32-fontmap.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/pango/pangowin32-fontmap.c b/pango/pangowin32-fontmap.c
index b474b22..9cfa161 100644
--- a/pango/pangowin32-fontmap.c
+++ b/pango/pangowin32-fontmap.c
@@ -1397,10 +1397,8 @@ pango_win32_font_description_from_logfontw (const LOGFONTW *lfp)
}
static char *
-charset_name (int charset)
+charset_name (int charset, char* num)
{
- static char num[10];
-
switch (charset)
{
#define CASE(x) case x##_CHARSET: return #x
@@ -1431,10 +1429,8 @@ charset_name (int charset)
}
static char *
-ff_name (int ff)
+ff_name (int ff, char* num)
{
- static char num[10];
-
switch (ff)
{
#define CASE(x) case FF_##x: return #x
@@ -1462,13 +1458,16 @@ pango_win32_insert_font (PangoWin32FontMap *win32fontmap,
PangoWin32Face *win32face;
gint i;
+ char tmp_for_charset_name[10];
+ char tmp_for_ff_name[10];
+
PING (("face=%S,charset=%s,it=%s,wt=%ld,ht=%ld,ff=%s%s",
lfp->lfFaceName,
- charset_name (lfp->lfCharSet),
+ charset_name (lfp->lfCharSet, tmp_for_charset_name),
lfp->lfItalic ? "yes" : "no",
lfp->lfWeight,
lfp->lfHeight,
- ff_name (lfp->lfPitchAndFamily & 0xF0),
+ ff_name (lfp->lfPitchAndFamily & 0xF0, tmp_for_ff_name),
is_synthetic ? " synthetic" : ""));
/* Ignore Symbol fonts (which don't have any Unicode mapping
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]