diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-22 22:28:08 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-22 22:28:08 +0200 |
commit | c0dab37d0a2e079d0e0c85aa979439373e9096ca (patch) | |
tree | a9604c6673dfef0726eebba516c5674bcf40ef3e /editors | |
parent | 6935ec9c0b2ac58b1ddc206c21bea36582e1f233 (diff) | |
download | busybox-w32-c0dab37d0a2e079d0e0c85aa979439373e9096ca.tar.gz busybox-w32-c0dab37d0a2e079d0e0c85aa979439373e9096ca.tar.bz2 busybox-w32-c0dab37d0a2e079d0e0c85aa979439373e9096ca.zip |
*: remove last function calls to isspace
function old new delta
xstrtoul_range_sfx 232 231 -1
xstrtoull_range_sfx 295 293 -2
trim 82 80 -2
trim_trailing_spaces_and_print 57 52 -5
isspace 18 - -18
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'editors')
-rw-r--r-- | editors/sed.c | 6 | ||||
-rw-r--r-- | editors/vi.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/editors/sed.c b/editors/sed.c index 9b360b669..27c345921 100644 --- a/editors/sed.c +++ b/editors/sed.c | |||
@@ -423,10 +423,10 @@ static const char *parse_cmd_args(sed_cmd_t *sed_cmd, const char *cmdstr) | |||
423 | if (*cmdstr == '\n' || *cmdstr == '\\') { | 423 | if (*cmdstr == '\n' || *cmdstr == '\\') { |
424 | cmdstr++; | 424 | cmdstr++; |
425 | break; | 425 | break; |
426 | } else if (isspace(*cmdstr)) | 426 | } |
427 | cmdstr++; | 427 | if (!isspace(*cmdstr)) |
428 | else | ||
429 | break; | 428 | break; |
429 | cmdstr++; | ||
430 | } | 430 | } |
431 | sed_cmd->string = xstrdup(cmdstr); | 431 | sed_cmd->string = xstrdup(cmdstr); |
432 | /* "\anychar" -> "anychar" */ | 432 | /* "\anychar" -> "anychar" */ |
diff --git a/editors/vi.c b/editors/vi.c index a24b72303..82f302dca 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -1783,23 +1783,23 @@ static int st_test(char *p, int type, int dir, char *tested) | |||
1783 | 1783 | ||
1784 | if (type == S_BEFORE_WS) { | 1784 | if (type == S_BEFORE_WS) { |
1785 | c = ci; | 1785 | c = ci; |
1786 | test = ((!isspace(c)) || c == '\n'); | 1786 | test = (!isspace(c) || c == '\n'); |
1787 | } | 1787 | } |
1788 | if (type == S_TO_WS) { | 1788 | if (type == S_TO_WS) { |
1789 | c = c0; | 1789 | c = c0; |
1790 | test = ((!isspace(c)) || c == '\n'); | 1790 | test = (!isspace(c) || c == '\n'); |
1791 | } | 1791 | } |
1792 | if (type == S_OVER_WS) { | 1792 | if (type == S_OVER_WS) { |
1793 | c = c0; | 1793 | c = c0; |
1794 | test = ((isspace(c))); | 1794 | test = isspace(c); |
1795 | } | 1795 | } |
1796 | if (type == S_END_PUNCT) { | 1796 | if (type == S_END_PUNCT) { |
1797 | c = ci; | 1797 | c = ci; |
1798 | test = ((ispunct(c))); | 1798 | test = ispunct(c); |
1799 | } | 1799 | } |
1800 | if (type == S_END_ALNUM) { | 1800 | if (type == S_END_ALNUM) { |
1801 | c = ci; | 1801 | c = ci; |
1802 | test = ((isalnum(c)) || c == '_'); | 1802 | test = (isalnum(c) || c == '_'); |
1803 | } | 1803 | } |
1804 | *tested = c; | 1804 | *tested = c; |
1805 | return test; | 1805 | return test; |