[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 01/01: grog: momentarily ignore groff preproc options for 3 prep
From: |
Bernd Warken |
Subject: |
[groff] 01/01: grog: momentarily ignore groff preproc options for 3 preprocessors |
Date: |
Mon, 16 Jun 2014 20:20:30 +0000 |
bwarken pushed a commit to branch master
in repository groff.
commit a18a7801fe030a8ddcde27e3869ccf1aed25faaf
Author: Bernd Warken <address@hidden>
Date: Mon Jun 16 22:20:11 2014 +0200
grog: momentarily ignore groff preproc options for 3 preprocessors
---
ChangeLog | 5 +++++
src/roff/grog/subs.pl | 34 ++++++++++++++++++++++++++++++----
2 files changed, 35 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 60c44b2..b636c1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2014-06-16 Bernd Warken <address@hidden>
+ * src/roff/grog/subs.pl: Remove too early listing of 3 `groff'
+ preprocessors options: gideal, glilypond, gperl.
+
+2014-06-16 Bernd Warken <address@hidden>
+
* contrib/gideal: New project for installing `ideal' for `groff'.
* Makefile.in: Add `gideal' for `OTHERDIRS'.
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index 4bce9d0..991ebaf 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -67,7 +67,12 @@ my %Groff = (
'grn' => 0,
'ideal' => 0,
'lilypond' => 0,
+
'pic' => 0,
+ 'PS' => 0, # opening for pic
+ 'PF' => 0, # alternative opening for pic
+ 'PE' => 0, # closing for pic
+
'refer' => 0,
'refer_open' => 0,
'refer_close' => 0,
@@ -357,10 +362,21 @@ sub do_line {
$Groff{'lilypond'}++; # for glilypond
return;
}
+
+ # pic can be opened by .PS or .PF and closed by .PE
if ( $command =~ /^\.PS$/ ) {
- $Groff{'pic'}++; # for gpic
+ $Groff{'pic'}++; # normal opening for pic
+ return;
+ }
+ if ( $command =~ /^\.PF$/ ) {
+ $Groff{'PF'}++; # alternative opening for pic
+ return;
+ }
+ if ( $command =~ /^\.PE$/ ) {
+ $Groff{'PE'}++; # closing for pic
return;
}
+
if ( $command =~ /^\.R1$/ ) {
$Groff{'refer'}++; # for refer
return;
@@ -644,21 +660,31 @@ EOF
##########
# preprocessors
+ # preprocessors without `groff' option
if ( $Groff{'lilypond'} ) {
push @preprograms, 'glilypond';
}
if ( $Groff{'gperl'} ) {
push @preprograms, 'gperl';
}
+ if ( $Groff{'ideal'} ) {
+ push @preprograms, 'gideal';
+ # || $Groff{'ideal'}
+ # $s .= "J" if $Groff{'ideal'};
+ }
+
+ # preprocessors with `groff' option
+ if ( ( $Groff{'PS'} || $Groff{'PF'} ) && $Groff{'PE'} ) {
+ $Groff{'pic'} = 1;
+ }
$Groff{'refer'} ||= $Groff{'refer_open'} && $Groff{'refer_close'};
if ( $Groff{'chem'} || $Groff{'eqn'} || $Groff{'grap'} ||
- $Groff{'grn'} || $Groff{'ideal'} || $Groff{'pic'} ||
+ $Groff{'grn'} || $Groff{'pic'} ||
$Groff{'refer'} || $Groff{'tbl'} ) {
my $s = "-";
$s .= "e" if $Groff{'eqn'};
- $s .= "g" if $Groff{'grn'};
$s .= "G" if $Groff{'grap'};
- $s .= "i" if $Groff{'ideal'};
+ $s .= "g" if $Groff{'grn'};
$s .= "j" if $Groff{'chem'};
$s .= "p" if $Groff{'pic'};
$s .= "R" if $Groff{'refer'};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 01/01: grog: momentarily ignore groff preproc options for 3 preprocessors,
Bernd Warken <=