projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c77e478
)
wc: compat: make "wc -c ONE_FILE" not print leading spaces. +2 bytes
author
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 8 Mar 2010 21:03:24 +0000
(22:03 +0100)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Mon, 8 Mar 2010 21:03:24 +0000
(22:03 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/wc.c
patch
|
blob
|
history
diff --git
a/coreutils/wc.c
b/coreutils/wc.c
index 08f3c2dc4d9e1116231ba3559dd3f7efbe50c3b0..711684225aa489f62e84bb80cde16b7e5b60e974 100644
(file)
--- a/
coreutils/wc.c
+++ b/
coreutils/wc.c
@@
-88,6
+88,8
@@
int wc_main(int argc UNUSED_PARAM, char **argv)
if (!argv[0]) {
*--argv = (char *) bb_msg_standard_input;
fname_fmt = "\n";
+ }
+ if (!argv[1]) { /* zero or one filename? */
if (!((print_type-1) & print_type)) /* exactly one option? */
start_fmt = "%"COUNT_FMT;
}