/********************************************************************** * Copyright (c) Digital Equipment Corporation 1984, 1985, 1986. * * All Rights Reserved. * * Reference "/usr/src/COPYRIGHT" for applicable restrictions. * **********************************************************************/ /* SCCSID: @(#)tc1.c 3.0 4/22/86 */ /* * tc1 [term] * dummy program to test termlib. * gets entry, counts it, and prints it. */ #include <stdio.h> char buf[1024]; char *getenv(); main(argc, argv) char **argv; { char *p; int rc; if (argc < 2) p = getenv("TERM"); else p = argv[1]; rc = tgetent(buf,p); printf("tgetent returns %d, len=%d, text=\n'%s'\n",rc,strlen(buf),buf); }