diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-20 11:30:28 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-03-20 11:30:28 +0000 |
commit | c86e052b81210e762f8ca6b79cb46b8c4bdfbfe0 (patch) | |
tree | 90608280101218f60c7d9181b913e92ba895799d /shell | |
parent | e84aeb5bcb1a8398fce53aad9c0072ad73a8b5c9 (diff) | |
download | busybox-w32-c86e052b81210e762f8ca6b79cb46b8c4bdfbfe0.tar.gz busybox-w32-c86e052b81210e762f8ca6b79cb46b8c4bdfbfe0.tar.bz2 busybox-w32-c86e052b81210e762f8ca6b79cb46b8c4bdfbfe0.zip |
fix accumulated whitespace and indentation damage
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash_test/ash-arith/arith-for.right | 4 | ||||
-rwxr-xr-x | shell/ash_test/ash-arith/arith-for.testsx | 2 | ||||
-rwxr-xr-x | shell/ash_test/ash-arith/arith.tests | 4 | ||||
-rwxr-xr-x | shell/ash_test/ash-heredoc/heredoc.tests | 2 | ||||
-rwxr-xr-x | shell/ash_test/run-all | 2 | ||||
-rw-r--r-- | shell/msh.c | 46 |
6 files changed, 30 insertions, 30 deletions
diff --git a/shell/ash_test/ash-arith/arith-for.right b/shell/ash_test/ash-arith/arith-for.right index 44941103f..88dbc15fa 100644 --- a/shell/ash_test/ash-arith/arith-for.right +++ b/shell/ash_test/ash-arith/arith-for.right | |||
@@ -11,8 +11,8 @@ | |||
11 | 2 | 11 | 2 |
12 | 4 | 12 | 4 |
13 | fx is a function | 13 | fx is a function |
14 | fx () | 14 | fx () |
15 | { | 15 | { |
16 | i=0; | 16 | i=0; |
17 | for ((1; i < 3; i++ )) | 17 | for ((1; i < 3; i++ )) |
18 | do | 18 | do |
diff --git a/shell/ash_test/ash-arith/arith-for.testsx b/shell/ash_test/ash-arith/arith-for.testsx index 585aa5133..4fa30ff90 100755 --- a/shell/ash_test/ash-arith/arith-for.testsx +++ b/shell/ash_test/ash-arith/arith-for.testsx | |||
@@ -73,7 +73,7 @@ done | |||
73 | type fx | 73 | type fx |
74 | fx | 74 | fx |
75 | 75 | ||
76 | # errors | 76 | # errors |
77 | for (( i=0; "i < 3" )) | 77 | for (( i=0; "i < 3" )) |
78 | do | 78 | do |
79 | echo $i | 79 | echo $i |
diff --git a/shell/ash_test/ash-arith/arith.tests b/shell/ash_test/ash-arith/arith.tests index 272fc3487..d65758e7d 100755 --- a/shell/ash_test/ash-arith/arith.tests +++ b/shell/ash_test/ash-arith/arith.tests | |||
@@ -144,12 +144,12 @@ echo 40 $(( 8 ^ 32 )) | |||
144 | #ash# echo 10 $(( 32#a )) | 144 | #ash# echo 10 $(( 32#a )) |
145 | #ash# echo 10 $(( 56#a )) | 145 | #ash# echo 10 $(( 56#a )) |
146 | #ash# echo 10 $(( 64#a )) | 146 | #ash# echo 10 $(( 64#a )) |
147 | #ash# | 147 | #ash# |
148 | #ash# echo 10 $(( 16#A )) | 148 | #ash# echo 10 $(( 16#A )) |
149 | #ash# echo 10 $(( 32#A )) | 149 | #ash# echo 10 $(( 32#A )) |
150 | #ash# echo 36 $(( 56#A )) | 150 | #ash# echo 36 $(( 56#A )) |
151 | #ash# echo 36 $(( 64#A )) | 151 | #ash# echo 36 $(( 64#A )) |
152 | #ash# | 152 | #ash# |
153 | #ash# echo 62 $(( 64#@ )) | 153 | #ash# echo 62 $(( 64#@ )) |
154 | #ash# echo 63 $(( 64#_ )) | 154 | #ash# echo 63 $(( 64#_ )) |
155 | 155 | ||
diff --git a/shell/ash_test/ash-heredoc/heredoc.tests b/shell/ash_test/ash-heredoc/heredoc.tests index 31316a58d..b3cdc3f7b 100755 --- a/shell/ash_test/ash-heredoc/heredoc.tests +++ b/shell/ash_test/ash-heredoc/heredoc.tests | |||
@@ -1,6 +1,6 @@ | |||
1 | # check order and content of multiple here docs | 1 | # check order and content of multiple here docs |
2 | 2 | ||
3 | cat << EOF1 << EOF2 | 3 | cat << EOF1 << EOF2 |
4 | hi | 4 | hi |
5 | EOF1 | 5 | EOF1 |
6 | there | 6 | there |
diff --git a/shell/ash_test/run-all b/shell/ash_test/run-all index ba1756e7d..02f6d2a9d 100755 --- a/shell/ash_test/run-all +++ b/shell/ash_test/run-all | |||
@@ -18,7 +18,7 @@ do_test() | |||
18 | cd "$1" || { echo "cannot cd $1!"; exit 1; } | 18 | cd "$1" || { echo "cannot cd $1!"; exit 1; } |
19 | for x in run-*; do | 19 | for x in run-*; do |
20 | test -f "$x" || continue | 20 | test -f "$x" || continue |
21 | case "$x" in | 21 | case "$x" in |
22 | "$0"|run-minimal|run-gprof) ;; | 22 | "$0"|run-minimal|run-gprof) ;; |
23 | *.orig|*~) ;; | 23 | *.orig|*~) ;; |
24 | #*) echo $x ; sh $x ;; | 24 | #*) echo $x ; sh $x ;; |
diff --git a/shell/msh.c b/shell/msh.c index 89c375380..41f4cc60d 100644 --- a/shell/msh.c +++ b/shell/msh.c | |||
@@ -50,36 +50,36 @@ static char *find_applet_by_name(const char *applet) | |||
50 | } | 50 | } |
51 | static void utoa_to_buf(unsigned n, char *buf, unsigned buflen) | 51 | static void utoa_to_buf(unsigned n, char *buf, unsigned buflen) |
52 | { | 52 | { |
53 | unsigned i, out, res; | 53 | unsigned i, out, res; |
54 | assert(sizeof(unsigned) == 4); | 54 | assert(sizeof(unsigned) == 4); |
55 | if (buflen) { | 55 | if (buflen) { |
56 | out = 0; | 56 | out = 0; |
57 | for (i = 1000000000; i; i /= 10) { | 57 | for (i = 1000000000; i; i /= 10) { |
58 | res = n / i; | 58 | res = n / i; |
59 | if (res || out || i == 1) { | 59 | if (res || out || i == 1) { |
60 | if (!--buflen) break; | 60 | if (!--buflen) break; |
61 | out++; | 61 | out++; |
62 | n -= res*i; | 62 | n -= res*i; |
63 | *buf++ = '0' + res; | 63 | *buf++ = '0' + res; |
64 | } | 64 | } |
65 | } | 65 | } |
66 | *buf = '\0'; | 66 | *buf = '\0'; |
67 | } | 67 | } |
68 | } | 68 | } |
69 | static void itoa_to_buf(int n, char *buf, unsigned buflen) | 69 | static void itoa_to_buf(int n, char *buf, unsigned buflen) |
70 | { | 70 | { |
71 | if (buflen && n<0) { | 71 | if (buflen && n < 0) { |
72 | n = -n; | 72 | n = -n; |
73 | *buf++ = '-'; | 73 | *buf++ = '-'; |
74 | buflen--; | 74 | buflen--; |
75 | } | 75 | } |
76 | utoa_to_buf((unsigned)n, buf, buflen); | 76 | utoa_to_buf((unsigned)n, buf, buflen); |
77 | } | 77 | } |
78 | static char local_buf[12]; | 78 | static char local_buf[12]; |
79 | static char *itoa(int n) | 79 | static char *itoa(int n) |
80 | { | 80 | { |
81 | itoa_to_buf(n, local_buf, sizeof(local_buf)); | 81 | itoa_to_buf(n, local_buf, sizeof(local_buf)); |
82 | return local_buf; | 82 | return local_buf; |
83 | } | 83 | } |
84 | #else | 84 | #else |
85 | # include <setjmp.h> | 85 | # include <setjmp.h> |