Fri Aug 6 03:10:27 2010 UTC ()
Don't define esc-[ as a custom key sequence because it steps on vt
function keys.


(dholland)
diff -r1.38 -r1.39 src/games/sail/pl_7.c

cvs diff -r1.38 -r1.39 src/games/sail/pl_7.c (expand / switch to unified diff)

--- src/games/sail/pl_7.c 2009/08/12 09:05:08 1.38
+++ src/games/sail/pl_7.c 2010/08/06 03:10:26 1.39
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pl_7.c,v 1.38 2009/08/12 09:05:08 dholland Exp $ */ 1/* $NetBSD: pl_7.c,v 1.39 2010/08/06 03:10:26 dholland Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1983, 1993 4 * Copyright (c) 1983, 1993
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[] = "@(#)pl_7.c 8.1 (Berkeley) 5/31/93"; 35static char sccsid[] = "@(#)pl_7.c 8.1 (Berkeley) 5/31/93";
36#else 36#else
37__RCSID("$NetBSD: pl_7.c,v 1.38 2009/08/12 09:05:08 dholland Exp $"); 37__RCSID("$NetBSD: pl_7.c,v 1.39 2010/08/06 03:10:26 dholland Exp $");
38#endif 38#endif
39#endif /* not lint */ 39#endif /* not lint */
40 40
41#include <curses.h> 41#include <curses.h>
42#include <err.h> 42#include <err.h>
43#include <errno.h> 43#include <errno.h>
44#include <signal.h> 44#include <signal.h>
45#include <stdarg.h> 45#include <stdarg.h>
46#include <stdio.h> 46#include <stdio.h>
47#include <stdlib.h> 47#include <stdlib.h>
48#include <string.h> 48#include <string.h>
49#include "array.h" 49#include "array.h"
50#include "extern.h" 50#include "extern.h"
@@ -142,27 +142,29 @@ initscreen(void) @@ -142,27 +142,29 @@ initscreen(void)
142 } 142 }
143 143
144 leaveok(view_w, 1); 144 leaveok(view_w, 1);
145 leaveok(slot_w, 1); 145 leaveok(slot_w, 1);
146 leaveok(stat_w, 1); 146 leaveok(stat_w, 1);
147 leaveok(turn_w, 1); 147 leaveok(turn_w, 1);
148 noecho(); 148 noecho();
149 cbreak(); 149 cbreak();
150 150
151 /* 151 /*
152 * Define esc-x keys 152 * Define esc-x keys
153 */ 153 */
154 for (ch = 0; ch < 127; ch++) { 154 for (ch = 0; ch < 127; ch++) {
155 define_esc_key(ch); 155 if (ch != '[') {
 156 define_esc_key(ch);
 157 }
156 } 158 }
157 159
158 done_curses++; 160 done_curses++;
159} 161}
160 162
161void 163void
162cleanupscreen(void) 164cleanupscreen(void)
163{ 165{
164 /* alarm already turned off */ 166 /* alarm already turned off */
165 if (done_curses) { 167 if (done_curses) {
166 wmove(scroll_w, SCROLL_Y - 1, 0); 168 wmove(scroll_w, SCROLL_Y - 1, 0);
167 wclrtoeol(scroll_w); 169 wclrtoeol(scroll_w);
168 display_redraw(); 170 display_redraw();