From 91f6682a7690a4dd6ae160804b2009a0a98f8122 Mon Sep 17 00:00:00 2001 From: ptt Date: Fri, 23 Apr 2004 16:26:20 +0000 Subject: integrate igetkey igetch egetch git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1828 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/edit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mbbsd/edit.c') diff --git a/mbbsd/edit.c b/mbbsd/edit.c index acc7bac0..897c7178 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -258,7 +258,7 @@ ask(char *prompt) standout(); prints("%s", prompt); standend(); - ch = igetkey(); + ch = igetch(); move(0, 0); clrtoeol(); return (ch); @@ -1682,7 +1682,7 @@ vedit(char *fpath, int saveheader, int *islocal) move(curr_window_line, ch); if (!line_dirty && strcmp(line, currline->data)) strcpy(line, currline->data); - ch = igetkey(); + ch = igetch(); /* jochang debug */ if ((interval = (now - th))) { th = now; -- cgit v1.2.3 From b282f3c6dca2a15ef4da7ee6c1f970e5ae926b67 Mon Sep 17 00:00:00 2001 From: ptt Date: Fri, 23 Apr 2004 20:14:20 +0000 Subject: reoragnize functions mprints, pprints -> mouts remove useless refresh, pressanykey(), sleep,... git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1833 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/edit.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mbbsd/edit.c') diff --git a/mbbsd/edit.c b/mbbsd/edit.c index 897c7178..f9cb439a 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -965,8 +965,7 @@ write_file(char *fpath, int saveheader, int *islocal) switch (ans[0]) { case 'a': - outs("文章\033[1m 沒有 \033[m存入"); - safe_sleep(1); + vmsg("文章\033[1m 沒有 \033[m存入"); aborted = -1; break; case 'r': -- cgit v1.2.3 From 77977eec595648e9143769c7993c65490b753b99 Mon Sep 17 00:00:00 2001 From: ptt Date: Fri, 23 Apr 2004 20:49:16 +0000 Subject: modify a little for vmsg git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1837 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/edit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mbbsd/edit.c') diff --git a/mbbsd/edit.c b/mbbsd/edit.c index f9cb439a..02eca6b2 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -965,7 +965,7 @@ write_file(char *fpath, int saveheader, int *islocal) switch (ans[0]) { case 'a': - vmsg("文章\033[1m 沒有 \033[m存入"); + outs("文章\033[1m 沒有 \033[m存入"); aborted = -1; break; case 'r': @@ -2022,7 +2022,7 @@ vedit(char *fpath, int saveheader, int *islocal) case '\n': #ifdef MAX_EDIT_LINE if( totaln == MAX_EDIT_LINE ){ - vmsg("MAX_EDIT_LINE exceed"); + outs("MAX_EDIT_LINE exceed"); break; } #endif -- cgit v1.2.3 From b35685ff078b08f1b87bbe12ab3422e8abaf19c0 Mon Sep 17 00:00:00 2001 From: ptt Date: Sat, 24 Apr 2004 01:29:10 +0000 Subject: =?UTF-8?q?little=20bug=20report=20fixed=20=20=E4=BD=9C=E8=80=85?= =?UTF-8?q?=20=20Toy=20(WeiTing)=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20=E7=9C=8B=E6=9D=BF=20=20SYSOP=20=20=E6=A8=99?= =?UTF-8?q?=E9=A1=8C=20=20=E8=89=B2=E7=A2=BC=E8=BC=B8=E5=85=A5=E7=84=A1?= =?UTF-8?q?=E6=B3=95=E6=AD=A3=E5=B8=B8=E9=81=8B=E4=BD=9C.=20=20=E6=99=82?= =?UTF-8?q?=E9=96=93=20=20Fri=20Apr=2023=2018:13:42=202004=20=E2=94=80?= =?UTF-8?q?=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80?= =?UTF-8?q?=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80?= =?UTF-8?q?=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80?= =?UTF-8?q?=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80?= =?UTF-8?q?=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80?= =?UTF-8?q?=E2=94=80=E2=94=80=E2=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 嗆ctrl+v脣丕NSI ctrl+c頛詨亦脩Ⅳ⊥甇撣賊雿 暻餌孟ysop鈭:) git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1839 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/edit.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'mbbsd/edit.c') 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); -- cgit v1.2.3