base/config/kconfig/symbol.c File Reference

#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <sys/utsname.h>
#include "lkc.h"

Include dependency graph for symbol.c:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Defines

#define LKC_DIRECT_LINK

Functions

void sym_add_default (struct symbol *sym, const char *def)
void sym_init (void)
enum symbol_type sym_get_type (struct symbol *sym)
const char * sym_type_name (enum symbol_type type)
propertysym_get_choice_prop (struct symbol *sym)
propertysym_get_default_prop (struct symbol *sym)
propertysym_get_range_prop (struct symbol *sym)
void sym_calc_visibility (struct symbol *sym)
symbolsym_calc_choice (struct symbol *sym)
void sym_calc_value (struct symbol *sym)
void sym_clear_all_valid (void)
void sym_set_changed (struct symbol *sym)
void sym_set_all_changed (void)
bool sym_tristate_within_range (struct symbol *sym, tristate val)
bool sym_set_tristate_value (struct symbol *sym, tristate val)
tristate sym_toggle_tristate_value (struct symbol *sym)
bool sym_string_valid (struct symbol *sym, const char *str)
bool sym_string_within_range (struct symbol *sym, const char *str)
bool sym_set_string_value (struct symbol *sym, const char *newval)
const char * sym_get_string_value (struct symbol *sym)
bool sym_is_changable (struct symbol *sym)
symbolsym_lookup (const char *name, int isconst)
symbolsym_find (const char *name)
symbolsym_check_deps (struct symbol *sym)
symbolsym_check_expr_deps (struct expr *e)
propertyprop_alloc (enum prop_type type, struct symbol *sym)
symbolprop_get_symbol (struct property *prop)
const char * prop_get_type_name (enum prop_type type)

Variables

symbol symbol_yes
int sym_change_count
symbolmodules_sym


Define Documentation

#define LKC_DIRECT_LINK
 

Definition at line 11 of file symbol.c.


Function Documentation

struct property* prop_alloc enum prop_type  type,
struct symbol sym
 

Definition at line 727 of file symbol.c.

References current_file, file::lineno, property::next, symbol::prop, and zconf_lineno().

Referenced by menu_add_prop(), and sym_add_default().

Here is the call graph for this function:

struct symbol* prop_get_symbol struct property prop  ) 
 

Definition at line 749 of file symbol.c.

References E_CHOICE, E_SYMBOL, property::expr, and expr::type.

Referenced by conf_read(), menu_finalize(), sym_calc_choice(), sym_calc_value(), and sym_set_tristate_value().

const char* prop_get_type_name enum prop_type  type  ) 
 

Definition at line 757 of file symbol.c.

References P_CHOICE, P_COMMENT, P_DEFAULT, P_MENU, P_PROMPT, P_RANGE, P_SELECT, and P_UNKNOWN.

void sym_add_default struct symbol sym,
const char *  def
 

Definition at line 35 of file symbol.c.

References expr_alloc_symbol(), P_DEFAULT, prop_alloc(), and sym_lookup().

Referenced by sym_init().

Here is the call graph for this function:

struct symbol* sym_calc_choice struct symbol sym  )  [static]
 

Definition at line 171 of file symbol.c.

References expr_calc_value(), for_all_defaults, no, prop_get_symbol(), sym_calc_visibility(), sym_get_choice_prop(), symbol::user, and symbol_value::val.

Referenced by sym_calc_value().

Here is the call graph for this function:

void sym_calc_value struct symbol sym  ) 
 

Definition at line 210 of file symbol.c.

References E_AND, E_OR, expr_calc_value(), flags, symbol::flags, mod, symbol::name, no, prop_get_symbol(), symbol::rev_dep, S_BOOLEAN, S_HEX, S_INT, S_STRING, S_TRISTATE, sym_calc_choice(), sym_calc_visibility(), sym_get_choice_prop(), sym_get_default_prop(), sym_get_type(), sym_has_value(), sym_is_choice(), sym_is_choice_value(), sym_set_changed(), SYMBOL_CHANGED, SYMBOL_VALID, SYMBOL_WRITE, expr_value::tri, symbol_value::tri, symbol::type, symbol::user, symbol_value::val, symbol::visible, and yes.

Referenced by conf_choice(), conf_expand_value(), conf_read(), conf_write(), expr_calc_value(), fill_row(), main(), menu_is_visible(), and sym_get_type().

Here is the call graph for this function:

