summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/visio.h2
-rw-r--r--mbbsd/io.c2
-rw-r--r--mbbsd/visio.c3
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;
diff --git a/mbbsd/io.c b/mbbsd/io.c
index 8e81ad1e..33571109 100644
--- a/mbbsd/io.c
+++ b/mbbsd/io.c
@@ -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))
{