[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 02/02: [grog]: Fix erroenous detection of pic(1) usage.
From: |
G. Branden Robinson |
Subject: |
[groff] 02/02: [grog]: Fix erroenous detection of pic(1) usage. |
Date: |
Sat, 26 Jun 2021 21:43:25 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit ffdf4b7036150a6193ee6e0d09cfade8aadf8349
Author: Dave Kemper <saint.snit@gmail.com>
AuthorDate: Fri Jun 11 11:03:38 2021 +0000
[grog]: Fix erroenous detection of pic(1) usage.
Fixes <https://savannah.gnu.org/bugs/?60772>.
---
ChangeLog | 6 ++++++
src/utils/grog/grog.pl | 16 ++++++++--------
2 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1a4ce21..6fe6637 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-06-26 Dave Kemper <saint.snit@gmail.com>
+
+ [grog]: Fix erroenous detection of pic(1) usage.
+
+ Fixes <https://savannah.gnu.org/bugs/?60772>.
+
2021-06-26 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/utils/grog/tests/PF-does-not-start-pic-region.sh:
diff --git a/src/utils/grog/grog.pl b/src/utils/grog/grog.pl
index e5ac7b2..396aed2 100644
--- a/src/utils/grog/grog.pl
+++ b/src/utils/grog/grog.pl
@@ -81,8 +81,8 @@ my %Groff =
'pic' => 0,
'PS' => 0, # opening for pic
- 'PF' => 0, # alternative opening for pic
'PE' => 0, # closing for pic
+ 'PF' => 0, # alternative closing for pic
'refer' => 0,
'refer_open' => 0,
@@ -652,19 +652,19 @@ sub do_line {
####### do_line()
- # pic can be opened by .PS or .PF and closed by .PE
+ # pic is opened by .PS and can be closed by either .PE or .PF
if ( $command =~ /^\.PS$/ ) {
- $Groff{'pic'}++; # normal opening for pic
- return;
- }
- if ( $command =~ /^\.PF$/ ) {
- $Groff{'PF'}++; # alternate opening for pic
+ $Groff{'PS'}++; # opening for pic
return;
}
if ( $command =~ /^\.PE$/ ) {
$Groff{'PE'}++; # closing for pic
return;
}
+ if ( $command =~ /^\.PF$/ ) {
+ $Groff{'PF'}++; # alternate closing for pic
+ return;
+ }
if ( $command =~ /^\.R1$/ ) {
$Groff{'refer'}++; # for refer
@@ -968,7 +968,7 @@ sub make_groff_preproc {
}
# preprocessors with 'groff' option
- if ( ( $Groff{'PS'} || $Groff{'PF'} ) && $Groff{'PE'} ) {
+ if ( $Groff{'PS'} && ( $Groff{'PE'} || $Groff{'PF'} ) ) {
$Groff{'pic'} = 1;
}
if ( $Groff{'gideal'} ) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 02/02: [grog]: Fix erroenous detection of pic(1) usage.,
G. Branden Robinson <=