summaryrefslogtreecommitdiffstats
path: root/mbbsd/screen.c
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-10 14:33:16 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-01-10 14:33:16 +0800
commitaf72ae1e0a95561a00e0980650b4f2bf32201ba2 (patch)
treef74afcafedfaaf32dfac9c45cc4378f6c7497bd9 /mbbsd/screen.c
parent084b0114a3e74ffddf1b1d71f5396317a2bbc90f (diff)
downloadpttbbs-af72ae1e0a95561a00e0980650b4f2bf32201ba2.tar
pttbbs-af72ae1e0a95561a00e0980650b4f2bf32201ba2.tar.gz
pttbbs-af72ae1e0a95561a00e0980650b4f2bf32201ba2.tar.bz2
pttbbs-af72ae1e0a95561a00e0980650b4f2bf32201ba2.tar.lz
pttbbs-af72ae1e0a95561a00e0980650b4f2bf32201ba2.tar.xz
pttbbs-af72ae1e0a95561a00e0980650b4f2bf32201ba2.tar.zst
pttbbs-af72ae1e0a95561a00e0980650b4f2bf32201ba2.zip
- terminal: add newwin()
- pfterm: fix some bounadry checkings of x range git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3812 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/screen.c')
-rw-r--r--mbbsd/screen.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/mbbsd/screen.c b/mbbsd/screen.c
index 08fae0b4..1f015acc 100644
--- a/mbbsd/screen.c
+++ b/mbbsd/screen.c
@@ -365,6 +365,21 @@ clrtoeol(void)
slp->len = cur_col;
}
+
+void newwin (int nlines, int ncols, int y, int x)
+{
+ int i=0, y, x;
+ getyx(&y, &x);
+
+ while (nlines-- > 0)
+ {
+ move_ansi(y++, x);
+ for (i = 0; i < ncols; i++)
+ outc(' ');
+ }
+ move(y, x);
+}
+
/**
* 從目前的行數(scr_ln) clear 到第 line 行
*/