On 18.03.2010, at 22:33, Matthias Melcher wrote:
>
> Looking at the code, I seem to remember that %p as a format identifier in 
> sscanf may be an issue.

Oh, yes, now that you mention it, I remember that I saw a doubled
"0x" in the output statements on Linux:

Fl_Plugin: creating a plugin, class "fltk:device", name 
"opengl.device.fltk.org"
Fl_Plugin: creating a plugin manager for class "fltk:device"
Fl_Plugin: adding plugin named "opengl.device.fltk.org" at 0x0x80ac7ac
Fl_Plugin: deleting a plugin manager
Fl_Plugin: creating a plugin manager for class "fltk:device"
Fl_Plugin: returning plugin named "opengl.device.fltk.org": 0x0x80ac7ac
Fl_Plugin: deleting a plugin manager
Fl_Plugin: creating a plugin manager for class "fltk:device"
Fl_Plugin: returning plugin named "opengl.device.fltk.org": 0x0x80ac7ac
Fl_Plugin: deleting a plugin manager
Fl_Plugin: deleting a plugin

The text is okay, the plugin works, but the additional 0x looks wrong.

Maybe it's only of cosmetical character, but what if one extraneous
'0x' is written to the plugin database...

> Here are the two functions that set and read the address of the plugin. May 
> Cygwin has limited support here?

currently it looks as if only MinGW runtime versions somewhere between
1.10 and 1.16 are affected, but as we can see, Ian uses even older
versions, and so may others.

> If so, how should I write a pointer in ASCII instead? I can of course 
> manually convert it to/from Hex?!

Cast to int maybe, and use %x for hex output and %x for sscanf as well.
I think that Manolo's proposal looks good.

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

Reply via email to