Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!psuvax1!wuarchive!uunet!bria!mike Newsgroups: comp.unix.programmer Subject: Re: How do you ask a terminal what it is? Message-ID: <383@bria> Date: 23 Jan 91 01:52:09 GMT References: <1991Jan20.042402.24635@opusc.csd.scarolina.edu> Distribution: usa Organization: Briareus Corporation, Los Angeles, CA Lines: 29 In article <1991Jan20.042402.24635@opusc.csd.scarolina.edu>, opusc.csd.scarolina.edu!jwwalker (Jim Walker) writes: > > I'm a UNIX novice, though not a programming novice, and I'm > trying to figure out how a program can determine whether a DEC > terminal is capable of ReGIS graphics. [...] > [ program example deleted ... ] This is because using the standard functions, i/o is buffered and no doubt that your terminal in canonical mode instead of cbreak mode. 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 ) { /* then I have this terminal type */ } else { /* whatever */ } If you want some more specific help, then send me email. -- 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 ..."