[Po4a-commits] "po4a/lib/Locale/Po4a Man.pm,1.148,1.149"
Nicolas FRANCOIS
nekral-guest at alioth.debian.org
Sun Jun 4 12:57:45 UTC 2006
Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv14266/lib/Locale/Po4a
Modified Files:
Man.pm
Log Message:
Using docheader to reset memories doesn't always work.
Make sure in Dd and TH that the memories are reset.
Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -d -r1.148 -r1.149
--- Man.pm 4 Jun 2006 12:21:32 -0000 1.148
+++ Man.pm 4 Jun 2006 12:57:43 -0000 1.149
@@ -1228,15 +1228,21 @@
}
} # end of main
-# We can't push the header in the first line of the document, as in the
-# other module, because the first line may contain indications on how the
-# man page must be processed.
-sub docheader {
+# Clear all the memories.
+# This should be called between all documents.
+sub re_init {
@comments = ();
@next_comments = ();
set_regular("R");
set_font("R");
set_font("R");
+ $mdoc_mode = 0;
+}
+# We can't push the header in the first line of the document, as in the
+# other module, because the first line may contain indications on how the
+# man page must be processed.
+sub docheader {
+ re_init();
return "";
}
@@ -1579,8 +1585,11 @@
my ($th,$title,$section,$date,$source,$manual)=@_;
#Preamble#.TH title section date source manual
# print STDERR "TH=$th;titre=$title;sec=$section;date=$date;source=$source;manual=$manual\n";
- $mdoc_mode = 0;
+
+ # Reset the memories
+ re_init();
$self->push_docheader();
+
$self->pushmacro($th,
$self->t($title),
$section,
@@ -2100,6 +2109,7 @@
$macro{'Dd'}=sub {
my ($self,$macroname,$macroarg)=(shift,shift,join(" ", at _));
+ re_init();
$mdoc_mode = 1;
$self->push_docheader();
More information about the Po4a-commits
mailing list