Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_FS_1_19910112 - c/lib/test/ttynam.c
There are 9 other files named ttynam.c in the archive. Click here to see a list.
#include <stdio.h>

extern char *ttyname();
extern int isatty();

main()
{
    printf("isatty(0) => %d\n", isatty(0));
    printf("ttyname(0) => \"%s\"\n", ttyname(0));
}