aboutsummaryrefslogtreecommitdiff
path: root/libXfont/src/fontfile/fontscale.c
diff options
context:
space:
mode:
Diffstat (limited to 'libXfont/src/fontfile/fontscale.c')
-rw-r--r--libXfont/src/fontfile/fontscale.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/libXfont/src/fontfile/fontscale.c b/libXfont/src/fontfile/fontscale.c
index 8e9de513d..8002dde81 100644
--- a/libXfont/src/fontfile/fontscale.c
+++ b/libXfont/src/fontfile/fontscale.c
@@ -35,13 +35,7 @@ in this Software without prior written authorization from The Open Group.
#include <config.h>
#endif
#include <X11/fonts/fntfilst.h>
-#ifdef _XOPEN_SOURCE
#include <math.h>
-#else
-#define _XOPEN_SOURCE /* to get prototype for hypot on some systems */
-#include <math.h>
-#undef _XOPEN_SOURCE
-#endif
Bool
FontFileAddScaledInstance (FontEntryPtr entry, FontScalablePtr vals,
@@ -57,8 +51,7 @@ FontFileAddScaledInstance (FontEntryPtr entry, FontScalablePtr vals,
if (extra->numScaled == extra->sizeScaled)
{
newsize = extra->sizeScaled + 4;
- new = (FontScaledPtr) xrealloc (extra->scaled,
- newsize * sizeof (FontScaledRec));
+ new = realloc (extra->scaled, newsize * sizeof (FontScaledRec));
if (!new)
return FALSE;
extra->sizeScaled = newsize;
@@ -113,7 +106,7 @@ FontFileRemoveScaledInstance (FontEntryPtr entry, FontPtr pFont)
if (extra->scaled[i].pFont == pFont)
{
if (extra->scaled[i].vals.ranges)
- xfree (extra->scaled[i].vals.ranges);
+ free (extra->scaled[i].vals.ranges);
extra->numScaled--;
for (; i < extra->numScaled; i++)
extra->scaled[i] = extra->scaled[i+1];