diff --git a/Socket/ClientSocketHandle.hh b/Socket/ClientSocketHandle.hh index 2bd9052dced654d27ba0b5746f6b75a7be38ee0a..95f1bb28da13d5cd54548dbf097e1baf814a072c 100644 --- a/Socket/ClientSocketHandle.hh +++ b/Socket/ClientSocketHandle.hh @@ -200,7 +200,7 @@ namespace senf { \returns \c std::pair of data read (a string) and the peers address - \todo Add \c limit argument + \fixme Add \c limit argument \implementation The readfrom() family of members will use \c recvfrom from the BSD socket API. @@ -243,7 +243,6 @@ namespace senf { \param[in] data Data to write \returns number of bytes written - \todo Make this member write the complete string if the socket is blocking \implementation The write() family of members will use POSIX \c write calls, not \c send. */ diff --git a/Socket/FileHandle.hh b/Socket/FileHandle.hh index 2f6b09f0bd32b2d73d76df1a20515ed3a961bfe9..79985c473eea8d10e0c7489c447832da92a11649 100644 --- a/Socket/FileHandle.hh +++ b/Socket/FileHandle.hh @@ -109,7 +109,7 @@ namespace senf { instance. This instance may either be a simple senf::FileBody or a class derived from senf::FileBody. - \todo Add public default constructor to allow declaration of (empty) senf::FileHandle + \fixme Add public default constructor to allow declaration of (empty) senf::FileHandle variables. */ class FileHandle diff --git a/doclib/senf.css b/doclib/senf.css index 1004b9f1bb4c8cd97042801da4a8892e41279c46..3b83650aa5ddf19ee6af937fb28ea67b7cf8408a 100644 --- a/doclib/senf.css +++ b/doclib/senf.css @@ -178,13 +178,6 @@ table.senf th { font-weight: bold; } -dl.bug, dl.fixme, dl.todo, dl.idea { - border: 1px solid #EE0000; - border-left-width: 4px; - background-color: #FFDDDD; - padding: 0 10px; -} - dl.xref-bug, dl.xref-fix, dl.xref-todo, dl.xref-idea { border: 1px solid #CC8888; padding: 2px 3px; @@ -206,36 +199,41 @@ dl.xref-bug a, dl.xref-fix a, dl.xref-todo a, dl.xref-idea a { color: #6666FF; } -dl.fixme { - border-color: #EEEE00; - background-color: #FFFFDD; -} - dl.xref-fix { border-color: #CCCC88; background-color: #FFFFEE; } -dl.todo { - border-color: #00AA00; - background-color: #DDFFDD; -} - dl.xref-todo { border-color: #88CC88; background-color: #EEFFEE; } -dl.idea { - border-color: #AAAAAA; - background-color: #EEEEEE; -} - dl.xref-idea { border-color: #CCCCCC; background-color: #F8F8F8; } +div.bug, div.fixme, div.todo, div.idea { + padding-left: 10px; +} + +div.bug { + border-left: 10px solid red; +} + +div.fixme { + border-left: 10px solid yellow; +} + +div.todo { + border-left: 10px solid green; +} + +div.idea { + border-left: 10px solid #AAAAAA; +} + table { width: 100%; } diff --git a/senfscons/functions.xsl b/senfscons/functions.xsl index f8e22f48e06bdbf050c341f359c4ecf02354d7ca..f0c5c4dd34095fd3e495ffc18133c776f1aa9b48 100644 --- a/senfscons/functions.xsl +++ b/senfscons/functions.xsl @@ -7,6 +7,68 @@ xmlns:exsl="http://exslt.org/common" extension-element-prefixes="str exsl func"> +<func:function name="str:split"> + <xsl:param name="string" select="''" /> + <xsl:param name="pattern" select="' '" /> + <xsl:choose> + <xsl:when test="not($string)"> + <func:result select="/.." /> + </xsl:when> + <xsl:when test="not(function-available('exsl:node-set'))"> + <xsl:message terminate="yes"> + ERROR: EXSLT - Functions implementation of str:split relies on exsl:node-set(). + </xsl:message> + </xsl:when> + <xsl:otherwise> + <xsl:variable name="tokens"> + <xsl:choose> + <xsl:when test="not($pattern)"> + <xsl:call-template name="str:_split-characters"> + <xsl:with-param name="string" select="$string" /> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:call-template name="str:_split-pattern"> + <xsl:with-param name="string" select="$string" /> + <xsl:with-param name="pattern" select="$pattern" /> + </xsl:call-template> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <func:result select="exsl:node-set($tokens)/token" /> + </xsl:otherwise> + </xsl:choose> +</func:function> + +<xsl:template name="str:_split-characters"> + <xsl:param name="string" /> + <xsl:if test="$string"> + <token><xsl:value-of select="substring($string, 1, 1)" /></token> + <xsl:call-template name="str:_split-characters"> + <xsl:with-param name="string" select="substring($string, 2)" /> + </xsl:call-template> + </xsl:if> +</xsl:template> + +<xsl:template name="str:_split-pattern"> + <xsl:param name="string" /> + <xsl:param name="pattern" /> + <xsl:choose> + <xsl:when test="contains($string, $pattern)"> + <xsl:if test="not(starts-with($string, $pattern))"> + <token><xsl:value-of select="substring-before($string, $pattern)" /></token> + </xsl:if> + <xsl:call-template name="str:_split-pattern"> + <xsl:with-param name="string" select="substring-after($string, $pattern)" /> + <xsl:with-param name="pattern" select="$pattern" /> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <token><xsl:value-of select="$string" /></token> + </xsl:otherwise> + </xsl:choose> +</xsl:template> + <!-- ==================================================================== --> <!-- node-set str:replace(string,object,object) --> <!-- --> diff --git a/senfscons/xrefhtml.xslt b/senfscons/xrefhtml.xslt index 3d4dcbccc0758b5cbc5a945653639f19480a08cb..3c81bfda671109939b738a56cd9308012b110459 100644 --- a/senfscons/xrefhtml.xslt +++ b/senfscons/xrefhtml.xslt @@ -4,7 +4,8 @@ xmlns:fn="http://senf.berlios.de/xml/Extensions" xmlns:exsl="http://exslt.org/common" xmlns:str="http://exslt.org/strings" - extension-element-prefixes="str fn exsl" + xmlns:func="http://exslt.org/functions" + extension-element-prefixes="str fn exsl func" version="1.0"> <xsl:include href="functions.xsl"/> @@ -12,29 +13,61 @@ <xsl:output method="html"/> <xsl:strip-space elements="*"/> <xsl:param name="title" select="''"/> + <xsl:param name="types" select="'bug fixme todo idea'"/> <xsl:template match="/"> - <h1><xsl:value-of select="$title"/></h1> - <xsl:apply-templates/> + <div class="xref"> + <h1><xsl:value-of select="$title"/></h1> + <xsl:variable name="doc" select="."/> + <div class="nav"> + <xsl:text> -- </xsl:text> + <xsl:for-each select="str:split($types)"> + <xsl:element name="a"> + <xsl:attribute name="href">#<xsl:value-of select="."/></xsl:attribute> + <xsl:value-of select="translate(.,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/><xsl:text>S</xsl:text> + </xsl:element> + <xsl:text> -- </xsl:text> + </xsl:for-each> + </div> + <xsl:for-each select="str:split($types)"> + <xsl:variable name="type" select="string(.)"/> + <xsl:element name="div"> + <xsl:attribute name="class"><xsl:value-of select="$type"/></xsl:attribute> + <xsl:element name="a"> + <xsl:attribute name="name"><xsl:value-of select="$type"/></xsl:attribute> + <h2>Open <xsl:value-of select="translate($type,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>s</h2> + </xsl:element> + <xsl:for-each select="$doc//xreflist[@type=$type]"> + <xsl:sort select="@module"/> + <h3><xsl:value-of select="@module"/> module</h3> + <dl> + <xsl:apply-templates/> + </dl> + </xsl:for-each> + </xsl:element> + </xsl:for-each> + </div> </xsl:template> - <xsl:template match="xreflist"> - <xsl:if test="string(preceding::xreflist[1]/@module)!=string(@module)"> - <xsl:if test="preceding::xreflist"> - <hr/> - </xsl:if> - <h2>The <xsl:element name="a"> - <xsl:attribute name="href">../../<xsl:value-of select="@module"/>/doc/html/index.html</xsl:attribute> - <xsl:value-of select="@module"/> - </xsl:element> module</h2> - </xsl:if> - <xsl:element name="dl"> - <xsl:attribute name="class"><xsl:value-of select="@type"/></xsl:attribute> - <dt><h3><xsl:value-of select="translate(@type,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/> items</h3></dt> + <xsl:template match="compound"> + <dt> + <xsl:element name="a"> + <xsl:attribute name="href"><xsl:value-of select="fn:id2url(@id)"/></xsl:attribute> + <b><xsl:value-of select="@name"/></b> + </xsl:element> + </dt> + <dd> <xsl:apply-templates/> - </xsl:element> + </dd> </xsl:template> + <xsl:template match="item"> + <p><xsl:apply-templates/></p> + </xsl:template> + + <!-- ====================================================================== --> + <!-- Helper functions --> + <fn:nsquote> <fn:replacement> <fn:match>_1_1</fn:match> @@ -44,29 +77,18 @@ <xsl:variable name="nsquote" select="document('')//fn:nsquote/fn:replacement"/> - <xsl:template match="compound"> + <func:function name="fn:id2url"> + <xsl:param name="id"/> <!-- Yuck ... I HATE this .. why doesn't xsltproc support XPath 2.0 ... grmpf --> <xsl:variable name="quoted"> - <xsl:apply-templates select="str:replace(@id,$nsquote/fn:match,$nsquote/fn:replace)"/> + <xsl:apply-templates select="str:replace($id,$nsquote/fn:match,$nsquote/fn:replace)"/> </xsl:variable> <xsl:variable name="anchor" select="substring-after($quoted,'_1')"/> <xsl:variable name="file"> <xsl:apply-templates select="str:replace(substring($quoted,1,string-length($quoted) - number(boolean($anchor))*2 - string-length($anchor)),$nsquote/fn:replace,$nsquote/fn:match)"/> </xsl:variable> <xsl:variable name="sep" select="substring('#',2-number(boolean($anchor)))"/> - <dt> - <xsl:element name="a"> - <xsl:attribute name="href">../../<xsl:value-of select="ancestor::xreflist/@module"/>/doc/html/<xsl:value-of select="$file"/>.html<xsl:value-of select="$sep"/><xsl:value-of select="$anchor"/></xsl:attribute> - <b><xsl:value-of select="@name"/></b> - </xsl:element> - </dt> - <dd> - <xsl:apply-templates/> - </dd> - </xsl:template> - - <xsl:template match="item"> - <p><xsl:apply-templates/></p> - </xsl:template> + <func:result>../../<xsl:value-of select="ancestor::xreflist/@module"/>/doc/html/<xsl:value-of select="$file"/>.html<xsl:value-of select="$sep"/><xsl:value-of select="$anchor"/></func:result> + </func:function> </xsl:stylesheet> diff --git a/senfscons/xrefxtract.xslt b/senfscons/xrefxtract.xslt index e09ff4fc5a0930eac92544bd1d836e05c49e6ca7..8a79414e33454e006b191250d02a4f326e38c30d 100644 --- a/senfscons/xrefxtract.xslt +++ b/senfscons/xrefxtract.xslt @@ -17,9 +17,9 @@ <xsl:value-of select="string(varlistentry/term)"/> </xsl:attribute> <xsl:text>
</xsl:text> - <xsl:variable name="curid" select="varlistentry/term/ref/@refid"/> + <xsl:variable name="curid" select="varlistentry/term/ref[1]/@refid"/> <xsl:apply-templates - select="//variablelist[varlistentry/term/ref/@refid=$curid]" + select="//variablelist[varlistentry/term/ref[1]/@refid=$curid]" mode="inlist"/> </xsl:element> <xsl:text>
</xsl:text>