[Xcb-commit] src

Bart Massey bart at kemper.freedesktop.org
Thu Mar 29 12:36:29 PDT 2007


 src/c-client.xsl |   38 +++++++++++++-------------------------
 1 files changed, 13 insertions(+), 25 deletions(-)

New commits:
diff-tree 91be36f845352dea7838853d0f98ae144fe571a4 (from 4a60950b7433eb41e08cb0c74dc8ced8f92fd78a)
Author: Eamon Walsh <ewalsh at tycho.nsa.gov>
Date:   Thu Mar 29 12:28:07 2007 -0700

    Replaces special-casing in c-client stylesheet with support
    for new attribute.  Tested with diff and found no difference with
    previous stylesheet header-file output.

diff --git a/src/c-client.xsl b/src/c-client.xsl
index d7a0eb9..24ffe6c 100644
--- a/src/c-client.xsl
+++ b/src/c-client.xsl
@@ -97,31 +97,19 @@ authorization from the authors.
     <xsl:param name="name" />
     <func:result>
       <xsl:text>xcb</xsl:text>
-      <xsl:choose>
-        <xsl:when test="/xcb/@extension-name = 'RandR'">
-          <xsl:text>_randr</xsl:text>
-        </xsl:when>
-        <xsl:when test="/xcb/@extension-name = 'ScreenSaver'">
-          <xsl:text>_screensaver</xsl:text>
-        </xsl:when>
-        <xsl:when test="/xcb/@extension-name = 'XF86Dri'">
-          <xsl:text>_xf86dri</xsl:text>
-        </xsl:when>
-        <xsl:when test="/xcb/@extension-name = 'XFixes'">
-          <xsl:text>_xfixes</xsl:text>
-        </xsl:when>
-        <xsl:when test="/xcb/@extension-name = 'XvMC'">
-          <xsl:text>_xvmc</xsl:text>
-        </xsl:when>
-        <xsl:when test="/xcb/@extension-name">
-          <xsl:text>_</xsl:text>
-          <xsl:call-template name="camelcase-to-underscore">
-            <xsl:with-param name="camelcase" select="/xcb/@extension-name" />
-          </xsl:call-template>
-        </xsl:when>
-        <xsl:otherwise>
-        </xsl:otherwise>
-      </xsl:choose>
+      <xsl:if test="/xcb/@extension-name">
+	<xsl:text>_</xsl:text>
+	<xsl:choose>
+	  <xsl:when test="/xcb/@extension-oneword = 'true' or /xcb/@extension-oneword = '1'">
+	    <xsl:value-of select="translate(/xcb/@extension-name, $ucase, $lcase)"/>
+	  </xsl:when>
+	  <xsl:otherwise>
+	    <xsl:call-template name="camelcase-to-underscore">
+	      <xsl:with-param name="camelcase" select="/xcb/@extension-name" />
+	    </xsl:call-template>
+	  </xsl:otherwise>
+	</xsl:choose>
+      </xsl:if>
       <xsl:if test="$name">
         <xsl:text>_</xsl:text>
         <xsl:call-template name="camelcase-to-underscore">


More information about the xcb-commit mailing list