[Xcb] ANNOUNCE: XML-XCB project merging into XCB

Josh Triplett josh at freedesktop.org
Tue Nov 9 17:20:30 PST 2004


Jamey Sharp wrote:
> On Sat, Nov 06, 2004 at 07:15:27PM -0800, Josh Triplett wrote:
>>Jamey Sharp wrote:
>>
>>>When I 'cvs update'd, I discovered that I had some uncommitted work
>>>based on the M4 bits. This seemed like a good opportunity to try to
>>>modify your stylesheet, to see how easily I could do it.
>>>
>>>This particular change was mostly straightforward, but I hit a
>>>limitation in the implementation: I want the major (and minor, if
>>>applicable) opcodes to be treated like the length field. Space should be
>>>reserved for them in the request structure, but they should not be
>>>assigned to in the generated code.
>>>
>>>I dunno how to do that. A patch is attached with my efforts so far:
>>>could you play with it and advise me on a fix?

This change is now complete.  I had been generating an assignment
statement only for fields outside of the <middle> tag; while this
happened to work, the two had nothing to do with each other.  To fix
this, I separated the two concepts by adding a "no-assign" attribute to
fields in the first pass, and then generating assignments for all fields
without that attribute, whether in the <middle> tag or not.

You can see the resulting change to the XSLT with "cvs diff -r 1.39 -r
1.40 c-client.xsl"; the changes to xcb_out.c and xcbext.h were taken
verbatim from your patch.

>>2) As we discussed previously, I'm going to replace the <extension> tag
>>that goes immediately under <xcb> in extension protocol descriptions
>>with optional extension-name and extension-xname attributes on the <xcb>
>>root tag.
> 
> I still agree that this is a sensible thing to do. :-)

This change is now done.

>>>Could you also tell me whether my use of the <l> line-formatting tags
>>>matches what you intended?
>>
>><l> tags go inside a <function> tag generated by the first or second
>>pass, and represent one indented line of code.  The output pass will
>>simply output the content of each <l> as the function body, with each
>>line prefixed by four spaces.
> 
> Yeah, I caught that. My question was more this: I wanted another level
> of indentation. Did you have something in mind for how to do that?

In current CVS, you can now use <indent> tags, which add one level of
indentation to the <l> and <indent> tags they contain.

- Josh Triplett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://freedesktop.org/pipermail/xcb/attachments/20041109/19131ca5/signature.pgp


More information about the xcb mailing list