aboutsummaryrefslogtreecommitdiff
path: root/toys/tty.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2011-11-13 20:02:47 -0600
committerRob Landley <rob@landley.net>2011-11-13 20:02:47 -0600
commit43c2e62d74f1cf1e8b20b87bacac5b7b3e454f99 (patch)
tree35ef2f9ec71489e515de2512f2d65df17b8d2379 /toys/tty.c
parent234f42adc016e8056a4a9f4466adea9072f0a7f6 (diff)
downloadtoybox-43c2e62d74f1cf1e8b20b87bacac5b7b3e454f99.tar.gz
Prepare for license switch by (regrettably) removing Charlie Shepherd's code, at least until I can get in touch with him to to get permission to relicense it.
Charlie's @gentoo address bounces, and he hasn't replied to his @gmail address. I welcome him as a contributor but can't _find_ him, so I can't ship his basename, dirname, mkfifo, touch, and tty command code under a non-GPL license. This essentially reverts the following commits: 147: implement touch 157: implement mkfifo 160: tweak touch 161: touch bugfix 162: touch -l 176: implement basename, dirname 179: implement tty I also looked at these commits, which Charlie contributed to but which don't need to be reverted. (Mostly whitespace changes and typo fixes, plus some minor changes to build infrastructure that don't affect the resulting code.) *149: add null pointer check *154: add .hgignore *155: whitespace *156: whitespace (the rest is by me) *158: add toys/help.h to makefile dependencies *159: fix typo in description *164: typo in df (dereference pointer) *180: .hgignore *182: whitespace in error messages *183: add headers to make dependencies *244: comment and whitespace cleanups *247: build tweak: error checking *248: typo in comment *249: .hgignore *250: wrong word in comment *251: whitespace *252: whitespace Several files in the "scripts" directory are still GPLv2 (kconfig, bloat-o-meter, Robert Foglietta's bash version of config2help.sh), but they're just build infrastructure that doesn't wind up in the resulting binary. I plan to address this later on general principles, but it's "mere aggregation" and not an immediate priority.)
Diffstat (limited to 'toys/tty.c')
-rw-r--r--toys/tty.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/toys/tty.c b/toys/tty.c
deleted file mode 100644
index 6bc9cd34..00000000
--- a/toys/tty.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* vi: set sw=4 ts=4:
- * tty.c - print terminal name of stdin
- *
- * Copyright 2007 Charlie Shepherd <masterdriverz@gentoo.org>
- *
- * See http://www.opengroup.org/onlinepubs/009695399/utilities/tty.html
-
-USE_TTY(NEWTOY(tty, "s", TOYFLAG_BIN))
-
-config TTY
- bool "tty"
- default y
- help
- Print the filename of the terminal connected to standard input.
-
- -s Don't print anything, only return an exit status.
-*/
-
-#include "toys.h"
-
-void tty_main(void)
-{
- char *name = ttyname(0);
- if (!toys.optflags) {
- if (name) puts(name);
- else puts("Not a tty");
- }
- toys.exitval = !name;
-}