How do you ask a terminal what it is?
Wed Jan 23 12:52:09 AEST 1991
In article <1991Jan20.042402.24635 at 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 ..."
More information about the Comp.unix.programmer
mailing list