diff options
author | Bernhard Reutner-Fischer | 2006-06-07 20:17:41 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2006-06-07 20:17:41 +0000 |
commit | 19008b83735341c91fa8a09a072ffe9816c9e423 (patch) | |
tree | 6e35288c247102998a775cbc16f9ec014e00e7fd /coreutils/stty.c | |
parent | 4c5ad2fc90389bf1239f17d84967d07b82f31dd7 (diff) | |
download | busybox-19008b83735341c91fa8a09a072ffe9816c9e423.zip busybox-19008b83735341c91fa8a09a072ffe9816c9e423.tar.gz |
- reuse strings and messages. Saves about 600B
Diffstat (limited to 'coreutils/stty.c')
-rw-r--r-- | coreutils/stty.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/coreutils/stty.c b/coreutils/stty.c index 8b70af6..cfb7f7f 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c @@ -23,6 +23,7 @@ //#define TEST +#include "busybox.h" #include <stddef.h> #include <termios.h> #include <sys/ioctl.h> @@ -45,7 +46,6 @@ #include <errno.h> #include <limits.h> #include <fcntl.h> -#include "busybox.h" #define STREQ(a, b) (strcmp ((a), (b)) == 0) @@ -608,7 +608,7 @@ int main(int argc, char **argv) for (i = 0; i < NUM_control_info; ++i) if (STREQ(argv[k], control_info[i].name)) { if (k == argc - 1) - bb_error_msg_and_die("missing argument to `%s'", argv[k]); + bb_error_msg_and_die(bb_msg_requires_arg, argv[k]); match_found = 1; ++k; set_control_char(&control_info[i], argv[k], &mode); @@ -619,14 +619,14 @@ int main(int argc, char **argv) if (match_found == 0) { if (STREQ(argv[k], "ispeed")) { if (k == argc - 1) - bb_error_msg_and_die("missing argument to `%s'", argv[k]); + bb_error_msg_and_die(bb_msg_requires_arg, argv[k]); ++k; set_speed(input_speed, argv[k], &mode); speed_was_set = 1; require_set_attr = 1; } else if (STREQ(argv[k], "ospeed")) { if (k == argc - 1) - bb_error_msg_and_die("missing argument to `%s'", argv[k]); + bb_error_msg_and_die(bb_msg_requires_arg, argv[k]); ++k; set_speed(output_speed, argv[k], &mode); speed_was_set = 1; @@ -635,13 +635,13 @@ int main(int argc, char **argv) #ifdef TIOCGWINSZ else if (STREQ(argv[k], "rows")) { if (k == argc - 1) - bb_error_msg_and_die("missing argument to `%s'", argv[k]); + bb_error_msg_and_die(bb_msg_requires_arg, argv[k]); ++k; set_window_size((int) bb_xparse_number(argv[k], stty_suffixes), -1); } else if (STREQ(argv[k], "cols") || STREQ(argv[k], "columns")) { if (k == argc - 1) - bb_error_msg_and_die("missing argument to `%s'", argv[k]); + bb_error_msg_and_die(bb_msg_requires_arg, argv[k]); ++k; set_window_size(-1, (int) bb_xparse_number(argv[k], stty_suffixes)); @@ -654,7 +654,7 @@ int main(int argc, char **argv) #ifdef HAVE_C_LINE else if (STREQ(argv[k], "line")) { if (k == argc - 1) - bb_error_msg_and_die("missing argument to `%s'", argv[k]); + bb_error_msg_and_die(bb_msg_requires_arg, argv[k]); ++k; mode.c_line = bb_xparse_number(argv[k], stty_suffixes); require_set_attr = 1; |