[Po4a-commits] po4a/lib/Locale/Po4a Sgml.pm,1.57,1.58

Martin Quinson po4a-devel@lists.alioth.debian.org
Sat, 28 May 2005 19:03:09 +0000


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

Modified Files:
	Sgml.pm 
Log Message:
Check the nsgmls exit code and issue an error if it is non-zero.

Index: Sgml.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Sgml.pm,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- Sgml.pm	25 May 2005 16:55:20 -0000	1.57
+++ Sgml.pm	28 May 2005 19:03:07 -0000	1.58
@@ -610,7 +610,7 @@
     print $tmpfh $origfile;
     close $tmpfh || die wrap_mod("po4a::sgml", dgettext("po4a", "Can't close tempfile: %s"), $!);
 
-    my $cmd="cat $tmpfile|nsgmls -l -E 0 2>/dev/null|";
+    my $cmd="nsgmls -l -E 0 <$tmpfile 2>/dev/null|";
     print STDERR "CMD=$cmd\n" if ($debug{'generic'});
 
     open (IN,$cmd) || die wrap_mod("po4a::sgml", dgettext("po4a", "Can't run nsgmls: %s"), $!);
@@ -865,6 +865,7 @@
     # What to do after parsing
     $self->pushline($buffer);
     close(IN);
+    die wrap_mod("po4a::sgml", dgettext("po4a","nsgmls is missing or non-functional"));
     unlink ($tmpfile) unless $debug{'refs'};
 }