// tty.c, version 1.1.0
// OMKOV coreutils implementation of POSIX tty
// Copyright (C) 2020, Jakob Wakeling
// MIT Licence
#include<unistd.h>#include<stdio.h>intmain(void){char*tty=ttyname(fileno(stdin));if(tty){puts(tty);return0;}else{printf("not a tty\n");return1;}}