int conf_string(struct menu *menu)
{
struct symbol *sym = menu->sym;
- const char *def, *help;
+ const char *def;
while (1) {
printf("%*s%s ", indent - 1, "", menu->prompt->text);
case '?':
/* print help */
if (line[1] == '\n') {
- help = nohelp_text;
- if (menu->sym->help)
- help = menu->sym->help;
- printf("\n%s\n", menu->sym->help);
+ printf("\n%s\n", menu->sym->help ? menu->sym->help : nohelp_text);
def = NULL;
break;
}
static int conf_sym(struct menu *menu)
{
struct symbol *sym = menu->sym;
- int type;
tristate oldval, newval;
const char *help;
printf("%*s%s ", indent - 1, "", menu->prompt->text);
if (sym->name)
printf("(%s) ", sym->name);
- type = sym_get_type(sym);
putchar('[');
oldval = sym_get_tristate_value(sym);
switch (oldval) {
{
struct symbol *sym, *def_sym;
struct menu *child;
- int type;
bool is_new;
sym = menu->sym;
- type = sym_get_type(sym);
is_new = !sym_has_value(sym);
if (sym_is_changable(sym)) {
conf_sym(menu);
{
int i, x, y, cur_x, cur_y, fpos, key = 0;
int passed_end;
- char search_term[MAX_LEN + 1];
WINDOW *dialog, *text;
- search_term[0] = '\0'; /* no search term entered yet */
-
/* Open input file for reading */
if ((fd = open(file, O_RDONLY)) == -1) {
endwin();
*/
static void print_line(WINDOW * win, int row, int width)
{
- int y, x;
char *line;
line = get_line();
waddch(win, ' ');
waddnstr(win, line, MIN(strlen(line), width - 2));
- getyx(win, y, x);
/* Clear 'residue' of previous line */
#if OLD_NCURSES
{
int i;
+ int y, x;
+
+ getyx(win, y, x);
for (i = 0; i < width - x; i++)
waddch(win, ' ');
}