diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-12 20:58:27 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-12 20:58:27 +0000 |
commit | 6ca409e0e4c198fe3081346eebbae3f068fe605a (patch) | |
tree | 060cb05d99220a1eda399194d1209c269f0e8cd8 /coreutils/stty.c | |
parent | 4185548984357df91311f30c8e43d95f33922576 (diff) | |
download | busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.tar.gz busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.tar.bz2 busybox-w32-6ca409e0e4c198fe3081346eebbae3f068fe605a.zip |
trylink: produce even more info about final link stage
trylink: explain how to modify link and drastically decrease amount
of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts
size saving: 0.5k
Diffstat (limited to 'coreutils/stty.c')
-rw-r--r-- | coreutils/stty.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/coreutils/stty.c b/coreutils/stty.c index fbb72baa9..863f28d92 100644 --- a/coreutils/stty.c +++ b/coreutils/stty.c | |||
@@ -127,28 +127,28 @@ enum { | |||
127 | control, input, output, local, combination | 127 | control, input, output, local, combination |
128 | }; | 128 | }; |
129 | 129 | ||
130 | static const char evenp [] = "evenp"; | 130 | static const char evenp [] ALIGN1 = "evenp"; |
131 | static const char raw [] = "raw"; | 131 | static const char raw [] ALIGN1 = "raw"; |
132 | static const char stty_min [] = "min"; | 132 | static const char stty_min [] ALIGN1 = "min"; |
133 | static const char stty_time [] = "time"; | 133 | static const char stty_time [] ALIGN1 = "time"; |
134 | static const char stty_swtch[] = "swtch"; | 134 | static const char stty_swtch[] ALIGN1 = "swtch"; |
135 | static const char stty_eol [] = "eol"; | 135 | static const char stty_eol [] ALIGN1 = "eol"; |
136 | static const char stty_eof [] = "eof"; | 136 | static const char stty_eof [] ALIGN1 = "eof"; |
137 | static const char parity [] = "parity"; | 137 | static const char parity [] ALIGN1 = "parity"; |
138 | static const char stty_oddp [] = "oddp"; | 138 | static const char stty_oddp [] ALIGN1 = "oddp"; |
139 | static const char stty_nl [] = "nl"; | 139 | static const char stty_nl [] ALIGN1 = "nl"; |
140 | static const char stty_ek [] = "ek"; | 140 | static const char stty_ek [] ALIGN1 = "ek"; |
141 | static const char stty_sane [] = "sane"; | 141 | static const char stty_sane [] ALIGN1 = "sane"; |
142 | static const char cbreak [] = "cbreak"; | 142 | static const char cbreak [] ALIGN1 = "cbreak"; |
143 | static const char stty_pass8[] = "pass8"; | 143 | static const char stty_pass8[] ALIGN1 = "pass8"; |
144 | static const char litout [] = "litout"; | 144 | static const char litout [] ALIGN1 = "litout"; |
145 | static const char cooked [] = "cooked"; | 145 | static const char cooked [] ALIGN1 = "cooked"; |
146 | static const char decctlq [] = "decctlq"; | 146 | static const char decctlq [] ALIGN1 = "decctlq"; |
147 | static const char stty_tabs [] = "tabs"; | 147 | static const char stty_tabs [] ALIGN1 = "tabs"; |
148 | static const char stty_lcase[] = "lcase"; | 148 | static const char stty_lcase[] ALIGN1 = "lcase"; |
149 | static const char stty_LCASE[] = "LCASE"; | 149 | static const char stty_LCASE[] ALIGN1 = "LCASE"; |
150 | static const char stty_crt [] = "crt"; | 150 | static const char stty_crt [] ALIGN1 = "crt"; |
151 | static const char stty_dec [] = "dec"; | 151 | static const char stty_dec [] ALIGN1 = "dec"; |
152 | 152 | ||
153 | /* Flags for 'struct mode_info' */ | 153 | /* Flags for 'struct mode_info' */ |
154 | #define SANE_SET 1 /* Set in 'sane' mode */ | 154 | #define SANE_SET 1 /* Set in 'sane' mode */ |
@@ -158,7 +158,7 @@ static const char stty_dec [] = "dec"; | |||
158 | 158 | ||
159 | /* Each mode */ | 159 | /* Each mode */ |
160 | struct mode_info { | 160 | struct mode_info { |
161 | const char * const name; /* Name given on command line */ | 161 | const char *const name; /* Name given on command line */ |
162 | const unsigned char type; /* Which structure element to change */ | 162 | const unsigned char type; /* Which structure element to change */ |
163 | const unsigned char flags; /* Setting and display options */ | 163 | const unsigned char flags; /* Setting and display options */ |
164 | /* were using short here, but ppc32 was unhappy: */ | 164 | /* were using short here, but ppc32 was unhappy: */ |
@@ -324,7 +324,7 @@ enum { | |||
324 | 324 | ||
325 | /* Control character settings */ | 325 | /* Control character settings */ |
326 | struct control_info { | 326 | struct control_info { |
327 | const char * const name; /* Name given on command line */ | 327 | const char *const name; /* Name given on command line */ |
328 | const unsigned char saneval; /* Value to set for 'stty sane' */ | 328 | const unsigned char saneval; /* Value to set for 'stty sane' */ |
329 | const unsigned char offset; /* Offset in c_cc */ | 329 | const unsigned char offset; /* Offset in c_cc */ |
330 | }; | 330 | }; |
@@ -417,11 +417,11 @@ static const char *visible(unsigned ch) | |||
417 | 417 | ||
418 | static tcflag_t *mode_type_flag(unsigned type, const struct termios *mode) | 418 | static tcflag_t *mode_type_flag(unsigned type, const struct termios *mode) |
419 | { | 419 | { |
420 | static const unsigned char tcflag_offsets[] = { | 420 | static const unsigned char tcflag_offsets[] ALIGN1 = { |
421 | offsetof(struct termios, c_cflag), /* control */ | 421 | offsetof(struct termios, c_cflag), /* control */ |
422 | offsetof(struct termios, c_iflag), /* input */ | 422 | offsetof(struct termios, c_iflag), /* input */ |
423 | offsetof(struct termios, c_oflag), /* output */ | 423 | offsetof(struct termios, c_oflag), /* output */ |
424 | offsetof(struct termios, c_lflag), /* local */ | 424 | offsetof(struct termios, c_lflag) /* local */ |
425 | }; | 425 | }; |
426 | 426 | ||
427 | if (type <= local) { | 427 | if (type <= local) { |
@@ -430,7 +430,7 @@ static tcflag_t *mode_type_flag(unsigned type, const struct termios *mode) | |||
430 | return NULL; | 430 | return NULL; |
431 | } | 431 | } |
432 | 432 | ||
433 | static void set_speed_or_die(enum speed_setting type, const char * const arg, | 433 | static void set_speed_or_die(enum speed_setting type, const char *const arg, |
434 | struct termios * const mode) | 434 | struct termios * const mode) |
435 | { | 435 | { |
436 | speed_t baud; | 436 | speed_t baud; |
@@ -560,9 +560,9 @@ enum { | |||
560 | param_ospeed = 8 | 0x80, | 560 | param_ospeed = 8 | 0x80, |
561 | }; | 561 | }; |
562 | 562 | ||
563 | static int find_param(const char * const name) | 563 | static int find_param(const char *const name) |
564 | { | 564 | { |
565 | static const char params[] = | 565 | static const char params[] ALIGN1 = |
566 | "line\0" /* 1 */ | 566 | "line\0" /* 1 */ |
567 | "rows\0" /* 2 */ | 567 | "rows\0" /* 2 */ |
568 | "cols\0" /* 3 */ | 568 | "cols\0" /* 3 */ |