aboutsummaryrefslogtreecommitdiff
path: root/libXfont/src/util/fontnames.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-25 13:45:56 +0000
committermarha <marha@users.sourceforge.net>2009-07-25 13:45:56 +0000
commit2fb179f86b0f9ecb7876759b87f9c64634a3f114 (patch)
tree351df3c4d5648356980bc078544e25820e4d26fc /libXfont/src/util/fontnames.c
parenta7be905cf4423239285228d4e23caf2172adfa8b (diff)
downloadvcxsrv-2fb179f86b0f9ecb7876759b87f9c64634a3f114.tar.gz
vcxsrv-2fb179f86b0f9ecb7876759b87f9c64634a3f114.tar.bz2
vcxsrv-2fb179f86b0f9ecb7876759b87f9c64634a3f114.zip
Added libXfont-1.4.0.tar.gz.
Diffstat (limited to 'libXfont/src/util/fontnames.c')
-rw-r--r--libXfont/src/util/fontnames.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/libXfont/src/util/fontnames.c b/libXfont/src/util/fontnames.c
index 2d3a51752..d03cea773 100644
--- a/libXfont/src/util/fontnames.c
+++ b/libXfont/src/util/fontnames.c
@@ -49,11 +49,11 @@ FreeFontNames(FontNamesPtr pFN)
if (!pFN)
return;
for (i = 0; i < pFN->nnames; i++) {
- xfree(pFN->names[i]);
+ free(pFN->names[i]);
}
- xfree(pFN->names);
- xfree(pFN->length);
- xfree(pFN);
+ free(pFN->names);
+ free(pFN->length);
+ free(pFN);
}
FontNamesPtr
@@ -61,18 +61,18 @@ MakeFontNamesRecord(unsigned int size)
{
FontNamesPtr pFN;
- pFN = (FontNamesPtr) xalloc(sizeof(FontNamesRec));
+ pFN = malloc(sizeof(FontNamesRec));
if (pFN) {
pFN->nnames = 0;
pFN->size = size;
if (size)
{
- pFN->length = (int *) xalloc(size * sizeof(int));
- pFN->names = (char **) xalloc(size * sizeof(char *));
+ pFN->length = malloc(size * sizeof(int));
+ pFN->names = malloc(size * sizeof(char *));
if (!pFN->length || !pFN->names) {
- xfree(pFN->length);
- xfree(pFN->names);
- xfree(pFN);
+ free(pFN->length);
+ free(pFN->names);
+ free(pFN);
pFN = (FontNamesPtr) 0;
}
}
@@ -91,7 +91,7 @@ AddFontNamesName(FontNamesPtr names, char *name, int length)
int index = names->nnames;
char *nelt;
- nelt = (char *) xalloc(length + 1);
+ nelt = malloc(length + 1);
if (!nelt)
return AllocError;
if (index >= names->size) {
@@ -101,16 +101,16 @@ AddFontNamesName(FontNamesPtr names, char *name, int length)
if (size == 0)
size = 8;
- nlength = (int *) xrealloc(names->length, size * sizeof(int));
- nnames = (char **) xrealloc(names->names, size * sizeof(char *));
+ nlength = realloc(names->length, size * sizeof(int));
+ nnames = realloc(names->names, size * sizeof(char *));
if (nlength && nnames) {
names->size = size;
names->length = nlength;
names->names = nnames;
} else {
- xfree(nelt);
- xfree(nlength);
- xfree(nnames);
+ free(nelt);
+ free(nlength);
+ free(nnames);
return AllocError;
}
}