Module Name:    src
Committed By:   blymn
Date:           Sat Nov  9 11:16:59 UTC 2013

Modified Files:
        src/lib/libcurses: add_wch.c addbytes.c addch.c addchnstr.c
            curses_private.h

Log Message:
Rename the old __waddbytes function to _cursesi_waddbytes and add a
parameter that controls whether or not certain characters in the
string are interpreted or not (things like tab being expanded).

Make __waddbytes a wrapper for _cursesi_waddbytes that passes all
parameters and sets the flag for character interpretation for backward
compatibility.

Fix an incipient bug in _cursesi_waddbytes where garbage would have
been written to the terminal if the terminal TABSIZE was set > 8 and
character interpretation is on.

Convert all internal __waddbytes calls to use _cursesi_waddbytes, fix
the function prototypes and add a new flag that will be used later.

Fix the addchstr family functions so that they call _cursesi_waddbytes
with character interpretation off as per SUSV2.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libcurses/add_wch.c
cvs rdiff -u -r1.40 -r1.41 src/lib/libcurses/addbytes.c
cvs rdiff -u -r1.16 -r1.17 src/lib/libcurses/addch.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libcurses/addchnstr.c
cvs rdiff -u -r1.48 -r1.49 src/lib/libcurses/curses_private.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libcurses/add_wch.c
diff -u src/lib/libcurses/add_wch.c:1.3 src/lib/libcurses/add_wch.c:1.4
--- src/lib/libcurses/add_wch.c:1.3	Wed Jul 22 16:57:14 2009
+++ src/lib/libcurses/add_wch.c	Sat Nov  9 11:16:59 2013
@@ -1,4 +1,4 @@
-/*   $NetBSD: add_wch.c,v 1.3 2009/07/22 16:57:14 roy Exp $ */
+/*   $NetBSD: add_wch.c,v 1.4 2013/11/09 11:16:59 blymn Exp $ */
 
 /*
  * Copyright (c) 2005 The NetBSD Foundation Inc.
@@ -36,7 +36,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: add_wch.c,v 1.3 2009/07/22 16:57:14 roy Exp $");
+__RCSID("$NetBSD: add_wch.c,v 1.4 2013/11/09 11:16:59 blymn Exp $");
 #endif /* not lint */
 
 #include <stdlib.h>
@@ -119,6 +119,6 @@ wadd_wch(WINDOW *win, const cchar_t *wch
 	__CTRACE(__CTRACE_INPUT, "wadd_wch: win(%p)", win);
 #endif
 	lnp = win->alines[y];
-	return _cursesi_addwchar(win, &lnp, &y, &x, wch);
+	return _cursesi_addwchar(win, &lnp, &y, &x, wch, 1);
 #endif /* HAVE_WCHAR */
 }

Index: src/lib/libcurses/addbytes.c
diff -u src/lib/libcurses/addbytes.c:1.40 src/lib/libcurses/addbytes.c:1.41
--- src/lib/libcurses/addbytes.c:1.40	Wed Oct 16 19:59:29 2013
+++ src/lib/libcurses/addbytes.c	Sat Nov  9 11:16:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: addbytes.c,v 1.40 2013/10/16 19:59:29 roy Exp $	*/
+/*	$NetBSD: addbytes.c,v 1.41 2013/11/09 11:16:59 blymn Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)addbytes.c	8.4 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: addbytes.c,v 1.40 2013/10/16 19:59:29 roy Exp $");
+__RCSID("$NetBSD: addbytes.c,v 1.41 2013/11/09 11:16:59 blymn Exp $");
 #endif
 #endif				/* not lint */
 
