Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!aurora!labrea!decwrl!ucbvax!cbosgd!ihnp4!chinet!dag From: dag@chinet.UUCP (Daniel A. Glasser) Newsgroups: comp.sources.bugs Subject: Re: miles compilation problem/ what system is this really meant for? Message-ID: <2192@chinet.UUCP> Date: 2 Feb 88 17:51:33 GMT References: <1529@bgsuvax.UUCP> Reply-To: dag@chinet.UUCP (Daniel A. Glasser) Organization: Chinet - Public Access Unix Lines: 42 Keywords: bugs . . . I don't know what the initial system was, but I suspect BSD... Most of the missing functions are in libtermlib.a, but the following two functions are not (exactly) there: cbreak() Enters raw mode on the terminal. Some systems call this raw() instead -- it's exactly equivelent. beep() There does not appear to be an analogy to this one in termlib, so you will just have to supply your own. It 'rings' the terminal bell. If you want to get fancy, use the termcap 'visible-bell' capability for terminals that have it. On my system III machine I had to do the following to get miles to compile (without changing the posted sources at all...): Modify the makefile so that after "-lcurses" there is "-ltermlib" Add to the CCFLAGS "-Dcbreak=raw" Add a new source, local.c, which contains the function "beep". This function takes no parameters, and writes a beep to the standard error stream (I use '\7', though '\a' should work). With these minor changes to the makefile and addition of local.c, I had no trouble at all. As an alternative, you can modify the calls to cbreak in io.c to call raw instead (I suggest that you conditionalize the source with #ifdefs for future portability) and (also conditionally) add the 'beep' function. I suspect io.c is the best place for this. You will still need the '-ltermlib' on the link (final cc) command line. -- Nobody at the place where I work Daniel A. Glasser knows anything about my opinions ...!ihnp4!chinet!dag my postings, or me for that matter! ...!ihnp4!mwc!dag ...!ihnp4!mwc!gorgon!dag One of those things that goes "BUMP!!! (ouch!)" in the night.