first characters in the line.
don't reset the x and y coordinates unless they're great than win->_maxx
and win->maxy, didn't work right for the last column of the line
SCCS-vsn: lib/libcurses/addbytes.c 5.6
-static char sccsid[] = "@(#)addbytes.c 5.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)addbytes.c 5.6 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
c = *bytes++;
switch (c) {
case '\t':
c = *bytes++;
switch (c) {
case '\t':
if (waddbytes(win, blanks, 8 - (x % 8)) == ERR)
return (ERR);
if (waddbytes(win, blanks, 8 - (x % 8)) == ERR)
return (ERR);
win->_firstch[y] = newx;
else if (newx > win->_lastch[y])
win->_lastch[y] = newx;
win->_firstch[y] = newx;
else if (newx > win->_lastch[y])
win->_lastch[y] = newx;
__TRACE("ADDBYTES: change gives f/l: %d/%d [%d/%d]\n",
__TRACE("ADDBYTES: change gives f/l: %d/%d [%d/%d]\n",
- win->_firstch[y], win->_lastch[y], win->_firstch[y] - win->_ch_off,
+ win->_firstch[y], win->_lastch[y],
+ win->_firstch[y] - win->_ch_off,
win->_lastch[y] - win->_ch_off);
#endif
}
win->_y[y][x++] = c;
win->_lastch[y] - win->_ch_off);
#endif
}
win->_y[y][x++] = c;
-newline: if (++y >= win->_maxy)
+newline: if (++y > win->_maxy)
if (win->_scroll) {
SYNCH_OUT;
scroll(win);
if (win->_scroll) {
SYNCH_OUT;
scroll(win);