Re: [PATCH] format-patch -n: make sorting easier by padding number
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 9, 2007, 00:47 UTC
- Message-ID
- <Pine.LNX.4.63.0702090147050.22628@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <Pine.LNX.4.63.0702090142100.22628@wbgn013.biozentrum.uni-wuerzburg.de>
Hi,
On Fri, 9 Feb 2007, Johannes Schindelin wrote:
> +static unsigned int log10(unsigned int number)
> +{
> + unsigned int i = 10, result = 1;
> + while (i < number) {D'oh. Make that "<=", please.
Show 5 quoted lines
> + i *= 10; > + result++; > + } > + return result; > +}
Ciao, Dscho