Skip to content
Snippets Groups Projects
Select Git revision
  • 0683be9c77db4c4ad67a16c06cf7e4561f33bd67
  • master default protected
  • 9.0
  • 8.0
  • nt-tools
  • 7.8
  • 7.6
  • 7.4
  • 7.2
  • 7.0
  • 0.6
  • rosuav/latex-markdown-renderer
  • rxnpatch/rxnpatch
  • marcus/gobject-introspection
  • rxnpatch/8.0
  • rosuav/pre-listening-ports
  • rosuav/async-annotations
  • rosuav/pgsql-ssl
  • rxnpatch/rxnpatch-broken/2023-10-06T094250
  • grubba/fdlib
  • grubba/wip/sakura/8.0
  • v8.0.2020
  • v8.0.2018
  • v8.0.2016
  • v8.0.2014
  • v8.0.2012
  • v8.0.2008
  • v8.0.2006
  • v8.0.2004
  • v8.0.2002
  • v8.0.2000
  • v8.0.1998
  • v8.0.1996
  • v8.0.1994
  • v8.0.1992
  • v8.0.1990
  • v8.0.1988
  • v8.0.1986
  • rxnpatch/clusters/8.0/2025-04-29T124414
  • rxnpatch/2025-04-29T124414
  • v8.0.1984
41 results

port.h

Blame
  • hashtable.h 1.01 KiB
    /*\
    ||| This file a part of uLPC, and is copyright by Fredrik Hubinette
    ||| uLPC is distributed as GPL (General Public License)
    ||| See the files COPYING and DISCLAIMER for more information.
    \*/
    #ifndef HASHTABLE_H
    #define HASHTABLE_H
    
    #include "types.h"
    
    #define AVERAGE_HASH_LENGTH 16
    #define NEW_HASHTABLE_SIZE 4
    
    struct hash_entry
    {
      struct hash_entry *next;
      struct lpc_string *s;
    };
    
    struct hash_table
    {
      INT32 mask;
      INT32 entries;
      struct hash_entry *htable[1];
    };
    
    /* Prototypes begin here */
    struct hash_entry *hash_lookup(struct hash_table *h, struct lpc_string *s);
    struct hash_table *create_hash_table();
    struct hash_table *hash_rehash(struct hash_table *h,int size);
    struct hash_table *hash_insert(struct hash_table *h, struct hash_entry *s);
    struct hash_table *hash_unlink(struct hash_table *h, struct hash_entry *s);
    void map_hashtable(struct hash_table *h, void (*fun)(struct hash_entry *));
    void free_hashtable(struct hash_table *h,
    		    void (*free_entry)(struct hash_entry *));
    /* Prototypes end here */
    
    #endif