From 11e883205cf61f3e2acc7dbf9e9f481abecb89d6 Mon Sep 17 00:00:00 2001 From: blymn Date: Mon, 11 Apr 2011 09:06:24 +0000 Subject: [PATCH] Apply patch provided by mrg to fix bad calls to vw_printw and vw_scanw --- tests/lib/libcurses/slave/curses_commands.c | 34 +++++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/tests/lib/libcurses/slave/curses_commands.c b/tests/lib/libcurses/slave/curses_commands.c index 3fa8ba9166e2..18ff194348a2 100644 --- a/tests/lib/libcurses/slave/curses_commands.c +++ b/tests/lib/libcurses/slave/curses_commands.c @@ -1,4 +1,4 @@ -/* $NetBSD: curses_commands.c,v 1.2 2011/04/10 23:31:30 dholland Exp $ */ +/* $NetBSD: curses_commands.c,v 1.3 2011/04/11 09:06:24 blymn Exp $ */ /*- * Copyright 2009 Brett Lymn @@ -34,6 +34,8 @@ #include #include #include +#include + #include "slave.h" #include "curses_commands.h" @@ -4398,6 +4400,19 @@ cmd_vline(int nargs, char **args) } +static int +internal_vw_printw(WINDOW *win, char *arg1, ...) +{ + va_list va; + int rv; + + va_start(va, arg1); + rv = vw_printw(win, arg1, va); + va_end(va); + + return rv; +} + void cmd_vw_printw(int nargs, char **args) { @@ -4413,10 +4428,23 @@ cmd_vw_printw(int nargs, char **args) } report_count(1); - report_return(vw_printw(win, args[1], args[2])); + report_return(internal_vw_printw(win, args[1], args[2])); } +static int +internal_vw_scanw(WINDOW *win, char *arg1, ...) +{ + va_list va; + int rv; + + va_start(va, arg1); + rv = vw_scanw(win, arg1, va); + va_end(va); + + return rv; +} + void cmd_vw_scanw(int nargs, char **args) { @@ -4434,7 +4462,7 @@ cmd_vw_scanw(int nargs, char **args) /* XXX - call2 */ report_count(2); - report_int(vw_scanw(win, args[1], string)); + report_int(internal_vw_scanw(win, args[1], string)); report_status(string); }