svn commit: trunk/busybox: coreutils miscutils shell
aldot at busybox.net
aldot at busybox.net
Tue Apr 10 02:38:35 PDT 2007
Author: aldot
Date: 2007-04-10 02:38:35 -0700 (Tue, 10 Apr 2007)
New Revision: 18379
Log:
- use skip_non_whitespace() where appropriate
Modified:
trunk/busybox/coreutils/uniq.c
trunk/busybox/miscutils/dc.c
trunk/busybox/shell/bbsh.c
Changeset:
Modified: trunk/busybox/coreutils/uniq.c
===================================================================
--- trunk/busybox/coreutils/uniq.c 2007-04-10 09:38:07 UTC (rev 18378)
+++ trunk/busybox/coreutils/uniq.c 2007-04-10 09:38:35 UTC (rev 18379)
@@ -75,9 +75,7 @@
e1 = s1;
for (i = skip_fields; i; i--) {
e1 = skip_whitespace(e1);
- while (*e1 && !isspace(*e1)) {
- ++e1;
- }
+ e1 = skip_non_whitespace(e1);
}
for (i = skip_chars; *e1 && i; i--) {
++e1;
Modified: trunk/busybox/miscutils/dc.c
===================================================================
--- trunk/busybox/miscutils/dc.c 2007-04-10 09:38:07 UTC (rev 18378)
+++ trunk/busybox/miscutils/dc.c 2007-04-10 09:38:35 UTC (rev 18379)
@@ -182,9 +182,7 @@
current = skip_whitespace(*buffer);
if (*current != 0) {
start = current;
- while (!isspace(*current) && *current != 0) {
- current++;
- }
+ current = skip_non_whitespace(current);
*buffer = current;
}
return start;
Modified: trunk/busybox/shell/bbsh.c
===================================================================
--- trunk/busybox/shell/bbsh.c 2007-04-10 09:38:07 UTC (rev 18378)
+++ trunk/busybox/shell/bbsh.c 2007-04-10 09:38:35 UTC (rev 18379)
@@ -90,7 +90,7 @@
// Grab next word. (Add dequote and envvar logic here)
end = start;
- while (*end && !isspace(*end)) end++;
+ end = skip_non_whitespace(end);
(*cmd)->argv[(*cmd)->argc++] = xstrndup(start, end-start);
// Allocate more space if there's no room for NULL terminator.
More information about the busybox-cvs
mailing list