aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-21 11:09:40 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-21 11:09:40 +0000
commit5e34ff29bcc870936ab18172f438a34d042d4e03 (patch)
treea5e7a528f2f916eb883f1161eadceacdf2dca4be /shell/ash.c
parent8b814b4a349e2262c0ad25793b05206a14651ebb (diff)
downloadbusybox-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/ash.c')
-rw-r--r--shell/ash.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/shell/ash.c b/shell/ash.c
index c53b080a4..b27b2777e 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -56,11 +56,11 @@
56/* STANDALONE does not make sense, and won't compile */ 56/* STANDALONE does not make sense, and won't compile */
57#undef CONFIG_FEATURE_SH_STANDALONE 57#undef CONFIG_FEATURE_SH_STANDALONE
58#undef ENABLE_FEATURE_SH_STANDALONE 58#undef ENABLE_FEATURE_SH_STANDALONE
59#undef USE_FEATURE_SH_STANDALONE 59#undef IF_FEATURE_SH_STANDALONE
60#undef SKIP_FEATURE_SH_STANDALONE(...) 60#undef IF_NOT_FEATURE_SH_STANDALONE(...)
61#define ENABLE_FEATURE_SH_STANDALONE 0 61#define ENABLE_FEATURE_SH_STANDALONE 0
62#define USE_FEATURE_SH_STANDALONE(...) 62#define IF_FEATURE_SH_STANDALONE(...)
63#define SKIP_FEATURE_SH_STANDALONE(...) __VA_ARGS__ 63#define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__
64#endif 64#endif
65 65
66#ifndef PIPE_BUF 66#ifndef PIPE_BUF
@@ -349,7 +349,7 @@ raise_interrupt(void)
349} while (0) 349} while (0)
350#endif 350#endif
351 351
352static USE_ASH_OPTIMIZE_FOR_SIZE(inline) void 352static IF_ASH_OPTIMIZE_FOR_SIZE(inline) void
353int_on(void) 353int_on(void)
354{ 354{
355 xbarrier(); 355 xbarrier();
@@ -358,7 +358,7 @@ int_on(void)
358 } 358 }
359} 359}
360#define INT_ON int_on() 360#define INT_ON int_on()
361static USE_ASH_OPTIMIZE_FOR_SIZE(inline) void 361static IF_ASH_OPTIMIZE_FOR_SIZE(inline) void
362force_int_on(void) 362force_int_on(void)
363{ 363{
364 xbarrier(); 364 xbarrier();
@@ -4219,7 +4219,7 @@ cmdputs(const char *s)
4219 static const char vstype[VSTYPE + 1][3] = { 4219 static const char vstype[VSTYPE + 1][3] = {
4220 "", "}", "-", "+", "?", "=", 4220 "", "}", "-", "+", "?", "=",
4221 "%", "%%", "#", "##" 4221 "%", "%%", "#", "##"
4222 USE_ASH_BASH_COMPAT(, ":", "/", "//") 4222 IF_ASH_BASH_COMPAT(, ":", "/", "//")
4223 }; 4223 };
4224 4224
4225 const char *p, *str; 4225 const char *p, *str;
@@ -6069,9 +6069,9 @@ subevalvar(char *p, char *str, int strloc, int subtype,
6069 char *startp; 6069 char *startp;
6070 char *loc; 6070 char *loc;
6071 char *rmesc, *rmescend; 6071 char *rmesc, *rmescend;
6072 USE_ASH_BASH_COMPAT(char *repl = NULL;) 6072 IF_ASH_BASH_COMPAT(char *repl = NULL;)
6073 USE_ASH_BASH_COMPAT(char null = '\0';) 6073 IF_ASH_BASH_COMPAT(char null = '\0';)
6074 USE_ASH_BASH_COMPAT(int pos, len, orig_len;) 6074 IF_ASH_BASH_COMPAT(int pos, len, orig_len;)
6075 int saveherefd = herefd; 6075 int saveherefd = herefd;
6076 int amount, workloc, resetloc; 6076 int amount, workloc, resetloc;
6077 int zero; 6077 int zero;
@@ -6157,7 +6157,7 @@ subevalvar(char *p, char *str, int strloc, int subtype,
6157 * stack will need rebasing, and we'll need to remove our work 6157 * stack will need rebasing, and we'll need to remove our work
6158 * areas each time 6158 * areas each time
6159 */ 6159 */
6160 USE_ASH_BASH_COMPAT(restart:) 6160 IF_ASH_BASH_COMPAT(restart:)
6161 6161
6162 amount = expdest - ((char *)stackblock() + resetloc); 6162 amount = expdest - ((char *)stackblock() + resetloc);
6163 STADJUST(-amount, expdest); 6163 STADJUST(-amount, expdest);
@@ -7083,7 +7083,7 @@ static int builtinloc = -1; /* index in path of %builtin, or -1 */
7083 7083
7084 7084
7085static void 7085static void
7086tryexec(USE_FEATURE_SH_STANDALONE(int applet_no,) char *cmd, char **argv, char **envp) 7086tryexec(IF_FEATURE_SH_STANDALONE(int applet_no,) char *cmd, char **argv, char **envp)
7087{ 7087{
7088 int repeated = 0; 7088 int repeated = 0;
7089 7089
@@ -7155,13 +7155,13 @@ shellexec(char **argv, const char *path, int idx)
7155 || (applet_no = find_applet_by_name(argv[0])) >= 0 7155 || (applet_no = find_applet_by_name(argv[0])) >= 0
7156#endif 7156#endif
7157 ) { 7157 ) {
7158 tryexec(USE_FEATURE_SH_STANDALONE(applet_no,) argv[0], argv, envp); 7158 tryexec(IF_FEATURE_SH_STANDALONE(applet_no,) argv[0], argv, envp);
7159 e = errno; 7159 e = errno;
7160 } else { 7160 } else {
7161 e = ENOENT; 7161 e = ENOENT;
7162 while ((cmdname = padvance(&path, argv[0])) != NULL) { 7162 while ((cmdname = padvance(&path, argv[0])) != NULL) {
7163 if (--idx < 0 && pathopt == NULL) { 7163 if (--idx < 0 && pathopt == NULL) {
7164 tryexec(USE_FEATURE_SH_STANDALONE(-1,) cmdname, argv, envp); 7164 tryexec(IF_FEATURE_SH_STANDALONE(-1,) cmdname, argv, envp);
7165 if (errno != ENOENT && errno != ENOTDIR) 7165 if (errno != ENOENT && errno != ENOTDIR)
7166 e = errno; 7166 e = errno;
7167 } 7167 }
@@ -10789,7 +10789,7 @@ readtoken1(int firstc, int syntax, char *eofmark, int striptabs)
10789 int parenlevel; /* levels of parens in arithmetic */ 10789 int parenlevel; /* levels of parens in arithmetic */
10790 int dqvarnest; /* levels of variables expansion within double quotes */ 10790 int dqvarnest; /* levels of variables expansion within double quotes */
10791 10791
10792 USE_ASH_BASH_COMPAT(smallint bash_dollar_squote = 0;) 10792 IF_ASH_BASH_COMPAT(smallint bash_dollar_squote = 0;)
10793 10793
10794#if __GNUC__ 10794#if __GNUC__
10795 /* Avoid longjmp clobbering */ 10795 /* Avoid longjmp clobbering */
@@ -10895,7 +10895,7 @@ readtoken1(int firstc, int syntax, char *eofmark, int striptabs)
10895 dblquote = 1; 10895 dblquote = 1;
10896 goto quotemark; 10896 goto quotemark;
10897 case CENDQUOTE: 10897 case CENDQUOTE:
10898 USE_ASH_BASH_COMPAT(bash_dollar_squote = 0;) 10898 IF_ASH_BASH_COMPAT(bash_dollar_squote = 0;)
10899 if (eofmark != NULL && arinest == 0 10899 if (eofmark != NULL && arinest == 0
10900 && varnest == 0 10900 && varnest == 0
10901 ) { 10901 ) {
@@ -10994,7 +10994,7 @@ readtoken1(int firstc, int syntax, char *eofmark, int striptabs)
10994 len = out - (char *)stackblock(); 10994 len = out - (char *)stackblock();
10995 out = stackblock(); 10995 out = stackblock();
10996 if (eofmark == NULL) { 10996 if (eofmark == NULL) {
10997 if ((c == '>' || c == '<' USE_ASH_BASH_COMPAT( || c == 0x100 + '>')) 10997 if ((c == '>' || c == '<' IF_ASH_BASH_COMPAT( || c == 0x100 + '>'))
10998 && quotef == 0 10998 && quotef == 0
10999 ) { 10999 ) {
11000 if (isdigit_str9(out)) { 11000 if (isdigit_str9(out)) {
@@ -11488,7 +11488,7 @@ xxreadtoken(void)
11488 startlinno = g_parsefile->linno; 11488 startlinno = g_parsefile->linno;
11489 for (;;) { /* until token or start of word found */ 11489 for (;;) { /* until token or start of word found */
11490 c = pgetc_fast(); 11490 c = pgetc_fast();
11491 if (c == ' ' || c == '\t' USE_ASH_ALIAS( || c == PEOA)) 11491 if (c == ' ' || c == '\t' IF_ASH_ALIAS( || c == PEOA))
11492 continue; 11492 continue;
11493 11493
11494 if (c == '#') { 11494 if (c == '#') {
@@ -12454,8 +12454,8 @@ readcmd(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
12454 rflag = 0; 12454 rflag = 0;
12455 prompt = NULL; 12455 prompt = NULL;
12456 while ((i = nextopt("p:u:r" 12456 while ((i = nextopt("p:u:r"
12457 USE_ASH_READ_TIMEOUT("t:") 12457 IF_ASH_READ_TIMEOUT("t:")
12458 USE_ASH_READ_NCHARS("n:s") 12458 IF_ASH_READ_NCHARS("n:s")
12459 )) != '\0') { 12459 )) != '\0') {
12460 switch (i) { 12460 switch (i) {
12461 case 'p': 12461 case 'p':