From 0d88c38881088f0c8ee7a09dbba01821253a778c Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 27 Nov 2007 01:36:50 -0600 Subject: Add comment, and whitespace changes. --- toys/tty.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'toys') diff --git a/toys/tty.c b/toys/tty.c index c6eeac0a..d04e3012 100644 --- a/toys/tty.c +++ b/toys/tty.c @@ -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; } -- cgit v1.2.3