home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
419b.lha
/
TERMLIB
/
tgetnum.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-05
|
464b
|
30 lines
/* 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;
}