bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #66504] [gropdf] build failure on Solaris 10


From: G. Branden Robinson
Subject: [bug #66504] [gropdf] build failure on Solaris 10
Date: Wed, 4 Dec 2024 08:56:50 -0500 (EST)

Follow-up Comment #11, bug #66504 (group groff):

Hi Deri,

This amended patch seems to quiet the warnings.

Please review for correctness.  I grasp that the code here is processing a
_grout_ 'x' command, but am not sure I have preserved the desired logic.


diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 754c4904b..a40156ed9 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -486,7 +486,7 @@ my $term="\n";
 my @bl;
 my %seac;
 my $thisfnt;
-my $parcln=qr/\[[^\]]*?\]|(?<term>.)((?!\g{term}).)*\g{term}/;
+my $parcln=qr/\[[^\]]*?\]|(.)((?!\1).)*\1/;
 my $parclntyp=qr/(?:[\d\w]|\([+-]?[\S]{2}|$parcln)/;
 
 if (!GetOptions('F=s' => \$fd, 'I=s' => \@idirs, 'l' => \$frot,
@@ -1697,10 +1697,16 @@ sub do_x
                    else
                    {
                        my $dim=`( identify $FDnm 2>/dev/null || file $FDnm
)`;
-                       $dim=~m/(?:(?:[,=A-Z]|JP2)
(?<w>\d+)\s*x\s*(?<h>\d+))|(?:height=(?<h>\d+).+width=(?<w>\d+))/;
-
-                       $info->{ImageWidth}=$+{w};
-                       $info->{ImageHeight}=$+{h};
+                       if ($dim=~m/(?:[,=A-Z]|JP2) (\d+)\s*x\s*(\d+)/)
+                       {
+                           $info->{ImageWidth}=$1;
+                           $info->{ImageHeight}=$2;
+                       }
+                       elsif ($dim=~m/height=(\d+).+width=(\d+)/)
+                       {
+                           $info->{ImageWidth}=$2;
+                           $info->{ImageHeight}=$1;
+                       }
 
                        if ($dim=~m/JPEG \d+x|JFIF/)
                        {
@@ -2009,7 +2015,8 @@ sub do_x
                my ($S,$P,$St);
 
                $xprm[2]='' if !$xprm[2] or $xprm[2] eq '.';
-               $xprm[3]='' if defined($xprm[3]) and $xprm[3] eq '.';
+               $xprm[3]='' if !defined($xprm[3]) or $xprm[3] eq '.';
+               $xprm[4]='' if !defined($xprm[4]);
 
                if ($xprm[2] and index('DRrAa',substr($xprm[2],0,1)) == -1)




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66504>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]