From e644996aa66e0e3f1ab9c14ef3135bfde2dd5912 Mon Sep 17 00:00:00 2001 From: ptt Date: Fri, 14 Nov 2003 23:03:42 +0000 Subject: git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1336 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/announce.c | 9 +++------ mbbsd/bbs.c | 24 +++++++++++------------- mbbsd/board.c | 13 ++++--------- mbbsd/friend.c | 5 ++--- mbbsd/kaede.c | 18 +++++++++++++++++- 5 files changed, 37 insertions(+), 32 deletions(-) (limited to 'mbbsd') diff --git a/mbbsd/announce.c b/mbbsd/announce.c index c3a267a9..c316db20 100644 --- a/mbbsd/announce.c +++ b/mbbsd/announce.c @@ -346,20 +346,19 @@ a_pasteitem(menu_t * pm, int mode) if (HAS_PERM(PERM_BBSADM)) Link(copyfile, newpath); else { - snprintf(buf, sizeof(buf), - "/bin/cp %s %s", copyfile, newpath); - system(buf); + Copy(copyfile, newpath); } } else if (dashf(copyfile)) { stampfile(newpath, &item); memcpy(copytitle, "◇", 2); - snprintf(buf, sizeof(buf), "/bin/cp %s %s", copyfile, newpath); + Copy(copyfile, newpath); } else if (dashd(copyfile)) { stampdir(newpath, &item); memcpy(copytitle, "◆", 2); snprintf(buf, sizeof(buf), "/bin/cp -r %s/* %s/.D* %s", copyfile, copyfile, newpath); + system(buf); } else { outs("無法拷貝!"); igetch(); @@ -368,8 +367,6 @@ a_pasteitem(menu_t * pm, int mode) strlcpy(item.owner, *copyowner ? copyowner : cuser.userid, sizeof(item.owner)); strlcpy(item.title, copytitle, sizeof(item.title)); - if (!*copyowner) - system(buf); a_additem(pm, &item); copyfile[0] = '\0'; } 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= 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<