aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-06-09 07:44:19 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-06-09 07:44:19 +0000
commited9d621cf481a180a586f8e62867484c803723fa (patch)
tree6a6548c4766d4400b4b631d5fa1c14f737267388
parentf2cccbce37022a95c83424006525e98440dc7fc4 (diff)
downloadbusybox-w32-ed9d621cf481a180a586f8e62867484c803723fa.tar.gz
busybox-w32-ed9d621cf481a180a586f8e62867484c803723fa.tar.bz2
busybox-w32-ed9d621cf481a180a586f8e62867484c803723fa.zip
msh: style cleanups. No code changes.
-rw-r--r--shell/msh.c48
1 files changed, 23 insertions, 25 deletions
diff --git a/shell/msh.c b/shell/msh.c
index 840c8bb93..2b6b3853f 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -92,17 +92,17 @@ static char *itoa(int n)
92#ifdef MSHDEBUG 92#ifdef MSHDEBUG
93static int mshdbg = MSHDEBUG; 93static int mshdbg = MSHDEBUG;
94 94
95#define DBGPRINTF(x) if (mshdbg>0) printf x 95#define DBGPRINTF(x) if (mshdbg > 0) printf x
96#define DBGPRINTF0(x) if (mshdbg>0) printf x 96#define DBGPRINTF0(x) if (mshdbg > 0) printf x
97#define DBGPRINTF1(x) if (mshdbg>1) printf x 97#define DBGPRINTF1(x) if (mshdbg > 1) printf x
98#define DBGPRINTF2(x) if (mshdbg>2) printf x 98#define DBGPRINTF2(x) if (mshdbg > 2) printf x
99#define DBGPRINTF3(x) if (mshdbg>3) printf x 99#define DBGPRINTF3(x) if (mshdbg > 3) printf x
100#define DBGPRINTF4(x) if (mshdbg>4) printf x 100#define DBGPRINTF4(x) if (mshdbg > 4) printf x
101#define DBGPRINTF5(x) if (mshdbg>5) printf x 101#define DBGPRINTF5(x) if (mshdbg > 5) printf x
102#define DBGPRINTF6(x) if (mshdbg>6) printf x 102#define DBGPRINTF6(x) if (mshdbg > 6) printf x
103#define DBGPRINTF7(x) if (mshdbg>7) printf x 103#define DBGPRINTF7(x) if (mshdbg > 7) printf x
104#define DBGPRINTF8(x) if (mshdbg>8) printf x 104#define DBGPRINTF8(x) if (mshdbg > 8) printf x
105#define DBGPRINTF9(x) if (mshdbg>9) printf x 105#define DBGPRINTF9(x) if (mshdbg > 9) printf x
106 106
107static int mshdbg_rc = 0; 107static int mshdbg_rc = 0;
108 108
@@ -124,7 +124,7 @@ static int mshdbg_rc = 0;
124 124
125#define RCPRINTF(x) ((void)0) 125#define RCPRINTF(x) ((void)0)
126 126
127#endif /* MSHDEBUG */ 127#endif /* MSHDEBUG */
128 128
129 129
130#if ENABLE_FEATURE_EDITING_FANCY_PROMPT 130#if ENABLE_FEATURE_EDITING_FANCY_PROMPT
@@ -141,13 +141,13 @@ static int mshdbg_rc = 0;
141 * shell 141 * shell
142 */ 142 */
143 143
144#define LINELIM 2100 144#define LINELIM 2100
145#define NPUSH 8 /* limit to input nesting */ 145#define NPUSH 8 /* limit to input nesting */
146 146
147#undef NOFILE 147#undef NOFILE
148#define NOFILE 20 /* Number of open files */ 148#define NOFILE 20 /* Number of open files */
149#define NUFILE 10 /* Number of user-accessible files */ 149#define NUFILE 10 /* Number of user-accessible files */
150#define FDBASE 10 /* First file usable by Shell */ 150#define FDBASE 10 /* First file usable by Shell */
151 151
152/* 152/*
153 * values returned by wait 153 * values returned by wait
@@ -159,7 +159,7 @@ static int mshdbg_rc = 0;
159/* 159/*
160 * library and system definitions 160 * library and system definitions
161 */ 161 */
162typedef void xint; /* base type of jmp_buf, for not broken compilers */ 162typedef void xint; /* base type of jmp_buf, for not broken compilers */
163 163
164/* 164/*
165 * shell components 165 * shell components
@@ -725,7 +725,7 @@ static void print_tree(struct op *head)
725 return; 725 return;
726 } 726 }
727 727
728 DBGPRINTF(("NODE: %p, left %p, right %p\n", head, head->left, 728 DBGPRINTF(("NODE: %p, left %p, right %p\n", head, head->left,
729 head->right)); 729 head->right));
730 730
731 if (head->left) 731 if (head->left)
@@ -4316,9 +4316,7 @@ static void globname(char *we, char *pp)
4316 dname[NAME_MAX] = '\0'; 4316 dname[NAME_MAX] = '\0';
4317 while ((de = readdir(dirp)) != NULL) { 4317 while ((de = readdir(dirp)) != NULL) {
4318 /* XXX Hmmm... What this could be? (abial) */ 4318 /* XXX Hmmm... What this could be? (abial) */
4319 /* 4319 /* if (ent[j].d_ino == 0) continue;
4320 if (ent[j].d_ino == 0)
4321 continue;
4322 */ 4320 */
4323 strncpy(dname, de->d_name, NAME_MAX); 4321 strncpy(dname, de->d_name, NAME_MAX);
4324 if (dname[0] == '.') 4322 if (dname[0] == '.')
@@ -4825,7 +4823,7 @@ static int linechar(struct ioarg *ap)
4825} 4823}
4826 4824
4827/* 4825/*
4828 * remap fd into Shell's fd space 4826 * Remap fd into shell's fd space
4829 */ 4827 */
4830static int remap(int fd) 4828static int remap(int fd)
4831{ 4829{
@@ -5211,7 +5209,7 @@ int msh_main(int argc, char **argv)
5211 5209
5212/* Shell is non-interactive, activate printf-based debug */ 5210/* Shell is non-interactive, activate printf-based debug */
5213#ifdef MSHDEBUG 5211#ifdef MSHDEBUG
5214 mshdbg = (int) (((char) (mshdbg_var->value[0])) - '0'); 5212 mshdbg = mshdbg_var->value[0] - '0';
5215 if (mshdbg < 0) 5213 if (mshdbg < 0)
5216 mshdbg = 0; 5214 mshdbg = 0;
5217#endif 5215#endif
@@ -5219,7 +5217,7 @@ int msh_main(int argc, char **argv)
5219 5217
5220 name = *++argv; 5218 name = *++argv;
5221 if (newfile(name)) 5219 if (newfile(name))
5222 exit(EXIT_FAILURE); /* Exit on error */ 5220 exit(EXIT_FAILURE); /* Exit on error */
5223 } 5221 }
5224 } 5222 }
5225 5223