[Po4a-commits] po4a/lib/Locale/Po4a Man.pm,1.62,1.63

Nicolas FRAN??OIS po4a-devel@lists.alioth.debian.org
Fri, 12 Nov 2004 18:04:20 +0000


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv428/lib/Locale/Po4a

Modified Files:
	Man.pm 
Log Message:
Heading of a section (.SH or .SS) can be specified on the next line.


Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- Man.pm	12 Nov 2004 16:36:14 -0000	1.62
+++ Man.pm	12 Nov 2004 18:04:18 -0000	1.63
@@ -1033,7 +1033,23 @@
 };
 
 # .SS t    Subheading t (like .SH, but used for a subsection inside a section).
-$macro{'SS'}=$macro{'SH'}=\&translate_joined;
+$macro{'SS'}=$macro{'SH'}=sub {
+    if (!defined $_[2]) {
+        # The argument is on the next line.
+        my ($self,$macroname) = (shift,shift);
+        my ($l2,$ref2) = $self->shiftline();
+        if ($l2 =~/^\./) {
+            $self->SUPER::unshiftline($l2,$ref2);
+        } else {
+            chomp($l2);
+            $self->pushmacro($macroname,
+                             $self->t($l2));
+        }
+        return;
+    } else {
+        return translate_joined(@_);
+    }
+};
 
 $macro{'SM'}=\&translate_joined;