On 25.03.2011 03:10, Evan Laforge wrote:

> I actually have a small utility library that has a 'const char
> *show_event(int evt);' function that's basically the same, only safer,
> since it won't segfault on a bad input.  Since it's obviously a useful
> function, how about adding it to the Fl namespace or something?
> Here's mine:

Yep, I also thought about a function with range checking instead of
the simple global array, and this would be very simple to add.
If we'd have this in its own source file, then this would also only
be linked in (statically) if it was called somewhere (as Greg wrote
in another post).

> In fact, here are some more bonus ones:

Thanks for posting these. As Greg wrote, we could maybe add some or
all of them to FLTK as debugging helpers, if we can manage to make them
optional. One way would be to enable/disable them with configure, so
that they don't even appear in shared builds, if someone is short of
memory.

BTW: I wonder whether your show_key() function would work for UTF-8
characters?

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

Reply via email to