aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/dix/dixfonts.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-06-26 01:51:18 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-02 14:05:30 +0200
commit2646fc254e75c4a7fc10d03d1139d0bd708ceae9 (patch)
tree6a183ec2959f55cf8d6850d072b557399b401f7e /nx-X11/programs/Xserver/dix/dixfonts.c
parentacf87144d019f18e646501657d9082c6eba77f54 (diff)
downloadnx-libs-2646fc254e75c4a7fc10d03d1139d0bd708ceae9.tar.gz
nx-libs-2646fc254e75c4a7fc10d03d1139d0bd708ceae9.tar.bz2
nx-libs-2646fc254e75c4a7fc10d03d1139d0bd708ceae9.zip
nx-X11/programs/Xserver: Drop {X,x}alloc() macros, use malloc() instead.
Diffstat (limited to 'nx-X11/programs/Xserver/dix/dixfonts.c')
-rw-r--r--nx-X11/programs/Xserver/dix/dixfonts.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c
index 1a0352387..ef40c66f7 100644
--- a/nx-X11/programs/Xserver/dix/dixfonts.c
+++ b/nx-X11/programs/Xserver/dix/dixfonts.c
@@ -393,7 +393,7 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna
#ifdef FONTDEBUG
char *f;
- f = (char *)xalloc(lenfname + 1);
+ f = (char *)malloc(lenfname + 1);
memmove(f, pfontname, lenfname);
f[lenfname] = '\0';
ErrorF("OpenFont: fontname is \"%s\"\n", f);
@@ -430,10 +430,10 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna
return Success;
}
}
- c = (OFclosurePtr) xalloc(sizeof(OFclosureRec));
+ c = (OFclosurePtr) malloc(sizeof(OFclosureRec));
if (!c)
return BadAlloc;
- c->fontname = (char *) xalloc(lenfname);
+ c->fontname = (char *) malloc(lenfname);
c->origFontName = pfontname;
c->origFontNameLen = lenfname;
if (!c->fontname) {
@@ -445,7 +445,7 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna
* while we're blocking, the request still appears atomic
*/
c->fpe_list = (FontPathElementPtr *)
- xalloc(sizeof(FontPathElementPtr) * num_fpes);
+ malloc(sizeof(FontPathElementPtr) * num_fpes);
if (!c->fpe_list) {
free(c->fontname);
free(c);
@@ -680,7 +680,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
}
if (err == FontNameAlias) {
if (resolved) free(resolved);
- resolved = (char *) xalloc(resolvedlen + 1);
+ resolved = (char *) malloc(resolvedlen + 1);
if (resolved)
memmove(resolved, tmpname, resolvedlen + 1);
}
@@ -735,7 +735,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
c->haveSaved = TRUE;
if (c->savedName)
free(c->savedName);
- c->savedName = (char *)xalloc(namelen + 1);
+ c->savedName = (char *)malloc(namelen + 1);
if (c->savedName)
memmove(c->savedName, name, namelen + 1);
c->savedNameLen = namelen;
@@ -853,10 +853,10 @@ ListFonts(ClientPtr client, unsigned char *pattern, unsigned length,
if (length > XLFDMAXFONTNAMELEN)
return BadAlloc;
- if (!(c = (LFclosurePtr) xalloc(sizeof *c)))
+ if (!(c = (LFclosurePtr) malloc(sizeof *c)))
return BadAlloc;
c->fpe_list = (FontPathElementPtr *)
- xalloc(sizeof(FontPathElementPtr) * num_fpes);
+ malloc(sizeof(FontPathElementPtr) * num_fpes);
if (!c->fpe_list) {
free(c);
return BadAlloc;
@@ -995,7 +995,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
c->savedNumFonts = numFonts;
if (c->savedName)
free(c->savedName);
- c->savedName = (char *)xalloc(namelen + 1);
+ c->savedName = (char *)malloc(namelen + 1);
if (c->savedName)
memmove(c->savedName, name, namelen + 1);
aliascount = 20;
@@ -1127,10 +1127,10 @@ StartListFontsWithInfo(ClientPtr client, int length, unsigned char *pattern,
if (length > XLFDMAXFONTNAMELEN)
return BadAlloc;
- if (!(c = (LFWIclosurePtr) xalloc(sizeof *c)))
+ if (!(c = (LFWIclosurePtr) malloc(sizeof *c)))
goto badAlloc;
c->fpe_list = (FontPathElementPtr *)
- xalloc(sizeof(FontPathElementPtr) * num_fpes);
+ malloc(sizeof(FontPathElementPtr) * num_fpes);
if (!c->fpe_list)
{
free(c);
@@ -1317,7 +1317,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c)
/* Step 1 */
/* Allocate a malloc'd closure structure to replace
the local one we were passed */
- new_closure = (PTclosurePtr) xalloc(sizeof(PTclosureRec));
+ new_closure = (PTclosurePtr) malloc(sizeof(PTclosureRec));
if (!new_closure)
{
err = BadAlloc;
@@ -1327,7 +1327,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c)
c = new_closure;
len = c->endReq - c->pElt;
- c->data = (unsigned char *)xalloc(len);
+ c->data = (unsigned char *)malloc(len);
if (!c->data)
{
free(c);
@@ -1517,7 +1517,7 @@ doImageText(ClientPtr client, register ITclosurePtr c)
in doPolyText, but much simpler because the
request structure is much simpler. */
- new_closure = (ITclosurePtr) xalloc(sizeof(ITclosureRec));
+ new_closure = (ITclosurePtr) malloc(sizeof(ITclosureRec));
if (!new_closure)
{
err = BadAlloc;
@@ -1527,7 +1527,7 @@ doImageText(ClientPtr client, register ITclosurePtr c)
*new_closure = *c;
c = new_closure;
- data = (unsigned char *)xalloc(c->nChars * c->itemSize);
+ data = (unsigned char *)malloc(c->nChars * c->itemSize);
if (!data)
{
free(c);
@@ -1704,7 +1704,7 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist)
FontPathElementPtr fpe = NULL, *fplist;
fplist = (FontPathElementPtr *)
- xalloc(sizeof(FontPathElementPtr) * npaths);
+ malloc(sizeof(FontPathElementPtr) * npaths);
if (!fplist) {
*bad = 0;
return BadAlloc;
@@ -1745,13 +1745,13 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist)
/* if error or can't do it, act like it's a new one */
if (!fpe)
{
- fpe = (FontPathElementPtr) xalloc(sizeof(FontPathElementRec));
+ fpe = (FontPathElementPtr) malloc(sizeof(FontPathElementRec));
if (!fpe)
{
err = BadAlloc;
goto bail;
}
- fpe->name = (char *) xalloc(len + 1);
+ fpe->name = (char *) malloc(len + 1);
if (!fpe->name)
{
free(fpe);