[Xcb] XKeysymToString

Thomas Hunger hto at arcor.de
Thu Apr 19 12:41:55 PDT 2007


On Saturday 14 April 2007 13:35, Vincent Torri wrote:

> 1) That function is an horror.
:)

> 2) Is it possible to write a pithon code that parse keysymdef.h and
> write the result in a .c file, with, in that file, a hash table
> being a const, like const char *[] = { .... }; ? (so that that hash
> table will be in libxcb.so)

In libX11 there is "./src/util/makekeys.c" which reads keysymdef.h 
from stdin and outputs a hash table (but I do not know how to use 
that table). 

If written anew it would be nice to output a perfect hash (gperf is 
gpl, is the generated code gpl as well?)

> 3) I think that we have already discussed about that but I can't
> find where and I can't remember: is it a good or a bad idea to have
> keysymdef.h as an xml file ?

Maybe this:
http://lists.freedesktop.org/archives/xcb/2006-November/002284.html
?

Tom


More information about the Xcb mailing list