diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-19 23:39:37 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-12-19 23:39:37 +0800 |
commit | 60c7059c312f02d1dd5738d7e9c2872a1a123657 (patch) | |
tree | a1e4ec9e7c788fcbfaf22882e7629823faeb4067 /mbbsd/term.c | |
parent | acf58ca18005d3ed917cbc80a33baeec9d44335f (diff) | |
download | pttbbs-60c7059c312f02d1dd5738d7e9c2872a1a123657.tar pttbbs-60c7059c312f02d1dd5738d7e9c2872a1a123657.tar.gz pttbbs-60c7059c312f02d1dd5738d7e9c2872a1a123657.tar.bz2 pttbbs-60c7059c312f02d1dd5738d7e9c2872a1a123657.tar.lz pttbbs-60c7059c312f02d1dd5738d7e9c2872a1a123657.tar.xz pttbbs-60c7059c312f02d1dd5738d7e9c2872a1a123657.tar.zst pttbbs-60c7059c312f02d1dd5738d7e9c2872a1a123657.zip |
- isolate low level termial i/o api calls, prepare for pfterm
(piaip's flat terminal system)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3710 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/term.c')
-rw-r--r-- | mbbsd/term.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/mbbsd/term.c b/mbbsd/term.c index 2ef13ed0..202ea582 100644 --- a/mbbsd/term.c +++ b/mbbsd/term.c @@ -40,25 +40,15 @@ sig_term_resize(int sig) void term_resize(int w, int h) { - screenline_t *new_picture; - Signal(SIGWINCH, SIG_IGN); /* Don't bother me! */ /* make sure reasonable size */ h = MAX(24, MIN(100, h)); w = MAX(80, MIN(200, w)); - if (h > t_lines && big_picture) { - new_picture = (screenline_t *) - calloc(h, sizeof(screenline_t)); - if (new_picture == NULL) { - syslog(LOG_ERR, "calloc(): %m"); - return; - } - memcpy(new_picture, big_picture, t_lines * sizeof(screenline_t)); - free(big_picture); - big_picture = new_picture; - } + // invoke terminal system resize + resizescr(h, w); + t_lines = h; t_columns = w; scr_lns = t_lines; /* XXX: scr_lns 跟 t_lines 有什麼不同, 為何分成兩個 */ |