aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-04-10 09:38:35 +0000
committeraldot <aldot@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-04-10 09:38:35 +0000
commit5e4f447825c090406a3f51e748bac308bea96591 (patch)
treebf440665c9a99743cc22195351b0eec490ab8204
parentd15b7ac65a2530e6e35973625f433ca3446a9cf4 (diff)
downloadbusybox-w32-5e4f447825c090406a3f51e748bac308bea96591.tar.gz
busybox-w32-5e4f447825c090406a3f51e748bac308bea96591.tar.bz2
busybox-w32-5e4f447825c090406a3f51e748bac308bea96591.zip
- use skip_non_whitespace() where appropriate
git-svn-id: svn://busybox.net/trunk/busybox@18379 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--coreutils/uniq.c4
-rw-r--r--miscutils/dc.c4
-rw-r--r--shell/bbsh.c2
3 files changed, 3 insertions, 7 deletions
diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index bcdf44026..11a731aaa 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -75,9 +75,7 @@ int uniq_main(int argc, char **argv)
75 e1 = s1; 75 e1 = s1;
76 for (i = skip_fields; i; i--) { 76 for (i = skip_fields; i; i--) {
77 e1 = skip_whitespace(e1); 77 e1 = skip_whitespace(e1);
78 while (*e1 && !isspace(*e1)) { 78 e1 = skip_non_whitespace(e1);
79 ++e1;
80 }
81 } 79 }
82 for (i = skip_chars; *e1 && i; i--) { 80 for (i = skip_chars; *e1 && i; i--) {
83 ++e1; 81 ++e1;
diff --git a/miscutils/dc.c b/miscutils/dc.c
index 8c9d77fc3..1953a9489 100644
--- a/miscutils/dc.c
+++ b/miscutils/dc.c
@@ -182,9 +182,7 @@ static char *get_token(char **buffer)
182 current = skip_whitespace(*buffer); 182 current = skip_whitespace(*buffer);
183 if (*current != 0) { 183 if (*current != 0) {
184 start = current; 184 start = current;
185 while (!isspace(*current) && *current != 0) { 185 current = skip_non_whitespace(current);
186 current++;
187 }
188 *buffer = current; 186 *buffer = current;
189 } 187 }
190 return start; 188 return start;
diff --git a/shell/bbsh.c b/shell/bbsh.c
index 4f38213c9..06fd0131e 100644
--- a/shell/bbsh.c
+++ b/shell/bbsh.c
@@ -90,7 +90,7 @@ static char *parse_word(char *start, struct command **cmd)
90 90
91 // Grab next word. (Add dequote and envvar logic here) 91 // Grab next word. (Add dequote and envvar logic here)
92 end = start; 92 end = start;
93 while (*end && !isspace(*end)) end++; 93 end = skip_non_whitespace(end);
94 (*cmd)->argv[(*cmd)->argc++] = xstrndup(start, end-start); 94 (*cmd)->argv[(*cmd)->argc++] = xstrndup(start, end-start);
95 95
96 // Allocate more space if there's no room for NULL terminator. 96 // Allocate more space if there's no room for NULL terminator.