/********************************************************************** * Copyright (c) Digital Equipment Corporation 1984, 1985, 1986. * * All Rights Reserved. * * Reference "/usr/src/COPYRIGHT" for applicable restrictions. * **********************************************************************/ /* * Type tty name */ static char Sccsid[] = "@(#)tty.c 3.0 4/22/86"; char *ttyname(); main(argc, argv) char **argv; { register char *p; p = ttyname(0); if(argc==2 && !strcmp(argv[1], "-s")) ; else printf("%s\n", (p? p: "not a tty")); exit(p? 0: 1); }