Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!nosc!crash!nusdecs!rwhite From: rwhite@nusdecs.uucp (0257014-Robert White(140)) Newsgroups: comp.lang.c Subject: Re: Curses question Message-ID: <1990Nov21.190302.10159@nusdecs.uucp> Date: 21 Nov 90 19:03:02 GMT References: Distribution: na Organization: National University San Diego Lines: 48 In article hart@blackjack.dt.navy.mil (Michael Hart) writes: >I've been trying out curses on an SGI Personal Iris. The problem > Compile: cc cur1.c -lc_s -lcurses -o cur1 While I don't beleive that it is a problem in your current example, you should remember that the libraries are scanned in the order they occur on the cc command line (in ?most? implementations) so if you use the shared c library (-lc_s) is *MUST* be the last library spesified! If you don't do this you may discover many strange things happening durring compilation or runtime (depending on numerous things). (e.g.) if your program calls a routine x and curses calls a routine y and x and y are from the standard c library and both depend on the same global data item you will have name colision because the y will come from the c library and x will come from the shared library and the data item will be included twice by the same name with an impossible linkage [sic] These linkage problems *may* already be occuring in your example because of the possiblity thay you may be getting stdio routines piecemeal from the tro libraries. Don't *know* this to be the case, but it could happen. > [Some Code] It *looked* ok at a quick read. The only thing that really jumped out at me was that if you use the strange-key definitions you really *should* call keypad(win,TRUE) on the window you wgetch() your input from (stdscr in the example). An other possibility is that the control-C combo may be setup to signal(2) your program. If you have ^C setup as interrupt or quit your system would abort the program instead of using your branching logic to exit. This could cause the symptoms you describe. The best way to test this is to check for a known-not-to-be-special character like the space bar; or put some indicative code after the loop (e.g. a printf("Normal Exit\n"); after the endwin() call. Disclaimer: Just a few guesses that might help, not dogma (woff ;-) ******************************************************************* Robert White | Not some church, and not the state, Network Administrator | Not some dark capricious fate. National University | Who you are, and when you lose, crash!nusdecs!rwhite | Comes only from the things you chose. (619) 563-7140 (voice) | -- me. *******************************************************************