one has entered invalid data (like an incomplete IP).
Their was no feedback about this, though.
Apply a patch from Peter Postma that gives feedback in this case.
Closes problem noted when re-testing PR 16937.
* hide the cursor everywhere except in forms (looks nicer)
* fix repaint with lists (from TODO)
* fix the form page (removes XXX)
* force a pos_form_cursor() after every keypress in the forms
to ensure that the selected field got the focus.
* tweak the status message a bit.
I've made a patch for sushi(8) for setting environment variables at startup.
This might be useful when a user needs a different terminal type.
The patch also fixes the searchpaths when the config file does not
contain any.
Also, change the way console input is passed to the subprocess -- instead of
echoing it in sushi, instead set the pty to cooked mode and have it do any
echoing. This will work better if we have scripts that accept input (sometimes
we don't want it visible; e.g. if it's a password) and also has the side effect
of allowing a command to be interrupted with ^C.
that for form subwindow, which may be NULL (or is always, even?).
This fixes SIGSEGV when one goes to
Network related configuration -> Modify the hosts file -> Delete host entries
and presses F1 (Help).
process_{pre,}form(): g/c unnecessary malloc, plug memory leak
gen_list(): only check ftp->list after realloc()
handle_{pre,}form(): allocate F[] via calloc(3), so that the memory is
properly zeroed
to get amount of fields on the form instead.
This fixes a SIGSEGV problem I encountered, and possibly also the crash part
of bin/17718 by Grant Beattie.
policy and the data dependent initialization is very fragile. I.e.
the code assumes because the data entry is of type foo, it has
initialized certain fields and others not.
- make sure list is not NULL before you use it.
- don't realloc on every loop iteration!
- don't increment i when there are short lines; leads to uninitialized
list[i] entries [fixes bills' core-dump, hi bill!]
- don't allocate:
char *p = malloc(len * sizeof(char *))
when you mean:
char *p = malloc(len)
- eliminate duplicated code by creating functions and try not to wrap
- use mvwinnstr instead of mvwinstr