void sym_calc_visibility struct symbol sym  )  [static]
 

Definition at line 145 of file symbol.c.

References E_OR, expr_value::expr, expr_calc_value(), for_all_prompts, no, symbol::rev_dep, sym_is_choice_value(), sym_set_changed(), expr_value::tri, tristate, and symbol::visible.

Referenced by sym_calc_choice(), and sym_calc_value().

Here is the call graph for this function:

struct symbol* sym_check_deps struct symbol sym  ) 
 

Referenced by conf_parse(), and sym_check_expr_deps().

struct symbol* sym_check_expr_deps struct expr e  )  [static]
 

Definition at line 661 of file symbol.c.

References E_AND, E_EQUAL, E_NOT, E_OR, E_SYMBOL, E_UNEQUAL, expr_data::expr, expr::right, expr_data::sym, sym_check_deps(), and expr::type.

Referenced by sym_check_deps().

Here is the call graph for this function:

void sym_clear_all_valid void   ) 
 

Definition at line 322 of file symbol.c.

References for_all_symbols, sym_change_count, and SYMBOL_VALID.

Referenced by conf_write(), sym_set_string_value(), and sym_set_tristate_value().

struct symbol* sym_find const char *  name  ) 
 

Definition at line 630 of file symbol.c.

References symbol::next, SYMBOL_CONST, symbol_hash, symbol_mod, and symbol_yes.

Referenced by conf_read().

struct property* sym_get_choice_prop struct symbol sym  ) 
 

Definition at line 112 of file symbol.c.

References for_all_choices.

Referenced by conf_read(), menu_finalize(), sym_calc_choice(), sym_calc_value(), and sym_set_tristate_value().

struct property* sym_get_default_prop struct symbol sym  ) 
 

Definition at line 121 of file symbol.c.

References expr_calc_value(), for_all_defaults, and no.

Referenced by sym_calc_value().

Here is the call graph for this function:

struct property* sym_get_range_prop struct symbol sym  ) 
 

Definition at line 133 of file symbol.c.

References expr_calc_value(), for_all_properties, no, and P_RANGE.

Referenced by sym_string_within_range().

Here is the call graph for this function:

const char* sym_get_string_value struct symbol sym  ) 
 

Definition at line 556 of file symbol.c.

References mod, no, S_BOOLEAN, S_TRISTATE, sym_get_tristate_value(), tristate, symbol::type, and yes.

Referenced by build_conf(), conf_expand_value(), conf_string(), conf_sym(), conf_write(), expr_calc_value(), fill_row(), and main().

Here is the call graph for this function:

enum symbol_type sym_get_type struct symbol sym  ) 
 

Definition at line 75 of file symbol.c.

References modules_sym, no, S_BOOLEAN, S_TRISTATE, sym_calc_value(), sym_is_choice_value(), symbol_type, symbol::type, symbol::visible, and yes.

Referenced by build_conf(), change_sym_value(), conf_askvalue(), conf_choice(), conf_sym(), fill_row(), sym_calc_value(), and sym_tristate_within_range().

Here is the call graph for this function:

void sym_init void   ) 
 

Definition at line 42 of file symbol.c.

References S_STRING, sym_add_default(), sym_lookup(), and SYMBOL_AUTO.

Referenced by conf_parse().

Here is the call graph for this function:

bool sym_is_changable struct symbol sym  ) 
 

Definition at line 579 of file symbol.c.

References symbol::rev_dep, expr_value::tri, and symbol::visible.

Referenced by build_conf(), check_conf(), conf_askvalue(), and conf_choice().

struct symbol* sym_lookup const char *  name,
int  isconst
 

Definition at line 584 of file symbol.c.

References symbol::next, S_UNKNOWN, SYMBOL_CONST, symbol_hash, symbol_mod, SYMBOL_NEW, and symbol_yes.

Referenced by conf_expand_value(), conf_parse(), main(), sym_add_default(), and sym_init().

void sym_set_all_changed void   ) 
 

Definition at line 343 of file symbol.c.

References for_all_symbols, and sym_set_changed().

Referenced by sym_set_tristate_value().

Here is the call graph for this function:

void sym_set_changed struct symbol sym  ) 
 

Definition at line 332 of file symbol.c.

References symbol::flags, MENU_CHANGED, property::next, symbol::prop, and SYMBOL_CHANGED.

