edit: Treat blank interactive input like empty input
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
4c1866285b
commit
33456b3371
3 changed files with 23 additions and 3 deletions
|
@ -405,11 +405,9 @@ getin(char *buf, char **valp)
|
|||
p = getstarg(NULL, "%c xxxxx -- thing value : ", buf);
|
||||
if (!p)
|
||||
return -1;
|
||||
if (!*p)
|
||||
return 0;
|
||||
for (; isspace(*p); p++) ;
|
||||
if (!*p)
|
||||
return -1;
|
||||
return 0;
|
||||
thing = *p;
|
||||
for (; *p && !isspace(*p); p++) ;
|
||||
for (; isspace(*p); p++) ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue