=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/make/Attic/hash.c,v retrieving revision 1.2 retrieving revision 1.3 diff -c -r1.2 -r1.3 *** src/usr.bin/make/Attic/hash.c 1996/06/26 05:36:31 1.2 --- src/usr.bin/make/Attic/hash.c 1996/11/30 21:08:55 1.3 *************** *** 1,5 **** ! /* $OpenBSD: hash.c,v 1.2 1996/06/26 05:36:31 deraadt Exp $ */ ! /* $NetBSD: hash.c,v 1.5 1995/06/14 15:19:15 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. --- 1,5 ---- ! /* $OpenBSD: hash.c,v 1.3 1996/11/30 21:08:55 millert Exp $ */ ! /* $NetBSD: hash.c,v 1.6 1996/11/06 17:59:06 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. *************** *** 41,49 **** #ifndef lint #if 0 ! static char sccsid[] = "@(#)hash.c 5.5 (Berkeley) 12/28/90"; #else ! static char rcsid[] = "$OpenBSD: hash.c,v 1.2 1996/06/26 05:36:31 deraadt Exp $"; #endif #endif /* not lint */ --- 41,49 ---- #ifndef lint #if 0 ! static char sccsid[] = "@(#)hash.c 8.1 (Berkeley) 6/6/93"; #else ! static char rcsid[] = "$OpenBSD: hash.c,v 1.3 1996/11/30 21:08:55 millert Exp $"; #endif #endif /* not lint */ *************** *** 65,71 **** static void RebuildTable __P((Hash_Table *)); ! /* * The following defines the ratio of # entries to # buckets * at which we rebuild the table to make it larger. */ --- 65,71 ---- static void RebuildTable __P((Hash_Table *)); ! /* * The following defines the ratio of # entries to # buckets * at which we rebuild the table to make it larger. */ *************** *** 74,85 **** /* *--------------------------------------------------------- ! * * Hash_InitTable -- * * This routine just sets up the hash table. * ! * Results: * None. * * Side Effects: --- 74,85 ---- /* *--------------------------------------------------------- ! * * Hash_InitTable -- * * This routine just sets up the hash table. * ! * Results: * None. * * Side Effects: *************** *** 101,107 **** register struct Hash_Entry **hp; /* ! * Round up the size to a power of two. */ if (numBuckets <= 0) i = 16; --- 101,107 ---- register struct Hash_Entry **hp; /* ! * Round up the size to a power of two. */ if (numBuckets <= 0) i = 16; *************** *** 126,132 **** * and frees up the memory space it occupied (except for * the space in the Hash_Table structure). * ! * Results: * None. * * Side Effects: --- 126,132 ---- * and frees up the memory space it occupied (except for * the space in the Hash_Table structure). * ! * Results: * None. * * Side Effects: *************** *** 152,158 **** /* * Set up the hash table to cause memory faults on any future access ! * attempts until re-initialization. */ t->bucketPtr = NULL; } --- 152,158 ---- /* * Set up the hash table to cause memory faults on any future access ! * attempts until re-initialization. */ t->bucketPtr = NULL; } *************** *** 244,250 **** /* * The desired entry isn't there. Before allocating a new entry, * expand the table if necessary (and this changes the resulting ! * bucket chain). */ if (t->numEntries >= rebuildLimit * t->size) RebuildTable(t); --- 244,250 ---- /* * The desired entry isn't there. Before allocating a new entry, * expand the table if necessary (and this changes the resulting ! * bucket chain). */ if (t->numEntries >= rebuildLimit * t->size) RebuildTable(t); *************** *** 308,314 **** * This procedure sets things up for a complete search * of all entries recorded in the hash table. * ! * Results: * The return value is the address of the first entry in * the hash table, or NULL if the table is empty. * --- 308,314 ---- * This procedure sets things up for a complete search * of all entries recorded in the hash table. * ! * Results: * The return value is the address of the first entry in * the hash table, or NULL if the table is empty. * *************** *** 323,329 **** Hash_Entry * Hash_EnumFirst(t, searchPtr) Hash_Table *t; /* Table to be searched. */ ! register Hash_Search *searchPtr;/* Area in which to keep state * about search.*/ { searchPtr->tablePtr = t; --- 323,329 ---- Hash_Entry * Hash_EnumFirst(t, searchPtr) Hash_Table *t; /* Table to be searched. */ ! register Hash_Search *searchPtr;/* Area in which to keep state * about search.*/ { searchPtr->tablePtr = t; *************** *** 352,358 **** Hash_Entry * Hash_EnumNext(searchPtr) ! register Hash_Search *searchPtr; /* Area used to keep state about search. */ { register Hash_Entry *e; --- 352,358 ---- Hash_Entry * Hash_EnumNext(searchPtr) ! register Hash_Search *searchPtr; /* Area used to keep state about search. */ { register Hash_Entry *e; *************** *** 386,392 **** * This local routine makes a new hash table that * is larger than the old one. * ! * Results: * None. * * Side Effects: --- 386,392 ---- * This local routine makes a new hash table that * is larger than the old one. * ! * Results: * None. * * Side Effects: