|
|
1.1 root 1: /*
2: * tc1 [term]
3: * dummy program to test termlib.
4: * gets entry, counts it, and prints it.
5: */
6: #include <stdio.h>
7: char buf[1024];
8: char *getenv();
9:
10: main(argc, argv) char **argv; {
11: char *p;
12: int rc;
13:
14: if (argc < 2)
15: p = getenv("TERM");
16: else
17: p = argv[1];
18: rc = tgetent(buf,p);
19: printf("tgetent returns %d, len=%d, text=\n'%s'\n",rc,strlen(buf),buf);
20: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.