summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-03 23:32:15 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-03-03 23:32:15 +0800
commitc8a46a1e88d4cca6af4cbb4414e9d560aee7ef28 (patch)
tree882da017ac7b51a63f6547ad34b5376a4cb80184
parent34ebdaac0225336a35d8f0b89b5ee5b6c5ec29ba (diff)
downloadpttbbs-c8a46a1e88d4cca6af4cbb4414e9d560aee7ef28.tar
pttbbs-c8a46a1e88d4cca6af4cbb4414e9d560aee7ef28.tar.gz
pttbbs-c8a46a1e88d4cca6af4cbb4414e9d560aee7ef28.tar.bz2
pttbbs-c8a46a1e88d4cca6af4cbb4414e9d560aee7ef28.tar.lz
pttbbs-c8a46a1e88d4cca6af4cbb4414e9d560aee7ef28.tar.xz
pttbbs-c8a46a1e88d4cca6af4cbb4414e9d560aee7ef28.tar.zst
pttbbs-c8a46a1e88d4cca6af4cbb4414e9d560aee7ef28.zip
fix input length of voting
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@683 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/vote.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/mbbsd/vote.c b/mbbsd/vote.c
index 618da18a..a71040c9 100644
--- a/mbbsd/vote.c
+++ b/mbbsd/vote.c
@@ -1,4 +1,4 @@
-/* $Id: vote.c,v 1.18 2003/01/19 16:06:06 kcwu Exp $ */
+/* $Id: vote.c,v 1.19 2003/03/03 15:32:15 in2 Exp $ */
#include "bbs.h"
static int total;
@@ -704,9 +704,17 @@ vote_maintain(char *bname)
outs("\n請依序輸入選項, 按 ENTER 完成設定");
num = 0;
while (!aborted) {
+ if( num % 15 == 0 ){
+ for( i = num ; i < num + 15 ; ++i ){
+ snprintf(buf, sizeof(buf), "\033[1;30m%c)\033[m ", i + 'A');
+ move((i % 15) + 2, (i / 15) * 40);
+ prints(buf);
+ }
+ refresh();
+ }
snprintf(buf, sizeof(buf), "%c) ", num + 'A');
getdata((num % 15) + 2, (num / 15) * 40, buf,
- inbuf, 50, DOECHO);
+ inbuf, 37, DOECHO);
if (*inbuf) {
fprintf(fp, "%1c) %s\n", (num + 'A'), inbuf);
num++;