On Wed, Mar 9, 2011 at 7:19 AM, Mads Kiilerich <[email protected]> wrote:
> On 03/09/2011 01:09 PM, eduardo fiss beloni wrote:
>> Hi,
>>
>> --- On Sun, 6/3/11, Marc-André Moreau<[email protected]>  wrote:
>>
>>> I added it in cunit and dfbfreerdp after they wouldn't build because
>>> of the missing ceil function. Looking at the previous commits, I
>>> noticed the -lm option, so I added it just so they would build. When
>>> was this introduced and why do we need it exactly?
>>
>>
>> I did. This is the commit:
>>
>> commit f4de129c11d7ed3c8cac161b41cc055b1bd215b0
>> Author: Eduardo Beloni<[email protected]>
>> Date:   Fri Feb 25 18:22:26 2011 -0300
>>
>>      xfreerdp: link against math (-lm)
>>
>>      This is a prerequisite to the 'Multi' capabilities
>>
>>
>> As it is done in process_polygon_sc:
>>
>>       data = ((os->npoints - 1) / 4) + 1;
>>
>> Should I have done the same in process_multiopaquerect? (instead of using 
>> ceil):
>>
>>       data = ((os->nentries - 1) / 2) + 1;
>
> Yes, please.
>
> I would however find it slightly less obscure if it was:
>
>   data = (os->nentries + 1) / 2;
>
> Subtracting 1 from an unsigned 0 might give surprising results.

To continue this tangent, I found a Q/A thread that has some
interesting analysis of this simple operation. :)

http://stackoverflow.com/questions/17944/how-to-round-up-the-result-of-integer-division

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Freerdp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freerdp-devel

Reply via email to