RE: [fltk.coredev] Improve function Fl_X11_System_Driver::newUUID() - [General Use]

9 views
Skip to first unread message

MacArthur, Ian (Leonardo, UK)

unread,
Sep 30, 2020, 10:56:36 AM9/30/20
to fltkc...@googlegroups.com
> I'd like to improve function Fl_X11_System_Driver::newUUID()
> that generates UUIDs having it call function uuid_generate() from libuuid
> when it's found at run-time. The code falls back to the present ad hoc method
> when uuid_generate() isn't available.
>
> That's in attached uuid_generate.patch.txt
>
> The modified code can be tested adding
>     fprintf(stderr, "UUID=%s\n", Fl_Preferences::newUUID());
> as first statement in main() of test/preferences.cxx


Haven't tried it (Windows PC day today) but "visual inspection" looks fine, and the idea is sound in principle, so I’d say yes...



Leonardo MW Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

Albrecht Schlosser

unread,
Sep 30, 2020, 5:06:33 PM9/30/20
to fltkc...@googlegroups.com
On 9/30/20 4:56 PM MacArthur, Ian (Leonardo, UK) wrote:
>> I'd like to improve function Fl_X11_System_Driver::newUUID()
>> that generates UUIDs having it call function uuid_generate() from libuuid
>> when it's found at run-time. The code falls back to the present ad hoc method
>> when uuid_generate() isn't available.
>>
>> That's in attached uuid_generate.patch.txt
>>
>> The modified code can be tested adding
>>      fprintf(stderr, "UUID=%s\n", Fl_Preferences::newUUID());
>> as first statement in main() of test/preferences.cxx
>
>
> Haven't tried it (Windows PC day today) but "visual inspection" looks fine, and the idea is sound in principle, so I’d say yes...

+1

Manolo

unread,
Oct 2, 2020, 6:26:41 AM10/2/20
to fltk.coredev

Thanks for your votes.That's now committed at 4659822
Reply all
Reply to author
Forward
0 new messages