-/* $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
* 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.
*
#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 */
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#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);
/*
leaveok(stat_w, 1);
leaveok(turn_w, 1);
noecho();
- crmode();
+ cbreak();
}
void
/*ARGSUSED*/
void
-newturn(int n __attribute__((__unused__)))
+newturn(int n __unused)
{
repaired = loaded = fired = changed = 0;
movebuf[0] = '\0';
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);
{
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);