diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-01 11:26:30 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-06-01 11:26:30 +0200 |
| commit | 28a105d867b6fe429c5f2f14a42e1dbb41236156 (patch) | |
| tree | a1f69de9f1a76cd91246a6ce061f7f793a4e0500 /shell | |
| parent | 4b7db4f2ca232c630e334fa56b1eb89848d5fcc5 (diff) | |
| download | busybox-w32-28a105d867b6fe429c5f2f14a42e1dbb41236156.tar.gz busybox-w32-28a105d867b6fe429c5f2f14a42e1dbb41236156.tar.bz2 busybox-w32-28a105d867b6fe429c5f2f14a42e1dbb41236156.zip | |
nc, hush: cosmetic cleanups, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/hush.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/shell/hush.c b/shell/hush.c index 5fa693b0a..7d0416796 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
| @@ -563,9 +563,9 @@ struct built_in_command { | |||
| 563 | int (*function)(char **argv); | 563 | int (*function)(char **argv); |
| 564 | #if ENABLE_HUSH_HELP | 564 | #if ENABLE_HUSH_HELP |
| 565 | const char *descr; | 565 | const char *descr; |
| 566 | #define BLTIN(cmd, func, help) { cmd, func, help } | 566 | # define BLTIN(cmd, func, help) { cmd, func, help } |
| 567 | #else | 567 | #else |
| 568 | #define BLTIN(cmd, func, help) { cmd, func } | 568 | # define BLTIN(cmd, func, help) { cmd, func } |
| 569 | #endif | 569 | #endif |
| 570 | }; | 570 | }; |
| 571 | 571 | ||
| @@ -612,7 +612,7 @@ static const struct built_in_command bltins[] = { | |||
| 612 | BLTIN("test" , builtin_test , "Test condition"), | 612 | BLTIN("test" , builtin_test , "Test condition"), |
| 613 | BLTIN("trap" , builtin_trap , "Trap signals"), | 613 | BLTIN("trap" , builtin_trap , "Trap signals"), |
| 614 | BLTIN("type" , builtin_type , "Write a description of command type"), | 614 | BLTIN("type" , builtin_type , "Write a description of command type"), |
| 615 | // BLTIN("ulimit" , builtin_return , "Control resource limits"), | 615 | // BLTIN("ulimit" , builtin_ulimit , "Control resource limits"), |
| 616 | BLTIN("umask" , builtin_umask , "Set file creation mask"), | 616 | BLTIN("umask" , builtin_umask , "Set file creation mask"), |
| 617 | BLTIN("unset" , builtin_unset , "Unset environment variable"), | 617 | BLTIN("unset" , builtin_unset , "Unset environment variable"), |
| 618 | BLTIN("wait" , builtin_wait , "Wait for process"), | 618 | BLTIN("wait" , builtin_wait , "Wait for process"), |
| @@ -627,7 +627,7 @@ static const struct built_in_command bltins[] = { | |||
| 627 | # define debug_enter() (G.debug_indent++) | 627 | # define debug_enter() (G.debug_indent++) |
| 628 | # define debug_leave() (G.debug_indent--) | 628 | # define debug_leave() (G.debug_indent--) |
| 629 | #else | 629 | #else |
| 630 | # define indent() ((void)0) | 630 | # define indent() ((void)0) |
| 631 | # define debug_enter() ((void)0) | 631 | # define debug_enter() ((void)0) |
| 632 | # define debug_leave() ((void)0) | 632 | # define debug_leave() ((void)0) |
| 633 | #endif | 633 | #endif |
| @@ -693,7 +693,7 @@ static void debug_print_strings(const char *prefix, char **vv) | |||
| 693 | fprintf(stderr, " '%s'\n", *vv++); | 693 | fprintf(stderr, " '%s'\n", *vv++); |
| 694 | } | 694 | } |
| 695 | #else | 695 | #else |
| 696 | #define debug_print_strings(prefix, vv) ((void)0) | 696 | # define debug_print_strings(prefix, vv) ((void)0) |
| 697 | #endif | 697 | #endif |
| 698 | 698 | ||
| 699 | 699 | ||
| @@ -819,7 +819,7 @@ static void syntax_error_unexpected_ch(unsigned lineno, int ch) | |||
| 819 | #if ENABLE_HUSH_INTERACTIVE | 819 | #if ENABLE_HUSH_INTERACTIVE |
| 820 | static void cmdedit_update_prompt(void); | 820 | static void cmdedit_update_prompt(void); |
| 821 | #else | 821 | #else |
| 822 | # define cmdedit_update_prompt() | 822 | # define cmdedit_update_prompt() ((void)0) |
| 823 | #endif | 823 | #endif |
| 824 | 824 | ||
| 825 | 825 | ||
| @@ -1003,13 +1003,13 @@ static void restore_G_args(save_arg_t *sv, char **argv) | |||
| 1003 | * If job control is off, backgrounded commands ("cmd &") | 1003 | * If job control is off, backgrounded commands ("cmd &") |
| 1004 | * have SIGINT, SIGQUIT set to SIG_IGN. | 1004 | * have SIGINT, SIGQUIT set to SIG_IGN. |
| 1005 | * | 1005 | * |
| 1006 | * Commands run in command substitution ("`cmd`") | 1006 | * Commands which are run in command substitution ("`cmd`") |
| 1007 | * have SIGTTIN, SIGTTOU, SIGTSTP set to SIG_IGN. | 1007 | * have SIGTTIN, SIGTTOU, SIGTSTP set to SIG_IGN. |
| 1008 | * | 1008 | * |
| 1009 | * Ordinary commands have signals set to SIG_IGN/DFL as inherited | 1009 | * Ordinary commands have signals set to SIG_IGN/DFL as inherited |
| 1010 | * by the shell from its parent. | 1010 | * by the shell from its parent. |
| 1011 | * | 1011 | * |
| 1012 | * Siganls which differ from SIG_DFL action | 1012 | * Signals which differ from SIG_DFL action |
| 1013 | * (note: child (i.e., [v]forked) shell is not an interactive shell): | 1013 | * (note: child (i.e., [v]forked) shell is not an interactive shell): |
| 1014 | * | 1014 | * |
| 1015 | * SIGQUIT: ignore | 1015 | * SIGQUIT: ignore |
| @@ -1714,7 +1714,7 @@ static void nommu_addchr(o_string *o, int ch) | |||
| 1714 | o_addchr(o, ch); | 1714 | o_addchr(o, ch); |
| 1715 | } | 1715 | } |
| 1716 | #else | 1716 | #else |
| 1717 | #define nommu_addchr(o, str) ((void)0) | 1717 | # define nommu_addchr(o, str) ((void)0) |
| 1718 | #endif | 1718 | #endif |
| 1719 | 1719 | ||
| 1720 | static void o_addstr_with_NUL(o_string *o, const char *str) | 1720 | static void o_addstr_with_NUL(o_string *o, const char *str) |
| @@ -1834,7 +1834,7 @@ static void debug_print_list(const char *prefix, o_string *o, int n) | |||
| 1834 | } | 1834 | } |
| 1835 | } | 1835 | } |
| 1836 | #else | 1836 | #else |
| 1837 | #define debug_print_list(prefix, o, n) ((void)0) | 1837 | # define debug_print_list(prefix, o, n) ((void)0) |
| 1838 | #endif | 1838 | #endif |
| 1839 | 1839 | ||
| 1840 | /* n = o_save_ptr_helper(str, n) "starts new string" by storing an index value | 1840 | /* n = o_save_ptr_helper(str, n) "starts new string" by storing an index value |
| @@ -6294,7 +6294,7 @@ int hush_main(int argc, char **argv) | |||
| 6294 | /* bash: after sourcing /etc/profile, | 6294 | /* bash: after sourcing /etc/profile, |
| 6295 | * tries to source (in the given order): | 6295 | * tries to source (in the given order): |
| 6296 | * ~/.bash_profile, ~/.bash_login, ~/.profile, | 6296 | * ~/.bash_profile, ~/.bash_login, ~/.profile, |
| 6297 | * stopping of first found. --noprofile turns this off. | 6297 | * stopping on first found. --noprofile turns this off. |
| 6298 | * bash also sources ~/.bash_logout on exit. | 6298 | * bash also sources ~/.bash_logout on exit. |
| 6299 | * If called as sh, skips .bash_XXX files. | 6299 | * If called as sh, skips .bash_XXX files. |
| 6300 | */ | 6300 | */ |
| @@ -6325,8 +6325,8 @@ int hush_main(int argc, char **argv) | |||
| 6325 | * NB: don't forget to (re)run block_signals(0/1) as needed. | 6325 | * NB: don't forget to (re)run block_signals(0/1) as needed. |
| 6326 | */ | 6326 | */ |
| 6327 | 6327 | ||
| 6328 | /* A shell is interactive if the '-i' flag was given, or if all of | 6328 | /* A shell is interactive if the '-i' flag was given, |
| 6329 | * the following conditions are met: | 6329 | * or if all of the following conditions are met: |
| 6330 | * no -c command | 6330 | * no -c command |
| 6331 | * no arguments remaining or the -s flag given | 6331 | * no arguments remaining or the -s flag given |
| 6332 | * standard input is a terminal | 6332 | * standard input is a terminal |
