|
Packit Service |
612474 |
|
|
Packit Service |
612474 |
There are a number of problematic special cases in XKB. The issues
|
|
Packit Service |
612474 |
mentioned here are at most partly resolved.
|
|
Packit Service |
612474 |
|
|
Packit Service |
612474 |
1. The are several XxxDoodad structures defined in xkb.xml. They are used
|
|
Packit Service |
612474 |
in a few lists, but in a rather special way:
|
|
Packit Service |
612474 |
The struct "CommonDoodad" is supposed to be a rather generic data type,
|
|
Packit Service |
612474 |
combining the most basic Doodad fields that are common in all these structures.
|
|
Packit Service |
612474 |
All Doodads are encapsulated in a union type simply called "Doodad".
|
|
Packit Service |
612474 |
Now this union is used in subsequent list definitions, aiming at a kind of
|
|
Packit Service |
612474 |
'polymorphism': From inspection of the protocol and Xlib, the Doodads are to
|
|
Packit Service |
612474 |
be discriminated based on their type field.
|
|
Packit Service |
612474 |
However the special meaning of the type field is not encoded in the protocol.
|
|
Packit Service |
612474 |
Furthermore the TextDoodad and the LogoDoodad are variable size types due to
|
|
Packit Service |
612474 |
some fields of type CountedString16, thereby turning the union into a
|
|
Packit Service |
612474 |
possibly variable size type as well.
|
|
Packit Service |
612474 |
However, for lists with variable size elements, special sizeof functions are
|
|
Packit Service |
612474 |
required. These cannot be autogenerated as it cannot be referred which
|
|
Packit Service |
612474 |
Doodad type to use for the union.
|
|
Packit Service |
612474 |
Therefore, the Doodad type structures are unsupported at the moment.
|
|
Packit Service |
612474 |
|
|
Packit Service |
612474 |
2. There are still some bugs in xkb.xml: Either certain fields are missing
|
|
Packit Service |
612474 |
that are required by the protocol, or Xlib simply has another understanding
|
|
Packit Service |
612474 |
of the protocol.
|
|
Packit Service |
612474 |
|
|
Packit Service |
612474 |
3. The interface for accessors should be reviewed.
|
|
Packit Service |
612474 |
|
|
Packit Service |
612474 |
4. Currently some bitcases carry 'name' attributes. These could be avoided if
|
|
Packit Service |
612474 |
the data within would consist of a singe struct field only.
|
|
Packit Service |
612474 |
|
|
Packit Service |
612474 |
5. switch could get a 'fixed_size' attribute, so when rewriting valueparam to switch,
|
|
Packit Service |
612474 |
an uint32_t * pointer could be used instead of void *.
|
|
Packit Service |
612474 |
|
|
Packit Service |
612474 |
6. The automatic inclusion of padding requires some complicated coding in the
|
|
Packit Service |
612474 |
generator. This is errorprone and could be avoided if all padding is explicitly
|
|
Packit Service |
612474 |
given in the protocol definition. For variable size fields that require padding,
|
|
Packit Service |
612474 |
the pad tag could get a 'fieldref' attribute. That way padding could be handled
|
|
Packit Service |
612474 |
a lot easier in the autogenerator.
|