diff options
author | ache <ache@FreeBSD.org> | 1994-12-02 06:40:24 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1994-12-02 06:40:24 +0000 |
commit | da3bc85e1374c51c5dced6baacf60288a5a3ea40 (patch) | |
tree | 0beef683196d6d2f76165d3756c20ac09c0ee20b /lib/libncurses/lib_window.c | |
parent | d856190a55e1ac4bbc1e389083c70c3a9c37746e (diff) | |
download | FreeBSD-src-da3bc85e1374c51c5dced6baacf60288a5a3ea40.zip FreeBSD-src-da3bc85e1374c51c5dced6baacf60288a5a3ea40.tar.gz |
Upgrade to version 1.8.6
Diffstat (limited to 'lib/libncurses/lib_window.c')
-rw-r--r-- | lib/libncurses/lib_window.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/libncurses/lib_window.c b/lib/libncurses/lib_window.c index ec18694..c2686b9 100644 --- a/lib/libncurses/lib_window.c +++ b/lib/libncurses/lib_window.c @@ -14,7 +14,7 @@ int mvder(WINDOW *win, int y, int x) { - + return(ERR); } void wsyncup(WINDOW *win) @@ -24,7 +24,7 @@ void wsyncup(WINDOW *win) int syncok(WINDOW *win, bool bf) { - + return(ERR); } void wcursyncup(WINDOW *win) @@ -40,12 +40,11 @@ void wsyncdown(WINDOW *win) WINDOW *dupwin(WINDOW *win) { WINDOW *nwin; -#ifdef TRACE - if (_tracing) - _tracef("dupwin(%x) called", win); -#endif +int linesize, i; + + T(("dupwin(%x) called", win)); - if ((nwin = newwin(win->_maxy, win->_maxx, win->_bey, win->_begx)) == NULL) + if ((nwin = newwin(win->_maxy + 1, win->_maxx + 1, win->_begy, win->_begx)) == NULL) return NULL; nwin->_curx = win->_curx; @@ -57,6 +56,7 @@ WINDOW *nwin; nwin->_flags = win->_flags; nwin->_attrs = win->_attrs; + nwin->_bkgd = win->_bkgd; nwin->_clear = win->_clear; nwin->_scroll = win->_scroll; @@ -73,8 +73,9 @@ WINDOW *nwin; nwin->_regtop = win->_regtop; nwin->_regbottom = win->_regbottom; - for (i = 0; i < nwin->_cury; i++) { - memcpy(nwin->_line[i], win->_line[i], win->_maxx * sizeof(chtype)); + linesize = (win->_maxx + 1) * sizeof(chtype); + for (i = 0; i <= nwin->_maxy; i++) { + memcpy(nwin->_line[i], win->_line[i], linesize); nwin->_firstchar[i] = win->_firstchar[i]; nwin->_lastchar[i] = win->_lastchar[i]; } |