[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 01/01: Adjust for first lines with non-preproc
From: |
Bernd Warken |
Subject: |
[groff] 01/01: Adjust for first lines with non-preproc |
Date: |
Wed, 18 Jun 2014 13:39:43 +0000 |
bwarken pushed a commit to branch master
in repository groff.
commit 70166d793a6da2710f6f39e0361bd75790d88a2c
Author: Bernd Warken <address@hidden>
Date: Wed Jun 18 15:39:09 2014 +0200
Adjust for first lines with non-preproc
---
ChangeLog | 5 +++++
src/roff/grog/subs.pl | 15 ++++++++++++++-
2 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2b42094..82d1f85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2014-06-18 Bernd Warken <address@hidden>
+ * src/roff/grog/subs.pl: Adjust for first lines with non-preproc
+ and not-tmac names to be ignored.
+
+2014-06-18 Bernd Warken <address@hidden>
+
* src/roff/grog/grog.pl, src/roff/grog/subs.pl: Add new first line
of roff files with the names of the needed preprocessors and the
actual tmac, see 2014-06-17 Ulrich Lauther. Replace the
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index a32c901..7206d14 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -279,7 +279,9 @@ sub do_first_line {
# all following array members are either preprocs or 1 tmac, in
my @words = split '\s+', $1;
- for my $word ( @words ) {
+ my @in = ();
+ my $word;
+ for $word ( @words ) {
if ( $word eq 'ideal' ) {
$word = 'gideal';
} elsif ( $word eq 'gpic' ) {
@@ -287,7 +289,18 @@ sub do_first_line {
} elsif ( $word =~ /^(gn|)eqn$/ ) {
$word = 'eqn';
}
+ if ( exists $preproc_tmacs{$word} ) {
+ push $word, @in;
+ } else {
+ # not word for preproc or tmac
+ return 0;
+ }
}
+
+ for $word ( @in ) {
+ $Groff{$word}++ ;
+ }
+
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 01/01: Adjust for first lines with non-preproc,
Bernd Warken <=