summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sail/display.h43
-rw-r--r--sail/pl_1.c5
-rw-r--r--sail/pl_2.c5
-rw-r--r--sail/pl_3.c5
-rw-r--r--sail/pl_4.c6
-rw-r--r--sail/pl_5.c7
-rw-r--r--sail/pl_6.c5
-rw-r--r--sail/pl_7.c7
-rw-r--r--sail/pl_main.c5
-rw-r--r--sail/player.h17
10 files changed, 73 insertions, 32 deletions
diff --git a/sail/display.h b/sail/display.h
new file mode 100644
index 00000000..c36a92d0
--- /dev/null
+++ b/sail/display.h
@@ -0,0 +1,43 @@
+/* $NetBSD: display.h,v 1.1 2001/01/04 04:41:41 jwise Exp $ */
+
+/*-
+ * Copyright (c) 2001 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifdef SIGTSTP
+#define SCREENTEST() (initscr() != NULL && signal(SIGTSTP, SIG_DFL) != SIG_ERR && STAT_R < COLS && SCROLL_Y > 0)
+#else
+#define SCREENTEST() (initscr() != NULL && STAT_R < COLS && SCROLL_Y > 0)
+#endif
+
+extern WINDOW *view_w;
+extern WINDOW *slot_w;
+extern WINDOW *scroll_w;
+extern WINDOW *stat_w;
+extern WINDOW *turn_w;
+
diff --git a/sail/pl_1.c b/sail/pl_1.c
index 1ce113ec..03308384 100644
--- a/sail/pl_1.c
+++ b/sail/pl_1.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_1.c,v 1.12 2001/01/04 03:51:24 jwise Exp $ */
+/* $NetBSD: pl_1.c,v 1.13 2001/01/04 04:41:41 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)pl_1.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_1.c,v 1.12 2001/01/04 03:51:24 jwise Exp $");
+__RCSID("$NetBSD: pl_1.c,v 1.13 2001/01/04 04:41:41 jwise Exp $");
#endif
#endif /* not lint */
@@ -47,6 +47,7 @@ __RCSID("$NetBSD: pl_1.c,v 1.12 2001/01/04 03:51:24 jwise Exp $");
#include <signal.h>
#include <stdio.h>
#include <unistd.h>
+#include "extern.h"
#include "player.h"
void leave(int);
diff --git a/sail/pl_2.c b/sail/pl_2.c
index 009cb3d0..2d06040a 100644
--- a/sail/pl_2.c
+++ b/sail/pl_2.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_2.c,v 1.7 2001/01/04 03:51:24 jwise Exp $ */
+/* $NetBSD: pl_2.c,v 1.8 2001/01/04 04:41:41 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,11 +38,12 @@
#if 0
static char sccsid[] = "@(#)pl_2.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_2.c,v 1.7 2001/01/04 03:51:24 jwise Exp $");
+__RCSID("$NetBSD: pl_2.c,v 1.8 2001/01/04 04:41:41 jwise Exp $");
#endif
#endif /* not lint */
#include <signal.h>
+#include "extern.h"
#include "player.h"
void play(void);
diff --git a/sail/pl_3.c b/sail/pl_3.c
index 20ab7146..9f4f07b6 100644
--- a/sail/pl_3.c
+++ b/sail/pl_3.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_3.c,v 1.13 2001/01/04 03:51:24 jwise Exp $ */
+/* $NetBSD: pl_3.c,v 1.14 2001/01/04 04:41:41 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,12 +38,13 @@
#if 0
static char sccsid[] = "@(#)pl_3.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_3.c,v 1.13 2001/01/04 03:51:24 jwise Exp $");
+__RCSID("$NetBSD: pl_3.c,v 1.14 2001/01/04 04:41:41 jwise Exp $");
#endif
#endif /* not lint */
#include <signal.h>
#include <stdlib.h>
+#include "extern.h"
#include "player.h"
void acceptcombat(void);
diff --git a/sail/pl_4.c b/sail/pl_4.c
index 73f78a30..7931991b 100644
--- a/sail/pl_4.c
+++ b/sail/pl_4.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_4.c,v 1.11 2001/01/04 03:51:24 jwise Exp $ */
+/* $NetBSD: pl_4.c,v 1.12 2001/01/04 04:41:41 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,11 +38,13 @@
#if 0
static char sccsid[] = "@(#)pl_4.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_4.c,v 1.11 2001/01/04 03:51:24 jwise Exp $");
+__RCSID("$NetBSD: pl_4.c,v 1.12 2001/01/04 04:41:41 jwise Exp $");
#endif
#endif /* not lint */
+#include <sys/types.h>
#include <ctype.h>
+#include "extern.h"
#include "player.h"
void changesail(void);
diff --git a/sail/pl_5.c b/sail/pl_5.c
index f2762186..b54d0f47 100644
--- a/sail/pl_5.c
+++ b/sail/pl_5.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_5.c,v 1.11 2001/01/04 03:51:24 jwise Exp $ */
+/* $NetBSD: pl_5.c,v 1.12 2001/01/04 04:41:42 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,14 +38,17 @@
#if 0
static char sccsid[] = "@(#)pl_5.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_5.c,v 1.11 2001/01/04 03:51:24 jwise Exp $");
+__RCSID("$NetBSD: pl_5.c,v 1.12 2001/01/04 04:41:42 jwise Exp $");
#endif
#endif /* not lint */
#include <ctype.h>
+#include <curses.h>
#include <signal.h>
#include <stdio.h>
+#include "extern.h"
#include "player.h"
+#include "display.h"
#define turnfirst(x) (*x == 'r' || *x == 'l')
diff --git a/sail/pl_6.c b/sail/pl_6.c
index e13378e5..d22311f8 100644
--- a/sail/pl_6.c
+++ b/sail/pl_6.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_6.c,v 1.8 2001/01/04 03:51:24 jwise Exp $ */
+/* $NetBSD: pl_6.c,v 1.9 2001/01/04 04:41:42 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,11 +38,12 @@
#if 0
static char sccsid[] = "@(#)pl_6.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_6.c,v 1.8 2001/01/04 03:51:24 jwise Exp $");
+__RCSID("$NetBSD: pl_6.c,v 1.9 2001/01/04 04:41:42 jwise Exp $");
#endif
#endif /* not lint */
#include <signal.h>
+#include "extern.h"
#include "player.h"
void repair(void);
diff --git a/sail/pl_7.c b/sail/pl_7.c
index 620403e4..7d6a5170 100644
--- a/sail/pl_7.c
+++ b/sail/pl_7.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_7.c,v 1.19 2001/01/04 03:51:24 jwise Exp $ */
+/* $NetBSD: pl_7.c,v 1.20 2001/01/04 04:41:42 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,15 +38,18 @@
#if 0
static char sccsid[] = "@(#)pl_7.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_7.c,v 1.19 2001/01/04 03:51:24 jwise Exp $");
+__RCSID("$NetBSD: pl_7.c,v 1.20 2001/01/04 04:41:42 jwise Exp $");
#endif
#endif /* not lint */
+#include <curses.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <unistd.h>
+#include "extern.h"
#include "player.h"
+#include "display.h"
void initscreen(void);
void cleanupscreen(void);
diff --git a/sail/pl_main.c b/sail/pl_main.c
index 545748c1..397b9046 100644
--- a/sail/pl_main.c
+++ b/sail/pl_main.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_main.c,v 1.13 2001/01/04 03:51:24 jwise Exp $ */
+/* $NetBSD: pl_main.c,v 1.14 2001/01/04 04:41:42 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)pl_main.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_main.c,v 1.13 2001/01/04 03:51:24 jwise Exp $");
+__RCSID("$NetBSD: pl_main.c,v 1.14 2001/01/04 04:41:42 jwise Exp $");
#endif
#endif /* not lint */
@@ -48,6 +48,7 @@ __RCSID("$NetBSD: pl_main.c,v 1.13 2001/01/04 03:51:24 jwise Exp $");
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include "extern.h"
#include "player.h"
#include "restart.h"
diff --git a/sail/player.h b/sail/player.h
index 968af6b4..352b818a 100644
--- a/sail/player.h
+++ b/sail/player.h
@@ -1,4 +1,4 @@
-/* $NetBSD: player.h,v 1.8 1999/12/28 18:05:25 jsm Exp $ */
+/* $NetBSD: player.h,v 1.9 2001/01/04 04:41:42 jwise Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -35,9 +35,6 @@
* @(#)player.h 8.2 (Berkeley) 5/3/95
*/
-#include <curses.h>
-#include "extern.h"
-
/* sizes and coordinates for the screen */
#define LINE_T 0
@@ -92,18 +89,6 @@
#define SLOT_B VIEW_B
#define SLOT_R (SLOT_L+SLOT_X-1)
-#ifdef SIGTSTP
-#define SCREENTEST() (initscr() != NULL && signal(SIGTSTP, SIG_DFL) != SIG_ERR && STAT_R < COLS && SCROLL_Y > 0)
-#else
-#define SCREENTEST() (initscr() != NULL && STAT_R < COLS && SCROLL_Y > 0)
-#endif
-
-extern WINDOW *view_w;
-extern WINDOW *slot_w;
-extern WINDOW *scroll_w;
-extern WINDOW *stat_w;
-extern WINDOW *turn_w;
-
extern char done_curses;
extern char loaded, fired, changed, repaired;
extern char dont_adjust;