home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
419b.lha
/
TERMLIB
/
termcap.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-05
|
535b
|
27 lines
/* termcap... print current terminal capabilities.
*
* Termcap prints all the termcap capability strings for the terminal `term'.
* The output is in machine readable form, suitable for use in the construct:
*
* TERMCAP="`termcap`"; export TERMCAP
*
* Syntax: termcap [term]
*/
#include <stdio.h>
char *tent;
main(ac, av)
int ac;
char **av;
{
char tbuf[1024];
if(ac==1) if(tgetent(tbuf, getenv("TERM"))) {
puts(tbuf);
exit(0);
} else exit(-1);
if(tgetent(tbuf, av[1])) {
puts(tbuf);
exit(0);
} else exit(-1);
}