summaryrefslogtreecommitdiff
path: root/lib/libncurses/lib_addstr.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1994-12-02 06:40:24 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1994-12-02 06:40:24 +0000
commit795172f7a504475a68702297052619a5c90dbfbf (patch)
tree0beef683196d6d2f76165d3756c20ac09c0ee20b /lib/libncurses/lib_addstr.c
parent766ee5695e87f2a4f5c3d4fb858e68e3369ac401 (diff)
Notes
Diffstat (limited to 'lib/libncurses/lib_addstr.c')
-rw-r--r--lib/libncurses/lib_addstr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libncurses/lib_addstr.c b/lib/libncurses/lib_addstr.c
index 007598cdb308..d9cb30aae2fb 100644
--- a/lib/libncurses/lib_addstr.c
+++ b/lib/libncurses/lib_addstr.c
@@ -15,21 +15,21 @@
int
waddnstr(WINDOW *win, char *str, int n)
{
- T(("waddnstr(%x,%s,%d) called", win, str, n));
+ T(("waddnstr(%x,\"%s\",%d) called", win, visbuf(str), n));
if (str == NULL)
return ERR;
if (n < 0) {
while (*str != '\0') {
- if (waddch(win, (unsigned char)*str++) == ERR)
+ if (waddch(win, (chtype)(unsigned char)*str++) == ERR)
return(ERR);
}
return OK;
}
while((n-- > 0) && (*str != '\0')) {
- if (waddch(win, (unsigned char)*str++) == ERR)
+ if (waddch(win, (chtype)(unsigned char)*str++) == ERR)
return ERR;
}
return OK;
@@ -42,14 +42,14 @@ waddchnstr(WINDOW *win, chtype *str, int n)
if (n < 0) {
while (*str) {
- if (waddch(win, *str++) == ERR)
+ if (waddch(win, (chtype)(unsigned char)*str++) == ERR)
return(ERR);
}
return OK;
}
while(n-- > 0) {
- if (waddch(win, *str++) == ERR)
+ if (waddch(win, (chtype)(unsigned char)*str++) == ERR)
return ERR;
}
return OK;