[Xcb-commit] src

Jamey Sharp jamey at kemper.freedesktop.org
Sat Oct 14 19:52:50 PDT 2006


 src/c-client.xsl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

New commits:
diff-tree 5ec55dc9c0c51137d89dd870ede05cc3268f75ae (from c1504691ec2786594e8ffc33f3962f460f041971)
Author: Zephaniah E. Hull <warp at aehallh.com>
Date:   Sat Oct 14 19:52:23 2006 -0700

    Define and use constants for opcode numbers.
    
    Hard coding the opcode numbers in the function just makes it harder to figure
    out what's going on, but much more to the point, not defining the opcodes in
    the header makes it impossible to use the generated headers instead of the
    x11proto headers in the server.
    
    The name I settled on is very simple, for an extension by the name of xconf,
    and a request by the name of list_devices, we get XCB_XCONF_LIST_DEVICES.  If
    this somehow causes problems, we can probably add a _OP somewhere in there,
    but.
    
    Acked-by: Jamey Sharp <jamey at minilop.net>
    Closes: #8641

diff --git a/src/c-client.xsl b/src/c-client.xsl
index f9897f7..445a8a6 100644
--- a/src/c-client.xsl
+++ b/src/c-client.xsl
@@ -342,7 +342,7 @@ authorization from the authors.
       </xsl:attribute>
       <field type="xcb_connection_t *" name="c" />
       <xsl:apply-templates select="$req/*[not(self::reply)]" mode="param" />
-      <do-request ref="{xcb:xcb-prefix($req/@name)}_request_t" opcode="{$req/@opcode}"
+      <do-request ref="{xcb:xcb-prefix($req/@name)}_request_t" opcode="{translate(xcb:xcb-prefix($req/@name), $lcase, $ucase)}"
                   checked="{$checked}">
         <xsl:if test="$req/reply">
           <xsl:attribute name="has-reply">true</xsl:attribute>
@@ -358,6 +358,7 @@ authorization from the authors.
         <field type="unsigned int" name="sequence" />
       </struct>
     </xsl:if>
+    <constant type="number" name="{xcb:xcb-prefix($req/@name)}" value="{$req/@opcode}" />
     <struct name="{xcb:xcb-prefix(@name)}_request_t">
       <field type="uint8_t" name="major_opcode" no-assign="true" />
       <xsl:if test="$ext">


More information about the xcb-commit mailing list