summaryrefslogtreecommitdiffstats
path: root/mbbsd/bbs.c
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-11-15 07:03:42 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-11-15 07:03:42 +0800
commite644996aa66e0e3f1ab9c14ef3135bfde2dd5912 (patch)
tree112623d73caa364e2cd30842f5f8f0163dc384b4 /mbbsd/bbs.c
parentf6e922eff16029374e8853e1c71469861c5d8997 (diff)
downloadpttbbs-e644996aa66e0e3f1ab9c14ef3135bfde2dd5912.tar
pttbbs-e644996aa66e0e3f1ab9c14ef3135bfde2dd5912.tar.gz
pttbbs-e644996aa66e0e3f1ab9c14ef3135bfde2dd5912.tar.bz2
pttbbs-e644996aa66e0e3f1ab9c14ef3135bfde2dd5912.tar.lz
pttbbs-e644996aa66e0e3f1ab9c14ef3135bfde2dd5912.tar.xz
pttbbs-e644996aa66e0e3f1ab9c14ef3135bfde2dd5912.tar.zst
pttbbs-e644996aa66e0e3f1ab9c14ef3135bfde2dd5912.zip
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1336 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/bbs.c')
-rw-r--r--mbbsd/bbs.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/mbbsd/bbs.c b/mbbsd/bbs.c
index 7dc00eda..eb357b50 100644
--- a/mbbsd/bbs.c
+++ b/mbbsd/bbs.c
@@ -581,17 +581,15 @@ do_general(int isbid)
else {
if(!isbid)
{
- sprintf(buf,"種類:");
- for(i=0; i<8 && bp->posttype[i*2]; i++)
- sprintf(buf+6+7*i,"%d.%2.2s ", i+1, bp->posttype+2*i);
- if(i==0)
- {
- strcat(buf, "1.問題 2.建議 3.討論 4.心得 5.閒聊 6.請益 "
- "7.公告 8.情報 ");
- i=8;
- }
- sprintf(buf+6+7*i,"(1-%d或不選)",i);
- getdata(21, 0, buf, save_title, 3, LCECHO);
+ move(21,0);
+ prints("種類:");
+ for(i=0; i<8 && bp->posttype[i*4]; i++)
+ strncpy(ctype[i],bp->posttype+4*i,4);
+ if(i==0) i=8;
+ for(aborted=0; aborted<i; aborted++)
+ prints("%d.%4.4s ", i+1, ctype[i]);
+ prints(buf,"(1-%d或不選)",i);
+ getdata(21, 6+7*i, buf, save_title, 3, LCECHO);
local_article = save_title[0] - '1';
if (local_article >= 0 && local_article <= 6)
snprintf(save_title, sizeof(save_title),
@@ -844,7 +842,7 @@ b_posttype(int ent, fileheader_t * fhdr, char *direct)
{
boardheader_t *bp;
int i, aborted;
- char filepath[256], genbuf[6], title[3], posttype_f, posttype[33];
+ char filepath[256], genbuf[6], title[5], posttype_f, posttype[33];
if(!currmode & MODE_BOARD) return DONOTHING;
@@ -861,7 +859,7 @@ b_posttype(int ent, fileheader_t * fhdr, char *direct)
genbuf[4]=0;
sprintf(title,"%d.",i+1);
if(!getdata_buf(2,10, title, genbuf, 5, DOECHO)) break;
- sprintf(posttype+i*4,"%4.4s", genbuf);
+ sprintf(posttype+i*4,"%-4.4s", genbuf);
if( posttype_f & (1<<i) )
{
if(getdata(2, 20, "設定範本格式?(Y/n)", genbuf, 3, LCECHO) &&