Changeset 3223
- Timestamp:
- 07/16/07 13:06:39 (1 year ago)
- Files:
-
- trunk/freewrt/tools/config (modified) (1 prop)
- trunk/freewrt/tools/config/Makefile (modified) (2 diffs)
- trunk/freewrt/tools/config/expr.h (modified) (2 diffs)
- trunk/freewrt/tools/config/lex.zconf.c_shipped (deleted)
- trunk/freewrt/tools/config/mconf.c (modified) (2 diffs)
- trunk/freewrt/tools/config/menu.c (modified) (2 diffs)
- trunk/freewrt/tools/config/symbol.c (modified) (6 diffs)
- trunk/freewrt/tools/config/zconf.tab.c_shipped (deleted)
- trunk/freewrt/tools/config/zconf.tab.h_shipped (deleted)
- trunk/freewrt/tools/config/zconf.y (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/freewrt/tools/config
- Property svn:ignore changed from
conf
info.mk
lex.zconf.c
lkc_defs.h
mconf
tags
zconf.tab.c
zconf.tab.h
to
conf
info.mk
lex.backup
lex.zconf.c
lkc_defs.h
mconf
tags
zconf.output
zconf.tab.c
zconf.tab.h
- Property svn:ignore changed from
trunk/freewrt/tools/config/Makefile
r3092 r3223 69 69 # By default we use the _shipped versions, uncomment the 70 70 # following line if you are modifying the flex/bison src. 71 #LKC_GENPARSER:= 171 LKC_GENPARSER:= 1 72 72 73 73 ifdef LKC_GENPARSER … … 78 78 lex.%.c: %.l 79 79 flex -P$(notdir $*) -o$@ $< 80 81 lex.zconf.o: lex.zconf.c $(SHARED_DEPS) 82 $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ 83 84 zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(SHARED_DEPS) 85 $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ 86 80 87 else 81 88 trunk/freewrt/tools/config/expr.h
r1 r3223 75 75 struct expr *dep, *dep2; 76 76 struct expr_value rev_dep; 77 struct expr_value rev_dep_inv; 77 78 }; 78 79 … … 102 103 103 104 enum prop_type { 104 P_UNKNOWN, P_PROMPT, P_COMMENT, P_MENU, P_DEFAULT, P_CHOICE, P_SELECT, P_ RANGE105 P_UNKNOWN, P_PROMPT, P_COMMENT, P_MENU, P_DEFAULT, P_CHOICE, P_SELECT, P_SELECTNOT, P_RANGE 105 106 }; 106 107 trunk/freewrt/tools/config/mconf.c
r2532 r3223 327 327 cprint_name("[%c]", val == no ? ' ' : '*'); 328 328 else 329 cprint_name( "---");329 cprint_name(val == no ? "_ _" : "-+-"); 330 330 break; 331 331 case S_TRISTATE: … … 339 339 cprint_name("<%c>", ch); 340 340 else 341 cprint_name( "---");341 cprint_name(val == no ? "_ _" : "-+-"); 342 342 break; 343 343 default: trunk/freewrt/tools/config/menu.c
r1 r3223 167 167 break; 168 168 case P_SELECT: 169 case P_SELECTNOT: 169 170 sym2 = prop_get_symbol(prop); 170 171 if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE) … … 244 245 struct symbol *es = prop_get_symbol(prop); 245 246 es->rev_dep.expr = expr_alloc_or(es->rev_dep.expr, 247 expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep))); 248 } else if (prop->type == P_SELECTNOT) { 249 struct symbol *es = prop_get_symbol(prop); 250 es->rev_dep_inv.expr = expr_alloc_or(es->rev_dep_inv.expr, 246 251 expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep))); 247 252 } trunk/freewrt/tools/config/symbol.c
r2629 r3223 5 5 6 6 #include <ctype.h> 7 #include <stdbool.h> 7 8 #include <stdlib.h> 8 9 #include <string.h> … … 140 141 struct property *prop; 141 142 tristate tri; 143 bool deselected = false; 142 144 143 145 /* any prompt visible? */ … … 149 151 if (tri == mod && (sym->type != S_TRISTATE || modules_val == no)) 150 152 tri = yes; 153 if (sym->rev_dep_inv.expr && (expr_calc_value(sym->rev_dep_inv.expr) == yes)) { 154 tri = no; 155 deselected = true; 156 } 151 157 if (sym->visible != tri) { 152 158 sym->visible = tri; 153 159 sym_set_changed(sym); 154 160 } 155 if (sym_is_choice_value(sym) )161 if (sym_is_choice_value(sym) || deselected) 156 162 return; 157 163 tri = no; … … 249 255 prop = sym_get_choice_prop(sym); 250 256 newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no; 257 } else if (sym->rev_dep_inv.expr && (expr_calc_value(sym->rev_dep_inv.expr) == yes)) { 258 newval.tri = no; 251 259 } else if (E_OR(sym->visible, sym->rev_dep.tri) != no) { 252 260 sym->flags |= SYMBOL_WRITE; … … 702 710 703 711 for (prop = sym->prop; prop; prop = prop->next) { 704 if (prop->type == P_CHOICE || prop->type == P_SELECT )712 if (prop->type == P_CHOICE || prop->type == P_SELECT || prop->type == P_SELECTNOT) 705 713 continue; 706 714 sym2 = sym_check_expr_deps(prop->visible.expr); … … 764 772 return "choice"; 765 773 case P_SELECT: 774 case P_SELECTNOT: 766 775 return "select"; 767 776 case P_RANGE: trunk/freewrt/tools/config/zconf.y
r444 r3223 220 220 }; 221 221 222 config_option: T_SELECT T_NOT T_WORD if_expr T_EOL 223 { 224 menu_add_symbol(P_SELECTNOT, sym_lookup($3, 0), $4); 225 printd(DEBUG_PARSE, "%s:%d:selectnot\n", zconf_curname(), zconf_lineno()); 226 }; 227 222 228 config_option: T_RANGE symbol symbol if_expr T_EOL 223 229 {


