summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-24 09:29:10 +0800
committerptt <ptt@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-04-24 09:29:10 +0800
commitb35685ff078b08f1b87bbe12ab3422e8abaf19c0 (patch)
tree22b9666b65c5d344bd466c56287c4ab48ff37fa9
parentf3021d4093e35eace1044c6517cf69687acde46d (diff)
downloadpttbbs-b35685ff078b08f1b87bbe12ab3422e8abaf19c0.tar
pttbbs-b35685ff078b08f1b87bbe12ab3422e8abaf19c0.tar.gz
pttbbs-b35685ff078b08f1b87bbe12ab3422e8abaf19c0.tar.bz2
pttbbs-b35685ff078b08f1b87bbe12ab3422e8abaf19c0.tar.lz
pttbbs-b35685ff078b08f1b87bbe12ab3422e8abaf19c0.tar.xz
pttbbs-b35685ff078b08f1b87bbe12ab3422e8abaf19c0.tar.zst
pttbbs-b35685ff078b08f1b87bbe12ab3422e8abaf19c0.zip
little bug report fixed
作者 Toy (WeiTing) 看板 SYSOP 標題 色碼輸入無法正常運作. 時間 Fri Apr 23 18:13:42 2004 ─────────────────────────────────────── 當按ctrl+v進入ANSI狀態時 按ctrl+c輸入的色碼無法正常運作 麻煩sysop了:) git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1839 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/edit.c13
-rw-r--r--mbbsd/read.c2
2 files changed, 7 insertions, 8 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index 02eca6b2..eda5da08 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -1835,28 +1835,27 @@ vedit(char *fpath, int saveheader, int *islocal)
char *tmp, *apos = ans;
int fg, bg;
- strlcpy(color, "\033[", sizeof(color));
+ strcpy(color, "\033[");
if (isdigit(*apos)) {
- snprintf(color, sizeof(color),
- "%s%c", color, *(apos++));
+ sprintf(color,"%s%c", color, *(apos++));
if (*apos)
- snprintf(color, sizeof(color), "%s;", color);
+ strcat(color, ";");
}
if (*apos) {
if ((tmp = strchr(t, toupper(*(apos++)))))
fg = tmp - t + 30;
else
fg = 37;
- snprintf(color, sizeof(color), "%s%d", color, fg);
+ sprintf(color, "%s%d", color, fg);
}
if (*apos) {
if ((tmp = strchr(t, toupper(*(apos++)))))
bg = tmp - t + 40;
else
bg = 40;
- snprintf(color, sizeof(color), "%s;%d", color, bg);
+ sprintf(color, "%s;%d", color, bg);
}
- snprintf(color, sizeof(color), "%sm", color);
+ strcat(color, "m");
insert_string(color);
} else
insert_string(reset_color);
diff --git a/mbbsd/read.c b/mbbsd/read.c
index 06ed39b7..b2db9715 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -591,7 +591,7 @@ i_read_key(onekey_t * rcmdlist, char default_ch, keeploc_t * locmem,
case '8':
case '9':
if((num = search_num(ch, last_line))!=-1)
- new_ln = num;
+ new_ln = num+1;
break;
case 'q':
case 'e':