From 6ca8a092219b016c1c3304761216be18f375cc82 Mon Sep 17 00:00:00 2001 From: piaip Date: Fri, 14 Oct 2011 08:40:42 +0000 Subject: decrease default post topic length git-svn-id: http://opensvn.csie.org/pttbbs/trunk@5427 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- pttbbs/include/pttstruct.h | 4 ++++ pttbbs/mbbsd/bbs.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pttbbs/include/pttstruct.h b/pttbbs/include/pttstruct.h index cbfbf689..e987f0c6 100644 --- a/pttbbs/include/pttstruct.h +++ b/pttbbs/include/pttstruct.h @@ -249,6 +249,10 @@ typedef struct boardheader_t { /* 256 bytes */ #define TTLEN 64 /* Length of title */ #define FNLEN 28 /* Length of filename */ +// Prefix of str_reply and str_forward usually needs longer. +// In artitlcle list, the normal length is (80-34)=46. +#define DISP_TTLEN 46 + typedef struct fileheader_t { /* 128 bytes */ char filename[FNLEN]; /* M.1120582370.A.1EA [19+1], create time */ time4_t modified; /* last modified time */ diff --git a/pttbbs/mbbsd/bbs.c b/pttbbs/mbbsd/bbs.c index 5e1b0b66..7a406834 100644 --- a/pttbbs/mbbsd/bbs.c +++ b/pttbbs/mbbsd/bbs.c @@ -1218,7 +1218,8 @@ do_general(int garbage) } while (1); do { - getdata_buf(22, 0, "¼ÐÃD¡G", tmp_title, TTLEN, DOECHO); + getdata_buf(22, 0, "¼ÐÃD¡G", tmp_title, + DISP_TTLEN + (t_columns - 80), DOECHO); strip_ansi(tmp_title, tmp_title, STRIP_ALL); if (!is_tn_allowed(tmp_title)) -- cgit v1.2.3