hash.c (138435) | hash.c (138455) |
---|---|
1/* 2 * Copyright (c) 1988, 1989, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (c) 1988, 1989 by Adam de Boor 5 * Copyright (c) 1989 by Berkeley Softworks 6 * All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by --- 26 unchanged lines hidden (view full) --- 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * @(#)hash.c 8.1 (Berkeley) 6/6/93 40 */ 41 42#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1988, 1989, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (c) 1988, 1989 by Adam de Boor 5 * Copyright (c) 1989 by Berkeley Softworks 6 * All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by --- 26 unchanged lines hidden (view full) --- 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * @(#)hash.c 8.1 (Berkeley) 6/6/93 40 */ 41 42#include <sys/cdefs.h> |
43__FBSDID("$FreeBSD: head/usr.bin/make/hash.c 138435 2004-12-06 08:56:30Z harti $"); | 43__FBSDID("$FreeBSD: head/usr.bin/make/hash.c 138455 2004-12-06 15:20:12Z harti $"); |
44 45/* hash.c -- 46 * 47 * This module contains routines to manipulate a hash table. 48 * See hash.h for a definition of the structure of the hash 49 * table. Hash tables grow automatically as the amount of 50 * information increases. 51 */ --- 241 unchanged lines hidden (view full) --- 293 * Side Effects: 294 * The information in searchPtr is initialized so that successive 295 * calls to Hash_Next will return successive HashEntry's 296 * from the table. 297 * 298 *--------------------------------------------------------- 299 */ 300Hash_Entry * | 44 45/* hash.c -- 46 * 47 * This module contains routines to manipulate a hash table. 48 * See hash.h for a definition of the structure of the hash 49 * table. Hash tables grow automatically as the amount of 50 * information increases. 51 */ --- 241 unchanged lines hidden (view full) --- 293 * Side Effects: 294 * The information in searchPtr is initialized so that successive 295 * calls to Hash_Next will return successive HashEntry's 296 * from the table. 297 * 298 *--------------------------------------------------------- 299 */ 300Hash_Entry * |
301Hash_EnumFirst(Hash_Table *t, Hash_Search *searchPtr) | 301Hash_EnumFirst(const Hash_Table *t, Hash_Search *searchPtr) |
302{ 303 304 searchPtr->tablePtr = t; 305 searchPtr->nextIndex = 0; 306 searchPtr->hashEntryPtr = NULL; 307 return (Hash_EnumNext(searchPtr)); 308} 309 --- 13 unchanged lines hidden (view full) --- 323 * next entry. 324 * 325 *--------------------------------------------------------- 326 */ 327Hash_Entry * 328Hash_EnumNext(Hash_Search *searchPtr) 329{ 330 Hash_Entry *e; | 302{ 303 304 searchPtr->tablePtr = t; 305 searchPtr->nextIndex = 0; 306 searchPtr->hashEntryPtr = NULL; 307 return (Hash_EnumNext(searchPtr)); 308} 309 --- 13 unchanged lines hidden (view full) --- 323 * next entry. 324 * 325 *--------------------------------------------------------- 326 */ 327Hash_Entry * 328Hash_EnumNext(Hash_Search *searchPtr) 329{ 330 Hash_Entry *e; |
331 Hash_Table *t = searchPtr->tablePtr; | 331 const Hash_Table *t = searchPtr->tablePtr; |
332 333 /* 334 * The hashEntryPtr field points to the most recently returned 335 * entry, or is NULL if we are starting up. If not NULL, we have 336 * to start at the next one in the chain. 337 */ 338 e = searchPtr->hashEntryPtr; 339 if (e != NULL) --- 56 unchanged lines hidden --- | 332 333 /* 334 * The hashEntryPtr field points to the most recently returned 335 * entry, or is NULL if we are starting up. If not NULL, we have 336 * to start at the next one in the chain. 337 */ 338 e = searchPtr->hashEntryPtr; 339 if (e != NULL) --- 56 unchanged lines hidden --- |