[xml/sgml-commit] [SCM] linuxdoc-tools package for Debian. branch, master, updated. debian/0.9.60-24-gf1f1363
Agustin Martin Domingo
agmartin at debian.org
Mon Jun 15 12:30:19 UTC 2009
The following commit has been merged in the master branch:
commit b0fb10b68d2b5bcc537a81897d6e569961b3ef37
Author: Agustin Martin Domingo <agmartin at debian.org>
Date: Wed Apr 1 00:38:31 2009 +0200
lib/fmt/fmt_txt.pl: More debugging info if debug is enabled
Show postprocessed groff that will be piped to groff, along
with raw non preprocessed groff.
diff --git a/lib/fmt/fmt_txt.pl b/lib/fmt/fmt_txt.pl
index 18bc1e3..84ccf89 100644
--- a/lib/fmt/fmt_txt.pl
+++ b/lib/fmt/fmt_txt.pl
@@ -6,7 +6,7 @@
#
# © Copyright 1996, Cees de Groot
# © Copyright 2001, Taketoshi Sano
-# © Copyright 2007-2008, Agustin Martin
+# © Copyright 2007-2009, Agustin Martin
# ---------------------------------------------------
package LinuxDocTools::fmt_txt;
@@ -314,8 +314,10 @@ $txt->{postASP} = sub
my $txtfile = "$global->{filename}.txt";
my $groffout = "$global->{tmpbase}.groffout";
my $txtout = ( $global->{language} eq "en" ) ? "" : ".nr HY 0\n";
+ my $txtout0 = "$txtout";
while ( <$INFILE> ) { # Feed $txtout with roff input.
+ $txtout0 .= $_;
unless (/^\.DS/.../^\.DE/) {
s/^[ \t]{1,}(.*)/$1/g;
}
@@ -325,6 +327,22 @@ $txt->{postASP} = sub
$txtout .= $_;
}
+ if ( $global->{debug} ){
+ my $GROFF0;
+ my $groff0 = "$global->{tmpbase}.groff.0";
+ open ( $GROFF0, "> $groff0")
+ or die "fmt_txt::postASP: Could not open \"$groff0\" for write.\n";
+ print $GROFF0 $txtout0;
+ close $GROFF0;
+
+ my $GROFF;
+ my $groff = "$global->{tmpbase}.groff";
+ open ( $GROFF, "> $groff")
+ or die "fmt_txt::postASP: Could not open \"$groff\" for write.\n";
+ print $GROFF $txtout;
+ close $GROFF;
+ }
+
if ( $txt->{manpage} ) {
open ( $OUTFILE, "> $manfile" )
or die "fmt_txt::postASP: Could not open \"$manfile\" for writing\n";
@@ -332,7 +350,6 @@ $txt->{postASP} = sub
unless ( $global->{pass} ){ # Use old overstrike format
$global->{pass} = $txt->{filter} ? "-P-cbou" : "-P-c";
}
- create_temp("$groffout");
my $groffcommand = "| $main::progs->{GROFF} $global->{pass} -T $global->{charset} -t $main::progs->{GROFFMACRO} > $groffout";
open ( $OUTFILE, $groffcommand )
or die "fmt_txt::postASP: Could not open pipe to groff:\n $groffcommand\n";
--
linuxdoc-tools package for Debian.
More information about the debian-xml-sgml-commit
mailing list