Mercurial > hg > toybox
changeset 181:78d93164a9d2
Add comment, and whitespace changes.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 27 Nov 2007 01:36:50 -0600 |
parents | 05a452127fc1 |
children | ed26d3529575 |
files | toys/tty.c |
diffstat | 1 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/toys/tty.c Fri Nov 23 21:01:37 2007 +0000 +++ b/toys/tty.c Tue Nov 27 01:36:50 2007 -0600 @@ -1,13 +1,17 @@ +/* vi: set sw=4 ts=4: */ +/* tty.c - print terminal name of stdin + * + * See http://www.opengroup.org/onlinepubs/009695399/utilities/tty.html + */ + #include "toys.h" int tty_main(void) { char *name = ttyname(0); if (!toys.optflags) { - if (name) - puts(name); - else - puts("Not a tty"); + if (name) puts(name); + else puts("Not a tty"); } return !name; }