diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-21 11:09:40 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-21 11:09:40 +0000 |
commit | 5e34ff29bcc870936ab18172f438a34d042d4e03 (patch) | |
tree | a5e7a528f2f916eb883f1161eadceacdf2dca4be /shell/hush.c | |
parent | 8b814b4a349e2262c0ad25793b05206a14651ebb (diff) | |
download | busybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.tar.gz busybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.tar.bz2 busybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.zip |
*: mass renaming of USE_XXXX to IF_XXXX
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially
badly named. It was not skipping anything!
Diffstat (limited to 'shell/hush.c')
-rw-r--r-- | shell/hush.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/shell/hush.c b/shell/hush.c index d59a5de82..58a57d961 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -97,11 +97,11 @@ | |||
97 | /* STANDALONE does not make sense, and won't compile */ | 97 | /* STANDALONE does not make sense, and won't compile */ |
98 | # undef CONFIG_FEATURE_SH_STANDALONE | 98 | # undef CONFIG_FEATURE_SH_STANDALONE |
99 | # undef ENABLE_FEATURE_SH_STANDALONE | 99 | # undef ENABLE_FEATURE_SH_STANDALONE |
100 | # undef USE_FEATURE_SH_STANDALONE | 100 | # undef IF_FEATURE_SH_STANDALONE |
101 | # define SKIP_FEATURE_SH_STANDALONE(...) __VA_ARGS__ | 101 | # define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__ |
102 | # define ENABLE_FEATURE_SH_STANDALONE 0 | 102 | # define ENABLE_FEATURE_SH_STANDALONE 0 |
103 | # define USE_FEATURE_SH_STANDALONE(...) | 103 | # define IF_FEATURE_SH_STANDALONE(...) |
104 | # define SKIP_FEATURE_SH_STANDALONE(...) __VA_ARGS__ | 104 | # define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__ |
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | #if !ENABLE_HUSH_INTERACTIVE | 107 | #if !ENABLE_HUSH_INTERACTIVE |
@@ -2443,11 +2443,11 @@ static void re_execute_shell(char ***to_free, const char *s, char *g_argv0, char | |||
2443 | goto do_exec; | 2443 | goto do_exec; |
2444 | } | 2444 | } |
2445 | 2445 | ||
2446 | sprintf(param_buf, "-$%x:%x:%x" USE_HUSH_LOOPS(":%x") | 2446 | sprintf(param_buf, "-$%x:%x:%x" IF_HUSH_LOOPS(":%x") |
2447 | , (unsigned) G.root_pid | 2447 | , (unsigned) G.root_pid |
2448 | , (unsigned) G.last_bg_pid | 2448 | , (unsigned) G.last_bg_pid |
2449 | , (unsigned) G.last_exitcode | 2449 | , (unsigned) G.last_exitcode |
2450 | USE_HUSH_LOOPS(, G.depth_of_loop) | 2450 | IF_HUSH_LOOPS(, G.depth_of_loop) |
2451 | ); | 2451 | ); |
2452 | /* 1:hush 2:-$<pid>:<pid>:<exitcode>:<depth> <vars...> <funcs...> | 2452 | /* 1:hush 2:-$<pid>:<pid>:<exitcode>:<depth> <vars...> <funcs...> |
2453 | * 3:-c 4:<cmd> 5:<arg0> <argN...> 6:NULL | 2453 | * 3:-c 4:<cmd> 5:<arg0> <argN...> 6:NULL |
@@ -3386,7 +3386,7 @@ static int run_pipe(struct pipe *pi) | |||
3386 | debug_printf_exec("run_pipe start: members:%d\n", pi->num_cmds); | 3386 | debug_printf_exec("run_pipe start: members:%d\n", pi->num_cmds); |
3387 | debug_enter(); | 3387 | debug_enter(); |
3388 | 3388 | ||
3389 | USE_HUSH_JOB(pi->pgrp = -1;) | 3389 | IF_HUSH_JOB(pi->pgrp = -1;) |
3390 | pi->stopped_cmds = 0; | 3390 | pi->stopped_cmds = 0; |
3391 | command = &(pi->cmds[0]); | 3391 | command = &(pi->cmds[0]); |
3392 | argv_expanded = NULL; | 3392 | argv_expanded = NULL; |
@@ -3821,7 +3821,7 @@ static int run_list(struct pipe *pi) | |||
3821 | rcode = G.last_exitcode; | 3821 | rcode = G.last_exitcode; |
3822 | 3822 | ||
3823 | /* Go through list of pipes, (maybe) executing them. */ | 3823 | /* Go through list of pipes, (maybe) executing them. */ |
3824 | for (; pi; pi = USE_HUSH_LOOPS(rword == RES_DONE ? loop_top : ) pi->next) { | 3824 | for (; pi; pi = IF_HUSH_LOOPS(rword == RES_DONE ? loop_top : ) pi->next) { |
3825 | if (G.flag_SIGINT) | 3825 | if (G.flag_SIGINT) |
3826 | break; | 3826 | break; |
3827 | 3827 | ||
@@ -4773,7 +4773,7 @@ static FILE *generate_stream_from_string(const char *s) | |||
4773 | close(channel[0]); /* NB: close _first_, then move fd! */ | 4773 | close(channel[0]); /* NB: close _first_, then move fd! */ |
4774 | xmove_fd(channel[1], 1); | 4774 | xmove_fd(channel[1], 1); |
4775 | /* Prevent it from trying to handle ctrl-z etc */ | 4775 | /* Prevent it from trying to handle ctrl-z etc */ |
4776 | USE_HUSH_JOB(G.run_list_level = 1;) | 4776 | IF_HUSH_JOB(G.run_list_level = 1;) |
4777 | #if BB_MMU | 4777 | #if BB_MMU |
4778 | reset_traps_to_defaults(); | 4778 | reset_traps_to_defaults(); |
4779 | parse_and_run_string(s); | 4779 | parse_and_run_string(s); |
@@ -5441,7 +5441,7 @@ static struct pipe *parse_stream(char **pstring, | |||
5441 | nommu_addchr(&ctx.as_string, ch); | 5441 | nommu_addchr(&ctx.as_string, ch); |
5442 | is_ifs = strchr(G.ifs, ch); | 5442 | is_ifs = strchr(G.ifs, ch); |
5443 | is_special = strchr("<>;&|(){}#'" /* special outside of "str" */ | 5443 | is_special = strchr("<>;&|(){}#'" /* special outside of "str" */ |
5444 | "\\$\"" USE_HUSH_TICK("`") /* always special */ | 5444 | "\\$\"" IF_HUSH_TICK("`") /* always special */ |
5445 | , ch); | 5445 | , ch); |
5446 | 5446 | ||
5447 | if (!is_special && !is_ifs) { /* ordinary char */ | 5447 | if (!is_special && !is_ifs) { /* ordinary char */ |
@@ -5832,7 +5832,7 @@ static struct pipe *parse_stream(char **pstring, | |||
5832 | } | 5832 | } |
5833 | /* Discard cached input, force prompt */ | 5833 | /* Discard cached input, force prompt */ |
5834 | input->p = NULL; | 5834 | input->p = NULL; |
5835 | USE_HUSH_INTERACTIVE(input->promptme = 1;) | 5835 | IF_HUSH_INTERACTIVE(input->promptme = 1;) |
5836 | goto reset; | 5836 | goto reset; |
5837 | } | 5837 | } |
5838 | } | 5838 | } |