summaryrefslogtreecommitdiffstats
path: root/mbbsd/screen.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-09-11 15:16:49 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-09-11 15:16:49 +0800
commit3e667e8bf274223b49012acc74707b3651668fe3 (patch)
tree3a89166476349056e32a285c3054b9704f95d5f9 /mbbsd/screen.c
parentf190a09af728c61ad2118cf908c6d831e8a594cf (diff)
downloadpttbbs-3e667e8bf274223b49012acc74707b3651668fe3.tar
pttbbs-3e667e8bf274223b49012acc74707b3651668fe3.tar.gz
pttbbs-3e667e8bf274223b49012acc74707b3651668fe3.tar.bz2
pttbbs-3e667e8bf274223b49012acc74707b3651668fe3.tar.lz
pttbbs-3e667e8bf274223b49012acc74707b3651668fe3.tar.xz
pttbbs-3e667e8bf274223b49012acc74707b3651668fe3.tar.zst
pttbbs-3e667e8bf274223b49012acc74707b3651668fe3.zip
not only long screen, but also width screen
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@518 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/screen.c')
-rw-r--r--mbbsd/screen.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/mbbsd/screen.c b/mbbsd/screen.c
index 0dc36811..fb367618 100644
--- a/mbbsd/screen.c
+++ b/mbbsd/screen.c
@@ -1,11 +1,10 @@
-/* $Id: screen.c,v 1.9 2002/09/11 03:22:50 kcwu Exp $ */
+/* $Id: screen.c,v 1.10 2002/09/11 07:16:49 kcwu Exp $ */
#include "bbs.h"
#ifdef SUPPORT_GB
static int current_font_type = TYPE_BIG5;
static int gbinited = 0;
#endif
-#define SCR_WIDTH 80
#define o_clear() output(clearbuf,clearbuflen)
#define o_cleol() output(cleolbuf,cleolbuflen)
#define o_scrollrev() output(scrollrev,scrollrevlen)
@@ -119,6 +118,7 @@ redoscr()
output((char *)bp->data, len);
tc_col += len;
if (tc_col >= t_columns) {
+ /* XXX Is this code right? */
if (automargins)
tc_col = t_columns - 1;
else {
@@ -182,12 +182,15 @@ refresh()
output((char *)&bp->data[bp->smod], bp->emod - bp->smod + 1);
tc_col = bp->emod + 1;
if (tc_col >= t_columns) {
- if (automargins) {
+ /* XXX Is this code right? */
+ if (automargins)
+ tc_col = t_columns - 1;
+ else {
tc_col -= t_columns;
- if (++tc_line >= t_lines)
+ tc_line++;
+ if (tc_line >= t_lines)
tc_line = b_lines;
- } else
- tc_col = t_columns - 1;
+ }
}
}
if (bp->oldlen > len) {
@@ -423,7 +426,7 @@ edit_outs(char *text)
if (current_font_type == TYPE_GB)
text = hc_convert_str(text, HC_BIGtoGB, HC_DO_SINGLE);
#endif
- while ((ch = *text++) && (++column < SCR_WIDTH))
+ while ((ch = *text++) && (++column < t_columns))
outch(ch == 27 ? '*' : ch);
return 0;