X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fcomp_hash.c;h=d4d9eaa62e13e9a6d85c309a9fd0a7b72ebc5c51;hp=9f2ee71041e4650da7592167774fe32d789e0921;hb=0c9774ef662e2137933ac0c79077eaa9c8981357;hpb=46722468f47c2b77b3987729b4bcf2321cccfd01 diff --git a/ncurses/tinfo/comp_hash.c b/ncurses/tinfo/comp_hash.c index 9f2ee710..d4d9eaa6 100644 --- a/ncurses/tinfo/comp_hash.c +++ b/ncurses/tinfo/comp_hash.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998,2000,2001 Free Software Foundation, Inc. * + * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -29,6 +29,7 @@ /**************************************************************************** * Author: Zeyd M. Ben-Halim 1992,1995 * * and: Eric S. Raymond * + * and: Thomas E. Dickey 1996-on * ****************************************************************************/ /* @@ -37,6 +38,7 @@ * */ +#define USE_TERMLIB 1 #include #include @@ -48,7 +50,7 @@ #define DEBUG(level, params) /*nothing */ #endif -MODULE_ID("$Id: comp_hash.c,v 1.25 2001/06/02 22:50:42 skimo Exp $") +MODULE_ID("$Id: comp_hash.c,v 1.28 2005/08/20 19:58:18 tom Exp $") static int hash_function(const char *); @@ -97,12 +99,11 @@ _nc_make_hash_table(struct name_table_entry *table, * Computes the hashing function on the given string. * * The current hash function is the sum of each consectutive pair - * of characters, taken as two-byte integers, mod Hashtabsize. + * of characters, taken as two-byte integers, mod HASHTABSIZE. * */ -static -int +static int hash_function(const char *string) { long sum = 0; @@ -128,8 +129,8 @@ hash_function(const char *string) #ifndef MAIN_PROGRAM NCURSES_EXPORT(struct name_table_entry const *) -_nc_find_entry -(const char *string, const struct name_table_entry *const *hash_table) +_nc_find_entry(const char *string, + const struct name_table_entry *const *hash_table) { int hashvalue; struct name_table_entry const *ptr; @@ -159,10 +160,9 @@ _nc_find_entry */ NCURSES_EXPORT(struct name_table_entry const *) -_nc_find_type_entry -(const char *string, - int type, - const struct name_table_entry *table) +_nc_find_type_entry(const char *string, + int type, + const struct name_table_entry *table) { struct name_table_entry const *ptr;