bug in tgetent()

utzoo!decvax!harpo!npoiv!alice!rabbit!rtm utzoo!decvax!harpo!npoiv!alice!rabbit!rtm
Thu Aug 5 07:42:00 AEST 1982


----- News saved at Thu Aug  5 07:38:06 1982

tgetent() is a recursive function. Every time it sees
tc= it calls itself to find the description of the
specified terminal. If you set hopcount to zero each
time tgetent() is called, you defeat it's purpose,
which is to count the recursive calls to tgetent().
What you really want is to rename tgetent() _tgetent(),
and make a routine called tgetent() with the same arguments
as the old tgetent() (now _tgetent()) that sets hopcount = 0
and calls _tgetent() with its arguments.



More information about the Comp.bugs.4bsd.ucb-fixes mailing list