/* TERMLIB: Terminal independant database.
 *
 * Module: tgetnum
 *
 * Purpose: get numeric value such as 'li' or 'co' from termcap.
 *
 * Calling conventions: id = 2 character id.
 *
 * Returned values: -1 for failure, else numerical value.
 */
#include <stdio.h>
#include <ctype.h>
#include "termlib.h"

/* tgetnum.c (libtermlib.a)
 *
 */

tgetnum(id)
char *id;
{
	char *ptr, buf[256];
	ptr = buf;

	if(tgetstr(id, &ptr))
		return atoi(buf);
	else
		return 0;
}
