コード例 #1
0
ファイル: table.c プロジェクト: MarcNo/lifelines
/*===================================
 * 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);
	}
}
コード例 #2
0
ファイル: table.c プロジェクト: MarcNo/lifelines
/*===============================
 * 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);
	}
}
コード例 #3
0
ファイル: table.c プロジェクト: MarcNo/lifelines
/*===============================
 * 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);
	}


}
コード例 #4
0
ファイル: table.c プロジェクト: MarcNo/lifelines
/*===================================
 * 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;
}
コード例 #5
0
ファイル: table.c プロジェクト: MarcNo/lifelines
/*===============================
 * 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);
}
コード例 #6
0
ファイル: netlist_spice.c プロジェクト: sedic/xcircuit-3.8
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;
}