Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!wuarchive!uunet!bria!mike Newsgroups: comp.lang.c Subject: Re: Unix Routines Message-ID: <361@bria> Date: 16 Jan 91 05:37:54 GMT References: <1991Jan13.163326.8246@jpradley.jpr.com] <2871@dsacg3.dsac.dla.mil> Reply-To: uunet!bria!mike (Michael Stefanik) Followup-To: comp.unix.programmer Distribution: comp.lang.c Organization: Briareus Corporation, Los Angeles, CA Lines: 34 In article <2871@dsacg3.dsac.dla.mil> dsacg3.dsac.dla.mil!nto0302 (Bob Fisher) writes: >From article <1991Jan13.163326.8246@jpradley.jpr.com], by jpr@jpradley.jpr.com (Jean-Pierre Radley): [ question about reading "special" keys in C under UNIX ] >> >> The required code is highly dependent on your hardware. >> Check out termcap, terminfo, tgetent, tput, and other such entries in your >> manual. >> In fact, just browing through /etc/termcap, or /usr/lib/terminfo/*src, will >> show you that the code sequences you seek are quite variable. > >Also check out the curses(3) library functions. > >The reference to hardware dependency refers to terminals, not just the CPU. >Different brands of terminals on the same system may require different >command sequences. Actually, the code for this is very terminal *independant*; this is why termcap/terminfo and the routines that are there exist. The programmer is isolated from the differences on terminal types, knowing that the curses routines will perform the same function on different terminal type (unless of course, the termcap entry is trashed). Since most termcap/terminfo sources have virtually every Tom, Dick, and Harry terminal made by Mankind since the Dawn of Time, the applications programmer rarely has to worry about writing his own cap entry. BTW, I directed follow-ups to comp.unix.programmer, where this really belongs ... -- Michael Stefanik, Systems Engineer (JOAT), Briareus Corporation UUCP: ...!uunet!bria!mike -- technoignorami (tek'no-ig'no-ram`i) a group of individuals that are constantly found to be saying things like "Well, it works on my DOS machine ..."