summaryrefslogtreecommitdiff
path: root/lib/libcurses/overwrite.c
diff options
context:
space:
mode:
authoralm <alm@NetBSD.org>1993-07-09 05:34:14 +0000
committeralm <alm@NetBSD.org>1993-07-09 05:34:14 +0000
commit75de25bb937aed7d7fbdbd3a822fbc03d8bf6a08 (patch)
treea8a314f717e88a1f7fb1700d111d7263e416f95a /lib/libcurses/overwrite.c
parentcb880ccb9480246e8ba2026db43f12f1f2e8dde8 (diff)
added Andrew Chernov's patch set:
Standard curses library use eight bit for standout mode, so 8-bit characters displays like highlighted 7-bit characters. This patch produce library which is fully compatible with all curses programs and add 8-bit chars to all input/display functions. --- I don't think, that any programs wish to use internal curses attribute _STANDOUT directly, in expressions like: addch( ch | _STANDOUT ); Normal interface use standout() and standend() functions instead. Many programs use 'char' type (with sign extention) for input characters and sign extention becomes _STANDOUT mode in this case. So, I refuse this future and allow 8-bit characters for programs, which is designed for 7-bit only ('char' type using instead of 'unsigned char'). --- This small patch fix unpleasant standard curses bug: curses can't expand TAB at all (but tries). A man who wrote this curses misplace SYNC_IN and SYNCH_OUT, this patch exchange macro calls. This patch useful for standard 7-bit curses too, for this you must delete '_' symbol before waddbytes and apply patch. --- Oh, NO! This curses are really buggy! This small patch fix following problem: [ assumed scrollok(stdscr, TRUE) ] when addch(ch) at lower right corner of screen, curses are realy gone mad instead if simple scrolling... Curses code assumed that this will be done correctly, but implement it with two bugs.
Diffstat (limited to 'lib/libcurses/overwrite.c')
-rw-r--r--lib/libcurses/overwrite.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/libcurses/overwrite.c b/lib/libcurses/overwrite.c
index c885ab34652..655f923ab26 100644
--- a/lib/libcurses/overwrite.c
+++ b/lib/libcurses/overwrite.c
@@ -48,7 +48,6 @@ static char sccsid[] = "@(#)overwrite.c 5.4 (Berkeley) 6/1/90";
overwrite(win1, win2)
reg WINDOW *win1, *win2; {
- reg char *sp, *end;
reg int x, y, endy, endx, starty, startx;
# ifdef DEBUG
@@ -66,7 +65,7 @@ reg WINDOW *win1, *win2; {
x = endx - startx;
for (y = starty; y < endy; y++) {
bcopy(&win1->_y[y - win1->_begy][startx - win1->_begx],
- &win2->_y[y - win2->_begy][startx - win2->_begx], x);
+ &win2->_y[y - win2->_begy][startx - win2->_begx], x * sizeof(chtype));
touchline(win2, y, startx - win2->_begx, endx - win2->_begx);
}
}