aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/oldX/XCrAssoc.c
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-01 13:13:48 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2016-07-01 13:13:48 +0200
commit4b3081c4814891c22c6a881dde0c0b3e6ceced1d (patch)
tree0b6ee56508568472a72210d76631920aa194eeb7 /nx-X11/lib/oldX/XCrAssoc.c
parentb666a3776df04e6d2712b04ab4ca9b582aa3c6cc (diff)
parentf0bf303c8f97c05dc4c2e6479bbf97e2b17d8cab (diff)
downloadnx-libs-4b3081c4814891c22c6a881dde0c0b3e6ceced1d.tar.gz
nx-libs-4b3081c4814891c22c6a881dde0c0b3e6ceced1d.tar.bz2
nx-libs-4b3081c4814891c22c6a881dde0c0b3e6ceced1d.zip
Merge branch 'sunweaver-pr/drop-really-old-X10-API-code' into 3.6.x
Attributes GH PR #148: https://github.com/ArcticaProject/nx-libs/pull/148 Reviewed by Vadim Troshchinskiy <vadim@qindel.com> -- Fri, 01 Jul 2016 03:12:26 -0700
Diffstat (limited to 'nx-X11/lib/oldX/XCrAssoc.c')
-rw-r--r--nx-X11/lib/oldX/XCrAssoc.c75
1 files changed, 0 insertions, 75 deletions
diff --git a/nx-X11/lib/oldX/XCrAssoc.c b/nx-X11/lib/oldX/XCrAssoc.c
deleted file mode 100644
index d36e95293..000000000
--- a/nx-X11/lib/oldX/XCrAssoc.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* $Xorg: XCrAssoc.c,v 1.4 2001/02/09 02:04:05 xorgcvs Exp $ */
-/*
-
-Copyright 1985, 1998 The Open Group.
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-*/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include "X11/Xlibint.h"
-#include "X10.h"
-
-/*
- * XCreateAssocTable - Create an XAssocTable. The size argument should be
- * a power of two for efficiency reasons. Some size suggestions: use 32
- * buckets per 100 objects; a reasonable maximum number of object per
- * buckets is 8. If there is an error creating the XAssocTable, a NULL
- * pointer is returned.
- */
-XAssocTable *XCreateAssocTable(size)
- register int size; /* Desired size of the table. */
-{
- register XAssocTable *table; /* XAssocTable to be initialized. */
- register XAssoc *buckets; /* Pointer to the first bucket in */
- /* the bucket array. */
-
- /* XMalloc the XAssocTable. */
- if ((table = (XAssocTable *)Xmalloc(sizeof(XAssocTable))) == NULL) {
- /* XMalloc call failed! */
- errno = ENOMEM;
- return(NULL);
- }
-
- /* XMalloc the buckets (actually just their headers). */
- buckets = (XAssoc *)Xcalloc((unsigned)size, (unsigned)sizeof(XAssoc));
- if (buckets == NULL) {
- /* XCalloc call failed! */
- errno = ENOMEM;
- return(NULL);
- }
-
- /* Insert table data into the XAssocTable structure. */
- table->buckets = buckets;
- table->size = size;
-
- while (--size >= 0) {
- /* Initialize each bucket. */
- buckets->prev = buckets;
- buckets->next = buckets;
- buckets++;
- }
-
- return(table);
-}