summaryrefslogtreecommitdiff
path: root/NetWare/nwhashcls.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-04-22 15:15:22 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-04-22 15:15:22 +0000
commit011f1a1a00b94fe919083a224d5df636f05ae32a (patch)
treecd77ae1fdc3803f999aabf2d8c618c7a1a9a0a76 /NetWare/nwhashcls.h
parente41d30bc98dce1dea5c4a5747bd838c25bdeda5d (diff)
downloadperl-011f1a1a00b94fe919083a224d5df636f05ae32a.tar.gz
NetWare changeover from Watcom to Codewarrior, from C Aditya.
p4raw-id: //depot/perl@16076
Diffstat (limited to 'NetWare/nwhashcls.h')
-rw-r--r--NetWare/nwhashcls.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/NetWare/nwhashcls.h b/NetWare/nwhashcls.h
new file mode 100644
index 0000000000..88956afb86
--- /dev/null
+++ b/NetWare/nwhashcls.h
@@ -0,0 +1,79 @@
+
+/*
+ * Copyright © 2001 Novell, Inc. All Rights Reserved.
+ *
+ * You may distribute under the terms of either the GNU General Public
+ * License or the Artistic License, as specified in the README file.
+ *
+ */
+
+/*
+ * FILENAME : nwhashcls.h
+ * DESCRIPTION : Equivalent of Hash class
+ *
+ * Author : Srivathsa M
+ * Date Created : July 26 2001
+ */
+#include <stdio.h>
+#include <conio.h>
+#include <process.h>
+
+#define BUCKET_SIZE 37
+
+struct HASHNODE
+{
+ void *data;
+ struct HASHNODE *next;
+};
+
+typedef void (*HASHFORALLFUN)(void *, void *);
+
+class NWPerlHashList
+{
+private:
+ HASHNODE* MemListHash[BUCKET_SIZE];
+ void removeAll() const;
+
+public:
+ ~NWPerlHashList();
+ NWPerlHashList();
+ int insert(void *lData);
+ int remove(void *lData);
+ void forAll( void (*)(void *, void*), void * ) const;
+};
+
+struct KEYHASHNODE
+{
+ void *key;
+ void *data;
+ KEYHASHNODE *next;
+};
+
+/**
+typedef void (*KEYHASHFORALLFUN)(void *, void *);
+
+class NWPerlKeyHashList
+{
+private:
+ KEYHASHNODE* MemListHash[BUCKET_SIZE];
+ void removeAll() const;
+
+public:
+ ~NWPerlKeyHashList();
+ NWPerlKeyHashList();
+ int insert(void *key, void *lData);
+ int remove(void *key);
+ void forAll( void (*)(void *, void*), void * ) const;
+ int find(void *key, void **pData);
+};
+**/
+
+//#define DEBUG_HASH 1
+
+#ifdef DEBUG_HASH
+#define DEBUGPRINT ConsolePrintf
+#else
+#define DEBUGPRINT
+#endif
+
+