diff options
author | Ron Yorston <rmy@pobox.com> | 2012-03-21 20:53:50 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2012-03-21 20:53:50 +0000 |
commit | f6bad5ef766b0447158e3de2f55c35f1f6cecb58 (patch) | |
tree | f5ec7ac45234c25794c97f87e9a6daa8a551e57c /coreutils/wc.c | |
parent | 72394258b6509b40e0fa08594ac86215a558dfd8 (diff) | |
parent | 8d0e0cdadf726beab28ccdc7d69738c1534e1f74 (diff) | |
download | busybox-w32-f6bad5ef766b0447158e3de2f55c35f1f6cecb58.tar.gz busybox-w32-f6bad5ef766b0447158e3de2f55c35f1f6cecb58.tar.bz2 busybox-w32-f6bad5ef766b0447158e3de2f55c35f1f6cecb58.zip |
Merge commit '8d0e0cdadf726beab28ccdc7d69738c1534e1f74' into merge
Conflicts:
include/platform.h
libbb/Kbuild.src
libbb/messages.c
Diffstat (limited to 'coreutils/wc.c')
-rw-r--r-- | coreutils/wc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/coreutils/wc.c b/coreutils/wc.c index fe3f274f8..6e22c66c8 100644 --- a/coreutils/wc.c +++ b/coreutils/wc.c | |||
@@ -81,11 +81,11 @@ | |||
81 | * column order in "wc -cmlwL" output: | 81 | * column order in "wc -cmlwL" output: |
82 | */ | 82 | */ |
83 | enum { | 83 | enum { |
84 | WC_LINES = 0, | 84 | WC_LINES = 0, /* -l */ |
85 | WC_WORDS = 1, | 85 | WC_WORDS = 1, /* -w */ |
86 | WC_UNICHARS = 2, | 86 | WC_UNICHARS = 2, /* -m */ |
87 | WC_CHARS = 3, | 87 | WC_BYTES = 3, /* -c */ |
88 | WC_LENGTH = 4, | 88 | WC_LENGTH = 4, /* -L */ |
89 | NUM_WCS = 5, | 89 | NUM_WCS = 5, |
90 | }; | 90 | }; |
91 | 91 | ||
@@ -104,10 +104,10 @@ int wc_main(int argc UNUSED_PARAM, char **argv) | |||
104 | 104 | ||
105 | init_unicode(); | 105 | init_unicode(); |
106 | 106 | ||
107 | print_type = getopt32(argv, "lwcmL"); | 107 | print_type = getopt32(argv, "lwmcL"); |
108 | 108 | ||
109 | if (print_type == 0) { | 109 | if (print_type == 0) { |
110 | print_type = (1 << WC_LINES) | (1 << WC_WORDS) | (1 << WC_CHARS); | 110 | print_type = (1 << WC_LINES) | (1 << WC_WORDS) | (1 << WC_BYTES); |
111 | } | 111 | } |
112 | 112 | ||
113 | argv += optind; | 113 | argv += optind; |
@@ -157,7 +157,7 @@ int wc_main(int argc UNUSED_PARAM, char **argv) | |||
157 | } | 157 | } |
158 | 158 | ||
159 | /* Cater for -c and -m */ | 159 | /* Cater for -c and -m */ |
160 | ++counts[WC_CHARS]; | 160 | ++counts[WC_BYTES]; |
161 | if (unicode_status != UNICODE_ON /* every byte is a new char */ | 161 | if (unicode_status != UNICODE_ON /* every byte is a new char */ |
162 | || (c & 0xc0) != 0x80 /* it isn't a 2nd+ byte of a Unicode char */ | 162 | || (c & 0xc0) != 0x80 /* it isn't a 2nd+ byte of a Unicode char */ |
163 | ) { | 163 | ) { |