Follow-up Comment #25, bug #67612 (group groff):

Patch v2:


diff --git a/src/devices/gropdf/gropdf.1.man
b/src/devices/gropdf/gropdf.1.man
index 09b5d191a..20cf1f37c 100644
--- a/src/devices/gropdf/gropdf.1.man
+++ b/src/devices/gropdf/gropdf.1.man
@@ -1944,17 +1944,19 @@ .SH "Exit status"
 .IP 0
 .I gropdf
 successfully produced a PDF document.
+.
+.
 .IP 1
 .I gropdf
 experienced a critical error,
-or could not interpret its arguments.
-No PDF was produced,
-or the document produced will be unusable.
+or warnings were emitted and the
+.B \-W
+option was specified.
+.
+.
 .IP 2
 .I gropdf
-emitted warnings.
-The document produced may be usable,
-but may fail to render as desired.
+could not interpret its command-line arguments.
 .
 .
 .br
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index d0da52c42..db0562c9c 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -461,7 +461,7 @@ sub usage
 "Translate the output of troff(1) into Portable Document Format.\n" .
 "See the gropdf(1) manual page.\n";
     }
-    exit($had_error);
+    exit($had_error ? 2 : 0);
 }
 
 my $fd;
@@ -498,7 +498,7 @@ if (!GetOptions('F=s' => \@fdlist, 'I=s' => \@idirs, 'l'
=> \$frot,
     'e' => \$embedall, 'y=s' => \$Foundry, 's' => \$stats, 'W' =>
\$warnexit,
     'u:s' => \$unicodemap))
 {
-    &usage(1);
+    &usage(1); # had error
 }
 
 unshift(@idirs,'.');
@@ -3197,7 +3197,7 @@ sub Warn
     unshift(@_, "warning: ");
     my $msg=join('',@_);
     Msg(0,$msg);
-    $xitcd=2 if $warnexit;
+    $xitcd=1 if $warnexit;
 }
 
 sub Die




    _______________________________________________________

Reply to this item at:

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

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

Attachment: signature.asc
Description: PGP signature

Reply via email to