@@ -60,7 +60,7 @@ __RCSID("$NetBSD: addbytes.c,v 1.40 2013
 int
 addbytes(const char *bytes, int count)
 {
-	return __waddbytes(stdscr, bytes, count, 0);
+	return _cursesi_waddbytes(stdscr, bytes, count, 0, 1);
 }
 
 /*
@@ -70,7 +70,7 @@ addbytes(const char *bytes, int count)
 int
 waddbytes(WINDOW *win, const char *bytes, int count)
 {
-	return __waddbytes(win, bytes, count, 0);
+	return _cursesi_waddbytes(win, bytes, count, 0, 1);
 }
 
 /*
@@ -93,19 +93,29 @@ mvwaddbytes(WINDOW *win, int y, int x, c
 	if (wmove(win, y, x) == ERR)
 		return ERR;
 
-	return __waddbytes(win, bytes, count, 0);
+	return _cursesi_waddbytes(win, bytes, count, 0, 1);
 }
 
 #endif
 
+int
+__waddbytes(WINDOW *win, const char *bytes, int count, attr_t attr)
+{
+	return _cursesi_waddbytes(win, bytes, count, attr, 1);
+}
+
 /*
- * waddbytes --
+ * _cursesi_waddbytes --
  *	Add the character to the current position in the given window.
+ * if char_interp is non-zero then character interpretation is done on
+ * the byte (i.e. \n to newline, \r to carriage return, \b to backspace
+ * and so on).
  */
 int
-__waddbytes(WINDOW *win, const char *bytes, int count, attr_t attr)
+_cursesi_waddbytes(WINDOW *win, const char *bytes, int count, attr_t attr,
+	    int char_interp)
 {
-	int		 x, y, err;
+	int		 ox, x, y, err;
 	__LINE		*lp;
 #ifdef HAVE_WCHAR
 	int		n;
@@ -128,6 +138,7 @@ __waddbytes(WINDOW *win, const char *byt
 	err = OK;
 	SYNCH_IN;
 	lp = win->alines[y];
+	ox = win->curx;
 
 #ifdef HAVE_WCHAR
 	(void)memset(&st, 0, sizeof(st));
@@ -139,7 +150,7 @@ __waddbytes(WINDOW *win, const char *byt
 		__CTRACE(__CTRACE_INPUT, "ADDBYTES('%c', %x) at (%d, %d)\n",
 		    c, attr, y, x);
 #endif
-		err = _cursesi_addbyte(win, &lp, &y, &x, c, attr);
+		err = _cursesi_addbyte(win, &lp, &y, &x, c, attr, char_interp);
 		count--;
 #else
 		/*
@@ -169,7 +180,7 @@ __waddbytes(WINDOW *win, const char *byt
 		cc.vals[0] = wc;
 		cc.elements = 1;
 		cc.attributes = attr;
-		err = _cursesi_addwchar(win, &lp, &y, &x, &cc);
+		err = _cursesi_addwchar(win, &lp, &y, &x, &cc, char_interp);
 		bytes += n;
 		count -= n;
 #endif
@@ -190,127 +201,132 @@ __waddbytes(WINDOW *win, const char *byt
  * _cursesi_addbyte -
  *	Internal function to add a byte and update the row and column
  * positions as appropriate.  This function is only used in the narrow
- * character version of curses.
+ * character version of curses.  If update_cursor is non-zero then character
+ * interpretation.
  */
 int
 _cursesi_addbyte(WINDOW *win, __LINE **lp, int *y, int *x, int c,
-		 attr_t attr)
+		 attr_t attr, int char_interp)
 {
-	static char	 blanks[] = "        ";
-	int		 newx;
-	attr_t		 attributes;
+	static char	 blank[] = " ";
 	int		 tabsize;
+	int		 newx, i;
+	attr_t		 attributes;
 
-	switch (c) {
-	case '\t':
-		tabsize = win->screen->TABSIZE;
-		PSYNCH_OUT;
-		if (waddbytes(win, blanks, tabsize - (*x % tabsize)) == ERR)
-			return (ERR);
-		PSYNCH_IN;
-		break;
+	if (char_interp) {
+		switch (c) {
+		case '\t':
+			tabsize = win->screen->TABSIZE;
+			PSYNCH_OUT;
+			for (i = 0; i < (tabsize - (*x % tabsize)); i++) {
+				if (waddbytes(win, blank, 1) == ERR)
+					return (ERR);
+			}
+			PSYNCH_IN;
+			return (OK);
+
+		case '\n':
+			PSYNCH_OUT;
+			wclrtoeol(win);
+			PSYNCH_IN;
+			(*lp)->flags |= __ISPASTEOL;
+			break;
+
+		case '\r':
+			*x = 0;
+			win->curx = *x;
+			return (OK);
+
+		case '\b':
+			if (--(*x) < 0)
+				*x = 0;
+			win->curx = *x;
+			return (OK);
+		}
+	}
 
-	default:
 #ifdef DEBUG
-		__CTRACE(__CTRACE_INPUT, "ADDBYTES(%p, %d, %d)\n",
-			 win, *y, *x);
+	__CTRACE(__CTRACE_INPUT, "ADDBYTES(%p, %d, %d)\n", win, *y, *x);
 #endif
 
-		if ((*lp)->flags & __ISPASTEOL) {
-		  new_line:
-			*x = 0;
-			(*lp)->flags &= ~__ISPASTEOL;
-			if (*y == win->scr_b) {
+	if (char_interp && ((*lp)->flags & __ISPASTEOL)) {
+		*x = 0;
+		(*lp)->flags &= ~__ISPASTEOL;
+		if (*y == win->scr_b) {
 #ifdef DEBUG
-				__CTRACE(__CTRACE_INPUT,
-					 "ADDBYTES - on bottom "
-					 "of scrolling region\n");
+			__CTRACE(__CTRACE_INPUT,
+				 "ADDBYTES - on bottom "
+				 "of scrolling region\n");
 #endif
-				if (!(win->flags & __SCROLLOK))
-					return ERR;
-				PSYNCH_OUT;
-				scroll(win);
-				PSYNCH_IN;
-			} else {
-				(*y)++;
-			}
-			*lp = win->alines[*y];
-			if (c == '\n')
-				break;
+			if (!(win->flags & __SCROLLOK))
+				return ERR;
+			PSYNCH_OUT;
+			scroll(win);
+			PSYNCH_IN;
+		} else {
+			(*y)++;
 		}
+		*lp = win->alines[*y];
+		if (c == '\n')
+			return (OK);
+	}
 
-		attributes = (win->wattr | attr) &
-			(__ATTRIBUTES & ~__COLOR);
-		if (attr & __COLOR)
-			attributes |= attr & __COLOR;
-		else if (win->wattr & __COLOR)
-			attributes |= win->wattr & __COLOR;
 #ifdef DEBUG
-		__CTRACE(__CTRACE_INPUT,
-			 "ADDBYTES: 1: y = %d, x = %d, firstch = %d, "
-			 "lastch = %d\n",
-			 *y, *x, *win->alines[*y]->firstchp,
-			 *win->alines[*y]->lastchp);
+	__CTRACE(__CTRACE_INPUT,
+		 "ADDBYTES: 1: y = %d, x = %d, firstch = %d, lastch = %d\n",
+		 *y, *x, *win->alines[*y]->firstchp,
+		 *win->alines[*y]->lastchp);
 #endif
-		/*
-		 * Always update the change pointers.  Otherwise,
-		 * we could end up not displaying 'blank' characters
-		 * when overlapping windows are displayed.
-		 */
-		newx = *x + win->ch_off;
-		(*lp)->flags |= __ISDIRTY;
-		/*
-		 * firstchp/lastchp are shared between
-		 * parent window and sub-window.
-		 */
-		if (newx < *(*lp)->firstchp)
-			*(*lp)->firstchp = newx;
-		if (newx > *(*lp)->lastchp)
-			*(*lp)->lastchp = newx;
-#ifdef DEBUG
-		__CTRACE(__CTRACE_INPUT,
-			 "ADDBYTES: change gives f/l: %d/%d [%d/%d]\n",
-			 *(*lp)->firstchp, *(*lp)->lastchp,
-			 *(*lp)->firstchp - win->ch_off,
-			 *(*lp)->lastchp - win->ch_off);
-#endif
-		if (win->bch != ' ' && c == ' ')
-			(*lp)->line[*x].ch = win->bch;
-		else
-			(*lp)->line[*x].ch = c;
-
-		if (attributes & __COLOR)
-			(*lp)->line[*x].attr =
-				attributes | (win->battr & ~__COLOR);
-		else
-			(*lp)->line[*x].attr = attributes | win->battr;
 
-		if (*x == win->maxx - 1)
-			(*lp)->flags |= __ISPASTEOL;
-		else
-			(*x)++;
-#ifdef DEBUG
-		__CTRACE(__CTRACE_INPUT,
-			 "ADDBYTES: 2: y = %d, x = %d, firstch = %d, "
-			 "lastch = %d\n",
-			 *y, *x, *win->alines[*y]->firstchp,
-			 *win->alines[*y]->lastchp);
-#endif
-		break;
-	case '\n':
-		PSYNCH_OUT;
-		wclrtoeol(win);
-		PSYNCH_IN;
-		goto new_line;
-	case '\r':
-		*x = 0;
-		break;
-	case '\b':
-		if (--(*x) < 0)
-			*x = 0;
-		break;
-	}
+	attributes = (win->wattr | attr) & (__ATTRIBUTES & ~__COLOR);
+	if (attr & __COLOR)
+		attributes |= attr & __COLOR;
+	else if (win->wattr & __COLOR)
+		attributes |= win->wattr & __COLOR;
 
+	/*
+	 * Always update the change pointers.  Otherwise,
+	 * we could end up not displaying 'blank' characters
+	 * when overlapping windows are displayed.
+	 */
+	newx = *x + win->ch_off;
+	(*lp)->flags |= __ISDIRTY;
+	/*
+	 * firstchp/lastchp are shared between
+	 * parent window and sub-window.
+	 */
+	if (newx < *(*lp)->firstchp)
+		*(*lp)->firstchp = newx;
+	if (newx > *(*lp)->lastchp)
+		*(*lp)->lastchp = newx;
+#ifdef DEBUG
+	__CTRACE(__CTRACE_INPUT, "ADDBYTES: change gives f/l: %d/%d [%d/%d]\n",
+		 *(*lp)->firstchp, *(*lp)->lastchp,
+		 *(*lp)->firstchp - win->ch_off,
+		 *(*lp)->lastchp - win->ch_off);
+#endif
+	if (win->bch != ' ' && c == ' ')
+		(*lp)->line[*x].ch = win->bch;
+	else
+		(*lp)->line[*x].ch = c;
+
+	if (attributes & __COLOR)
+		(*lp)->line[*x].attr =
+			attributes | (win->battr & ~__COLOR);
+	else
+		(*lp)->line[*x].attr = attributes | win->battr;
+
+	if (*x == win->maxx - 1)
+		(*lp)->flags |= __ISPASTEOL;
+	else
+		(*x)++;
+
+#ifdef DEBUG
+	__CTRACE(__CTRACE_INPUT,
+		 "ADDBYTES: 2: y = %d, x = %d, firstch = %d, lastch = %d\n",
+		 *y, *x, *win->alines[*y]->firstchp,
+		 *win->alines[*y]->lastchp);
+#endif
 	return (OK);
 }
 
@@ -321,7 +337,7 @@ _cursesi_addbyte(WINDOW *win, __LINE **l
  */
 int
 _cursesi_addwchar(WINDOW *win, __LINE **lnp, int *y, int *x,
-		  const cchar_t *wch)
+		  const cchar_t *wch, int char_interp)
 {
 #ifndef HAVE_WCHAR
 	return (ERR);
@@ -332,42 +348,45 @@ _cursesi_addwchar(WINDOW *win, __LINE **
 	cchar_t cc;
 	attr_t attributes;
 
-	/* special characters handling */
-	switch (wch->vals[0]) {
-	case L'\b':
-		if (--*x < 0)
+	if (char_interp) {
+		/* special characters handling */
+		switch (wch->vals[0]) {
+		case L'\b':
+			if (--*x < 0)
+				*x = 0;
+			win->curx = *x;
+			return OK;
+		case L'\r':
 			*x = 0;
-		win->curx = *x;
-		return OK;
-	case L'\r':
-		*x = 0;
-		return OK;
-	case L'\n':
-		wclrtoeol(win);
-		PSYNCH_IN;
-		*x = 0;
-		(*lnp)->flags &= ~__ISPASTEOL;
-		if (*y == win->scr_b) {
-			if (!(win->flags & __SCROLLOK))
-				return ERR;
-			PSYNCH_OUT;
-			scroll(win);
+			win->curx = *x;
+			return OK;
+		case L'\n':
+			wclrtoeol(win);
 			PSYNCH_IN;
-		} else {
-			(*y)++;
-		}
-		PSYNCH_OUT;
-		return OK;
-	case L'\t':
-		cc.vals[0] = L' ';
-		cc.elements = 1;
-		cc.attributes = win->wattr;
-		tabsize = win->screen->TABSIZE;
-		for (i = 0; i < tabsize - (*x % tabsize); i++) {
-			if (wadd_wch(win, &cc) == ERR)
-				return ERR;
+			*x = 0;
+			(*lnp)->flags &= ~__ISPASTEOL;
+			if (*y == win->scr_b) {
+				if (!(win->flags & __SCROLLOK))
+					return ERR;
+				PSYNCH_OUT;
+				scroll(win);
+				PSYNCH_IN;
+			} else {
+				(*y)++;
+			}
+			PSYNCH_OUT;
+			return OK;
+		case L'\t':
+			cc.vals[0] = L' ';
+			cc.elements = 1;
+			cc.attributes = win->wattr;
+			tabsize = win->screen->TABSIZE;
+			for (i = 0; i < tabsize - (*x % tabsize); i++) {
+				if (wadd_wch(win, &cc) == ERR)
+					return ERR;
+			}
+			return OK;
 		}
-		return OK;
 	}
 
 	/* check for non-spacing character */
@@ -399,7 +418,7 @@ _cursesi_addwchar(WINDOW *win, __LINE **
 		return OK;
 	}
 	/* check for new line first */
-	if ((*lnp)->flags & __ISPASTEOL) {
+	if (char_interp && ((*lnp)->flags & __ISPASTEOL)) {
 		*x = 0;
 		(*lnp)->flags &= ~__ISPASTEOL;
 		if (*y == win->scr_b) {
@@ -444,6 +463,7 @@ _cursesi_addwchar(WINDOW *win, __LINE **
 	cw = wcwidth(wch->vals[0]);
 	if (cw < 0)
 		cw = 1;
+
 	if (cw > win->maxx - *x) {
 #ifdef DEBUG
 		__CTRACE(__CTRACE_INPUT,
@@ -546,6 +566,7 @@ _cursesi_addwchar(WINDOW *win, __LINE **
 		/* Mark as "continuation" cell */
 		tp->attr |= __WCWIDTH;
 	}
+
 	if (*x == win->maxx) {
 		(*lnp)->flags |= __ISPASTEOL;
 		newx = win->maxx - 1 + win->ch_off;
@@ -563,9 +584,9 @@ _cursesi_addwchar(WINDOW *win, __LINE **
 			while (ex < win->maxx && WCOL(*tp) < 0) {
 #ifdef DEBUG
 				__CTRACE(__CTRACE_INPUT,
-					 "_cursesi_addwchar: clear "
-					 "remaining of current char (%d,%d)nn",
-					 *y, ex);
+				 	"_cursesi_addwchar: clear "
+				 	"remaining of current char (%d,%d)nn",
+				 	*y, ex);
 #endif /* DEBUG */
 				tp->ch = (wchar_t) btowc((int) win->bch);
 				if (_cursesi_copy_nsp(win->bnsp, tp) == ERR)

Index: src/lib/libcurses/addch.c
diff -u src/lib/libcurses/addch.c:1.16 src/lib/libcurses/addch.c:1.17
--- src/lib/libcurses/addch.c:1.16	Tue Feb 23 19:48:26 2010
+++ src/lib/libcurses/addch.c	Sat Nov  9 11:16:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: addch.c,v 1.16 2010/02/23 19:48:26 drochner Exp $	*/
+/*	$NetBSD: addch.c,v 1.17 2013/11/09 11:16:59 blymn Exp $	*/
 
 /*
  * Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)addch.c	8.2 (Berkeley) 5/4/94";
 #else
-__RCSID("$NetBSD: addch.c,v 1.16 2010/02/23 19:48:26 drochner Exp $");
+__RCSID("$NetBSD: addch.c,v 1.17 2013/11/09 11:16:59 blymn Exp $");
 #endif
 #endif				/* not lint */
 
@@ -124,5 +124,5 @@ __waddch(WINDOW *win, __LDATA *dp)
 
 	buf[0] = dp->ch;
 	buf[1] = '\0';
-	return (__waddbytes(win, buf, 1, dp->attr));
+	return (_cursesi_waddbytes(win, buf, 1, dp->attr, 1));
 }

Index: src/lib/libcurses/addchnstr.c
diff -u src/lib/libcurses/addchnstr.c:1.5 src/lib/libcurses/addchnstr.c:1.6
--- src/lib/libcurses/addchnstr.c:1.5	Fri Sep 28 06:00:39 2012
+++ src/lib/libcurses/addchnstr.c	Sat Nov  9 11:16:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: addchnstr.c,v 1.5 2012/09/28 06:00:39 blymn Exp $	*/
+/*	$NetBSD: addchnstr.c,v 1.6 2013/11/09 11:16:59 blymn Exp $	*/
 
 /*
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: addchnstr.c,v 1.5 2012/09/28 06:00:39 blymn Exp $");
+__RCSID("$NetBSD: addchnstr.c,v 1.6 2013/11/09 11:16:59 blymn Exp $");
 #endif				/* not lint */
 
 #include <stdlib.h>
@@ -135,7 +135,7 @@ waddchnstr(WINDOW *win, const chtype *ch
 	const chtype *chp;
 	attr_t	attr;
 	char	*ocp, *cp, *start;
-	int i, ret;
+	int i, ret, ox, oy;
 
 #ifdef DEBUG
 	__CTRACE(__CTRACE_INPUT, "waddchnstr: win = %p, chstr = %p, n = %d\n",
@@ -158,6 +158,8 @@ waddchnstr(WINDOW *win, const chtype *ch
 	start = ocp;
 	i = 0;
 	attr = (*chp) & __ATTRIBUTES;
+	ox = win->curx;
+	oy = win->cury;
 	while (len) {
 		*cp = (*chp) & __CHARTEXT;
 		cp++;
@@ -166,7 +168,7 @@ waddchnstr(WINDOW *win, const chtype *ch
 		len--;
 		if (((*chp) & __ATTRIBUTES) != attr) {
 			*cp = '\0';
-			if (__waddbytes(win, start, i, attr) == ERR) {
+			if (_cursesi_waddbytes(win, start, i, attr, 0) == ERR) {
 				free(ocp);
 				return ERR;
 			}
@@ -176,7 +178,8 @@ waddchnstr(WINDOW *win, const chtype *ch
 		}
 	}
 	*cp = '\0';
-	ret = __waddbytes(win, start, i, attr);
+	ret = _cursesi_waddbytes(win, start, i, attr, 0);
 	free(ocp);
+	wmove(win, oy, ox);
 	return ret;
 }

Index: src/lib/libcurses/curses_private.h
diff -u src/lib/libcurses/curses_private.h:1.48 src/lib/libcurses/curses_private.h:1.49
--- src/lib/libcurses/curses_private.h:1.48	Wed Oct 16 19:59:29 2013
+++ src/lib/libcurses/curses_private.h	Sat Nov  9 11:16:59 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: curses_private.h,v 1.48 2013/10/16 19:59:29 roy Exp $	*/
+/*	$NetBSD: curses_private.h,v 1.49 2013/11/09 11:16:59 blymn Exp $	*/
 
 /*-
  * Copyright (c) 1998-2000 Brett Lymn
@@ -99,6 +99,7 @@ struct __line {
 #endif
 #define	__ISDIRTY	0x01		/* Line is dirty. */
 #define __ISPASTEOL	0x02		/* Cursor is past end of line */
+#define __ISFORCED	0x04		/* Force update, no optimisation */
 	unsigned int flags;
 	unsigned int hash;		/* Hash value for the line. */
 	int *firstchp, *lastchp;	/* First and last chngd columns ptrs */
@@ -290,8 +291,10 @@ int     __cputchar_args(int, void *);
 void     _cursesi_free_keymap(keymap_t *);
 int      _cursesi_gettmode(SCREEN *);
 void     _cursesi_reset_acs(SCREEN *);
-int	_cursesi_addbyte(WINDOW *, __LINE **, int *, int *, int , attr_t);
-int	_cursesi_addwchar(WINDOW *, __LINE **, int *, int *, const cchar_t *);
+int	_cursesi_addbyte(WINDOW *, __LINE **, int *, int *, int , attr_t, int);
+int	_cursesi_addwchar(WINDOW *, __LINE **, int *, int *, const cchar_t *,
+			  int);
+int	_cursesi_waddbytes(WINDOW *, const char *, int, attr_t, int);
 #ifdef HAVE_WCHAR
 void     _cursesi_reset_wacs(SCREEN *);
 #endif /* HAVE_WCHAR */

Reply via email to