1: /*
2: * Copyright (c) 1980 Regents of the University of California.
3: * All rights reserved. The Berkeley software License Agreement
4: * specifies the terms and conditions for redistribution.
5: */
6:
7: #if !defined(lint) && !defined(NOSCCS)
8: static char sccsid[] = "@(#)tc1.c 5.1 (Berkeley) 6/5/85";
9: #endif not lint
10:
11: /*
12: * tc1 [term]
13: * dummy program to test termlib.
14: * gets entry, counts it, and prints it.
15: */
16: #include <stdio.h>
17: char buf[1024];
18: char *getenv();
19:
20: main(argc, argv) char **argv; {
21: char *p;
22: int rc;
23:
24: if (argc < 2)
25: p = getenv("TERM");
26: else
27: p = argv[1];
28: rc = tgetent(buf,p);
29: printf("tgetent returns %d, len=%d, text=\n'%s'\n",rc,strlen(buf),buf);
30: }
Defined functions
main
defined in line
20;
never used
Defined variables
buf
defined in line
17; used 3 times
sccsid
defined in line
8;
never used