/****************************************************************************
- * 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 *
#include <curses.priv.h>
-MODULE_ID("$Id: lib_printw.c,v 1.16 2005/06/11 19:30:51 tom Exp $")
+MODULE_ID("$Id: lib_printw.c,v 1.19 2009/04/18 18:45:55 tom Exp $")
NCURSES_EXPORT(int)
printw(const char *fmt,...)
{
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)));
- 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);