sym_validate_range(sym); 
void sym_calc_value(struct symbol *sym){	struct symbol_value newval, oldval;	struct property *prop;	struct expr *e;	if (!sym)		return;	if (sym->flags & SYMBOL_VALID)		return;	sym->flags |= SYMBOL_VALID;	oldval = sym->curr;	switch (sym->type) {	case S_INT:	case S_HEX:	case S_STRING:		newval = symbol_empty.curr;		break;	case S_BOOLEAN:	case S_TRISTATE:		newval = symbol_no.curr;		break;	default:		sym->curr.val = sym->name;		sym->curr.tri = no;		return;	}	if (!sym_is_choice_value(sym))		sym->flags &= ~SYMBOL_WRITE;	sym_calc_visibility(sym);	/* set default if recursively called */	sym->curr = newval;	switch (sym_get_type(sym)) {	case S_BOOLEAN:	case S_TRISTATE:		if (sym_is_choice_value(sym) && sym->visible == yes) {			prop = sym_get_choice_prop(sym);			newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no;		} else if (E_OR(sym->visible, sym->rev_dep.tri) != no) {			sym->flags |= SYMBOL_WRITE;			if (sym_has_value(sym))				newval.tri = sym->user.tri;			else if (!sym_is_choice(sym)) {				prop = sym_get_default_prop(sym);				if (prop)					newval.tri = expr_calc_value(prop->expr);			}			newval.tri = E_OR(E_AND(newval.tri, sym->visible), sym->rev_dep.tri);		} else if (!sym_is_choice(sym)) {			prop = sym_get_default_prop(sym);			if (prop) {				sym->flags |= SYMBOL_WRITE;				newval.tri = expr_calc_value(prop->expr);			}		}		if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN)			newval.tri = yes;		break;	case S_STRING:	case S_HEX:	case S_INT:		if (sym->visible != no) {			sym->flags |= SYMBOL_WRITE;			if (sym_has_value(sym)) {				newval.val = sym->user.val;				break;			}		}		prop = sym_get_default_prop(sym);		if (prop) {			struct symbol *ds = prop_get_symbol(prop);			if (ds) {				sym->flags |= SYMBOL_WRITE;				sym_calc_value(ds);				newval.val = ds->curr.val;			}		}		break;	default:		;	}	sym->curr = newval;	if (sym_is_choice(sym) && newval.tri == yes)		sym->curr.val = sym_calc_choice(sym);	if (memcmp(&oldval, &sym->curr, sizeof(oldval)))		sym_set_changed(sym);	if (modules_sym == sym)		modules_val = modules_sym->curr.tri;	if (sym_is_choice(sym)) {		int flags = sym->flags & (SYMBOL_CHANGED | SYMBOL_WRITE);		prop = sym_get_choice_prop(sym);		for (e = prop->expr; e; e = e->left.expr) {			e->right.sym->flags |= flags;			if (flags & SYMBOL_CHANGED)				sym_set_changed(e->right.sym);		}	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4cf3cbe2a9682242cd38897914b1f2a95f1db7e4/symbol.c/clean/scripts/kconfig/symbol.c