From f652ceb0de316dd8da1ccbcac5c4edd4567601bf Mon Sep 17 00:00:00 2001 From: "peterv%propagandism.org" Date: Thu, 6 May 2004 07:50:36 +0000 Subject: [PATCH] Removing unused files git-svn-id: svn://10.0.0.236/trunk@156026 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/parser/expat/lib/dllmain.c | 15 ---- mozilla/parser/expat/lib/hashtable.c | 127 --------------------------- mozilla/parser/expat/lib/hashtable.h | 44 ---------- 3 files changed, 186 deletions(-) delete mode 100644 mozilla/parser/expat/lib/dllmain.c delete mode 100644 mozilla/parser/expat/lib/hashtable.c delete mode 100644 mozilla/parser/expat/lib/hashtable.h diff --git a/mozilla/parser/expat/lib/dllmain.c b/mozilla/parser/expat/lib/dllmain.c deleted file mode 100644 index 97cbcf5de13..00000000000 --- a/mozilla/parser/expat/lib/dllmain.c +++ /dev/null @@ -1,15 +0,0 @@ -/* -Copyright (c) 1998, 1999 Thai Open Source Software Center Ltd -See the file COPYING for copying permission. -*/ - -#define STRICT 1 -#define WIN32_LEAN_AND_MEAN 1 - -#include - -BOOL WINAPI DllMain(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) -{ - return TRUE; -} - diff --git a/mozilla/parser/expat/lib/hashtable.c b/mozilla/parser/expat/lib/hashtable.c deleted file mode 100644 index e86b88f5c8d..00000000000 --- a/mozilla/parser/expat/lib/hashtable.c +++ /dev/null @@ -1,127 +0,0 @@ -/* -Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd -Portions Copyright (c) 1999 Netscape Communications Corporation. -See the file COPYING for copying permission. -*/ - -#include "xmldef.h" - -#ifdef XML_UNICODE_WCHAR_T -#ifndef XML_UNICODE -#define XML_UNICODE -#endif -#endif - -#include "hashtable.h" - -#define INIT_SIZE 64 - -static -int keyeq(KEY s1, KEY s2) -{ - for (; *s1 == *s2; s1++, s2++) - if (*s1 == 0) - return 1; - return 0; -} - -static -unsigned long hash(KEY s) -{ - unsigned long h = 0; - while (*s) - h = (h << 5) + h + (unsigned char)*s++; - return h; -} - -NAMED *lookup(HASH_TABLE *table, KEY name, size_t createSize) -{ - size_t i; - if (table->size == 0) { - if (!createSize) - return 0; - table->v = calloc(INIT_SIZE, sizeof(NAMED *)); - if (!table->v) - return 0; - table->size = INIT_SIZE; - table->usedLim = INIT_SIZE / 2; - i = hash(name) & (table->size - 1); - } - else { - unsigned long h = hash(name); - for (i = h & (table->size - 1); - table->v[i]; - i == 0 ? i = table->size - 1 : --i) { - if (keyeq(name, table->v[i]->name)) - return table->v[i]; - } - if (!createSize) - return 0; - if (table->used == table->usedLim) { - /* check for overflow */ - size_t newSize = table->size * 2; - NAMED **newV = calloc(newSize, sizeof(NAMED *)); - if (!newV) - return 0; - for (i = 0; i < table->size; i++) - if (table->v[i]) { - size_t j; - for (j = hash(table->v[i]->name) & (newSize - 1); - newV[j]; - j == 0 ? j = newSize - 1 : --j) - ; - newV[j] = table->v[i]; - } - free(table->v); - table->v = newV; - table->size = newSize; - table->usedLim = newSize/2; - for (i = h & (table->size - 1); - table->v[i]; - i == 0 ? i = table->size - 1 : --i) - ; - } - } - table->v[i] = calloc(1, createSize); - if (!table->v[i]) - return 0; - table->v[i]->name = name; - (table->used)++; - return table->v[i]; -} - -void hashTableDestroy(HASH_TABLE *table) -{ - size_t i; - for (i = 0; i < table->size; i++) { - NAMED *p = table->v[i]; - if (p) - free(p); - } - free(table->v); -} - -void hashTableInit(HASH_TABLE *p) -{ - p->size = 0; - p->usedLim = 0; - p->used = 0; - p->v = 0; -} - -void hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) -{ - iter->p = table->v; - iter->end = iter->p + table->size; -} - -NAMED *hashTableIterNext(HASH_TABLE_ITER *iter) -{ - while (iter->p != iter->end) { - NAMED *tem = *(iter->p)++; - if (tem) - return tem; - } - return 0; -} - diff --git a/mozilla/parser/expat/lib/hashtable.h b/mozilla/parser/expat/lib/hashtable.h deleted file mode 100644 index 7711172f445..00000000000 --- a/mozilla/parser/expat/lib/hashtable.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd -Portions Copyright (c) 1999 Netscape Communications Corporation. -See the file COPYING for copying permission. -*/ - -#include - -#ifdef XML_UNICODE - -#ifdef XML_UNICODE_WCHAR_T -typedef const wchar_t *KEY; -#else /* not XML_UNICODE_WCHAR_T */ -typedef const unsigned short *KEY; -#endif /* not XML_UNICODE_WCHAR_T */ - -#else /* not XML_UNICODE */ - -typedef const char *KEY; - -#endif /* not XML_UNICODE */ - -typedef struct { - KEY name; -} NAMED; - -typedef struct { - NAMED **v; - size_t size; - size_t used; - size_t usedLim; -} HASH_TABLE; - -NAMED *lookup(HASH_TABLE *table, KEY name, size_t createSize); -void hashTableInit(HASH_TABLE *); -void hashTableDestroy(HASH_TABLE *); - -typedef struct { - NAMED **p; - NAMED **end; -} HASH_TABLE_ITER; - -void hashTableIterInit(HASH_TABLE_ITER *, const HASH_TABLE *); -NAMED *hashTableIterNext(HASH_TABLE_ITER *);