1
Patch by sergei Golovan fixes several bugs with . and ' at the
2
beginning of a line in Erlang manpages. It simply escapes all dots
3
and apostrophes by adding \& before them. Also, it fixes whatis entries
4
for module and application definitions.
1
Author: Sergei Golovan <sgolovan@debian.org>
2
Description: Fixes a bug with .RE macro in the Erlang manpages.
3
Last-modified:Sat, 27 Feb 2010 09:35:21 +0300
6
--- erlang-13.b.3-dfsg.orig/lib/erl_docgen/priv/xsl/db_man.xsl
7
+++ erlang-13.b.3-dfsg/lib/erl_docgen/priv/xsl/db_man.xsl
10
<xsl:template match="/erlref">
11
<xsl:text>.TH </xsl:text><xsl:value-of select="module"/><xsl:text> 3 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "Ericsson AB" "Erlang Module Definition" </xsl:text>
12
- <xsl:text>.SH MODULE </xsl:text>
13
+ <xsl:text>.SH NAME </xsl:text>
14
<xsl:value-of select="module"/><xsl:text> \- </xsl:text><xsl:value-of select="modulesummary"/><xsl:text> </xsl:text>
15
<xsl:apply-templates/>
18
<xsl:template match="/appref">
19
<xsl:text>.TH </xsl:text><xsl:value-of select="app"/><xsl:text> 6 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "Ericsson AB" "Erlang Application Definition" </xsl:text>
20
<xsl:text>.SH NAME </xsl:text>
21
- <xsl:value-of select="file"/><xsl:text> \- </xsl:text><xsl:value-of select="filesummary"/><xsl:text> </xsl:text>
22
+ <xsl:value-of select="app"/><xsl:text> \- </xsl:text><xsl:value-of select="appsummary"/><xsl:text> </xsl:text>
23
<xsl:apply-templates/>
5
--- erlang-13.b.4-dfsg.orig/lib/erl_docgen/priv/xsl/db_man.xsl
6
+++ erlang-13.b.4-dfsg/lib/erl_docgen/priv/xsl/db_man.xsl
8
<xsl:template match="list">
9
<xsl:text> .RS 2</xsl:text>
10
<xsl:apply-templates/>
11
- <xsl:text> .RE</xsl:text>
12
+ <xsl:text> .RE </xsl:text>
15
<xsl:template match="list/item">
17
<xsl:template match="taglist">
18
<xsl:text> .RS 2</xsl:text>
19
<xsl:apply-templates select="tag|item"/>
20
- <xsl:text> .RE</xsl:text>
21
+ <xsl:text> .RE </xsl:text>
24
<xsl:template match="taglist/tag">
26
<xsl:text> .RS 2</xsl:text>
27
<xsl:text> .LP .LP </xsl:text>
28
<xsl:value-of select="$content"/>
29
- <xsl:text> .RE</xsl:text>
30
+ <xsl:text> .RE </xsl:text>
27
35
<xsl:text> .TP</xsl:text>
28
36
<xsl:text> Types</xsl:text>
29
37
<xsl:apply-templates/>
30
38
- <xsl:text> .RE</xsl:text>
31
+ <xsl:text> .RE </xsl:text>
39
+ <xsl:text> .RE </xsl:text>
36
44
<xsl:template match="desc">
37
45
<xsl:text> .RS</xsl:text>
38
46
<xsl:apply-templates/>
39
47
- <xsl:text> .RE</xsl:text>
40
+ <xsl:text> .RE </xsl:text>
45
<xsl:value-of select="normalize-space()"/>
49
+ <xsl:template match="authors">
50
+ <xsl:text> .SH AUTHORS</xsl:text>
51
+ <xsl:apply-templates/>
55
+ <xsl:template match="authors/aname">
56
+ <xsl:text> .LP </xsl:text>
57
+ <xsl:apply-templates/>
61
+ <xsl:template match="authors/email">
62
+ <xsl:text> .I <</xsl:text>
63
+ <xsl:apply-templates/>
64
+ <xsl:text>></xsl:text>
67
+ <!-- Replace ' by \&' ans . by \&. -->
68
+ <xsl:template match="text()">
69
+ <xsl:variable name="rep1">
70
+ <xsl:call-template name="replace-string">
71
+ <xsl:with-param name="text" select="." />
72
+ <xsl:with-param name="replace" select=""'"" />
73
+ <xsl:with-param name="with" select=""\&'"" />
74
+ </xsl:call-template>
76
+ <xsl:call-template name="replace-string">
77
+ <xsl:with-param name="text" select="$rep1" />
78
+ <xsl:with-param name="replace" select=""."" />
79
+ <xsl:with-param name="with" select=""\&."" />
80
+ </xsl:call-template>
83
+ <!-- Template replace-string is borrowed at http://www.dpawson.co.uk/xsl/sect2/replace.html -->
84
+ <xsl:template name="replace-string">
85
+ <xsl:param name="text"/>
86
+ <xsl:param name="replace"/>
87
+ <xsl:param name="with"/>
89
+ <xsl:when test="contains($text,$replace)">
90
+ <xsl:value-of select="substring-before($text,$replace)"/>
91
+ <xsl:value-of select="$with"/>
92
+ <xsl:call-template name="replace-string">
93
+ <xsl:with-param name="text" select="substring-after($text,$replace)"/>
94
+ <xsl:with-param name="replace" select="$replace"/>
95
+ <xsl:with-param name="with" select="$with"/>
96
+ </xsl:call-template>
99
+ <xsl:value-of select="$text"/>
105
--- erlang-13.b.3-dfsg.orig/lib/stdlib/doc/src/re.xml
106
+++ erlang-13.b.3-dfsg/lib/stdlib/doc/src/re.xml
48
+ <xsl:text> .RE </xsl:text>
52
--- erlang-13.b.4-dfsg.orig/lib/megaco/doc/src/Makefile
53
+++ erlang-13.b.4-dfsg/lib/megaco/doc/src/Makefile
55
$(INSTALL_DATA) $(INFO_FILE) $(RELSYSDIR)
56
$(INSTALL_DIR) $(RELEASE_PATH)/man/man3
57
$(INSTALL_DATA) $(MAN3DIR)/* $(RELEASE_PATH)/man/man3
58
- $(INSTALL_DIR) $(RELSYSDIR)/doc/standard
59
- $(INSTALL_DATA) $(STANDARDS) $(RELSYSDIR)/doc/standard
64
$(INSTALL_DIR) $(RELEASE_PATH)/man/man3
65
$(INSTALL_DATA) $(MAN3_FILES) $(RELEASE_PATH)/man/man3
66
$(INSTALL_DATA) $(TOP_HTML_FILES) $(RELSYSDIR)/doc
67
- $(INSTALL_DIR) $(RELSYSDIR)/doc/standard
68
- $(INSTALL_DATA) $(STANDARDS) $(RELSYSDIR)/doc/standard
72
--- erlang-13.b.4-dfsg.orig/lib/stdlib/doc/src/re.xml
73
+++ erlang-13.b.4-dfsg/lib/stdlib/doc/src/re.xml
107
74
@@ -349,7 +349,7 @@
108
75
metacharacter should not match before it. Setting this without
109
76
<c>multiline</c> (at compile time) causes circumflex never to