X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/38ff34bfdf7d560172c4cc0cffdb59dc4e6b309e..719ba3b79c3676a2f5d0b4fcf725e12e16c56220:/sail/pl_7.c diff --git a/sail/pl_7.c b/sail/pl_7.c index 2cdba567..30bc28cb 100644 --- a/sail/pl_7.c +++ b/sail/pl_7.c @@ -1,4 +1,4 @@ -/* $NetBSD: pl_7.c,v 1.22 2001/01/04 06:33:18 itojun Exp $ */ +/* $NetBSD: pl_7.c,v 1.28 2007/12/15 19:44:43 perry Exp $ */ /* * Copyright (c) 1983, 1993 @@ -12,11 +12,7 @@ * 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. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -38,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)pl_7.c 8.1 (Berkeley) 5/31/93"; #else -__RCSID("$NetBSD: pl_7.c,v 1.22 2001/01/04 06:33:18 itojun Exp $"); +__RCSID("$NetBSD: pl_7.c,v 1.28 2007/12/15 19:44:43 perry Exp $"); #endif #endif /* not lint */ @@ -46,35 +42,15 @@ __RCSID("$NetBSD: pl_7.c,v 1.22 2001/01/04 06:33:18 itojun Exp $"); #include #include #include +#include #include #include #include "extern.h" #include "player.h" #include "display.h" -void initscreen(void); -void cleanupscreen(void); -void newturn(int); -void Signal(const char *, struct ship *, ...) - __attribute__((__format__(__printf__,1,3))); -void Msg(const char *, ...) - __attribute__((__format__(__printf__,1,2))); static void Scroll(void); -void prompt(const char *, struct ship *); static void endprompt(int); -int sgetch(const char *, struct ship *, int); -void sgetstr(const char *, char *, int); -void draw_screen(void); -void draw_view(void); -void draw_turn(void); -void draw_stat(void); -void draw_slot(void); -void draw_board(void); -void centerview(void); -void upview(void); -void downview(void); -void leftview(void); -void rightview(void); static void adjustview(void); /* @@ -121,7 +97,7 @@ initscreen(void) leaveok(stat_w, 1); leaveok(turn_w, 1); noecho(); - crmode(); + cbreak(); } void @@ -138,7 +114,7 @@ cleanupscreen(void) /*ARGSUSED*/ void -newturn(int n __attribute__((__unused__))) +newturn(int n __unused) { repaired = loaded = fired = changed = 0; movebuf[0] = '\0'; @@ -198,9 +174,9 @@ Signal(const char *fmt, struct ship *ship, ...) va_list ap; char format[BUFSIZ]; - va_start(ap, ship); if (!done_curses) return; + va_start(ap, ship); if (*fmt == '\7') putchar(*fmt++); fmtship(format, sizeof(format), fmt, ship); @@ -215,9 +191,9 @@ Msg(const char *fmt, ...) { va_list ap; - va_start(ap, fmt); if (!done_curses) return; + va_start(ap, fmt); if (*fmt == '\7') putchar(*fmt++); vwprintw(scroll_w, fmt, ap);