1997-06-30 11:57:52 +00:00
|
|
|
*** galaxis.c Wed Sep 20 17:16:33 1995
|
1997-07-01 07:12:54 +00:00
|
|
|
--- /home/andy/tmp/wrk/galaxis.c Tue Jul 1 06:54:10 1997
|
1997-06-30 11:57:52 +00:00
|
|
|
***************
|
|
|
|
*** 8,14 ****
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <termios.h>
|
|
|
|
! #include <curses.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <assert.h>
|
|
|
|
--- 8,14 ----
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <termios.h>
|
|
|
|
! #include <ncurses.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <assert.h>
|
|
|
|
***************
|
|
|
|
*** 131,137 ****
|
|
|
|
|
|
|
|
(void) signal(SIGINT,outro);
|
|
|
|
(void) signal(SIGINT,outro);
|
|
|
|
! (void) signal(SIGIOT,outro); /* for assert(3) */
|
|
|
|
if(signal(SIGQUIT,SIG_IGN) != SIG_IGN)
|
|
|
|
(void)signal(SIGQUIT,outro);
|
|
|
|
|
|
|
|
--- 131,137 ----
|
|
|
|
|
|
|
|
(void) signal(SIGINT,outro);
|
|
|
|
(void) signal(SIGINT,outro);
|
|
|
|
! (void) signal(SIGABRT,outro); /* for assert(3) */
|
|
|
|
if(signal(SIGQUIT,SIG_IGN) != SIG_IGN)
|
|
|
|
(void)signal(SIGQUIT,outro);
|
|
|
|
|
1997-07-01 07:12:54 +00:00
|
|
|
***************
|
|
|
|
*** 540,555 ****
|
|
|
|
{
|
|
|
|
if (board[cury][curx] & S_LIFEBOAT)
|
|
|
|
{
|
|
|
|
! board[cury][curx] |= S_BOATSEEN;
|
|
|
|
! prompt("You found a lifeboat!");
|
|
|
|
! beep();
|
|
|
|
! turn++;
|
|
|
|
! boatsfound++;
|
|
|
|
! }
|
|
|
|
! else if (board[cury][curx] & S_BOATSEEN)
|
|
|
|
! {
|
|
|
|
! prompt("This lifeboat is already visible.");
|
|
|
|
! beep();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
--- 540,558 ----
|
|
|
|
{
|
|
|
|
if (board[cury][curx] & S_LIFEBOAT)
|
|
|
|
{
|
|
|
|
! if (board[cury][curx] & S_BOATSEEN)
|
|
|
|
! {
|
|
|
|
! prompt("This lifeboat is already visible.");
|
|
|
|
! beep();
|
|
|
|
! }
|
|
|
|
! else
|
|
|
|
! {
|
|
|
|
! board[cury][curx] |= S_BOATSEEN;
|
|
|
|
! prompt("You found a lifeboat!");
|
|
|
|
! beep();
|
|
|
|
! turn++;
|
|
|
|
! boatsfound++;
|
|
|
|
! }
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|