summaryrefslogtreecommitdiffstats
path: root/sail/pl_7.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>1997-10-13 21:02:57 +0000
committerchristos <christos@NetBSD.org>1997-10-13 21:02:57 +0000
commitbd10b531314ec546d25fd238f27d94c74a726567 (patch)
treea6f88adfc60ca14d2851035c0a9fce98fcc96438 /sail/pl_7.c
parent7e5c0c57606f0f1e9335aa74ef5ea8c8048a9b2c (diff)
downloadbsdgames-darwin-bd10b531314ec546d25fd238f27d94c74a726567.tar.gz
bsdgames-darwin-bd10b531314ec546d25fd238f27d94c74a726567.tar.zst
bsdgames-darwin-bd10b531314ec546d25fd238f27d94c74a726567.zip
- make sure that the arguments to the printf like functions are correct
- add a makemsg() function to accompany makesignal.
Diffstat (limited to 'sail/pl_7.c')
-rw-r--r--sail/pl_7.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/sail/pl_7.c b/sail/pl_7.c
index c1525b4c..006020a4 100644
--- a/sail/pl_7.c
+++ b/sail/pl_7.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pl_7.c,v 1.7 1997/10/13 19:45:39 christos Exp $ */
+/* $NetBSD: pl_7.c,v 1.8 1997/10/13 21:04:32 christos Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)pl_7.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: pl_7.c,v 1.7 1997/10/13 19:45:39 christos Exp $");
+__RCSID("$NetBSD: pl_7.c,v 1.8 1997/10/13 21:04:32 christos Exp $");
#endif
#endif /* not lint */
@@ -218,17 +218,13 @@ prompt(p, ship)
char *p;
struct ship *ship;
{
- static char buf[60];
+ static char buf[BUFSIZ];
- if (ship != 0) {
- (void)sprintf(buf, p, ship->shipname, colours(ship),
- sterncolour(ship));
- p = buf;
- }
- sc_prompt = p;
+ fmtship(buf, sizeof(buf), p, ship);
+ sc_prompt = buf;
sc_buf = "";
sc_hasprompt = 1;
- (void) waddstr(scroll_w, p);
+ (void) waddstr(scroll_w, buf);
}
void
@@ -247,7 +243,6 @@ struct ship *ship;
char flag;
{
int c;
-
prompt(p, ship);
blockalarm();
(void) wrefresh(scroll_w);