summaryrefslogtreecommitdiffstats
path: root/mbbsd/io.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-17 13:51:13 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-17 13:51:13 +0800
commit1b0e3ccd58a342a56779dd843abd0f5e3f1c9dea (patch)
tree12dc7038fb55d523fb6c9548e83e89720586d6de /mbbsd/io.c
parent9e11577128c92707c2db3f3e44814a3be0d7bf6f (diff)
downloadpttbbs-1b0e3ccd58a342a56779dd843abd0f5e3f1c9dea.tar
pttbbs-1b0e3ccd58a342a56779dd843abd0f5e3f1c9dea.tar.gz
pttbbs-1b0e3ccd58a342a56779dd843abd0f5e3f1c9dea.tar.bz2
pttbbs-1b0e3ccd58a342a56779dd843abd0f5e3f1c9dea.tar.lz
pttbbs-1b0e3ccd58a342a56779dd843abd0f5e3f1c9dea.tar.xz
pttbbs-1b0e3ccd58a342a56779dd843abd0f5e3f1c9dea.tar.zst
pttbbs-1b0e3ccd58a342a56779dd843abd0f5e3f1c9dea.zip
- (internal) getans -> vans
- (internal) update license git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4175 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/io.c')
-rw-r--r--mbbsd/io.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/mbbsd/io.c b/mbbsd/io.c
index ebf74f79..b2ee791d 100644
--- a/mbbsd/io.c
+++ b/mbbsd/io.c
@@ -1010,8 +1010,14 @@ getdata_buf(int line, int col, const char *prompt, char *buf, int len, int echo)
{
#ifdef TRY_VGETS
move(line, col);
- if(prompt && *prompts) outs(prompt);
- return vgetstr(buf, len, echo ? VGET_DOECHO : VGET_NOECHO, buf);
+ if(prompt && *prompt) outs(prompt);
+ if (echo == LCECHO)
+ echo = VGET_LOWERCASE;
+ else if (echo == NOECHO)
+ echo = VGET_NOECHO;
+ else
+ echo = VGET_DEFAULT;
+ return vgetstr(buf, len, echo, buf);
#else
return getdata_raw(line, col, prompt, buf, len, echo);
#endif
@@ -1023,8 +1029,14 @@ getdata_str(int line, int col, const char *prompt, char *buf, int len, int echo,
{
#ifdef TRY_VGETS
move(line, col);
- if(prompt && *prompts) outs(prompt);
- return vgetstr(buf, len, echo ? VGET_DOECHO : VGET_NOECHO, defaultstr);
+ if(prompt && *prompt) outs(prompt);
+ if (echo == LCECHO)
+ echo = VGET_LOWERCASE;
+ else if (echo == NOECHO)
+ echo = VGET_NOECHO;
+ else
+ echo = VGET_DEFAULT;
+ return vgetstr(buf, len, echo, defaultstr);
#else
// if pointer is the same, ignore copy.
if (defaultstr != buf)
@@ -1038,8 +1050,14 @@ getdata(int line, int col, const char *prompt, char *buf, int len, int echo)
{
#ifdef TRY_VGETS
move(line, col);
- if(prompt) outs(prompt);
- return vgets(buf, len, echo ? VGET_DOECHO : VGET_NOECHO);
+ if(prompt && *prompt) outs(prompt);
+ if (echo == LCECHO)
+ echo = VGET_LOWERCASE;
+ else if (echo == NOECHO)
+ echo = VGET_NOECHO;
+ else
+ echo = VGET_DEFAULT;
+ return vgets(buf, len, echo);
#else
buf[0] = 0;
return getdata_raw(line, col, prompt, buf, len, echo);