2014-07-14 1:57 GMT+09:00 Junio C Hamano :
>
> If you do not want floating point (and I think we tend to avoid it
> when we do not need it), you can realize that in your use of "0.1"
> and "0.01" and "0.001" there is nothing fundamentally floating-point;
> you can measure how many digits below the
"Yi, EungJun" writes:
> I think it is possible like this:
>
> num_langs += 1; /* for '*' */
> decimal_places = 1 + (num_langs > 10) + (num_langs > 100);
> snprintf(q_format, sizeof(q_format), "; q=%%.%df", decimal_places);
> for (q_precision = 1.0; decimal_places-- > 0;) q_precisi
2014-07-13 13:26 GMT+09:00 Eric Sunshine :
>> + /* Decide the precision for q-factor on number of preferred
>> languages. */
>> + if (num_langs + 1 > 100) { /* +1 is for '*' */
>> + q_precision = 0.001;
>> + q_format = "; q=%.3f";
>> + } else if (num_l
On Fri, Jul 11, 2014 at 12:52 PM, Yi EungJun wrote:
> Add an Accept-Language header which indicates the user's preferred
> languages defined by $LANGUAGE, $LC_ALL, $LC_MESSAGES and $LANG.
>
> Examples:
> LANGUAGE= -> ""
> LANGUAGE=ko:en -> "Accept-Language: ko, en; q=0.9, *; q=0.1"
> LANGUAG
Thanks for your detailed review and nice suggestions. I will accept
most of them.
2014-07-12 2:35 GMT+09:00 Jeff King :
>> + /* Decide the precision for q-factor on number of preferred languages.
>> */
>> + if (num_langs + 1 > 100) { /* +1 is for '*' */
>> + q_precision = 0.00
Yi EungJun:
Add an Accept-Language header which indicates the user's preferred
languages defined by $LANGUAGE, $LC_ALL, $LC_MESSAGES and $LANG.
This one seems to fix all the issues I had with the first patch,
thanks!
--
\\// Peter - http://www.softwolves.pp.se/
--
To unsubscribe from this l
On Fri, Jul 11, 2014 at 1:35 PM, Jeff King wrote:
> On Sat, Jul 12, 2014 at 01:52:53AM +0900, Yi EungJun wrote:
>> Add an Accept-Language header which indicates the user's preferred
>> languages defined by $LANGUAGE, $LC_ALL, $LC_MESSAGES and $LANG.
>>
>> Examples:
>> LANGUAGE= -> ""
>> LANGUA
On Sat, Jul 12, 2014 at 01:52:53AM +0900, Yi EungJun wrote:
> Add an Accept-Language header which indicates the user's preferred
> languages defined by $LANGUAGE, $LC_ALL, $LC_MESSAGES and $LANG.
>
> Examples:
> LANGUAGE= -> ""
> LANGUAGE=ko:en -> "Accept-Language: ko, en; q=0.9, *; q=0.1"
>
Add an Accept-Language header which indicates the user's preferred
languages defined by $LANGUAGE, $LC_ALL, $LC_MESSAGES and $LANG.
Examples:
LANGUAGE= -> ""
LANGUAGE=ko:en -> "Accept-Language: ko, en; q=0.9, *; q=0.1"
LANGUAGE=ko LANG=en_US.UTF-8 -> "Accept-Language: ko, *; q=0.1"
LANGUAG
9 matches
Mail list logo