register int i;
if (info->name != NULL)
- uFree(info->name);
+ free(info->name);
info->name = NULL;
info->dflt.defs.defined = 0;
info->dflt.defs.merge = MergeAugment;
if (stmt->stmt != NULL)
{
if (included.name != NULL)
- uFree(included.name);
+ free(included.name);
included.name = stmt->stmt;
stmt->stmt = NULL;
}
return True;
}
if (info.interps != NULL)
- uFree(info.interps);
+ free(info.interps);
return False;
}
int len;
char *new;
len = strlen(leftRtrn.str) + strlen(rightRtrn.str) + 1;
- new = (char *) uAlloc(len);
+ new = (char *) malloc(len);
if (new)
{
sprintf(new, "%s%s", leftRtrn.str, rightRtrn.str);
for (tmp = pi; tmp != NULL; tmp = next)
{
if (tmp->name)
- uFree(tmp->name);
+ free(tmp->name);
if (tmp->value)
- uFree(tmp->value);
+ free(tmp->value);
tmp->name = tmp->value = NULL;
next = (PropertyInfo *) tmp->defs.next;
- uFree(tmp);
+ free(tmp);
}
return;
}
{
ClearKeyInfo(tmp);
next = (KeyInfo *) tmp->defs.next;
- uFree(tmp);
+ free(tmp);
}
return;
}
{
ClearRowInfo(tmp, info);
next = (RowInfo *) tmp->defs.next;
- uFree(tmp);
+ free(tmp);
}
return;
}
{
next = (DoodadInfo *) tmp->defs.next;
ClearDoodadInfo(tmp);
- uFree(tmp);
+ free(tmp);
}
return;
}
{
ClearSectionInfo(tmp, info);
next = (SectionInfo *) tmp->defs.next;
- uFree(tmp);
+ free(tmp);
}
return;
}
{
if (tmp->outlines[i].points != NULL)
{
- uFree(tmp->outlines[i].points);
+ free(tmp->outlines[i].points);
tmp->outlines[i].num_points = 0;
tmp->outlines[i].points = NULL;
}
}
- uFree(tmp->outlines);
+ free(tmp->outlines);
tmp->szOutlines = 0;
tmp->nOutlines = 0;
tmp->outlines = NULL;
tmp->primary = tmp->approx = NULL;
}
next = (ShapeInfo *) tmp->defs.next;
- uFree(tmp);
+ free(tmp);
}
return;
}
ClearGeometryInfo(GeometryInfo * info)
{
if (info->name)
- uFree(info->name);
+ free(info->name);
info->name = NULL;
if (info->props)
FreeProperties(info->props, info);
new->value);
}
if (old->value)
- uFree(old->value);
+ free(old->value);
old->value = _XkbDupString(new->value);
return True;
}
if (stmt->stmt != NULL)
{
if (included.name != NULL)
- uFree(included.name);
+ free(included.name);
included.name = stmt->stmt;
stmt->stmt = NULL;
}
totalSize =
strlen(FONT_TEMPLATE) + strlen(font) + strlen(weight) + strlen(slant);
totalSize += strlen(setWidth) + strlen(variant) + strlen(encoding);
- rtrn = uCalloc(totalSize, 1);
+ rtrn = calloc(totalSize, 1);
if (rtrn)
sprintf(rtrn, FONT_TEMPLATE, font, weight, slant, setWidth, variant,
size, encoding);
while ((oi->keys != NULL) && (oi->keys->sectionRow == _GOK_UnknownRow))
{
next = (OverlayKeyInfo *) oi->keys->defs.next;
- uFree(oi->keys);
+ free(oi->keys);
oi->keys = next;
oi->nKeys--;
}
{
ki->defs.next = next->defs.next;
oi->nKeys--;
- uFree(next);
+ free(next);
next = (OverlayKeyInfo *) ki->defs.next;
}
}
last = led;
}
else
- uFree(led);
+ free(led);
}
else
{
im->ctrls = led->ctrls;
if (xkb->names != NULL)
xkb->names->indicators[led->indicator - 1] = led->name;
- uFree(led);
+ free(led);
}
}
if (unboundRtrn != NULL)
if (force)
{
unbound = next;
- uFree(led);
+ free(led);
}
else
{
led->indicator = _LED_NotBound;
if (force)
{
- uFree(led);
+ free(led);
unbound = next;
}
else
else
unbound = next;
led->defs.next = NULL;
- uFree(led);
+ free(led);
}
}
}
for (led = unbound; led != NULL; led = next)
{
next = (LEDInfo *) led->defs.next;
- uFree(led);
+ free(led);
}
}
return True;
}
}
}
- uFree(old);
+ free(old);
}
}
}
ClearKeyNamesInfo(KeyNamesInfo * info)
{
if (info->name != NULL)
- uFree(info->name);
+ free(info->name);
info->name = NULL;
info->computedMax = info->explicitMax = info->explicitMin = -1;
info->computedMin = 256;
if (stmt->stmt != NULL)
{
if (included.name != NULL)
- uFree(included.name);
+ free(included.name);
included.name = stmt->stmt;
stmt->stmt = NULL;
}
{
if (type->entries != NULL)
{
- uFree(type->entries);
+ free(type->entries);
type->entries = NULL;
}
if (type->lvlNames != NULL)
{
- uFree(type->lvlNames);
+ free(type->lvlNames);
type->lvlNames = NULL;
}
if (type->preserve != NULL)
FreeKeyTypesInfo(KeyTypesInfo * info)
{
if (info->name)
- uFree(info->name);
+ free(info->name);
info->name = NULL;
if (info->types)
{
if (stmt->stmt != NULL)
{
if (included.name != NULL)
- uFree(included.name);
+ free(included.name);
included.name = stmt->stmt;
stmt->stmt = NULL;
}
for (this = cmn; this != NULL; this = next)
{
next = this->next;
- uFree(this);
+ free(this);
}
}
return NULL;
into->expr =
(ExprDef *) AppendStmt(&into->expr->common, &from->expr->common);
from->expr = NULL;
- uFree(from);
+ free(from);
return into;
}
strncpy(key->over, over, XkbKeyNameLength);
strncpy(key->under, under, XkbKeyNameLength);
if (over)
- uFree(over);
+ free(over);
if (under)
- uFree(under);
+ free(under);
}
return key;
}
if (first)
first->stmt = stmt;
else if (stmt)
- uFree(stmt);
+ free(stmt);
return first;
BAIL:
ERROR("Illegal include statement \"%s\"\n", stmt);
{
incl = first->next;
if (first->file)
- uFree(first->file);
+ free(first->file);
if (first->map)
- uFree(first->map);
+ free(first->map);
if (first->modifier)
- uFree(first->modifier);
+ free(first->modifier);
if (first->path)
- uFree(first->path);
+ free(first->path);
first->file = first->map = first->path = NULL;
- uFree(first);
+ free(first);
first = incl;
}
if (stmt)
- uFree(stmt);
+ free(stmt);
return NULL;
}
info->numLevels[i] = 0;
info->types[i] = None;
if (info->syms[i] != NULL)
- uFree(info->syms[i]);
+ free(info->syms[i]);
info->syms[i] = NULL;
if (info->acts[i] != NULL)
- uFree(info->acts[i]);
+ free(info->acts[i]);
info->acts[i] = NULL;
}
info->dfltType = None;
register int i;
if (info->name)
- uFree(info->name);
+ free(info->name);
info->name = NULL;
if (info->keys)
{
{
FreeKeyInfo(&info->keys[i]);
}
- uFree(info->keys);
+ free(info->keys);
info->keys = NULL;
}
if (info->modMap)
}
}
if ((into->syms[group] != NULL) && (resultSyms != into->syms[group]))
- uFree(into->syms[group]);
+ free(into->syms[group]);
if ((from->syms[group] != NULL) && (resultSyms != from->syms[group]))
- uFree(from->syms[group]);
+ free(from->syms[group]);
if ((into->acts[group] != NULL) && (resultActs != into->acts[group]))
- uFree(into->acts[group]);
+ free(into->acts[group]);
if ((from->acts[group] != NULL) && (resultActs != from->acts[group]))
- uFree(from->acts[group]);
+ free(from->acts[group]);
into->numLevels[group] = resultWidth;
into->syms[group] = resultSyms;
from->syms[group] = NULL;
if (into->numLevels[i] != 0)
{
if (into->syms[i])
- uFree(into->syms[i]);
+ free(into->syms[i]);
if (into->acts[i])
- uFree(into->acts[i]);
+ free(into->acts[i]);
}
}
*into = *from;
if (!AddModMapEntry(into, mm))
into->errorCount++;
next = (ModMapEntry *) mm->defs.next;
- uFree(mm);
+ free(mm);
}
from->modMap = NULL;
}
if (stmt->stmt != NULL)
{
if (included.name != NULL)
- uFree(included.name);
+ free(included.name);
included.name = stmt->stmt;
stmt->stmt = NULL;
}
{
key->numLevels[i] = 0;
if (key->syms[i] != NULL)
- uFree(key->syms[i]);
+ free(key->syms[i]);
key->syms[i] = (uint32_t *) NULL;
if (key->acts[i] != NULL)
- uFree(key->acts[i]);
+ free(key->acts[i]);
key->acts[i] = (XkbcAction *) NULL;
key->types[i] = (uint32_t) 0;
}
{
key->numLevels[i] = 0;
if (key->syms[i] != NULL)
- uFree(key->syms[i]);
+ free(key->syms[i]);
key->syms[i] = (uint32_t *) NULL;
if (key->acts[i] != NULL)
- uFree(key->acts[i]);
+ free(key->acts[i]);
key->acts[i] = (XkbcAction *) NULL;
key->types[i] = (uint32_t) 0;
}
#include <stdlib.h>
#include <stdarg.h>
-/***====================================================================***/
-
-void *
-uAlloc(unsigned size)
-{
- return ((void *) malloc(size));
-}
-
-/***====================================================================***/
-
void *
-uCalloc(unsigned n, unsigned size)
-{
- return ((void *) calloc(n, size));
-}
-
-/***====================================================================***/
-
-void *
-uRealloc(void * old, unsigned newSize)
-{
- if (old == NULL)
- return ((void *) malloc(newSize));
- else
- return ((void *) realloc((char *) old, newSize));
-}
-
-/***====================================================================***/
-
-void *
-uRecalloc(void * old, unsigned nOld, unsigned nNew, unsigned itemSize)
+recalloc(void * old, unsigned nOld, unsigned nNew, unsigned itemSize)
{
char *rtrn;
}
/***====================================================================***/
-
-void
-uFree(void * ptr)
-{
- if (ptr != (void *) NULL)
- free((char *) ptr);
- return;
-}
-
-/***====================================================================***/
/*** FUNCTION ENTRY TRACKING ***/
/***====================================================================***/
/***====================================================================***/
extern void *
-uAlloc(unsigned size);
+recalloc(void * old, unsigned nOld, unsigned nNew, unsigned newSize);
-extern void *
-uCalloc(unsigned n, unsigned size);
-
-extern void *
-uRealloc(void * old, unsigned newSize);
-
-extern void *
-uRecalloc(void * old, unsigned nOld, unsigned nNew, unsigned newSize);
-
-extern void
-uFree(void * ptr);
-
-#define uTypedAlloc(t) ((t *)uAlloc((unsigned)sizeof(t)))
-#define uTypedCalloc(n,t) ((t *)uCalloc((unsigned)n,(unsigned)sizeof(t)))
-#define uTypedRealloc(pO,n,t) ((t *)uRealloc((void *)pO,((unsigned)n)*sizeof(t)))
-#define uTypedRecalloc(pO,o,n,t) ((t *)uRecalloc((void *)pO,((unsigned)o),((unsigned)n),sizeof(t)))
+#define uTypedAlloc(t) ((t *)malloc((unsigned)sizeof(t)))
+#define uTypedCalloc(n,t) ((t *)calloc((unsigned)n,(unsigned)sizeof(t)))
+#define uTypedRealloc(pO,n,t) ((t *)realloc((void *)pO,((unsigned)n)*sizeof(t)))
+#define uTypedRecalloc(pO,o,n,t) ((t *)recalloc((void *)pO,((unsigned)o),((unsigned)n),sizeof(t)))
#if (defined mdHasAlloca) && (mdHasAlloca)
#define uTmpAlloc(n) ((void *)alloca((unsigned)n))
#define uTmpFree(p)
#else
-#define uTmpAlloc(n) uAlloc(n)
-#define uTmpFree(p) uFree(p)
+#define uTmpAlloc(n) malloc(n)
+#define uTmpFree(p) free(p)
#endif
/***====================================================================***/
}
else if (str[0] == '(')
{
- uFree(*extra_data);
+ free(*extra_data);
return False;
}
else
tmp = strchr(str, ')');
if ((tmp == NULL) || (tmp[1] != '\0'))
{
- uFree(*file_rtrn);
- uFree(*extra_data);
+ free(*file_rtrn);
+ free(*extra_data);
return False;
}
*tmp++ = '\0';
{
if (includePath[i] != NULL)
{
- uFree(includePath[i]);
+ free(includePath[i]);
includePath[i] = NULL;
}
}