parse/htab.c
/* Looks up a key, returning NULL if
 * the value is not present. Note,
 * if NULL is a valid value, you need
 * to check with hthas() to see if it's
 * not there */
Looks up a key, returning NULL if
the value is not present. Note,
if NULL is a valid value, you need
to check with hthas() to see if it's
not there
Looks up a key returning NULL if the value is not present . Note if NULL is a valid value you need to check with hthas () to see if it ' s not there
void *htget(Htab *ht, void *k)
{
    ssize_t i;
    i = htidx(ht, k);
    if (i < 0)
        return NULL;
    else
        return ht->vals[i];
}
void * htget ( Htab * ht , void * k ) { ssize_t i ; i = htidx ( ht , k ) ; if ( i < 0 ) return NULL ; else return ht -> vals [ i ] ; }
Looks up a key, returning NULL if
 the value is not present.
Looks up a key returning NULL if the value is not present .