summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-05-20 14:40:24 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-05-20 14:40:24 +1000
commit53515d62f86fcdc27d8525ecbf2d6472256c79e5 (patch)
treebfee74b698b9d365744c0e172f8f8286343c2534
parent2dae1bbd3c5deb09ff36b2c7bcb805a441142caa (diff)
downloadxf86-input-wacom-53515d62f86fcdc27d8525ecbf2d6472256c79e5.tar.gz
Remove libc wrappers.
The X server is just deprecating them from the headers and the wrapping never had the desired effect anyway (which was to have alternative allocation implementations). This patch brought to you by sed. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Acked-by: Ping Cheng <pingc@wacom.com> (cherry picked from commit 44f4b81300b63fb01857197a96993bd85cc873ea) Conflicts: src/wcmCommon.c
-rw-r--r--src/wcmConfig.c26
-rw-r--r--src/wcmFilter.c2
-rw-r--r--src/wcmValidateDevice.c18
-rw-r--r--src/xf86Wacom.c2
4 files changed, 24 insertions, 24 deletions
diff --git a/src/wcmConfig.c b/src/wcmConfig.c
index 5dd65ce..4494f7b 100644
--- a/src/wcmConfig.c
+++ b/src/wcmConfig.c
@@ -40,19 +40,19 @@ static int wcmAllocate(LocalDevicePtr local)
WacomToolAreaPtr area = NULL;
int i;
- priv = xcalloc(1, sizeof(WacomDeviceRec));
+ priv = calloc(1, sizeof(WacomDeviceRec));
if (!priv)
goto error;
- common = xcalloc(1, sizeof(WacomCommonRec));
+ common = calloc(1, sizeof(WacomCommonRec));
if (!common)
goto error;
- tool = xcalloc(1, sizeof(WacomTool));
+ tool = calloc(1, sizeof(WacomTool));
if(!tool)
goto error;
- area = xcalloc(1, sizeof(WacomToolArea));
+ area = calloc(1, sizeof(WacomToolArea));
if (!area)
goto error;
@@ -148,10 +148,10 @@ static int wcmAllocate(LocalDevicePtr local)
return 1;
error:
- xfree(area);
- xfree(tool);
- xfree(common);
- xfree(priv);
+ free(area);
+ free(tool);
+ free(common);
+ free(priv);
return 0;
}
@@ -280,9 +280,9 @@ static void wcmUninit(InputDriverPtr drv, LocalDevicePtr local, int flags)
}
/* free pressure curve */
- xfree(priv->pPressCurve);
+ free(priv->pPressCurve);
- xfree(priv);
+ free(priv);
local->private = NULL;
@@ -314,7 +314,7 @@ static Bool wcmMatchDevice(LocalDevicePtr pLocal)
{
DBG(2, priv, "port share between"
" %s and %s\n", pLocal->name, pMatch->name);
- xfree(common);
+ free(common);
common = priv->common = privMatch->common;
priv->next = common->wcmDevices;
common->wcmDevices = priv;
@@ -431,8 +431,8 @@ SetupProc_fail:
/* restart the device list from the next one */
if (common && priv)
common->wcmDevices = priv->next;
- xfree(common);
- xfree(priv);
+ free(common);
+ free(priv);
if (local)
{
if (local->fd != -1)
diff --git a/src/wcmFilter.c b/src/wcmFilter.c
index 91b2f10..aa4aa4e 100644
--- a/src/wcmFilter.c
+++ b/src/wcmFilter.c
@@ -65,7 +65,7 @@ void wcmSetPressureCurve(WacomDevicePtr pDev, int x0, int y0,
/* if curve is not allocated, do it now. */
if (!pDev->pPressCurve)
{
- pDev->pPressCurve = (int*) xalloc(sizeof(int) *
+ pDev->pPressCurve = (int*) malloc(sizeof(int) *
(FILTER_PRESSURE_RES + 1));
if (!pDev->pPressCurve)
{
diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c
index bfae941..c9f5c4c 100644
--- a/src/wcmValidateDevice.c
+++ b/src/wcmValidateDevice.c
@@ -183,16 +183,16 @@ static InputOption *wcmOptionDupConvert(LocalDevicePtr local, const char *type)
memset(&dummy, 0, sizeof(dummy));
xf86CollectInputOptions(&dummy, NULL, original);
- name = xcalloc(strlen(local->name) + strlen(type) + 2, 1);
+ name = calloc(strlen(local->name) + strlen(type) + 2, 1);
sprintf(name, "%s %s", local->name, type);
dummy.options = xf86ReplaceStrOption(dummy.options, "Type", type);
dummy.options = xf86ReplaceStrOption(dummy.options, "Name", name);
- xfree(name);
+ free(name);
while(dummy.options)
{
- new = xcalloc(1, sizeof(InputOption));
+ new = calloc(1, sizeof(InputOption));
new->key = xf86OptionName(dummy.options);
new->value = xf86OptionValue(dummy.options);
@@ -209,9 +209,9 @@ static void wcmFreeInputOpts(InputOption* opts)
while(opts)
{
tmp = opts->next;
- xfree(opts->key);
- xfree(opts->value);
- xfree(opts);
+ free(opts->key);
+ free(opts->value);
+ free(opts);
opts = tmp;
}
}
@@ -467,7 +467,7 @@ int wcmParseOptions(LocalDevicePtr local)
{
WacomToolAreaPtr arealist;
- xfree(tool);
+ free(tool);
priv->tool = tool = toollist;
arealist = toollist->arealist;
@@ -585,8 +585,8 @@ int wcmParseOptions(LocalDevicePtr local)
return 1;
error:
- xfree(area);
- xfree(tool);
+ free(area);
+ free(tool);
return 0;
}
diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
index 578d7bc..96d42f9 100644
--- a/src/xf86Wacom.c
+++ b/src/xf86Wacom.c
@@ -216,7 +216,7 @@ static int wcmInitArea(LocalDevicePtr local)
if (inlist->next == area)
{
inlist->next = area->next;
- xfree(area);
+ free(area);
priv->toolarea = NULL;
break;
}