/*=================================== * valueofbool_obj -- Find object value of entry * BOOLEAN *there: [OUT] FALSE if not found *=================================*/ VPTR valueofbool_obj (TABLE tab, CNSTRING key, BOOLEAN *there) { ASSERT(tab); ASSERT(tab->vtable == &vtable_for_table); ASSERT(tab->valtype == TB_OBJ); if (tab->rbtree) { return rb_valueof(tab->rbtree, key, there); } else { return find_hashtab(tab->hashtab, key, there); } }
/*=============================== * valueof_obj -- Find object value of entry *=============================*/ VPTR valueof_obj (TABLE tab, CNSTRING key) { ASSERT(tab); ASSERT(tab->vtable == &vtable_for_table); ASSERT(tab->valtype == TB_OBJ); if (tab->rbtree) { return get_rb_value(tab->rbtree, key); } else { return find_hashtab(tab->hashtab, key, NULL); } }
/*=============================== * valueof_str -- Find string value of entry *=============================*/ STRING valueof_str (TABLE tab, CNSTRING key) { ASSERT(tab); ASSERT(tab->vtable == &vtable_for_table); ASSERT(tab->valtype == TB_STR); if (tab->rbtree) { return (STRING)get_rb_value(tab->rbtree, key); } else { return (STRING)find_hashtab(tab->hashtab, key, NULL); } }
/*=================================== * valueofbool_int -- Find pointer value of entry * BOOLEAN *there: [OUT] FALSE if not found *=================================*/ INT valueofbool_int (TABLE tab, CNSTRING key, BOOLEAN *there) { INT * val=0; ASSERT(tab); ASSERT(tab->vtable == &vtable_for_table); ASSERT(tab->valtype == TB_INT); if (tab->rbtree) { val = (INT *)rb_valueof(tab->rbtree, key, there); } else { val = find_hashtab(tab->hashtab, key, there); } return val ? *val : 0; }
/*=============================== * valueof_int -- Find int value of entry * return 0 if missing * Created: 2001/06/03 (Perry Rapp) *=============================*/ INT valueof_int (TABLE tab, CNSTRING key) { INT * val=0; ASSERT(tab); ASSERT(tab->vtable == &vtable_for_table); ASSERT(tab->valtype == TB_INT); if (tab->rbtree) { val = get_rb_value(tab->rbtree, key); } else { val = find_hashtab(tab->hashtab, key, NULL); } return (val ? *val : 0); }
subckt_t *spice_find_subckt(subckt_t *parent, char *name) { nodeclient_t *tc; tc=find_hashtab(parent->cktdir,(uchar *)name); return tc->payload.data.subckt; }