From bda33b7e716d56bf1a9ecccb7e2543889f9ab1d3 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 26 Nov 1997 04:02:03 +0000 Subject: ncurses 4.1 + changes to work with our terminfo libs (instead of the ncurses ones). Changes are #ifdef EXTERN_TERMINFO. Post 4.1 patches will be applied in a separate commit. --- lib/libcurses/lib_insstr.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/libcurses/lib_insstr.c') diff --git a/lib/libcurses/lib_insstr.c b/lib/libcurses/lib_insstr.c index 1d1d867ecc8..c25071f76d5 100644 --- a/lib/libcurses/lib_insstr.c +++ b/lib/libcurses/lib_insstr.c @@ -28,18 +28,20 @@ ** */ -#include "curses.priv.h" +#include #include +MODULE_ID("Id: lib_insstr.c,v 1.9 1997/02/15 16:09:53 tom Exp $") + int winsnstr(WINDOW *win, const char *str, int n) { short oy = win->_cury; short ox = win->_curx; -char *cp; +const char *cp; - T(("winsstr(%p,'%s',%d) called", win, str, n)); + T((T_CALLED("winsstr(%p,%s,%d)"), win, _nc_visbuf(str), n)); - for (cp = (char *)str; *cp && (n <= 0 || (cp - str) < n); cp++) { + for (cp = str; *cp && (n <= 0 || (cp - str) < n); cp++) { if (*cp == '\n' || *cp == '\r' || *cp == '\t' || *cp == '\b') _nc_waddch_nosync(win, (chtype)(*cp)); else if (is7bits(*cp) && iscntrl(*cp)) { @@ -53,9 +55,9 @@ char *cp; if (win->_curx > win->_maxx) win->_curx = win->_maxx; } - + win->_curx = ox; win->_cury = oy; _nc_synchook(win); - return OK; + returnCode(OK); } -- cgit v1.2.3