[net.sources.games] BSD version of Battleship

holloway@drivax.UUCP (Bruce Holloway) (03/13/86)

Thanks to Chris Grevstad, here is the diff file to make battleship BSD Unix
compatible. This patch assumes you've applied the previous patch to the
original battleship (with curses) posting.

Remember to remove all this header stuff and the disclaimer at the bottom.

---------snippety snip------------cut here----------snickety snack------------
509d
11c
/*#define	SEEMISS	0 */	/* Defined if the player sees the computer's
.
9c
/*#define	NOASK	0 */	/* Defined if the computer figures out whether
.
4a
/* #define	BSD	1	/* Define BSD if compiling for BSD Unix */

#ifdef BSD
#define	beep()	write(stdout,"\007",1);
#define	cbreak	crmode
#define	saveterm savetty
#define	resetterm resetty
#define	nocbreak nocrmode
#endif

.
-- 

+----------------------------------------------------------------------------+
|Whatever I write are not the opinions or policies of Digital Research, Inc.,|
|and probably won't be in the foreseeable future.                            |
+----------------------------------------------------------------------------+

Bruce Holloway

....!ucbvax!hplabs!amdahl!drivax!holloway
(I'm not THAT Bruce Holloway, I'm the other one.)

chris@minnie.UUCP (Chris Grevstad) (03/16/86)

holloway@drivax.UUCP (Bruce Holloway) says:
>Thanks to Chris Grevstad, here is the diff file to make battleship BSD Unix
> ...
> ...
>#ifdef BSD
>#define	beep()	write(stdout,"\007",1);
                              ^^^^^^
I appreciate the public thanks, but I think I said 'write(1, "\007", 1)' rather
than the above.  If I actually did say that, then I apologise, because
write(stdout, buf, len) will never work.  write() requires a file desriptor
and stdout is a file pointer.

-- 
	Chris Grevstad
	{sdcsvax,hplabs}!sdcrdcf!psivax!nrcvax!chris
	ucbvax!calma!nrcvax!chris
	ihnp4!nrcvax!chris

   "No, I'll tell you the truth.  She was a striptease dancer.  I saw
    her first in an obscene movie, one of those things in obscenacolor.
    Naked of course. They had a Kodiak bear strapped to a table, muzzled..."

holloway@drivax.UUCP (Bruce Holloway) (03/18/86)

In article <164@minnie.UUCP> chris@minnie.UUCP (Chris Grevstad) writes:
>>Thanks to Chris Grevstad, here is the diff file to make battleship BSD Unix
>> ...
>> ...
>>#ifdef BSD
>>#define	beep()	write(stdout,"\007",1);
>                              ^^^^^^
>I appreciate the public thanks, but I think I said 'write(1, "\007", 1)' rather
>than the above.  If I actually did say that, then I apologise, because
>write(stdout, buf, len) will never work.  write() requires a file desriptor
>and stdout is a file pointer.
Hmmm.... so THAT's why it didn't work. Solly.

-- 

+----------------------------------------------------------------------------+
|Whatever I write are not the opinions or policies of Digital Research, Inc.,|
|and probably won't be in the foreseeable future.                            |
+----------------------------------------------------------------------------+

Bruce Holloway

....!ucbvax!hplabs!amdahl!drivax!holloway
(I'm not THAT Bruce Holloway, I'm the other one.)