error).
Got rid of NONL.
SCCS-vsn: lib/libcurses/addbytes.c 5.8
-static char sccsid[] = "@(#)addbytes.c 5.7 (Berkeley) %G%";
+static char sccsid[] = "@(#)addbytes.c 5.8 (Berkeley) %G%";
#endif /* not lint */
#include <curses.h>
#endif /* not lint */
#include <curses.h>
#define SYNCH_IN {y = win->_cury; x = win->_curx;}
#define SYNCH_OUT {win->_cury = y; win->_curx = x;}
#define SYNCH_IN {y = win->_cury; x = win->_curx;}
#define SYNCH_OUT {win->_cury = y; win->_curx = x;}
register int c, newx, x, y;
SYNCH_IN;
register int c, newx, x, y;
SYNCH_IN;
#ifdef DEBUG
__TRACE("ADDBYTES('%c') at (%d, %d)\n", c, y, x);
#endif
#ifdef DEBUG
__TRACE("ADDBYTES('%c') at (%d, %d)\n", c, y, x);
#endif
win->_lastch[y] - win->_ch_off);
#endif
}
win->_lastch[y] - win->_ch_off);
#endif
}
- win->_y[y][x++] = c;
- if (x > win->_maxx) {
+ win->_y[y][x] = c;
+ if (++x >= win->_maxx) {
-newline: if (++y > win->_maxy)
+newline: if (++y >= win->_maxy)
if (win->_scroll) {
SYNCH_OUT;
scroll(win);
if (win->_scroll) {
SYNCH_OUT;
scroll(win);
SYNCH_OUT;
wclrtoeol(win);
SYNCH_IN;
SYNCH_OUT;
wclrtoeol(win);
SYNCH_IN;
+ if (origtermio.c_oflag & ONLCR)
x = 0;
goto newline;
case '\r':
x = 0;
goto newline;
case '\r':