From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Alexander Aring <alex.aring@googlemail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] progressbar: use __stringify in format string
Date: Sat, 20 Oct 2012 14:13:51 +0200 [thread overview]
Message-ID: <20121020121351.GD21588@game.jcrosoft.org> (raw)
In-Reply-To: <1350731704-17204-1-git-send-email-alex.aring@gmail.com>
On 13:15 Sat 20 Oct , Alexander Aring wrote:
> Use stringify in format string for HASH_PER_LINE.
>
> Signed-off-by: Alexander Aring <alex.aring@gmail.com>
> ---
> lib/show_progress.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/lib/show_progress.c b/lib/show_progress.c
> index d958a44..a43b4c9 100644
> --- a/lib/show_progress.c
> +++ b/lib/show_progress.c
> @@ -20,6 +20,7 @@
> #include <common.h>
> #include <progress.h>
> #include <asm-generic/div64.h>
> +#include <linux/stringify.h>
>
> #define HASHES_PER_LINE 65
>
> @@ -56,7 +57,9 @@ void init_progression_bar(int max)
> progress_max = max;
> spin = 0;
> if (progress_max)
> - printf("\t[%65s]\r\t[", "");
> + printf("\t[%"
> + __stringify(HASHES_PER_LINE)
> + "s]\r\t[", "");
online is more readable
Best Regards,
J.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-10-20 12:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-20 11:15 [PATCH] progressbar: use __stringify in format string Alexander Aring
2012-10-20 12:13 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-10-21 20:59 Alexander Aring
2012-10-23 6:25 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121020121351.GD21588@game.jcrosoft.org \
--to=plagnioj@jcrosoft.com \
--cc=alex.aring@googlemail.com \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.