aboutsummaryrefslogtreecommitdiff
path: root/ncurses/base/lib_printw.c
diff options
context:
space:
mode:
Diffstat (limited to 'ncurses/base/lib_printw.c')
-rw-r--r--ncurses/base/lib_printw.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/ncurses/base/lib_printw.c b/ncurses/base/lib_printw.c
index 62ae921e650d..963181d9a494 100644
--- a/ncurses/base/lib_printw.c
+++ b/ncurses/base/lib_printw.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2003,2005 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2005,2009 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -39,7 +39,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_printw.c,v 1.18 2006/12/17 19:21:39 tom Exp $")
+MODULE_ID("$Id: lib_printw.c,v 1.20 2009/10/24 22:07:03 tom Exp $")
NCURSES_EXPORT(int)
printw(const char *fmt,...)
@@ -70,7 +70,7 @@ wprintw(WINDOW *win, const char *fmt,...)
#ifdef TRACE
va_start(argp, fmt);
T((T_CALLED("wprintw(%p,%s%s)"),
- win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
+ (void *) win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
va_end(argp);
#endif
@@ -111,7 +111,7 @@ mvwprintw(WINDOW *win, int y, int x, const char *fmt,...)
#ifdef TRACE
va_start(argp, fmt);
T((T_CALLED("mvwprintw(%d,%d,%p,%s%s)"),
- y, x, win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
+ y, x, (void *) win, _nc_visbuf(fmt), _nc_varargs(fmt, argp)));
va_end(argp);
#endif
@@ -128,10 +128,14 @@ vwprintw(WINDOW *win, const char *fmt, va_list argp)
{
char *buf;
int code = ERR;
+#if NCURSES_SP_FUNCS
+ SCREEN *sp = _nc_screen_of(win);
+#endif
- T((T_CALLED("vwprintw(%p,%s,va_list)"), win, _nc_visbuf(fmt)));
+ T((T_CALLED("vwprintw(%p,%s,va_list)"), (void *) win, _nc_visbuf(fmt)));
- if ((buf = _nc_printf_string(fmt, argp)) != 0) {
+ buf = NCURSES_SP_NAME(_nc_printf_string) (NCURSES_SP_ARGx fmt, argp);
+ if (buf != 0) {
code = waddstr(win, buf);
}
returnCode(code);