[xml/sgml-commit] [SCM] linuxdoc-tools package for Debian. branch, experimental, updated. debian/0.9.56-15-g8131b89
Agustin Martin Domingo
agmartin at debian.org
Wed Sep 24 21:32:01 UTC 2008
The following commit has been merged in the experimental branch:
commit 8131b89c7cb60e33565e969f0eb6c5407c19221f
Author: Agustin Martin Domingo <agmartin at debian.org>
Date: Wed Sep 24 23:11:19 2008 +0200
Fixed most of the warnings present when processing docs with -w enabled.
* perl5lib/LinuxDocTools.pm:
- Value of <HANDLE> construct can be "0"; test with defined() at ../perl5lib/LinuxDocTools.pm line 140.
+ Use defined ($dtd2 = <$TMP>)
- Subroutine process_options redefined at ../perl5lib/LinuxDocTools.pm line 362.
+ Utils::process_options is always used with fulll name. No need to import it.
- Use of uninitialized value in concatenation (.) or string at ../perl5lib/LinuxDocTools.pm line 419.
+ /etc/sgml.catalog had bad (unneeded) prefix.
* lib/fmt/fmt_lyx.pl:
- Use of uninitialized value in numeric eq (==) at /tmp/ldt.OGoYc31777/linuxdoc-tools/fmt/fmt_lyx.pl line 222, ...
Make sure $inlookchange is initialized.
* lib/fmt/fmt_rtf.pl:
- Use of uninitialized value in concatenation (.) or string at /tmp/ldt.OGoYc31777/linuxdoc-tools/fmt/fmt_rtf.pl line 53.
+ Better check
* lib/fmt/fmt_txt.pl:
- "my" variable $number masks earlier declaration in same scope at /tmp/ldt.OGoYc31777/linuxdoc-tools/fmt/fmt_txt.pl line 266.
+ Remove redundant my.
* doc/Makedoc.sh: print next backend to be used.
diff --git a/doc/Makedoc.sh b/doc/Makedoc.sh
index 0539b26..deea175 100644
--- a/doc/Makedoc.sh
+++ b/doc/Makedoc.sh
@@ -42,15 +42,18 @@ chmod u+x $TMPDIR/linuxdoc
if [ -n "`which groff`" ]; then
ln -s $TMPDIR/linuxdoc $TMPDIR/sgml2txt
+ echo "- Building txt docs" >&2
$TMPDIR/sgml2txt -b 1 ./guide
fi
if [ -n "`which latex`" ]; then
ln -s $TMPDIR/linuxdoc $TMPDIR/sgml2latex
+ echo "- Building latex docs" >&2
$TMPDIR/sgml2latex --pass="\usepackage{times}" -o dvi ./guide
fi
if [ -n "`which dvips`" ]; then
+ echo " + dvips" >&2
dvips -t letter -o ./guide.ps ./guide.dvi
if [ -n "`which gzip`" -a -f ./guide.ps ]; then
gzip -fN ./guide.ps
@@ -58,11 +61,16 @@ if [ -n "`which dvips`" ]; then
fi
+echo "- Building info docs" >&2
$TMPDIR/linuxdoc -B info ./guide.sgml
+
+echo "- Building lyx docs" >&2
$TMPDIR/linuxdoc -B lyx ./guide.sgml
+echo "- Building html docs" >&2
$TMPDIR/linuxdoc -I -B html ./guide && mv -f ./guide*.html ./html
+echo "- Building rtf docs" >&2
$TMPDIR/linuxdoc -B rtf ./guide && if [ ! -d ./rtf ]; \
then mkdir -m 755 ./rtf; fi && mv -f ./guide*.rtf ./rtf
diff --git a/lib/fmt/fmt_lyx.pl b/lib/fmt/fmt_lyx.pl
index ad10632..39910f0 100644
--- a/lib/fmt/fmt_lyx.pl
+++ b/lib/fmt/fmt_lyx.pl
@@ -102,7 +102,7 @@ $lyx->{postASP} = sub {
my $indent_level = -1;
my $verb_last_line = "";
my $verbatim = 0;
- my $inlookchange;
+ my $inlookchange = 0;
my $inheading;
my $initem;
my $intag;
diff --git a/lib/fmt/fmt_rtf.pl b/lib/fmt/fmt_rtf.pl
index 4a22680..c807edb 100644
--- a/lib/fmt/fmt_rtf.pl
+++ b/lib/fmt/fmt_rtf.pl
@@ -46,7 +46,7 @@ $rtf->{postASP} = sub {
my $INFILE = shift;
my $PIPE;
my $rtf2rtf = "$main::AuxBinDir/rtf2rtf";
- my $split = "-2" if $rtf->{twosplit};
+ my $split = ($rtf->{twosplit}) ? "-2" : "";
my $prefile = "$global->{filename}";
my $rtffile = "$global->{filename}.rtf";
diff --git a/lib/fmt/fmt_txt.pl b/lib/fmt/fmt_txt.pl
index 2711692..e378194 100644
--- a/lib/fmt/fmt_txt.pl
+++ b/lib/fmt/fmt_txt.pl
@@ -263,7 +263,7 @@ $txt->{preASP} = sub
$header[$level]++;
}
- my $number = join ('.', at header);
+ $number = join ('.', at header);
if ( ! $#header ) {
# put a . after top level sections
diff --git a/perl5lib/LinuxDocTools.pm b/perl5lib/LinuxDocTools.pm
index 17817e7..ee7ce2a 100644
--- a/perl5lib/LinuxDocTools.pm
+++ b/perl5lib/LinuxDocTools.pm
@@ -44,7 +44,7 @@ use File::Copy;
use File::Temp qw(tempdir);
use File::Basename qw(fileparse);
use LinuxDocTools::Lang;
-use LinuxDocTools::Utils qw(process_options usage cleanup trap_signals remove_tmpfiles create_temp);
+use LinuxDocTools::Utils qw(usage cleanup trap_signals remove_tmpfiles create_temp);
use LinuxDocTools::Vars;
sub BEGIN
@@ -137,7 +137,7 @@ sub ldt_getdtd_v2 {
open (my $TMP,"< $preaspout")
or die "%error_header: Could not open $preaspout for reading. Aborting ...\n";
- while ( ($dtd2 = <$TMP>) && ! ( $dtd2 =~ /^\(/) ) { };
+ while ( defined ($dtd2 = <$TMP>) && ! ( $dtd2 =~ /^\(/) ) { };
close $TMP;
$dtd2 =~ s/^\(//;
$dtd2 =~ tr/A-Z/a-z/;
@@ -419,7 +419,7 @@ sub process_options {
my @sgmlcatalogs = ( "$main::prefix/share/sgml/entities/sgml-iso-entities-8879.1986/catalog",
"$main::prefix/share/sgml/iso-entities-8879.1986/iso-entities.cat",
"$main::DataDir/linuxdoc-tools.catalog",
- "$main::/etc/sgml.catalog");
+ "/etc/sgml.catalog");
@sgmlcatalogs = ($ENV{SGML_CATALOG_FILES}, @sgmlcatalogs) if defined $ENV{SGML_CATALOG_FILES};
--
linuxdoc-tools package for Debian.
More information about the debian-xml-sgml-commit
mailing list