summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-12 21:02:39 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-12 22:10:14 -0800
commit9fbe47e349fb261a3845c3c74f8832dbadfdbe8d (patch)
tree5831c7020a5a08beeff24a69196a2572ada68334
parentc968ddd21a83f64c5bbe26b1b3adbfcfd3d04ff7 (diff)
Remove unused u*alloc functions from utils.c
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--utils.c55
-rw-r--r--utils.h36
-rw-r--r--xkbvleds.c1
-rw-r--r--xkbwatch.c1
4 files changed, 0 insertions, 93 deletions
diff --git a/utils.c b/utils.c
index da8f510..5f08204 100644
--- a/utils.c
+++ b/utils.c
@@ -30,61 +30,6 @@
#include <stdlib.h>
/***====================================================================***/
-
-Opaque
-uAlloc(unsigned size)
-{
- return ((Opaque) malloc(size));
-}
-
-/***====================================================================***/
-
-Opaque
-uCalloc(unsigned n, unsigned size)
-{
- return ((Opaque) calloc(n, size));
-}
-
-/***====================================================================***/
-
-Opaque
-uRealloc(Opaque old, unsigned newSize)
-{
- if (old == NULL)
- return ((Opaque) malloc(newSize));
- else
- return ((Opaque) realloc((char *) old, newSize));
-}
-
-/***====================================================================***/
-
-Opaque
-uRecalloc(Opaque old, unsigned nOld, unsigned nNew, unsigned itemSize)
-{
- char *rtrn;
-
- if (old == NULL)
- rtrn = (char *) calloc(nNew, itemSize);
- else {
- rtrn = (char *) realloc((char *) old, nNew * itemSize);
- if ((rtrn) && (nNew > nOld)) {
- bzero(&rtrn[nOld * itemSize], (nNew - nOld) * itemSize);
- }
- }
- return (Opaque) rtrn;
-}
-
-/***====================================================================***/
-
-void
-uFree(Opaque ptr)
-{
- if (ptr != (Opaque) NULL)
- free((char *) ptr);
- return;
-}
-
-/***====================================================================***/
/*** PRINT FUNCTIONS ***/
/***====================================================================***/
diff --git a/utils.h b/utils.h
index 57aae1c..84604a0 100644
--- a/utils.h
+++ b/utils.h
@@ -48,13 +48,6 @@ _XFUNCPROTOBEGIN
/***====================================================================***/
-#ifndef OPAQUE_DEFINED
-typedef void *Opaque;
-#endif
-#ifndef NullOpaque
-#define NullOpaque ((Opaque)NULL)
-#endif
-
#ifndef BOOLEAN_DEFINED
typedef char Boolean;
#endif
@@ -77,35 +70,6 @@ typedef int Comparison;
/***====================================================================***/
-extern Opaque uAlloc(unsigned /* size */);
-
-extern Opaque uCalloc(unsigned /* n */,
- unsigned /* size */);
-
-extern Opaque uRealloc(Opaque /* old */,
- unsigned /* newSize */);
-
-extern Opaque uRecalloc(Opaque /* old */,
- unsigned /* nOld */,
- unsigned /* nNew */,
- unsigned /* newSize */);
-
-extern void uFree(Opaque /* 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((Opaque)pO,((unsigned)n)*sizeof(t)))
-#define uTypedRecalloc(pO,o,n,t) ((t *)uRecalloc((Opaque)pO,((unsigned)o),((unsigned)n),sizeof(t)))
-#if (defined mdHasAlloca) && (mdHasAlloca)
-#define uTmpAlloc(n) ((Opaque)alloca((unsigned)n))
-#define uTmpFree(p)
-#else
-#define uTmpAlloc(n) uAlloc(n)
-#define uTmpFree(p) uFree(p)
-#endif
-
-/***====================================================================***/
-
extern Boolean uSetErrorFile(const char *name);
extern void uInformation(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2);
extern void uAction(const char *s, ...) _X_ATTRIBUTE_PRINTF(1,2);
diff --git a/xkbvleds.c b/xkbvleds.c
index 3b8cc97..fb8b20e 100644
--- a/xkbvleds.c
+++ b/xkbvleds.c
@@ -34,7 +34,6 @@
#include <X11/Xaw/Cardinals.h>
#include <X11/Xaw/Box.h>
-#define OPAQUE_DEFINED
#define BOOLEAN_DEFINED
#include "utils.h"
#include "LED.h"
diff --git a/xkbwatch.c b/xkbwatch.c
index e480590..23961c5 100644
--- a/xkbwatch.c
+++ b/xkbwatch.c
@@ -34,7 +34,6 @@
#include <X11/Xaw/Cardinals.h>
#include <X11/Xaw/Box.h>
-#define OPAQUE_DEFINED
#define BOOLEAN_DEFINED
#include "utils.h"
#include "LED.h"