Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libcurses/slave Apply patch provided by mrg to fix...
details: https://anonhg.NetBSD.org/src/rev/c3a93482a014
branches: trunk
changeset: 764096:c3a93482a014
user: blymn <blymn%NetBSD.org@localhost>
date: Mon Apr 11 09:06:24 2011 +0000
description:
Apply patch provided by mrg to fix bad calls to vw_printw and vw_scanw
diffstat:
tests/lib/libcurses/slave/curses_commands.c | 38 +++++++++++++++++++++++++---
1 files changed, 33 insertions(+), 5 deletions(-)
diffs (73 lines):
diff -r 683f7e76f1db -r c3a93482a014 tests/lib/libcurses/slave/curses_commands.c
--- a/tests/lib/libcurses/slave/curses_commands.c Mon Apr 11 09:03:24 2011 +0000
+++ b/tests/lib/libcurses/slave/curses_commands.c Mon Apr 11 09:06:24 2011 +0000
@@ -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 <blymn%NetBSD.org@localhost>
@@ -34,6 +34,8 @@
#include <stdlib.h>
#include <string.h>
#include <termios.h>
+#include <stdarg.h>
+
#include "slave.h"
#include "curses_commands.h"
@@ -4398,6 +4400,19 @@
}
+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,9 +4428,22 @@
}
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 @@
/* 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);
}
Home |
Main Index |
Thread Index |
Old Index