diff options
-rw-r--r-- | include/visio.h | 2 | ||||
-rw-r--r-- | mbbsd/io.c | 2 | ||||
-rw-r--r-- | mbbsd/visio.c | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/include/visio.h b/include/visio.h index 859d3a7f..f64a1e3d 100644 --- a/include/visio.h +++ b/include/visio.h @@ -54,6 +54,8 @@ #define VGET_LOWERCASE (0x02) #define VGET_DIGITS (0x04) #define VGET_TRANSPARENT (0x08) +#define VGET_ASCII_ONLY (0x10) +#define VGET_PASSWORD (VGET_NOECHO | VGET_ASCII_ONLY) // DATATYPE DEFINITION ------------------------------------------------- typedef void * VREFSCR; @@ -751,7 +751,7 @@ getdata2vgetflag(int echo) else if (echo == NUMECHO) echo = VGET_DIGITS; else if (echo == NOECHO) - echo = VGET_NOECHO; + echo = VGET_PASSWORD; else echo = VGET_DEFAULT; diff --git a/mbbsd/visio.c b/mbbsd/visio.c index 641406a2..03e835af 100644 --- a/mbbsd/visio.c +++ b/mbbsd/visio.c @@ -1052,8 +1052,7 @@ vgetstring(char *_buf, int len, int flags, const char *defstr, const VGET_CALLBA } c = tolower(c); } - // XXX for NOECHO, allow only isprint() characters? - if (flags & VGET_NOECHO) + if (flags & VGET_ASCII_ONLY) { if (!isprint(c)) { |