From d3f335d2cf64eb6c556ee5ba6e4a9315766e3c6e Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 26 Oct 2014 12:56:41 -0500 Subject: Cosmetic tweak: no trailing spaces when ./toybox lists command names. --- main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index c3577b64..ed6706a9 100644 --- a/main.c +++ b/main.c @@ -166,11 +166,9 @@ list: for (j=0; toy_paths[j]; j++) if (fl & (1<65) { - xputc('\n'); - len=0; - } + len += printf("%s",toy_list[i].name); + if (++len > 65) len = 0; + xputc(len ? ' ' : '\n'); } } xputc('\n'); -- cgit v1.2.3