[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] grog and mom.
From: |
Ralph Corderoy |
Subject: |
Re: [Groff] grog and mom. |
Date: |
Thu, 06 Jun 2002 17:34:07 +0100 |
Hi Werner,
> > Please ignore my grog patch from the other day, there was an error
> > in the grog.sh part.
>
> Too late :-) Sorry for checking it in without testing it actually.
> Can you provide a quick fix?
I'll work on it.
BTW, your patch command is severely broken. The changes committed to
CVS from my patch has introduced some weird stuff resulting in a
syntacially incorrect grog.pl :-)
RCS file: /var/cvs/groff/src/roff/grog/grog.pl,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- grog.pl 20 Feb 2002 00:56:09 -0000 1.12
+++ grog.pl 6 Jun 2002 13:12:54 -0000 1.13
@@ -19,13 +19,9 @@
push(@command, $arg);
}
-if (@ARGV) {
- foreach $arg (@ARGV) {
- &process($arg, 0);
- }
-}
-else {
- &process("-", 0);
address@hidden = ('-') unless @ARGV;
+foreach $arg (@ARGV) {
+ &process($arg, 0);
}
sub process {
@@ -152,6 +148,9 @@
}
redo;
}
+ elseif (/^\.(PRINTSTYLE|START)$sp/) {
+ $mom++;
+ }
What's `elseif'? I had `elsif'.
if (/^\.so$sp/) {
chop;
s/^.so *//;
@@ -194,6 +193,9 @@
}
elsif ($SH > 0 && $TH > 0) {
push(@command, "-man");
+}
+else ($mom > 0) {
+ push(@command, "-mom");
Similarly, my `elsif' has become `else' causing problems for the
following `elsif's. And ` > 0' has been added.
}
elsif ($PP > 0) {
push(@command, "-ms");
I'd favour ditching the Perl version in the long term since grep, sed,
and awk seem more portable and are up to the job. I certainly have
platforms here with groff but no Perl. Does that sound OK by you?
Cheers,
Ralph.