diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-19 10:15:26 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2008-04-19 10:15:26 +0800 |
commit | a96135fe6dd80a66d618b922827794225e4f23d0 (patch) | |
tree | 102520522b476403b6a720327541e4beae94f509 /mbbsd | |
parent | 079854fba142e7c5d52293c88e9fba8aa51dfa0c (diff) | |
download | pttbbs-a96135fe6dd80a66d618b922827794225e4f23d0.tar pttbbs-a96135fe6dd80a66d618b922827794225e4f23d0.tar.gz pttbbs-a96135fe6dd80a66d618b922827794225e4f23d0.tar.bz2 pttbbs-a96135fe6dd80a66d618b922827794225e4f23d0.tar.lz pttbbs-a96135fe6dd80a66d618b922827794225e4f23d0.tar.xz pttbbs-a96135fe6dd80a66d618b922827794225e4f23d0.tar.zst pttbbs-a96135fe6dd80a66d618b922827794225e4f23d0.zip |
- fix LCECHO issue (cannot input chinese in some places)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4198 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/read.c | 5 | ||||
-rw-r--r-- | mbbsd/stuff.c | 8 | ||||
-rw-r--r-- | mbbsd/user.c | 4 | ||||
-rw-r--r-- | mbbsd/vote.c | 2 |
4 files changed, 10 insertions, 9 deletions
diff --git a/mbbsd/read.c b/mbbsd/read.c index 416be19c..257d8a3d 100644 --- a/mbbsd/read.c +++ b/mbbsd/read.c @@ -469,6 +469,7 @@ select_read(const keeploc_t * locmem, int sr_mode) " (<0則搜噓文數) " #endif // OLDRECOMMEND "的文章: ", + // 因為有負數所以暫時不能用 NUMECHO keyword, 7, LCECHO) || (n_recommend = atoi(keyword)) == 0 )) return READ_REDRAW; } @@ -478,7 +479,7 @@ select_read(const keeploc_t * locmem, int sr_mode) !getdata(b_lines, 0, (currmode & MODE_SELECT) ? "增加條件 文章價格: ":"搜尋價格高於多少的文章: ", - keyword, 7, LCECHO) || (n_money = atoi(keyword)) <= 0 )) + keyword, 7, NUMECHO) || (n_money = atoi(keyword)) <= 0 )) return READ_REDRAW; strcat(keyword, "M"); } @@ -694,7 +695,7 @@ i_read_key(const onekey_t * rcmdlist, keeploc_t * locmem, char *sp; int n = -1; - if(!getdata(b_lines, 0, "搜尋" AID_DISPLAYNAME ": #", aidc, 20, LCECHO)) + if(!getdata(b_lines, 0, "搜尋" AID_DISPLAYNAME ": #", aidc, 20, DOECHO)) { move(b_lines, 0); clrtoeol(); diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c index a3e2ba3a..03b05d3c 100644 --- a/mbbsd/stuff.c +++ b/mbbsd/stuff.c @@ -134,22 +134,22 @@ gettime(int line, time4_t dt, const char*head) move(line, 0); outs(head); i=strlen(head); do { - getdata_buf(line, i, " 西元年:", yn, 5, LCECHO); + getdata_buf(line, i, " 西元年:", yn, 5, NUMECHO); // signed: limited on (2037, ...) // unsigned: limited on (..., 1970) // let's restrict inside the boundary. } while ((endtime.tm_year = atoi(yn) - 1900) < 70 || endtime.tm_year > 135); snprintf(yn, sizeof(yn), "%d", ptime->tm_mon + 1); do { - getdata_buf(line, i+15, "月:", yn, 3, LCECHO); + getdata_buf(line, i+15, "月:", yn, 3, NUMECHO); } while ((endtime.tm_mon = atoi(yn) - 1) < 0 || endtime.tm_mon > 11); snprintf(yn, sizeof(yn), "%d", ptime->tm_mday); do { - getdata_buf(line, i+24, "日:", yn, 3, LCECHO); + getdata_buf(line, i+24, "日:", yn, 3, NUMECHO); } while ((endtime.tm_mday = atoi(yn)) < 1 || endtime.tm_mday > 31); snprintf(yn, sizeof(yn), "%d", ptime->tm_hour); do { - getdata_buf(line, i+33, "時(0-23):", yn, 3, LCECHO); + getdata_buf(line, i+33, "時(0-23):", yn, 3, NUMECHO); } while ((endtime.tm_hour = atoi(yn)) < 0 || endtime.tm_hour > 23); t = mktime(&endtime); /* saturation check */ diff --git a/mbbsd/user.c b/mbbsd/user.c index 8d8474f7..035f2fcc 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -653,12 +653,12 @@ uinfo_query(userec_t *u, int adminmode, int unum) buf[0] = 0; if (x.mobile) snprintf(buf, sizeof(buf), "%010d", x.mobile); - getdata_buf(y++, 0, "手機號碼:", buf, 11, LCECHO); + getdata_buf(y++, 0, "手機號碼:", buf, 11, NUMECHO); x.mobile = atoi(buf); snprintf(genbuf, sizeof(genbuf), "%d", (u->sex + 1) % 8); getdata_str(y++, 0, "性別 (1)葛格 (2)姐接 (3)底迪 (4)美眉 (5)薯叔 " "(6)阿姨 (7)植物 (8)礦物:", - buf, 3, DOECHO, genbuf); + buf, 3, NUMECHO, genbuf); if (buf[0] >= '1' && buf[0] <= '8') x.sex = (buf[0] - '1') % 8; else diff --git a/mbbsd/vote.c b/mbbsd/vote.c index 325aa953..e27279dd 100644 --- a/mbbsd/vote.c +++ b/mbbsd/vote.c @@ -606,7 +606,7 @@ vote_maintain(const char *bname) move(0, 0); prints("第 %d 號投票\n", x); setbfile(buf, bname, vbuf.title); - getdata(4, 0, "請輸入投票名稱:", inbuf, 50, LCECHO); + getdata(4, 0, "請輸入投票名稱:", inbuf, 50, DOECHO); if (inbuf[0] == '\0') strlcpy(inbuf, "不知名的", sizeof(inbuf)); fp = fopen(buf, "w"); |