aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-11-27 01:36:50 -0600
committerRob Landley <rob@landley.net>2007-11-27 01:36:50 -0600
commit0d88c38881088f0c8ee7a09dbba01821253a778c (patch)
treead9667fb719d5aef3d8d30729856231448e0e4c1
parent0dea00d075c133c1c17c67fce536924e6225479e (diff)
downloadtoybox-0d88c38881088f0c8ee7a09dbba01821253a778c.tar.gz
Add comment, and whitespace changes.
-rw-r--r--toys/tty.c12
1 files changed, 8 insertions, 4 deletions
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;
}