| 316 | } |
| 317 | |
| 318 | static int conf_askvalue(struct symbol *sym, const char *def) |
| 319 | { |
| 320 | if (!sym_has_value(sym)) |
| 321 | printf("(NEW) "); |
| 322 | |
| 323 | line[0] = '\n'; |
| 324 | line[1] = 0; |
| 325 | |
| 326 | if (!sym_is_changeable(sym)) { |
| 327 | printf("%s\n", def); |
| 328 | line[0] = '\n'; |
| 329 | line[1] = 0; |
| 330 | return 0; |
| 331 | } |
| 332 | |
| 333 | switch (input_mode) { |
| 334 | case oldconfig: |
| 335 | case syncconfig: |
| 336 | if (sym_has_value(sym)) { |
| 337 | printf("%s\n", def); |
| 338 | return 0; |
| 339 | } |
| 340 | /* fall through */ |
| 341 | default: |
| 342 | fflush(stdout); |
| 343 | xfgets(line, sizeof(line), stdin); |
| 344 | break; |
| 345 | } |
| 346 | |
| 347 | return 1; |
| 348 | } |
| 349 | |
| 350 | static int conf_string(struct menu *menu) |
| 351 | { |
no test coverage detected