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: }

Defined functions

main defined in line 10; never used

Defined variables

buf defined in line 7; used 3 times
Last modified: 1979-11-11
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 557
Valid CSS Valid XHTML 1.0 Strict