On 11.01.2008, at 15:00, Albrecht Schlosser wrote:

> Greg Ercolano wrote:
>> Alvin wrote:
>>> Thanks for comments. I agree, the actual handling of the URL is  
>>> severely
>>> flawed in the example. I was debating on whether I should make it  
>>> truely
>>> robust, but by doing so would complicate the example of receiving  
>>> the DND
>>> events themselves.
>
> to Alvin: thanks for this nice tutorial :-)
>
>> // Assume pairs of bytes: <char> <nul> <char> <nul> .. <nul> <nul>
>> void multibyte_convert(const char *in, char *out)
>> {
>>    for ( ; *in; out++, in+=2 )
>>        { *out = *in; }
>> }
>
> to Greg: wouldn't the above code miss the trailing zero byte?


No, the line

  for ( ; *in; out++, in+=2 )

could also be written as:

while (*in) {
   ...
   out++; in+=2;
}

----
http://robowerk.com/


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to