aboutsummaryrefslogtreecommitdiff
path: root/coreutils/wc.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-10-22 22:28:08 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-10-22 22:28:08 +0200
commitc0dab37d0a2e079d0e0c85aa979439373e9096ca (patch)
treea9604c6673dfef0726eebba516c5674bcf40ef3e /coreutils/wc.c
parent6935ec9c0b2ac58b1ddc206c21bea36582e1f233 (diff)
downloadbusybox-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 'coreutils/wc.c')
-rw-r--r--coreutils/wc.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/coreutils/wc.c b/coreutils/wc.c
index d0e5482ca..3e32e3d6d 100644
--- a/coreutils/wc.c
+++ b/coreutils/wc.c
@@ -43,22 +43,19 @@
43 43
44#include "libbb.h" 44#include "libbb.h"
45 45
46#if ENABLE_LOCALE_SUPPORT 46#if !ENABLE_LOCALE_SUPPORT
47#define isspace_given_isprint(c) isspace(c) 47# undef isprint
48#else 48# undef isspace
49#undef isspace 49# define isprint(c) ((unsigned)((c) - 0x20) <= (0x7e - 0x20))
50#undef isprint 50# define isspace(c) ((c) == ' ')
51#define isspace(c) ((((c) == ' ') || (((unsigned int)((c) - 9)) <= (13 - 9))))
52#define isprint(c) (((unsigned int)((c) - 0x20)) <= (0x7e - 0x20))
53#define isspace_given_isprint(c) ((c) == ' ')
54#endif 51#endif
55 52
56#if ENABLE_FEATURE_WC_LARGE 53#if ENABLE_FEATURE_WC_LARGE
57#define COUNT_T unsigned long long 54# define COUNT_T unsigned long long
58#define COUNT_FMT "llu" 55# define COUNT_FMT "llu"
59#else 56#else
60#define COUNT_T unsigned 57# define COUNT_T unsigned
61#define COUNT_FMT "u" 58# define COUNT_FMT "u"
62#endif 59#endif
63 60
64enum { 61enum {
@@ -123,11 +120,11 @@ int wc_main(int argc UNUSED_PARAM, char **argv)
123 c = getc(fp); 120 c = getc(fp);
124 if (isprint(c)) { 121 if (isprint(c)) {
125 ++linepos; 122 ++linepos;
126 if (!isspace_given_isprint(c)) { 123 if (!isspace(c)) {
127 in_word = 1; 124 in_word = 1;
128 continue; 125 continue;
129 } 126 }
130 } else if (((unsigned int)(c - 9)) <= 4) { 127 } else if ((unsigned)(c - 9) <= 4) {
131 /* \t 9 128 /* \t 9
132 * \n 10 129 * \n 10
133 * \v 11 130 * \v 11