Referenced by sym_calc_value(), sym_calc_visibility(), sym_set_all_changed(), sym_set_string_value(), and sym_set_tristate_value().

bool sym_set_string_value struct symbol sym,
const char *  newval
 

Definition at line 507 of file symbol.c.

References symbol::flags, mod, no, S_BOOLEAN, S_HEX, S_TRISTATE, sym_clear_all_valid(), sym_set_changed(), sym_set_tristate_value(), sym_string_within_range(), SYMBOL_NEW, symbol::type, symbol::user, symbol_value::val, and yes.

Referenced by conf_string(), and renderer_edited().

Here is the call graph for this function:

bool sym_set_tristate_value struct symbol sym,
tristate  val
 

Definition at line 371 of file symbol.c.

References symbol::flags, modules_sym, prop_get_symbol(), sym_clear_all_valid(), sym_get_choice_prop(), sym_get_tristate_value(), sym_is_choice_value(), sym_set_all_changed(), sym_set_changed(), sym_tristate_within_range(), SYMBOL_NEW, symbol_value::tri, tristate, symbol::user, and yes.

Referenced by change_sym_value(), conf(), conf_choice(), conf_sym(), sym_set_choice_value(), sym_set_string_value(), sym_toggle_tristate_value(), and toggle_sym_value().

Here is the call graph for this function:

bool sym_string_valid struct symbol sym,
const char *  str
 

Definition at line 422 of file symbol.c.

References S_BOOLEAN, S_HEX, S_INT, S_STRING, S_TRISTATE, and symbol::type.

Referenced by conf_read(), menu_finalize(), and sym_string_within_range().

bool sym_string_within_range struct symbol sym,
const char *  str
 

Definition at line 465 of file symbol.c.

References mod, no, S_BOOLEAN, S_HEX, S_INT, S_STRING, S_TRISTATE, sym_get_range_prop(), sym_string_valid(), sym_tristate_within_range(), symbol::type, and yes.

Referenced by conf_read(), and sym_set_string_value().

Here is the call graph for this function:

tristate sym_toggle_tristate_value struct symbol sym  ) 
 

Definition at line 399 of file symbol.c.

References mod, no, sym_get_tristate_value(), sym_set_tristate_value(), tristate, and yes.

Referenced by conf().

Here is the call graph for this function:

bool sym_tristate_within_range struct symbol sym,
tristate  val
 

Definition at line 352 of file symbol.c.

References mod, no, symbol::rev_dep, S_BOOLEAN, S_TRISTATE, sym_get_type(), sym_is_choice_value(), expr_value::tri, tristate, symbol::visible, and yes.

Referenced by change_sym_value(), conf_askvalue(), conf_sym(), fill_row(), sym_set_tristate_value(), sym_string_within_range(), and toggle_sym_value().

Here is the call graph for this function:

const char* sym_type_name enum symbol_type  type  ) 
 

Definition at line 91 of file symbol.c.

References S_BOOLEAN, S_HEX, S_INT, S_OTHER, S_STRING, S_TRISTATE, and S_UNKNOWN.

Referenced by menu_set_type().


Variable Documentation

struct symbol* modules_sym
 

Definition at line 33 of file symbol.c.

Referenced by conf_parse(), conf_write(), menu_check_dep(), sym_get_type(), and sym_set_tristate_value().

int sym_change_count
 

Definition at line 32 of file symbol.c.

Referenced by conf_parse(), conf_read(), conf_write(), and sym_clear_all_valid().

struct symbol symbol_yes
 

Initial value:

{ .name = "y", .curr = { "y", yes }, .flags = SYMBOL_YES|SYMBOL_VALID, } symbol_mod = { .name = "m", .curr = { "m", mod }, .flags = SYMBOL_MOD|SYMBOL_VALID, } symbol_no = { .name = "n", .curr = { "n", no }, .flags = SYMBOL_NO|SYMBOL_VALID, } symbol_empty = { .name = "", .curr = { "", no }, .flags = SYMBOL_VALID, }
Definition at line 14 of file symbol.c.

Referenced by __expr_eliminate_eq(), expr_depends_symbol(), expr_eliminate_dups1(), expr_eliminate_dups2(), expr_eliminate_yn(), expr_extract_eq(), expr_is_yes(), expr_join_and(), expr_join_or(), expr_trans_compare(), expr_transform(), sym_find(), and sym_lookup().


Generated on Thu Nov 20 11:51:54 2008 for RTAI API by doxygen 1.3.8