| 198 | */ |
| 199 | |
| 200 | HASHDATA * hash_find( struct hash * hp, OBJECT * key ) |
| 201 | { |
| 202 | ITEM * i; |
| 203 | unsigned int keyval = hash_keyval( key ); |
| 204 | |
| 205 | #ifdef HASH_DEBUG_PROFILE |
| 206 | profile_frame prof[ 1 ]; |
| 207 | if ( DEBUG_PROFILE ) |
| 208 | profile_enter( 0, prof ); |
| 209 | #endif |
| 210 | |
| 211 | if ( !hp->items.nel ) |
| 212 | { |
| 213 | #ifdef HASH_DEBUG_PROFILE |
| 214 | if ( DEBUG_PROFILE ) |
| 215 | profile_exit( prof ); |
| 216 | #endif |
| 217 | return 0; |
| 218 | } |
| 219 | |
| 220 | i = hash_search( hp, keyval, key, 0 ); |
| 221 | |
| 222 | #ifdef HASH_DEBUG_PROFILE |
| 223 | if ( DEBUG_PROFILE ) |
| 224 | profile_exit( prof ); |
| 225 | #endif |
| 226 | |
| 227 | return i ? hash_item_data( i ) : 0; |
| 228 | } |
| 229 | |
| 230 | |
| 231 | /* |
no test coverage detected