Re: [xml] EXSLT random() function



On Wed, Feb 20, 2008 at 10:46:24AM -0500, Daniel Veillard wrote:
[...]
so apparently libexslt implementation might just be conformant, but
as usual we takes patches ... But I don't see how you would seed in
a truely random fashion while keeping the code portable.

  replying to myself, maybe we could just use 
    srand((unsigned int)time(NULL))
just before xsltRegisterExtModuleFunction ((const xmlChar *) "random", ...
in exsltMathRegister()

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]