Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!hubcap!ncrcae!opusc!jwwalker From: jwwalker@opusc.csd.scarolina.edu (Jim Walker) Newsgroups: comp.unix.programmer Subject: Re: How do you ask a terminal what it is? Message-ID: <1991Jan23.190607.4245@opusc.csd.scarolina.edu> Date: 23 Jan 91 19:06:07 GMT References: <1991Jan20.042402.24635@opusc.csd.scarolina.edu> <383@bria> Distribution: usa Organization: Univ. of South Carolina, Columbia, Dept. of Math. Lines: 30 In article <383@bria> writes: > >As for a better solution, why not simply make a termcap (or terminfo) >defintion for a terminal type 'regis'. Then, all you need is something >as simple as: > > if ( strcmp(getenv("TERM"),"regis") == 0 ) { [etc] >If you want some more specific help, then send me email. >-- >Michael Stefanik, Systems Engineer (JOAT), Briareus Corporation >UUCP: ...!uunet!bria!mike (I would have sent you email, but neither I nor my mail reader understand how to reply to your message.) The trouble with this suggestion is, how does the TERM environment variable get set correctly? It's normally set with the .login or .cshrc file, right? The trouble is that some of our users, especially grad students without terminals of their own, may log in on one type of terminal one day and another type the next. I myself have a VT330 (a ReGIS terminal) at work and a VT100 emulator at home. One could argue that something in the .login, rather than individual programs, should worry about querying the terminal. Anyway, I did get the details worked out, with the help of some GNU Emacs source code. -- -- Jim Walker 76367.2271@compuserve.com