1 /* `tty.c` - return user's terminal name
2 Copyright (c) 2022, Alan Potteiger
3 See `LICENSE` for copyright and license details */
5 #define _POSIX_C_SOURCE 200809L
10 static const char *usage
= {
15 main(int argc
, char *argv
[])
19 if (isatty(0) && (name
= ttyname(0)) != NULL
) {