]> git.wh0rd.org Git - fontconfig.git/commitdiff
Avoid C99ism in Win32 code (#16651)
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 12 Aug 2008 18:10:03 +0000 (14:10 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Sat, 14 Feb 2009 00:53:54 +0000 (16:53 -0800)
src/fccfg.c
src/fcxml.c

index acb0bb4aabacfba58bdbfc9321a8ca8e1ce5e270..e5b67872c2cb5d950dff371e610c5735b16a45b3 100644 (file)
@@ -1671,9 +1671,10 @@ FcConfigGetPath (void)
 #ifdef _WIN32
        if (fontconfig_path[0] == '\0')
        {
+               char *p;
                if(!GetModuleFileName(NULL, fontconfig_path, sizeof(fontconfig_path)))
                        goto bail1;
-               char *p = strrchr (fontconfig_path, '\\');
+               p = strrchr (fontconfig_path, '\\');
                if (p) *p = '\0';
                strcat (fontconfig_path, "\\fonts");
        }
index 90c079addb17eb8e396b9d2130862bd90e12f59f..3de2e248ec4ca066664b7b0819e603a35ba5461b 100644 (file)
@@ -2060,6 +2060,7 @@ FcEndElement(void *userData, const XML_Char *name)
 #ifdef _WIN32
        if (strcmp (data, "CUSTOMFONTDIR") == 0)
        {
+               char *p;
                FcStrFree (data);
                data = malloc (1000);
                if (!data)
@@ -2074,7 +2075,7 @@ FcEndElement(void *userData, const XML_Char *name)
                        FcStrFree (data);
                        break;
                }
-               char *p = strrchr (data, '\\');
+               p = strrchr (data, '\\');
                if (p) *p = '\0';
                strcat (data, "\\fonts");
        }