[git commit master] wc: compat: make "wc -c ONE_FILE" not print leading spaces. +2 bytes

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Mon Mar 8 21:57:12 UTC 2010


On Mon, Mar 08, 2010 at 10:03:24PM +0100, Denys Vlasenko wrote:
>
>commit: http://git.busybox.net/busybox/commit/?id=79950a6bbe080441fbffc450e1e75f103e968839
>branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

please apply that to origin/1_16_stable too
>
>Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
>---
> coreutils/wc.c |    2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
>diff --git a/coreutils/wc.c b/coreutils/wc.c
>index 08f3c2d..7116842 100644
>--- 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;
> 	}
>-- 
>1.6.3.3
>
>_______________________________________________
>busybox-cvs mailing list
>busybox-cvs at busybox.net
>http://lists.busybox.net/mailman/listinfo/busybox-cvs


More information about the busybox-cvs mailing list