頭檔案
#include<term.h>
函式原型
char *tigetstr(char *capname);
範例
#include <stdio.h>
#include <term.h>
#include <ncurses.h>
#include<stdlib.h>
int main()
{
char *str;
setupterm(NULL, fileno(stdout), (int *)0);
str = tigetstr("acsc");
printf("This terminal acsc value is %s\n", str);
exit(0);
}
[root@localhost chapter05]#gcc -o setupterm setupterm.c -lcurses
[root@localhost chapter05]# ./setupterm
This terminal acsc value is ``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~