Battleship source for Unix w/curses

Steve Groom stevo at ucrmath.UUCP
Tue Mar 11 10:51:36 AEST 1986


> Using the following compile command, I got the following undefines below:
> cc -O -o bs bs.c -lcurses -ltermcap
> Undefined:
> _saveterm
> _cbreak
> _beep
> _resetterm
> 
> Can someone (probably the original poster) help?

I got similar messages on our 4.2bsd system. I fixed them by making the
following substitutions to the source (hints found by doing "man curses") :
savetty() for saveterm()
crmode()  for cbreak()
resetty() for resetterm()

To fix beep(), I simply added a dummy procedure at the end of the program
that looked like this (hey, I know its a hack, but it works!) :

beep(){
}

If I decided I *liked* having the terminal make noises at me, I would 
simply add the code to beep() to make it send a ^G to the screen .... 
probably something like:

wprintw(stdscr,"%c",7);

(No warrantys given or implied about the above noisemaking fragment)

Steve Groom
Univ. of Calif., Riverside
{ucla-cs, ucbvax!ucdavis} !ucrmath!stevo

/* "waddaya want for nothin' ?!" */



More information about the Comp.sources.unix mailing list