[8376] in Athena Bugs
rsaix 7.3P: tgetent() always returns -1
daemon@ATHENA.MIT.EDU (Calvin Clark)
Fri Oct 11 09:52:39 1991
Date: Fri, 11 Oct 91 09:53:33 -0400
From: Calvin Clark <ckclark@Athena.MIT.EDU>
To: bugs@Athena.MIT.EDU
Reply-To: ckclark@mit.edu
System name: splat
Type and version: POWER 7.3P
Display type: colorgda
What were you trying to do?
Use the compatability routine tgetent().
What's wrong:
The following program will produce the output "result = -1" on
an RS/6000. In BSD, this would mean that tgetent() could not open the
file /etc/termcap:
main()
{
char buf[1024];
int result;
result = tgetent(buf,"xterm");
printf("result = %d\n",result);
}
As far as I can tell, the same result is obtained for any set of
arguments, so it has nothing to do with the use of "xterm" in this
example.
What should have happened:
I don't care how ancient tgetent() is. If IBM is going to
provide a termcap library for compatability, it should at least work.
Please describe any relevant documentation references:
The info browser section on "Termcap Compatability Routines"
seems to say that the absence of /etc/termcap should not be a problem:
Termcap Compatibility Routines
These routines are included for compatibility with programs that require
termcap. Their parameters are the same as for termcap, and they are
emulated using the terminfo data base.
tgetent(bp, name) Looks up the termcap entry for name. Both bp and name
are strings. The name parameter is a terminal name; bp is ignored.
Calls setupterm.