summaryrefslogtreecommitdiff
path: root/coreutils/stty.c
diff options
context:
space:
mode:
authorRob Landley2006-08-03 15:41:12 +0000
committerRob Landley2006-08-03 15:41:12 +0000
commitd921b2ecc0d294ad4bf8c7458fc52a60c28727d2 (patch)
treee4a2769349867c441cf2983d83097bb66701a733 /coreutils/stty.c
parent6dce0b6fa79f2d4bb7e9d90e1fbc0f6beb25f855 (diff)
downloadbusybox-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.zip
busybox-d921b2ecc0d294ad4bf8c7458fc52a60c28727d2.tar.gz
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
Diffstat (limited to 'coreutils/stty.c')
-rw-r--r--coreutils/stty.c36
1 files changed, 1 insertions, 35 deletions
diff --git a/coreutils/stty.c b/coreutils/stty.c
index b78368e..073de84 100644
--- a/coreutils/stty.c
+++ b/coreutils/stty.c
@@ -21,31 +21,7 @@
*/
-//#define TEST
-
#include "busybox.h"
-#include <stddef.h>
-#include <termios.h>
-#include <sys/ioctl.h>
-
-#include <sys/param.h>
-#include <unistd.h>
-
-#ifndef STDIN_FILENO
-# define STDIN_FILENO 0
-#endif
-
-#ifndef STDOUT_FILENO
-# define STDOUT_FILENO 1
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <ctype.h>
-#include <errno.h>
-#include <limits.h>
-#include <fcntl.h>
#define STREQ(a, b) (strcmp ((a), (b)) == 0)
@@ -469,11 +445,7 @@ static const struct suffix_mult stty_suffixes[] = {
{NULL, 0 }
};
-#ifndef TEST
int stty_main(int argc, char **argv)
-#else
-int main(int argc, char **argv)
-#endif
{
struct termios mode;
void (*output_func)(struct termios *);
@@ -541,7 +513,7 @@ int main(int argc, char **argv)
device_name = file_name;
fclose(stdin);
- bb_xopen(device_name, O_RDONLY | O_NONBLOCK);
+ xopen(device_name, O_RDONLY | O_NONBLOCK);
if ((fdflags = fcntl(STDIN_FILENO, F_GETFL)) == -1
|| fcntl(STDIN_FILENO, F_SETFL, fdflags & ~O_NONBLOCK) < 0)
perror_on_device("%s: couldn't reset non-blocking mode");
@@ -1299,9 +1271,3 @@ static const char *visible(unsigned int ch)
*bpout = '\0';
return (const char *) buf;
}
-
-#ifdef TEST
-
-const char *bb_applet_name = "stty";
-
-#endif