summaryrefslogtreecommitdiff
path: root/src/tty.c
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-08-22 18:56:06 +0200
committerJim Meyering <meyering@redhat.com>2009-08-25 09:21:00 +0200
commit5e778f7c8d1ecf3d8f11385db013af2ba026e2a5 (patch)
treee460d471f37f0dce1ba06f60f88114d1a65326c4 /src/tty.c
parent2bc0f3caaafeb240cdcfd050b7ad1fe0ad14addf (diff)
downloadcoreutils-5e778f7c8d1ecf3d8f11385db013af2ba026e2a5.tar.xz
global: convert indentation-TABs to spaces
Transformed via this shell code: t=$'\t' git ls-files \ | grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \ | grep -vE 'tests/pr/|help2man' \ | xargs grep -lE "^ *$t" \ | xargs perl -MText::Tabs -ni -le \ '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
Diffstat (limited to 'src/tty.c')
-rw-r--r--src/tty.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/tty.c b/src/tty.c
index 12a2140cc..cc15cfe4a 100644
--- a/src/tty.c
+++ b/src/tty.c
@@ -59,7 +59,7 @@ usage (int status)
{
if (status != EXIT_SUCCESS)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
- program_name);
+ program_name);
else
{
printf (_("Usage: %s [OPTION]...\n"), program_name);
@@ -95,18 +95,18 @@ main (int argc, char **argv)
while ((optc = getopt_long (argc, argv, "s", longopts, NULL)) != -1)
{
switch (optc)
- {
- case 's':
- silent = true;
- break;
+ {
+ case 's':
+ silent = true;
+ break;
- case_GETOPT_HELP_CHAR;
+ case_GETOPT_HELP_CHAR;
- case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
+ case_GETOPT_VERSION_CHAR (PROGRAM_NAME, AUTHORS);
- default:
- usage (TTY_FAILURE);
- }
+ default:
+ usage (TTY_FAILURE);
+ }
}
if (optind < argc)
@@ -116,9 +116,9 @@ main (int argc, char **argv)
if (!silent)
{
if (tty)
- puts (tty);
+ puts (tty);
else
- puts (_("not a tty"));
+ puts (_("not a tty"));
}
exit (isatty (STDIN_FILENO) ? EXIT_SUCCESS : EXIT_FAILURE);