aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_docgen/priv/xsl/db_man.xsl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2012-07-16 20:02:23 +0200
committerHans Bolinder <[email protected]>2012-07-16 20:02:23 +0200
commitf3528e0a5ecb2f655f9d2e5de996424defcdf1c9 (patch)
tree297ce30dd355392793443ddb9e76228a59294233 /lib/erl_docgen/priv/xsl/db_man.xsl
parentffcdf6f983bd9b7005abc2e69c4a0f187b8493f6 (diff)
parent23307be619f0768d84464d13d94c8180d806ec49 (diff)
downloadotp-f3528e0a5ecb2f655f9d2e5de996424defcdf1c9.tar.gz
otp-f3528e0a5ecb2f655f9d2e5de996424defcdf1c9.tar.bz2
otp-f3528e0a5ecb2f655f9d2e5de996424defcdf1c9.zip
Merge branch 'hb/erl_docgen/cref_spaces/OTP-10138' into maint
* hb/erl_docgen/cref_spaces/OTP-10138: erts: add space before '*' in some function prototypes ic: add space before '*' in some function prototypes Fix a bug regarding spaces in C function prototypes
Diffstat (limited to 'lib/erl_docgen/priv/xsl/db_man.xsl')
-rw-r--r--lib/erl_docgen/priv/xsl/db_man.xsl26
1 files changed, 24 insertions, 2 deletions
diff --git a/lib/erl_docgen/priv/xsl/db_man.xsl b/lib/erl_docgen/priv/xsl/db_man.xsl
index 5234ba6bd0..33808859c7 100644
--- a/lib/erl_docgen/priv/xsl/db_man.xsl
+++ b/lib/erl_docgen/priv/xsl/db_man.xsl
@@ -3,7 +3,7 @@
#
# %CopyrightBegin%
#
- # Copyright Ericsson AB 2009-2011. All Rights Reserved.
+ # Copyright Ericsson AB 2009-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
@@ -758,10 +758,32 @@
<xsl:template name="name">
<xsl:text>&#10;.B&#10;</xsl:text>
- <xsl:apply-templates/>
+ <xsl:choose>
+ <xsl:when test="ancestor::cref">
+ <xsl:value-of select="ret"/>
+ <xsl:call-template name="maybe-space-after-ret">
+ <xsl:with-param name="s" select="ret"/>
+ </xsl:call-template>
+ <xsl:value-of select="nametext"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>
+ </xsl:choose>
<xsl:text>&#10;.br</xsl:text>
</xsl:template>
+ <xsl:template name="maybe-space-after-ret">
+ <xsl:param name="s"/>
+ <xsl:variable name="last_char"
+ select="substring($s, string-length($s), 1)"/>
+ <xsl:choose>
+ <xsl:when test="$last_char != '*'">
+ <xsl:text> </xsl:text>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:template>
+
<!-- Type -->
<xsl:template match="type">