From: utzoo!decvax!harpo!utah-cs!utah-gr!thomas
Newsgroups: net.bugs.4bsd
Title: Re: RE: bug in tgetent()
Article-I.D.: utah-gr.515
Posted: Sun Aug  8 12:51:47 1982
Received: Mon Aug  9 06:20:57 1982
References: rabbit.658

If you're going to make a separate routine for recursing, then you
can just add the depth as an argument:

tgetent(bp, name)
char *bp, *name;
{
	_tgetent(bp, name, 0);
}

_tgetent(bp, name, depth)
char *bp, *name;
{
	if (depth > 32) 
		/* Do Error Stuff */
	else
	{
		....
		/* tc= processing */
		_tgetent(bp, newname, depth+1);
		....
	}
}

=Spencer