ritzenth@bgsuvax.UUCP (Phil Ritzenthaler) (01/28/88)
Here I sit, broken hearted, went to compile and only . . .
ANYWAY, . . . what system was the miles game meant for? Did I miss a -l
switch somewhere?? Here were the missing procs:
Undefined:
_beep
_tputs
_tgoto
_tgetent
_tgetnum
_tgetflag
_tgetstr
OK, where did I mess up again??
Phil Ritzenthaler |USnail: University Computer Services
| 241 Math-Science Bldg.
UUCP :.!cbosgd!osu-cis!bgsuvax!ritzenth | Bowling Green State University
CSNET: ritzenth@bgsu.edu | Bowling Green, OH 43403-0125
ARPA : ritzenth%bgsu.edu@relay.cs.net | Phone: (419) 372-2102
dag@chinet.UUCP (Daniel A. Glasser) (02/03/88)
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.
allbery@ncoast.UUCP (Brandon Allbery) (02/06/88)
As quoted from <2192@chinet.UUCP> by dag@chinet.UUCP (Daniel A. Glasser): +--------------- | 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 | | beep() There does not appear to be an analogy | | On my system III machine I had to do the following to get miles to | compile (without changing the posted sources at all...): +--------------- Actually, it's System V. Try the following: #define cbreak() crmode() #define beep() write(1, "\7", 1) Works fine when I have to compile a System V program under System III. -- Brandon S. Allbery, moderator of comp.sources.misc {well!hoptoad,uunet!hnsurg3,cbosgd,sun!mandrill}!ncoast!allbery KABOOM!!! Worf: "I think I'm sick." LaForge: "I'm sure half the ship knows it."
jonl@sco.COM (Owl Of Nite) (02/10/88)
+-I seem to recall ritzenth@bgsuvax.UUCP (Phil Ritzenthaler) writing: | | Here I sit, broken hearted, went to compile and only . . . | | ANYWAY, . . . what system was the miles game meant for? Did I miss a -l | switch somewhere?? Here were the missing procs: | | Undefined: | _beep | _tputs | _tgoto | _tgetent | _tgetnum | _tgetflag | _tgetstr | | OK, where did I mess up again?? | | Phil Ritzenthaler |USnail: University Computer Services | | 241 Math-Science Bldg. | UUCP :.!cbosgd!osu-cis!bgsuvax!ritzenth | Bowling Green State Unversity | CSNET: ritzenth@bgsu.edu | Bowling Green, OH 43403-0125 | ARPA : ritzenth%bgsu.edu@relay.cs.net | Phone: (419) 372-2102 try using the -ltermcap compiling flag. That should get rid of the _tputs, _tgoto, _tgetent, _tgetnum, _tgetflag, and _tgetstr. the _beep funtion sounds like something that is not declared correctly in the code. what? ... what?!?!? =============================================================================== jon luini || WORK: 408-425-7222 || HOME: 408-423-2917 Work: || jonl@sco.com || ...!{uunet, ihnp4, ucbvax!ucscc}!sco!jonl Evil: || niteowl@ssyx.ucsc.edu || ...!{ucbvax}!ucscc!ssyx!niteowl ===============================================================================