Tue Jul 7 12:48:42 2020 UTC ()
Pull up following revision(s) (requested by uwe in ticket #1567):

	lib/libcurses/insch.c: revision 1.26
	lib/libcurses/ins_wch.c: revision 1.15
	lib/libcurses/ins_wstr.c: revision 1.15
	lib/libcurses/insstr.c: revision 1.8

mvwins*(WINDOW *win, ...) functions - call wins* on win, not stdscr.
>From Naman Jain in PR lib/55460.


(martin)
diff -r1.11 -r1.11.4.1 src/lib/libcurses/ins_wch.c
diff -r1.11 -r1.11.4.1 src/lib/libcurses/ins_wstr.c
diff -r1.23 -r1.23.6.1 src/lib/libcurses/insch.c
diff -r1.5 -r1.5.6.1 src/lib/libcurses/insstr.c

cvs diff -r1.11 -r1.11.4.1 src/lib/libcurses/ins_wch.c (expand / switch to unified diff)

--- src/lib/libcurses/ins_wch.c 2017/01/31 09:17:53 1.11
+++ src/lib/libcurses/ins_wch.c 2020/07/07 12:48:42 1.11.4.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ins_wch.c,v 1.11 2017/01/31 09:17:53 roy Exp $ */ 1/* $NetBSD: ins_wch.c,v 1.11.4.1 2020/07/07 12:48:42 martin Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 The NetBSD Foundation Inc. 4 * Copyright (c) 2005 The NetBSD Foundation Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from code donated to the NetBSD Foundation 7 * This code is derived from code donated to the NetBSD Foundation
8 * by Ruibiao Qiu <ruibiao@arl.wustl.edu,ruibiao@gmail.com>. 8 * by Ruibiao Qiu <ruibiao@arl.wustl.edu,ruibiao@gmail.com>.
9 * 9 *
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -26,27 +26,27 @@ @@ -26,27 +26,27 @@
26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE. 34 * SUCH DAMAGE.
35 */ 35 */
36 36
37#include <sys/cdefs.h> 37#include <sys/cdefs.h>
38#ifndef lint 38#ifndef lint
39__RCSID("$NetBSD: ins_wch.c,v 1.11 2017/01/31 09:17:53 roy Exp $"); 39__RCSID("$NetBSD: ins_wch.c,v 1.11.4.1 2020/07/07 12:48:42 martin Exp $");
40#endif /* not lint */ 40#endif /* not lint */
41 41
42#include <string.h> 42#include <string.h>
43#include <stdlib.h> 43#include <stdlib.h>
44 44
45#include "curses.h" 45#include "curses.h"
46#include "curses_private.h" 46#include "curses_private.h"
47 47
48/* 48/*
49 * ins_wch -- 49 * ins_wch --
50 * Do an insert-char on the line, leaving (cury, curx) unchanged. 50 * Do an insert-char on the line, leaving (cury, curx) unchanged.
51 */ 51 */
52int 52int
@@ -76,27 +76,27 @@ mvins_wch(int y, int x, const cchar_t *w @@ -76,27 +76,27 @@ mvins_wch(int y, int x, const cchar_t *w
76/* 76/*
77 * mvwins_wch -- 77 * mvwins_wch --
78 * Do an insert-char on the line at (y, x) in the given window. 78 * Do an insert-char on the line at (y, x) in the given window.
79 */ 79 */
80int 80int
81mvwins_wch(WINDOW *win, int y, int x, const cchar_t *wch) 81mvwins_wch(WINDOW *win, int y, int x, const cchar_t *wch)
82{ 82{
83#ifndef HAVE_WCHAR 83#ifndef HAVE_WCHAR
84 return ERR; 84 return ERR;
85#else 85#else
86 if (wmove(win, y, x) == ERR) 86 if (wmove(win, y, x) == ERR)
87 return ERR; 87 return ERR;
88 88
89 return wins_wch(stdscr, wch); 89 return wins_wch(win, wch);
90#endif /* HAVE_WCHAR */ 90#endif /* HAVE_WCHAR */
91} 91}
92 92
93/* 93/*
94 * wins_wch -- 94 * wins_wch --
95 * Do an insert-char on the line, leaving (cury, curx) unchanged. 95 * Do an insert-char on the line, leaving (cury, curx) unchanged.
96 */ 96 */
97int 97int
98wins_wch(WINDOW *win, const cchar_t *wch) 98wins_wch(WINDOW *win, const cchar_t *wch)
99{ 99{
100#ifndef HAVE_WCHAR 100#ifndef HAVE_WCHAR
101 return ERR; 101 return ERR;
102#else 102#else

cvs diff -r1.11 -r1.11.4.1 src/lib/libcurses/ins_wstr.c (expand / switch to unified diff)

--- src/lib/libcurses/ins_wstr.c 2017/01/31 09:17:53 1.11
+++ src/lib/libcurses/ins_wstr.c 2020/07/07 12:48:42 1.11.4.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ins_wstr.c,v 1.11 2017/01/31 09:17:53 roy Exp $ */ 1/* $NetBSD: ins_wstr.c,v 1.11.4.1 2020/07/07 12:48:42 martin Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 The NetBSD Foundation Inc. 4 * Copyright (c) 2005 The NetBSD Foundation Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from code donated to the NetBSD Foundation 7 * This code is derived from code donated to the NetBSD Foundation
8 * by Ruibiao Qiu <ruibiao@arl.wustl.edu,ruibiao@gmail.com>. 8 * by Ruibiao Qiu <ruibiao@arl.wustl.edu,ruibiao@gmail.com>.
9 * 9 *
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -26,27 +26,27 @@ @@ -26,27 +26,27 @@
26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE. 34 * SUCH DAMAGE.
35 */ 35 */
36 36
37#include <sys/cdefs.h> 37#include <sys/cdefs.h>
38#ifndef lint 38#ifndef lint
39__RCSID("$NetBSD: ins_wstr.c,v 1.11 2017/01/31 09:17:53 roy Exp $"); 39__RCSID("$NetBSD: ins_wstr.c,v 1.11.4.1 2020/07/07 12:48:42 martin Exp $");
40#endif /* not lint */ 40#endif /* not lint */
41 41
42#include <string.h> 42#include <string.h>
43#include <stdlib.h> 43#include <stdlib.h>
44 44
45#include "curses.h" 45#include "curses.h"
46#include "curses_private.h" 46#include "curses_private.h"
47 47
48/* 48/*
49 * ins_wstr -- 49 * ins_wstr --
50 * insert a multi-character wide-character string into the current window 50 * insert a multi-character wide-character string into the current window
51 */ 51 */
52int 52int
@@ -86,40 +86,40 @@ mvins_nwstr(int y, int x, const wchar_t  @@ -86,40 +86,40 @@ mvins_nwstr(int y, int x, const wchar_t
86 return mvwins_nwstr(stdscr, y, x, wstr, n); 86 return mvwins_nwstr(stdscr, y, x, wstr, n);
87} 87}
88 88
89/* 89/*
90 * mvwins_wstr -- 90 * mvwins_wstr --
91 * Do an insert-string on the line at (y, x) in the given window. 91 * Do an insert-string on the line at (y, x) in the given window.
92 */ 92 */
93int 93int
94mvwins_wstr(WINDOW *win, int y, int x, const wchar_t *wstr) 94mvwins_wstr(WINDOW *win, int y, int x, const wchar_t *wstr)
95{ 95{
96 if (wmove(win, y, x) == ERR) 96 if (wmove(win, y, x) == ERR)
97 return ERR; 97 return ERR;
98 98
99 return wins_wstr(stdscr, wstr); 99 return wins_wstr(win, wstr);
100} 100}
101 101
102/* 102/*
103 * mvwins_nwstr -- 103 * mvwins_nwstr --
104 * Do an insert-n-string on the line at (y, x) in the given window. 104 * Do an insert-n-string on the line at (y, x) in the given window.
105 */ 105 */
106int 106int
107mvwins_nwstr(WINDOW *win, int y, int x, const wchar_t *wstr, int n) 107mvwins_nwstr(WINDOW *win, int y, int x, const wchar_t *wstr, int n)
108{ 108{
109 if (wmove(win, y, x) == ERR) 109 if (wmove(win, y, x) == ERR)
110 return ERR; 110 return ERR;
111 111
112 return wins_nwstr(stdscr, wstr, n); 112 return wins_nwstr(win, wstr, n);
113} 113}
114 114
115 115
116/* 116/*
117 * wins_wstr -- 117 * wins_wstr --
118 * Do an insert-string on the line, leaving (cury, curx) unchanged. 118 * Do an insert-string on the line, leaving (cury, curx) unchanged.
119 */ 119 */
120int 120int
121wins_wstr(WINDOW *win, const wchar_t *wstr) 121wins_wstr(WINDOW *win, const wchar_t *wstr)
122{ 122{
123 return wins_nwstr(win, wstr, -1); 123 return wins_nwstr(win, wstr, -1);
124} 124}
125 125

cvs diff -r1.23 -r1.23.6.1 src/lib/libcurses/insch.c (expand / switch to unified diff)

--- src/lib/libcurses/insch.c 2017/01/06 13:53:18 1.23
+++ src/lib/libcurses/insch.c 2020/07/07 12:48:42 1.23.6.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: insch.c,v 1.23 2017/01/06 13:53:18 roy Exp $ */ 1/* $NetBSD: insch.c,v 1.23.6.1 2020/07/07 12:48:42 martin Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1981, 1993, 1994 4 * Copyright (c) 1981, 1993, 1994
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE. 29 * SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33#ifndef lint 33#ifndef lint
34#if 0 34#if 0
35static char sccsid[] = "@(#)insch.c 8.2 (Berkeley) 5/4/94"; 35static char sccsid[] = "@(#)insch.c 8.2 (Berkeley) 5/4/94";
36#else 36#else
37__RCSID("$NetBSD: insch.c,v 1.23 2017/01/06 13:53:18 roy Exp $"); 37__RCSID("$NetBSD: insch.c,v 1.23.6.1 2020/07/07 12:48:42 martin Exp $");
38#endif 38#endif
39#endif /* not lint */ 39#endif /* not lint */
40 40
41#include <string.h> 41#include <string.h>
42#include <stdlib.h> 42#include <stdlib.h>
43 43
44#include "curses.h" 44#include "curses.h"
45#include "curses_private.h" 45#include "curses_private.h"
46 46
47#ifndef _CURSES_USE_MACROS 47#ifndef _CURSES_USE_MACROS
48 48
49/* 49/*
50 * insch -- 50 * insch --
@@ -69,27 +69,27 @@ mvinsch(int y, int x, chtype ch) @@ -69,27 +69,27 @@ mvinsch(int y, int x, chtype ch)
69} 69}
70 70
71/* 71/*
72 * mvwinsch -- 72 * mvwinsch --
73 * Do an insert-char on the line at (y, x) in the given window. 73 * Do an insert-char on the line at (y, x) in the given window.
74 */ 74 */
75int 75int
76mvwinsch(WINDOW *win, int y, int x, chtype ch) 76mvwinsch(WINDOW *win, int y, int x, chtype ch)
77{ 77{
78 78
79 if (wmove(win, y, x) == ERR) 79 if (wmove(win, y, x) == ERR)
80 return ERR; 80 return ERR;
81 81
82 return winsch(stdscr, ch); 82 return winsch(win, ch);
83} 83}
84 84
85#endif 85#endif
86 86
87/* 87/*
88 * winsch -- 88 * winsch --
89 * Do an insert-char on the line, leaving (cury, curx) unchanged. 89 * Do an insert-char on the line, leaving (cury, curx) unchanged.
90 */ 90 */
91int 91int
92winsch(WINDOW *win, chtype ch) 92winsch(WINDOW *win, chtype ch)
93{ 93{
94 __LDATA *end, *temp1, *temp2; 94 __LDATA *end, *temp1, *temp2;
95 attr_t attr; 95 attr_t attr;

cvs diff -r1.5 -r1.5.6.1 src/lib/libcurses/insstr.c (expand / switch to unified diff)

--- src/lib/libcurses/insstr.c 2017/01/06 13:53:18 1.5
+++ src/lib/libcurses/insstr.c 2020/07/07 12:48:42 1.5.6.1
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: insstr.c,v 1.5 2017/01/06 13:53:18 roy Exp $ */ 1/* $NetBSD: insstr.c,v 1.5.6.1 2020/07/07 12:48:42 martin Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 The NetBSD Foundation Inc. 4 * Copyright (c) 2005 The NetBSD Foundation Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from code donated to the NetBSD Foundation 7 * This code is derived from code donated to the NetBSD Foundation
8 * by Ruibiao Qiu <ruibiao@arl.wustl.edu,ruibiao@gmail.com>. 8 * by Ruibiao Qiu <ruibiao@arl.wustl.edu,ruibiao@gmail.com>.
9 * 9 *
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -26,27 +26,27 @@ @@ -26,27 +26,27 @@
26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE. 34 * SUCH DAMAGE.
35 */ 35 */
36 36
37#include <sys/cdefs.h> 37#include <sys/cdefs.h>
38#ifndef lint 38#ifndef lint
39__RCSID("$NetBSD: insstr.c,v 1.5 2017/01/06 13:53:18 roy Exp $"); 39__RCSID("$NetBSD: insstr.c,v 1.5.6.1 2020/07/07 12:48:42 martin Exp $");
40#endif /* not lint */ 40#endif /* not lint */
41 41
42#include <string.h> 42#include <string.h>
43#include <stdlib.h> 43#include <stdlib.h>
44 44
45#include "curses.h" 45#include "curses.h"
46#include "curses_private.h" 46#include "curses_private.h"
47 47
48#ifndef _CURSES_USE_MACROS 48#ifndef _CURSES_USE_MACROS
49 49
50/* 50/*
51 * insstr -- 51 * insstr --
52 * insert a multi-byte character string into the current window 52 * insert a multi-byte character string into the current window
@@ -93,41 +93,41 @@ mvinsnstr(int y, int x, const char *str, @@ -93,41 +93,41 @@ mvinsnstr(int y, int x, const char *str,
93} 93}
94 94
95/* 95/*
96 * mvwinsstr -- 96 * mvwinsstr --
97 * Do an insert-string on the line at (y, x) in the given window. 97 * Do an insert-string on the line at (y, x) in the given window.
98 */ 98 */
99int 99int
100mvwinsstr(WINDOW *win, int y, int x, const char *str) 100mvwinsstr(WINDOW *win, int y, int x, const char *str)
101{ 101{
102 102
103 if (wmove(win, y, x) == ERR) 103 if (wmove(win, y, x) == ERR)
104 return ERR; 104 return ERR;
105 105
106 return winsstr(stdscr, str); 106 return winsstr(win, str);
107} 107}
108 108
109/* 109/*
110 * mvwinsnstr -- 110 * mvwinsnstr --
111 * Do an insert-n-string on the line at (y, x) in the given window. 111 * Do an insert-n-string on the line at (y, x) in the given window.
112 */ 112 */
113int 113int
114mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n) 114mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n)
115{ 115{
116 116
117 if (wmove(win, y, x) == ERR) 117 if (wmove(win, y, x) == ERR)
118 return ERR; 118 return ERR;
119 119
120 return winsnstr(stdscr, str, n); 120 return winsnstr(win, str, n);
121} 121}
122 122
123#endif 123#endif
124 124
125/* 125/*
126 * winsstr -- 126 * winsstr --
127 * Do an insert-string on the line, leaving (cury, curx) unchanged. 127 * Do an insert-string on the line, leaving (cury, curx) unchanged.
128 * No wrapping. 128 * No wrapping.
129 */ 129 */
130int 130int
131winsstr(WINDOW *win, const char *str) 131winsstr(WINDOW *win, const char *str)
132{ 132{
133 133