Category : C Source Code
Archive   : HASHTAB.ZIP
Filename : NETNOTE.TXT

Output of file : NETNOTE.TXT contained in archive : HASHTAB.ZIP
Article 2273 of alt.sources:
Path: cos!uunet!snorkelwacker!usc!wuarchive!!caen!!!emv
From: [email protected] (Chris Torek)
Newsgroups: alt.sources
Subject: [comp.lang.c] Re: hash function for text in C
Message-ID: <[email protected]>
Date: 18 Oct 90 18:44:51 GMT
Sender: [email protected] (Edward Vielmetti)
Reply-To: [email protected] (Chris Torek)
Followup-To: comp.lang.c
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
Lines: 417
X-Original-Newsgroups: comp.lang.c

Archive-name: hash/18-Oct-90
Original-posting-by: [email protected] (Chris Torek)
Original-subject: Re: hash function for text in C
Reposted-by: [email protected] (Edward Vielmetti)

[Reposted from comp.lang.c.
Comments on this service to [email protected] (Edward Vielmetti).]

The following implements expanding chained hash tables for strings and
numbers. This is unmodified from a special-purpose program (having to
do with reading a large number of files with name=id pairs and doing
various operations on them). Chain lengths are not monitored; instead,
the table is invariably expanded whenever it becomes 2/3 full. Entries
may be neither removed nor modified.

An essentially-unrelated function called `string' maintains a string
pool such that string(x) == string(y) iff strcmp(x,y)==0 (the program
typically stores each name several times, and often needs to test for
name equality, so this helps there).

  3 Responses to “Category : C Source Code
Archive   : HASHTAB.ZIP
Filename : NETNOTE.TXT

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: