作者gaod.bbs@cpu.tfcis.org (請叫我神秘工程師) 看板: itoc
標題Re: [問題] 聊天室畫面捲動
時間動力核心 (2008/12/31 Wed 02:55:47)
maple/visio.c:
- static screenline *cur_slp; /* current screen line pointer */
+ screenline *cur_slp; /* current screen line pointer */
so/chat.c:
printchatline() 換成下面這樣
static void
printchatline(msg)
char *msg;
{
int line;
extern screenline *cur_slp;
line = chatline;
move(line, 0);
clrtoeol();
outs(msg);
outc('\n');
if (frec)
fprintf(frec, "%s\n", msg);
if (++line == stop_line) {
int i;
screenline *last_slp;
line--;
move(i = 2, 0);
last_slp = cur_slp;
while(++i <= line) {
move(i, 0);
memcpy(last_slp, cur_slp, sizeof(screenline));
last_slp->smod = 0;
last_slp->emod = ANSILINELEN;
last_slp->oldlen = ANSILINELEN;
last_slp->mode = SL_MODIFIED;
last_slp = cur_slp;
}
}
move(line, 0);
clrtoeol();
outs("\033[0m→");
clrtoeol();
chatline = line;
}
--
好想要和你一起看月亮
靠在你肩上 情話慢慢講...
▁▂▄▅▃▂▁ ‧ ●
﹋ ▲‧ . ‧﹊‧﹊ ﹊﹊
﹋ ﹋ ◢◣ . ●●ˊ
--
=[﹎:�摃�◣��:﹎Origin ]|[ ���O���� cpu.tfcis.org ]|[�搟說�﹎:]=
=[﹊:�摃�╱��:﹊Author ]|[125-232-2-216.dynamic.hine]|[���插�﹊:]=