]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - c++/cursesw.cc
ncurses 5.6 - patch 20080907
[ncurses.git] / c++ / cursesw.cc
index 527bb7c40e4c39af6c539b7a3e3b6aaea603b999..825d08ddd102ada225d4759d55b9bc464bbd6507 100644 (file)
@@ -42,7 +42,7 @@
 #include "internal.h"
 #include "cursesw.h"
 
-MODULE_ID("$Id: cursesw.cc,v 1.48 2007/03/24 19:00:58 tom Exp $")
+MODULE_ID("$Id: cursesw.cc,v 1.49 2007/12/15 23:01:57 tom Exp $")
 
 #define COLORS_NEED_INITIALIZATION  -1
 #define COLORS_NOT_INITIALIZED       0
@@ -84,6 +84,29 @@ NCursesWindow::scanw(int y, int x, const char* fmt, ...)
 }
 
 
+int
+NCursesWindow::scanw(const char* fmt, va_list args)
+{
+    int result = ERR;
+
+    result = ::vw_scanw (w, const_cast<NCURSES_CONST char *>(fmt), args);
+
+    return result;
+}
+
+
+int
+NCursesWindow::scanw(int y, int x, const char* fmt, va_list args)
+{
+    int result = ERR;
+
+    if (::wmove(w, y, x) != ERR) {
+       result = ::vw_scanw (w, const_cast<NCURSES_CONST char *>(fmt), args);
+    }
+    return result;
+}
+
+
 int
 NCursesWindow::printw(const char * fmt, ...)
 {
@@ -109,6 +132,25 @@ NCursesWindow::printw(int y, int x, const char * fmt, ...)
 }
 
 
+int
+NCursesWindow::printw(const char * fmt, va_list args)
+{
+    int result = ::vw_printw(w, fmt, args);
+    return result;
+}
+
+
+int
+NCursesWindow::printw(int y, int x, const char * fmt, va_list args)
+{
+    int result = ::wmove(w, y, x);
+    if (result == OK) {
+       result = ::vw_printw(w, fmt, args);
+    }
+    return result;
+}
+
+
 void
 NCursesWindow::set_keyboard(void)
 {