aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-20 11:30:28 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-20 11:30:28 +0000
commit9dbd94421304e4bfca9dfb4883a7299b3fb2fe27 (patch)
tree90608280101218f60c7d9181b913e92ba895799d /shell
parent87dd90aa8ab4c88d3dee025044a419d8f2f49cd7 (diff)
downloadbusybox-w32-9dbd94421304e4bfca9dfb4883a7299b3fb2fe27.tar.gz
busybox-w32-9dbd94421304e4bfca9dfb4883a7299b3fb2fe27.tar.bz2
busybox-w32-9dbd94421304e4bfca9dfb4883a7299b3fb2fe27.zip
fix accumulated whitespace and indentation damage
git-svn-id: svn://busybox.net/trunk/busybox@18176 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-rw-r--r--shell/ash_test/ash-arith/arith-for.right4
-rwxr-xr-xshell/ash_test/ash-arith/arith-for.testsx2
-rwxr-xr-xshell/ash_test/ash-arith/arith.tests4
-rwxr-xr-xshell/ash_test/ash-heredoc/heredoc.tests2
-rwxr-xr-xshell/ash_test/run-all2
-rw-r--r--shell/msh.c46
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 @@
112 112
124 124
13fx is a function 13fx is a function
14fx () 14fx ()
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
73type fx 73type fx
74fx 74fx
75 75
76# errors 76# errors
77for (( i=0; "i < 3" )) 77for (( i=0; "i < 3" ))
78do 78do
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
3cat << EOF1 << EOF2 3cat << EOF1 << EOF2
4hi 4hi
5EOF1 5EOF1
6there 6there
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}
51static void utoa_to_buf(unsigned n, char *buf, unsigned buflen) 51static 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}
69static void itoa_to_buf(int n, char *buf, unsigned buflen) 69static 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}
78static char local_buf[12]; 78static char local_buf[12];
79static char *itoa(int n) 79static 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>