From MAILER-DAEMON Sun Jun 01 16:29:09 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WrCNR-0005rO-PV
	for mharc-groff-commit@gnu.org; Sun, 01 Jun 2014 16:29:09 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:38520)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrCNP-0005nY-2s
	for groff-commit@gnu.org; Sun, 01 Jun 2014 16:29:07 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrCNO-0004NF-6M
	for groff-commit@gnu.org; Sun, 01 Jun 2014 16:29:07 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:50907)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrCNO-0004NB-2N
	for groff-commit@gnu.org; Sun, 01 Jun 2014 16:29:06 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WrCNN-0002fS-1m
	for groff-commit@gnu.org; Sun, 01 Jun 2014 20:29:05 +0000
Date: Sun, 01 Jun 2014 20:29:05 +0000
Message-Id: <E1WrCNN-0002fS-1m@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01:  man/roff.man: move .TH at the beginning
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140601202904.10222.4863@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: c3263086f19defbedcb7f916bad978b2452b518f
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Jun 2014 20:29:08 -0000

bwarken pushed a commit to branch master
in repository groff.

commit c3263086f19defbedcb7f916bad978b2452b518f
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Sun Jun 1 22:28:47 2014 +0200

     man/roff.man: move .TH at the beginning
---
 ChangeLog    |    4 ++++
 man/roff.man |   16 +++++++---------
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4c9a7c9..d23d0f5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-06-01  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* man/roff.man: Move .TH at the beginning.
+
 2014-05-29  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* man/groff.man: In special characters, add the mentioning of the
diff --git a/man/roff.man b/man/roff.man
index a3a1a75..8706d94 100644
--- a/man/roff.man
+++ b/man/roff.man
@@ -1,4 +1,9 @@
 '\" t
+.TH ROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
+.SH NAME
+roff \- concepts and history of roff typesetting
+.
+.
 .ig
 roff.man
 
@@ -17,6 +22,8 @@ Front-Cover Texts, and with no Back-Cover Texts.
 
 A copy of the Free Documentation License is included as a file called
 FDL in the main directory of the groff source package.
+
+Last update: 01 Jun 2014
 ..
 .
 .
@@ -40,15 +47,6 @@ FDL in the main directory of the groff source package.
 .
 .
 .\" --------------------------------------------------------------------
-.\" Title
-.\" --------------------------------------------------------------------
-.
-.TH ROFF @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
-.SH NAME
-roff \- concepts and history of roff typesetting
-.
-.
-.\" --------------------------------------------------------------------
 .SH DESCRIPTION
 .\" --------------------------------------------------------------------
 .


From MAILER-DAEMON Sun Jun 01 16:37:09 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WrCVB-0002EB-PQ
	for mharc-groff-commit@gnu.org; Sun, 01 Jun 2014 16:37:09 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:39505)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrCV9-0002DW-Om
	for groff-commit@gnu.org; Sun, 01 Jun 2014 16:37:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrCV6-0006dB-W3
	for groff-commit@gnu.org; Sun, 01 Jun 2014 16:37:07 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:51001)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrCV6-0006d6-SQ
	for groff-commit@gnu.org; Sun, 01 Jun 2014 16:37:04 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WrCV5-0003RW-Qf
	for groff-commit@gnu.org; Sun, 01 Jun 2014 20:37:04 +0000
Date: Sun, 01 Jun 2014 20:37:03 +0000
Message-Id: <E1WrCV5-0003RW-Qf@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: src/roff/grog/grog.pl: - Remove `$Sp' mostly. -
	Reorder script. - Check and repair requests. - Add final character `$'
	or `\s' to many checked requests.
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140601203703.13203.89953@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 46f29c1dd4ac7a41dcdbcc2ebb65896dd90aa933
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Jun 2014 20:37:09 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 46f29c1dd4ac7a41dcdbcc2ebb65896dd90aa933
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Sun Jun 1 22:35:35 2014 +0200

    src/roff/grog/grog.pl:
    	- Remove `$Sp' mostly.
    	- Reorder script.
    	- Check and repair requests.
    	- Add final character `$' or `\s' to many checked requests.
---
 ChangeLog             |    6 ++++
 src/roff/grog/grog.pl |   72 ++++++++++++++++++++++++++-----------------------
 2 files changed, 44 insertions(+), 34 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d23d0f5..087f5b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2014-06-01  Bernd Warken  <groff-bernd.warken-72@web.de>
 
+	* src/roff/grog/grog.pl: Remove `$Sp' mostly.  Reorder script.
+	Check and repair requests.  Add final character `$' to many
+	checked requests.
+
+2014-06-01  Bernd Warken  <groff-bernd.warken-72@web.de>
+
 	* man/roff.man: Move .TH at the beginning.
 
 2014-05-29  Bernd Warken  <groff-bernd.warken-72@web.de>
diff --git a/src/roff/grog/grog.pl b/src/roff/grog/grog.pl
index 23d6fdd..f3b0699 100644
--- a/src/roff/grog/grog.pl
+++ b/src/roff/grog/grog.pl
@@ -28,7 +28,7 @@
 # <http://www.gnu.org/licenses/gpl-2.0.html>.
 
 ########################################################################
-my $Last_Update = '28 May 2014';
+my $Last_Update = '01 Jun 2014';
 ########################################################################
 
 require v5.6;
@@ -233,7 +233,8 @@ sub process {
     next if ( /^[.']{2}/ );
 
     s/^['.]\s*/./; # use only a dot as leading character
-    s/\s*$//;
+    s/\s+\\".*$//; # omit comment
+    s/\s+$//;
 
     if ( /^\.de1?\W?/ ) {
       # this line is a macro definition, add it to %macros
@@ -259,25 +260,25 @@ sub process {
     } elsif (/^(\.cstart)|(begin\s+chem)$/) {
       $Groff{'chem'}++;
       $Groff{'soelim'}++ if $level;
-    } elsif (/^\.TS$Sp/) {
+    } elsif (/^\.TS$/) {
       $_ = <FILE>;
       if (!/^\./ || /^\.so/) {
 	$Groff{'tbl'}++;
 	$Groff{'soelim'}++ if $level;
       }
-    } elsif (/^\.EQ$Sp/) {
+    } elsif (/^\.EQ$/) {
       $_ = <FILE>;
       if (!/^\./ || /^\.[0-9]/ || /^\.so/) {
 	$Groff{'eqn'}++;
 	$Groff{'soelim'}++ if $level;
       }
-    } elsif (/^\.GS$Sp/) {
+    } elsif (/^\.GS$/) {
       $_ = <FILE>;
       if (!/^\./ || /^\.so/) {
 	$Groff{'grn'}++;
 	$Groff{'soelim'}++ if $level;
       }
-    } elsif (/^\.G1$Sp/) {
+    } elsif (/^\.G1$/) {
       $_ = <FILE>;
       if (!/^\./ || /^\.so/) {
 	$Groff{'grap'}++;
@@ -295,13 +296,14 @@ sub process {
 #	  $Groff{'soelim'}++ if $level;
 #	}
 #      }
-    } elsif (/^\.PS[\s\n<]/) {
+#    } elsif (/^\.PS[\s\n<]/) {
+    } elsif (/^\.PS$/) {
       $Groff{'pic'}++;
       $Groff{'soelim'}++ if $level;
       if (/^\.PS\s*<\s*(\S+)/) {
 	&process($1, $level);
       }
-    } elsif (/^\.R1$Sp/) {
+    } elsif (/^\.R1$/) {
       $Groff{'refer'}++;
       $Groff{'soelim'}++ if $level;
     } elsif (/^\.\[/) {
@@ -310,27 +312,29 @@ sub process {
     } elsif (/^\.\]/) {
       $Groff{'refer_close'}++;
       $Groff{'soelim'}++ if $level;
-    } elsif (/^\.NH$Sp/) {
+    } elsif (/^\.NH/) {
       $Groff{'NH'}++;		# for ms
-    } elsif (/^\.TL$Sp/) {
+    } elsif (/^\.TL/) {
       $Groff{'TL'}++;		# for mm and ms
-    } elsif (/^\.PP$Sp/) {
+    } elsif (/^\.PP/) {
       $Groff{'PP'}++;		# for mom and ms
-    } elsif (/^\.[IL]P$Sp/) {
+    } elsif (/^\.[IL]P/) {
       $Groff{'ILP'}++;		# for man and ms
     } elsif (/^\.P$/) {
       $Groff{'P'}++;
-    } elsif (/^\.(PH|SA)$Sp/) {
+    } elsif (/^\.(PH|SA)/) {
       $Groff{'mm'}++;
-    } elsif (/^\.TH$Sp/) {
+    } elsif (/^\.TH\s/) {
       $Groff{'TH'}++;
-    } elsif (/^\.SH$Sp/) {
+    } elsif (/^\.SH\s$/) {
       $Groff{'SH'}++;
-    } elsif (/^\.([pnil]p|sh)$Sp/) {
+    } elsif (/^\.([il]p|sh)\s/) {
       $Groff{'me'}++;
-    } elsif (/^\.Dd$Sp/) {
+    } elsif (/^\.([pn]p)$/) {
+      $Groff{'me'}++;
+    } elsif (/^\.Dd\s/) {
       $Groff{'mdoc'}++;
-    } elsif (/^\.(Tp|Dp|De|Cx|Cl)$Sp/) {
+    } elsif (/^\.(Tp|Dp|De|Cx|Cl)/) {
       $Groff{'mdoc_old'} = 1;
     }
     # In the old version of -mdoc `Oo' is a toggle, in the new it's
@@ -364,10 +368,10 @@ sub process {
 	$Groff{'Oo'}--;
       }
       redo;
-    } elsif (/^\.(PRINTSTYLE|START)$Sp/) {
+    } elsif (/^\.(PRINTSTYLE|START)/) {
       $Groff{'mom'}++;
     }
-    if (/^\.so$Sp/) {
+    if (/^\.so$/) {
       chop;
       s/^.so *//;
       s/\\\".*//;
@@ -454,25 +458,30 @@ sub version {
     push(@Command, $s);
   }
 
-  if ( $Groff{'me'} ) {
-    push(@m, '-me');
-    push(@Command, '-me');
-  }
-  if ( $Groff{'SH'} && $Groff{'TH'} ) {
+  if ( $Groff{'TH'} && $Groff{'SH'} ) {
     push(@m, '-man');
     push(@Command, '-man');
     $is_man = 1;
   }
-  if ( $Groff{'mom'} ) {
-    push(@m, '-mom');
-    push(@Command, '-mom');
-    $is_mom = 1;
+  if ( $Groff{'me'} ) {
+    push(@m, '-me');
+    push(@Command, '-me');
   }
   if ( $Groff{'mm'} || ($Groff{'P'} && ! $is_man) ) {
     push(@m, '-mm');
     push(@Command, '-mm');
     $is_mm = 1;
   }
+  if ( $Groff{'mdoc'} ) {
+    my $s = ( $Groff{'mdoc_old'} || $Groff{'Oo'} ) ? '-mdoc-old' : '-mdoc';
+    push(@m, $s);
+    push(@Command, $s);
+  }
+  if ( $Groff{'mom'} ) {
+    push(@m, '-mom');
+    push(@Command, '-mom');
+    $is_mom = 1;
+  }
   if ( $Groff{'NH'} || ($Groff{'TL'} && ! $is_mm) ||
        ($Groff{'ILP'} && ! $is_man) ||
        ($Groff{'PP'} && ! $is_mom && ! $is_man) ) {
@@ -480,11 +489,6 @@ sub version {
     push(@m, '-ms');
     push(@Command, '-ms');
   }
-  if ( $Groff{'mdoc'} ) {
-    my $s = ( $Groff{'mdoc_old'} || $Groff{'Oo'} ) ? '-mdoc-old' : '-mdoc';
-    push(@m, $s);
-    push(@Command, $s);
-  }
 
   unshift @Command, 'groff';
   if ( @preprograms ) {


From MAILER-DAEMON Sun Jun 01 16:48:23 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WrCg3-0006WW-CB
	for mharc-groff-commit@gnu.org; Sun, 01 Jun 2014 16:48:23 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43503)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrCg0-0006WP-AX
	for groff-commit@gnu.org; Sun, 01 Jun 2014 16:48:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrCfy-0002i5-RE
	for groff-commit@gnu.org; Sun, 01 Jun 2014 16:48:20 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:51090)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrCfy-0002i0-O6
	for groff-commit@gnu.org; Sun, 01 Jun 2014 16:48:18 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WrCfx-0004If-QR
	for groff-commit@gnu.org; Sun, 01 Jun 2014 20:48:18 +0000
Date: Sun, 01 Jun 2014 20:48:17 +0000
Message-Id: <E1WrCfx-0004If-QR@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: In <groff-top>/contrib/groffer do:
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140601204817.16498.19436@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 0a60c74f0a6e5756e8324fa9d253404f4413d3a1
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Jun 2014 20:48:22 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 0a60c74f0a6e5756e8324fa9d253404f4413d3a1
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Sun Jun 1 22:45:50 2014 +0200

    In <groff-top>/contrib/groffer do:
    
    groffer.pl:
    	Fix ligature error `fi', etc. in pdf-mode by appending
    	`-P-y -PU' to `grog' call.
    	pfd2-mode works, but still has the ligature error.
    
    func.pl: Reorder.
    
    version.sh: Upgrade to version 2.1.1.
---
 contrib/groffer/ChangeLog  |   10 ++++++
 contrib/groffer/func.pl    |   78 +++++++++++++++++++++++---------------------
 contrib/groffer/groffer.pl |   15 +++++---
 contrib/groffer/version.sh |    4 +-
 4 files changed, 62 insertions(+), 45 deletions(-)

diff --git a/contrib/groffer/ChangeLog b/contrib/groffer/ChangeLog
index 7d046d4..659dedd 100644
--- a/contrib/groffer/ChangeLog
+++ b/contrib/groffer/ChangeLog
@@ -1,3 +1,13 @@
+2014-06-01  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* groffer.pl: Fix ligature error `fi', etc. in pdf-mode by
+	appending `-P-y -PU' to `grog' call.  pfd2-mode works, but still
+	has the ligature error.
+
+	* func.pl: Reorder.
+
+	* version.sh: Upgrade to version 2.1.1.
+
 2014-05-31  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* groffer.pl, func.pl, groffer.man: Change all existing viewer
diff --git a/contrib/groffer/func.pl b/contrib/groffer/func.pl
index 4532ed7..e4b21c5 100644
--- a/contrib/groffer/func.pl
+++ b/contrib/groffer/func.pl
@@ -8,7 +8,7 @@
 # Copyright (C) 2006, 2009, 2014 Free Software Foundation, Inc.
 # Written by Bernd Warken <groff-bernd.warken-72@web.de>.
 
-# Last update: 31 May 2014
+# Last update: 01 Jun 2014
 
 # This file is part of `groffer', which is part of `groff'.
 
@@ -518,15 +518,15 @@ Window viewer or in several text modes.  All input is decompressed
 on-the-fly with all formats that gzip can handle.
 
 "filespec" is one of
-  "filename"       name of a readable file
-  "-"              for standard input
-  "man:name(n)"    man page "name" in section "n"
-  "man:name.n"     man page "name" in section "n"
-  "man:name"       man page "name" in first section found
-  "name(n)"        man page "name" in section "n"
-  "name.n"         man page "name" in section "n"
-  "n name"         man page "name" in section "n"
-  "name"           man page "name" in first section found
+  "filename"	name of a readable file
+  "-"		for standard input
+  "man:name(n)"	man page "name" in section "n"
+  "man:name.n"	man page "name" in section "n"
+  "man:name"	man page "name" in first section found
+  "name(n)"	man page "name" in section "n"
+  "name.n"	man page "name" in section "n"
+  "n name"	man page "name" in section "n"
+  "name"	man page "name" in first section found
 where `section' is a single character out of [1-9on], optionally followed
 by some more letters that are called the `extension'.
 
@@ -542,38 +542,37 @@ All other short options are interpreted as "groff" formatting options.
 
 The most important groffer long options are
 
---apropos=name    start man's "apropos" program for "name".
+--apropos=name	start man's "apropos" program for "name".
 --apropos-data=name
-                  "apropos" for "name" in man's data sections 4, 5, 7.
+		"apropos" for "name" in man's data sections 4, 5, 7.
 --apropos-devel=name
-                  "apropos" for "name" in development sections 2, 3, 9.
+		"apropos" for "name" in development sections 2, 3, 9.
 --apropos-progs=name
-                  "apropos" for "name" in man's program sections 1, 6, 8.
---auto            choose mode automatically from the default mode list.
---default         reset all options to the default value.
+		"apropos" for "name" in man's program sections 1, 6, 8.
+--auto		choose mode automatically from the default mode list.
+--default	reset all options to the default value.
 --default-modes=mode1,mode2,...
-                  set sequence of automatically tried modes.
---dvi             display in a viewer for TeX device independent format.
---groff           process like groff, disable viewing features.
---help            display this helping output.
---html            display in a web browser.
---man             check file parameters first whether they are man pages.
+		set sequence of automatically tried modes.
+--dvi		display in a viewer for TeX device independent format.
+--groff		process like groff, disable viewing features.
+--help		display this helping output.
+--html		display in a web browser.
+--man		check file parameters first whether they are man pages.
 --mode=auto|dvi|groff|html|pdf|ps|source|text|tty|www|x|X
-                  choose display mode.
---no-man          disable man-page facility.
---no-special      disable --all, --apropos*, and --whatis
---pager=program   preset the paging program for tty mode.
---pdf             display in a PDF viewer.
---ps              display in a Postscript viewer.
---source          output as roff source.
---text            output in a text device without a pager.
---to-stdout       output the content of the mode file without display.
---tty             display with a pager on text terminal even when in X.
---viewer          choose a viewer for the actual device mode
---viewer-tty      choose a viewer for the actual text mode
---whatis          display the file name and description of man pages
---www             same as --html.
---x --X           display with "gxditview" using an X* device.
+		choose display mode.
+--no-man	disable man-page facility.
+--no-special	disable --all, --apropos*, and --whatis
+--pager=program preset the paging program for tty mode.
+--pdf		display in a PDF viewer.
+--ps		display in a Postscript viewer.
+--source	output as roff source.
+--text		output in a text device without a pager.
+--to-stdout	output the content of the mode file without display.
+--tty		display with a pager on text terminal even when in X.
+--viewer	choose a viewer for the actual device mode
+--whatis	display the file name and description of man pages
+--www		same as --html.
+--x --X		display with "gxditview" using an X* device.
 
 The usual X Windows toolkit options transformed into GNU long options:
 --background=color, --bd=size, --bg=color, --bordercolor=color,
@@ -794,3 +793,8 @@ sub wait {
 }				# wait()
 
 1;
+########################################################################
+### Emacs settings
+# Local Variables:
+# mode: CPerl
+# End:
diff --git a/contrib/groffer/groffer.pl b/contrib/groffer/groffer.pl
index 1a7b65b..5be47c9 100755
--- a/contrib/groffer/groffer.pl
+++ b/contrib/groffer/groffer.pl
@@ -10,7 +10,7 @@
 
 # Written by Bernd Warken <groff-bernd.warken-72@web.de>.
 
-# Last update: 31 May 2014
+# Last update: 01 Jun 2014
 
 # This file is part of `groffer', which is part of `groff'.
 
@@ -151,6 +151,7 @@ do "$file_perl_test_pl" or die "Perl test: $@";
 
 require 'func.pl';
 require 'man.pl';
+# require 'sub.pl';
 
 @Path = &path_uniq( File::Spec->path() );
 
@@ -171,7 +172,7 @@ my @Conf_Files = (File::Spec->catfile(File::Spec->rootdir(),
 				      'groffer.conf')
 		 );
 
-my @Default_Modes = ('pdf', 'html', 'ps', 'x', 'dvi', 'tty');
+my @Default_Modes = ('pdf', 'pdf2', 'html', 'ps', 'x', 'dvi', 'tty');
 my $Default_Resolution = 75;
 my $Default_tty_Device = 'latin1';
 
@@ -769,7 +770,7 @@ sub main_config_params {	# handle configuration files
     } @Filespecs = ('-') unless (@Filespecs);
     @ARGV = (@Options, '--', @Filespecs);
   }
-}
+} # main_config_params()
 
 if (0) {
   print STDERR "<$_>\n" foreach @ARGV;
@@ -833,7 +834,7 @@ sub main_parse_params {
 			'lbp' => 'groff',
 			'lj4' => 'groff',
 			'pdf' => 'pdf',
-			'pdf2' => 'pdf',
+			'pdf2' => 'pdf2',
 			'ps' => 'ps',
 			'utf8' => 'tty',
 		       );
@@ -925,7 +926,7 @@ sub main_parse_params {
 			 'www' => 'html',
 			 'dvi' => 'dvi',
 			 'pdf' => 'pdf',
-			 'pdf2' => 'pdf',
+			 'pdf2' => 'pdf2',
 			 'ps' => 'ps',
 			 'text' => 'text',
 			 'tty' => 'tty',
@@ -1263,6 +1264,7 @@ sub _get_prog_args {
 
   my $mode = lc($_[0]);
   my $MODE = uc($mode);
+  $MODE = 'PDF' if ( $MODE =~ /^PDF2$/ );
 
   my $xlist = $Viewer_X{$MODE};
   my $ttylist = $Viewer_tty{$MODE};
@@ -1997,7 +1999,7 @@ sub main_display {
 
     /^pdf$/ and do {
       $modefile .= '.pdf';
-      $groggy = `cat $tmp_cat | grog -Tpdf`;
+      $groggy = `cat $tmp_cat | grog -Tpdf -P-y -PU`;
       die "main_display(): grog error;" if $?;
       chomp $groggy;
       print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
@@ -2005,6 +2007,7 @@ sub main_display {
       next SWITCH;
     };
 
+
     /^pdf2$/ and do {
       if ($Opt{'DEVICE'} && $Opt{'DEVICE'} ne 'ps') {
 	warn "main_display(): " .
diff --git a/contrib/groffer/version.sh b/contrib/groffer/version.sh
index 9c2a592..96b9c63 100644
--- a/contrib/groffer/version.sh
+++ b/contrib/groffer/version.sh
@@ -29,8 +29,8 @@
 export _PROGRAM_VERSION;
 export _LAST_UPDATE;
 
-_PROGRAM_VERSION='2.1.0';
-_LAST_UPDATE='31 May 2014';
+_PROGRAM_VERSION='2.1.1';
+_LAST_UPDATE='01 Jun 2014';
 
 # this setting of the groff version is only used before make is run,
 # otherwise @VERSION@ will set it, see groffer.sh.


From MAILER-DAEMON Sun Jun 01 17:13:46 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WrD4c-00087A-0M
	for mharc-groff-commit@gnu.org; Sun, 01 Jun 2014 17:13:46 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:46989)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrD4Z-00086v-Cj
	for groff-commit@gnu.org; Sun, 01 Jun 2014 17:13:44 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrD4Y-0002Vr-FE
	for groff-commit@gnu.org; Sun, 01 Jun 2014 17:13:43 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:51272)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrD4Y-0002Vl-Bi
	for groff-commit@gnu.org; Sun, 01 Jun 2014 17:13:42 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WrD4X-0006UB-7O
	for groff-commit@gnu.org; Sun, 01 Jun 2014 21:13:41 +0000
Date: Sun, 01 Jun 2014 21:13:41 +0000
Message-Id: <E1WrD4X-0006UB-7O@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: src/roff/grog/Makefile.sub: Remove changing of first
	line `#! ...'.
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140601211341.24900.64362@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: aedec248fd27f64cc951cdf20e7ce338772ee0da
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Jun 2014 21:13:44 -0000

bwarken pushed a commit to branch master
in repository groff.

commit aedec248fd27f64cc951cdf20e7ce338772ee0da
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Sun Jun 1 23:11:03 2014 +0200

    src/roff/grog/Makefile.sub: Remove changing of first line `#! ...'.
---
 ChangeLog                  |    5 +++++
 src/roff/grog/Makefile.sub |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 087f5b8..5c70448 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2014-06-01  Bernd Warken  <groff-bernd.warken-72@web.de>
 
+	* src/roff/grog/Makefile.sub: Remove changing of first line
+	`#! ...'.
+
+2014-06-01  Bernd Warken  <groff-bernd.warken-72@web.de>
+
 	* src/roff/grog/grog.pl: Remove `$Sp' mostly.  Reorder script.
 	Check and repair requests.  Add final character `$' to many
 	checked requests.
diff --git a/src/roff/grog/Makefile.sub b/src/roff/grog/Makefile.sub
index 318656d..3203074 100644
--- a/src/roff/grog/Makefile.sub
+++ b/src/roff/grog/Makefile.sub
@@ -40,7 +40,6 @@ GROG_=`echo $(GROG) | sed 's|$(srcdir)/||g'`
 grog: grog.pl $(GROG) $(SH_DEPS_SED_SCRIPT)
 	rm -f $@
 	sed -f "$(SH_DEPS_SED_SCRIPT)" \
-	    -e "1s|^\(#! \).*perl|\\1$(PERL)|" \
 	    -e "s|@g@|$(g)|g" \
 	    -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
 	    -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \
@@ -48,6 +47,7 @@ grog: grog.pl $(GROG) $(SH_DEPS_SED_SCRIPT)
 	    -e "s|@VERSION@|$(version)$(revision)|" \
 	    -e "$(SH_SCRIPT_SED_CMD)" \
 	    $(srcdir)/grog.pl >$@
+#remove:    -e "1s|^\(#! \).*perl|\\1$(PERL)|" \
 	chmod +x $@
 
 .PHONY: install_data


From MAILER-DAEMON Mon Jun 02 07:44:43 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WrQfT-0006ja-50
	for mharc-groff-commit@gnu.org; Mon, 02 Jun 2014 07:44:43 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:36465)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrQfP-0006fL-QZ
	for groff-commit@gnu.org; Mon, 02 Jun 2014 07:44:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrQfM-0000vg-K7
	for groff-commit@gnu.org; Mon, 02 Jun 2014 07:44:39 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:59215)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrQfM-0000vc-GQ
	for groff-commit@gnu.org; Mon, 02 Jun 2014 07:44:36 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WrQfL-000721-M3
	for groff-commit@gnu.org; Mon, 02 Jun 2014 11:44:36 +0000
Date: Mon, 02 Jun 2014 11:44:35 +0000
Message-Id: <E1WrQfL-000721-M3@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: grog.pl: reinstall old version
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140602114435.26998.54447@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 04ec6c1e17f119fb8f02baac68b1e303f5a51a13
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Jun 2014 11:44:41 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 04ec6c1e17f119fb8f02baac68b1e303f5a51a13
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Mon Jun 2 13:44:27 2014 +0200

    grog.pl: reinstall old version
---
 ChangeLog                  |    5 +
 src/roff/grog/Makefile.sub |    1 -
 src/roff/grog/grog.pl      |  293 +++++++++++---------------------------------
 3 files changed, 77 insertions(+), 222 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5c70448..eb2eb9f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-02  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* src/roff/grog/grog.pl: The `grog' version of yesterday has many
+	bugs.  So reinstall an old version of `grog'.
+
 2014-06-01  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* src/roff/grog/Makefile.sub: Remove changing of first line
diff --git a/src/roff/grog/Makefile.sub b/src/roff/grog/Makefile.sub
index 3203074..fcc0020 100644
--- a/src/roff/grog/Makefile.sub
+++ b/src/roff/grog/Makefile.sub
@@ -47,7 +47,6 @@ grog: grog.pl $(GROG) $(SH_DEPS_SED_SCRIPT)
 	    -e "s|@VERSION@|$(version)$(revision)|" \
 	    -e "$(SH_SCRIPT_SED_CMD)" \
 	    $(srcdir)/grog.pl >$@
-#remove:    -e "1s|^\(#! \).*perl|\\1$(PERL)|" \
 	chmod +x $@
 
 .PHONY: install_data
diff --git a/src/roff/grog/grog.pl b/src/roff/grog/grog.pl
index f3b0699..1aca1f2 100644
--- a/src/roff/grog/grog.pl
+++ b/src/roff/grog/grog.pl
@@ -6,16 +6,15 @@
 # Source file position: <groff-source>/src/roff/grog/grog.pl
 # Installed position: <prefix>/bin/grog
 
-# Copyright (C) 1993, 2006, 2009, 2011-2012, 2014
-#               Free Software Foundation, Inc.
+# Copyright (C) 1993, 2006, 2009, 2011-2012 Free Software Foundation, Inc.
 # Written by James Clark, maintained by Werner Lemberg.
 # Rewritten and put under GPL by Bernd Warken <groff-bernd.warken-72@web.de>.
 
 # This file is part of `grog', which is part of `groff'.
 
 # `groff' is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
+# under the terms of the GNU General Public License (GPL) as published
+# by the Free Software Foundation, either version 3 of the License, or
 # (at your option) any later version.
 
 # `groff' is distributed in the hope that it will be useful, but
@@ -24,11 +23,10 @@
 # General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program. If not, see
-# <http://www.gnu.org/licenses/gpl-2.0.html>.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
 
 ########################################################################
-my $Last_Update = '01 Jun 2014';
+my $Last_Update = '24 May 2012';
 ########################################################################
 
 require v5.6;
@@ -37,8 +35,6 @@ use warnings;
 use strict;
 use File::Spec;
 
-$\ = "\n";
-
 my $Prog = $0;
 {
   my ($v, $d, $f) = File::Spec->splitpath($Prog);
@@ -46,42 +42,13 @@ my $Prog = $0;
 }
 
 #my $Sp = "[\\s\\n]";
-#my $Sp = qr([\s\n]);
-my $Sp = '';
+my $Sp = qr([\s\n]);
 
 my @Command;			# stores the final output
 my @Mparams;			# stores the options -m*
-my %Groff = (
-	     'chem' => 0,
-	     'eqn' => 0,
-	     'gperl' => 0,
-	     'grap' => 0,
-	     'grn' => 0,
-	     'lilypond' => 0,
-	     'mdoc' => 0,
-	     'mdoc_old' => 0,
-	     'me' => 0,
-	     'mm' => 0,
-	     'mom' => 0,
-	     'ILP' => 0,
-	     'LP' => 0,
-	     'NH' => 0,
-	     'Oo' => 0,
-	     'P' => 0,
-	     'PP' => 0,
-	     'SH' => 0,
-	     'TL' => 0,
-	     'TH' => 0,
-	     'TL' => 0,
-	     'pic' => 0,
-	     'refer' => 0,
-	     'refer_open' => 0,
-	     'refer_close' => 0,
-	     'soelim' => 0,
-	     'tbl' => 0,
-);
-
-{ # command line arguments except file names
+my %Groff;
+
+{
   my @filespec = ();
   my $double_minus = 0;
   my $was_minus = 0;
@@ -94,7 +61,7 @@ my %Groff = (
       if (-f $arg && -r $arg) {
 	push @filespec, $arg;
       } else {
-	print STDERR "grog: $arg is not a readable file.";
+	print STDERR "grog: $arg is not a readable file.\n";
       }
       next;
     }
@@ -114,7 +81,7 @@ my %Groff = (
 
     &version(0) if $arg eq '-v' || '--version' =~ /^$arg/;
     &help() if $arg eq '-h' || '--help' =~ /^$arg/;
-    print STDERR "grog: wrong option $arg." if $arg =~ /^--/;
+    print STDERR "grog: wrong option $arg.\n" if $arg =~ /^--/;
 
     if ($arg =~ /^-m/) {
       push @Mparams, $arg;
@@ -130,7 +97,7 @@ my %Groff = (
       if (-f $arg && -r $arg) {
 	push @filespec, $arg;
       } else {
-	print STDERR "grog: $arg is not a readable file.";
+	print STDERR "grog: $arg is not a readable file.\n";
       }
       next;
     }
@@ -140,145 +107,47 @@ my %Groff = (
   @ARGV = @filespec;
 }
 
-foreach my $arg (@ARGV) { # test for each file name in the arguments
+foreach my $arg (@ARGV) {
   &process($arg, 0);
 }
 
 sub process {
   my ($filename, $level) = @_;
   local(*FILE);
-  my %macros;
-  my $first_line = 1; # we are now in reading the first line
 
   if (!open(FILE, $filename eq "-" ? $filename : "< $filename")) {
-    print STDERR "$Prog: can't open \`$filename': $!";
+    print STDERR "$Prog: can't open \`$filename': $!\n";
     exit 1 unless $level;
     return;
   }
-
   while (<FILE>) {
     chomp;
+    s/^[.']\s*/./;
+    s/^\s+|\s+$//g;
+    s/$/\n/;
 
-    if ( $first_line ) {
-      # As documented for the `man' program, the first line can be
-      # used as an groff option line.  This is done by:
-      # - start the line with '\" (apostrophe, backslash, double quote)
-      # - add a space character
-      # - a word using the following characters can be appended: `egGjpRst'.
-      #     Each of these characters means an option for the generated
-      #     `groff' command line, e.g. `-t'.
-
-      $first_line = 0; # for later necessary end of first line
-
-      if ( /^\.\\"/ ) {
-	my $line = $_;
-	$line =~ s/^[.]\\"//g;
-	$line =~ s/\s//g;
-	if ( $line =~ /[egGjpRst]+$/ ) {
-	  # line is a groff options line with . instead of '
-	  print STDERR "First line must start with " .
-	    "apostrophe ' instead of period . for groff options line!";
-	  s/^\./'/; # line now starts with apostrophe '
-	} else {
-	  # line has non-option characters, so is a comment, i.e. ignore
-	  next;
-	}
-      }
-
-      if ( /^'\\"/ ) {
-	s/^'\\"//;
-	s/\W//g;
-	{
-	  my $chars = $_;
-	  $chars =~ s/[egGjpRst]//g;
-	  if ( $chars ) {
-	    print STDERR 'Wrong characters in first line: ' .
-	      $chars . '.';
-	    print STDERR
-	      "For an options line are only allowed: [egGjpRst].";
-	  }
-	}
-
-	if ( /e/ ) {
-	  $Groff{'eqn'}++;
-	}
-	if ( /g/ ) {
-	  $Groff{'grn'}++;
-	}
-	if ( /G/ ) {
-	  $Groff{'grap'}++;
-	}
-	if ( /j/ ) {
-	  $Groff{'chem'}++;
-	}
-	if ( /p/ ) {
-	  $Groff{'pic'}++;
-	}
-	if ( /R/ ) {
-	  $Groff{'refer'}++;
-	}
-	if ( /s/ ) {
-	  $Groff{'soelim'}++;
-	}
-	if ( /t/ ) {
-	  $Groff{'tbl'}++;
-	}
-	next;
-      }
-    }
-
-    # $first_line no longer needed in the following
-
-    next unless ( /^[.']/ );
-    next if ( /^[.']{2}/ );
-
-    s/^['.]\s*/./; # use only a dot as leading character
-    s/\s+\\".*$//; # omit comment
-    s/\s+$//;
-
-    if ( /^\.de1?\W?/ ) {
-      # this line is a macro definition, add it to %macros
-      my $macro = s/^\.de1?\s+(\w+)\W*/.$1/;
-      next if ( exists $macros{$macro} );
-      $macros{ $macro } = 1;
-      next;
-    }
-
-    {
-      # if line command is a defined macro, just ignore this line
-      my $macro = $_;
-      $macro =~ s/^(\.\w+)/$1/;
-      next if ( exists $macros{ $macro } );
-    }
-
-    if ( /^\.lilypond/ ) {
-      $Groff{'lilypond'}++;
-      $Groff{'soelim'}++ if $level;
-    } elsif ( /^\.Perl/ ) {
-      $Groff{'gperl'}++;
-      $Groff{'soelim'}++ if $level;
-    } elsif (/^(\.cstart)|(begin\s+chem)$/) {
+    if (/^(.cstart)|(begin\s+chem)$/) {
       $Groff{'chem'}++;
       $Groff{'soelim'}++ if $level;
-    } elsif (/^\.TS$/) {
+    } elsif (/^\.TS$Sp/) {
       $_ = <FILE>;
       if (!/^\./ || /^\.so/) {
 	$Groff{'tbl'}++;
 	$Groff{'soelim'}++ if $level;
       }
-    } elsif (/^\.EQ$/) {
+    } elsif (/^\.EQ$Sp/) {
       $_ = <FILE>;
       if (!/^\./ || /^\.[0-9]/ || /^\.so/) {
 	$Groff{'eqn'}++;
 	$Groff{'soelim'}++ if $level;
       }
-    } elsif (/^\.GS$/) {
+    } elsif (/^\.GS$Sp/) {
       $_ = <FILE>;
       if (!/^\./ || /^\.so/) {
 	$Groff{'grn'}++;
 	$Groff{'soelim'}++ if $level;
       }
-    } elsif (/^\.G1$/) {
+    } elsif (/^\.G1$Sp/) {
       $_ = <FILE>;
       if (!/^\./ || /^\.so/) {
 	$Groff{'grap'}++;
@@ -296,14 +165,13 @@ sub process {
 #	  $Groff{'soelim'}++ if $level;
 #	}
 #      }
-#    } elsif (/^\.PS[\s\n<]/) {
-    } elsif (/^\.PS$/) {
+    } elsif (/^\.PS[\s\n<]/) {
       $Groff{'pic'}++;
       $Groff{'soelim'}++ if $level;
       if (/^\.PS\s*<\s*(\S+)/) {
 	&process($1, $level);
       }
-    } elsif (/^\.R1$/) {
+    } elsif (/^\.R1$Sp/) {
       $Groff{'refer'}++;
       $Groff{'soelim'}++ if $level;
     } elsif (/^\.\[/) {
@@ -312,29 +180,27 @@ sub process {
     } elsif (/^\.\]/) {
       $Groff{'refer_close'}++;
       $Groff{'soelim'}++ if $level;
-    } elsif (/^\.NH/) {
+    } elsif (/^\.NH$Sp/) {
       $Groff{'NH'}++;		# for ms
-    } elsif (/^\.TL/) {
+    } elsif (/^\.TL$Sp/) {
       $Groff{'TL'}++;		# for mm and ms
-    } elsif (/^\.PP/) {
+    } elsif (/^\.PP$Sp/) {
       $Groff{'PP'}++;		# for mom and ms
-    } elsif (/^\.[IL]P/) {
+    } elsif (/^\.[IL]P$Sp/) {
       $Groff{'ILP'}++;		# for man and ms
     } elsif (/^\.P$/) {
       $Groff{'P'}++;
-    } elsif (/^\.(PH|SA)/) {
+    } elsif (/^\.(PH|SA)$Sp/) {
       $Groff{'mm'}++;
-    } elsif (/^\.TH\s/) {
+    } elsif (/^\.TH$Sp/) {
       $Groff{'TH'}++;
-    } elsif (/^\.SH\s$/) {
+    } elsif (/^\.SH$Sp/) {
       $Groff{'SH'}++;
-    } elsif (/^\.([il]p|sh)\s/) {
-      $Groff{'me'}++;
-    } elsif (/^\.([pn]p)$/) {
+    } elsif (/^\.([pnil]p|sh)$Sp/) {
       $Groff{'me'}++;
-    } elsif (/^\.Dd\s/) {
+    } elsif (/^\.Dd$Sp/) {
       $Groff{'mdoc'}++;
-    } elsif (/^\.(Tp|Dp|De|Cx|Cl)/) {
+    } elsif (/^\.(Tp|Dp|De|Cx|Cl)$Sp/) {
       $Groff{'mdoc_old'} = 1;
     }
     # In the old version of -mdoc `Oo' is a toggle, in the new it's
@@ -343,12 +209,13 @@ sub process {
       $Groff{'Oo'}++;
       s/^\.Oo/\. /;
       redo;
-    } elsif (/^\..* Oo( |$)/) {
-      # The test for `Oo' and `Oc' not starting a line (as allowed by the
-      # new implementation of -mdoc) is not complete; it assumes that
-      # macro arguments are well behaved, i.e., "" is used within "..." to
-      # indicate a doublequote as a string element, and weird features
-      # like `.foo a"b' are not used.
+    }
+    # The test for `Oo' and `Oc' not starting a line (as allowed by the
+    # new implementation of -mdoc) is not complete; it assumes that
+    # macro arguments are well behaved, i.e., "" is used within "..." to
+    # indicate a doublequote as a string element, and weird features
+    # like `.foo a"b' are not used.
+    elsif (/^\..* Oo( |$)/) {
       s/\\\".*//;
       s/\"[^\"]*\"//g;
       s/\".*//;
@@ -368,10 +235,10 @@ sub process {
 	$Groff{'Oo'}--;
       }
       redo;
-    } elsif (/^\.(PRINTSTYLE|START)/) {
+    } elsif (/^\.(PRINTSTYLE|START)$Sp/) {
       $Groff{'mom'}++;
     }
-    if (/^\.so$/) {
+    if (/^\.so$Sp/) {
       chop;
       s/^.so *//;
       s/\\\".*//;
@@ -387,7 +254,6 @@ sub process {
       # blocks like .EQ/.EN or .TS/.TE; but it doesn't harm if we call
       # soelim even if we don't need to.
       if ( $Groff{'pic'} || $Groff{'tbl'} || $Groff{'eqn'} ||
-	   $Groff{'gperl'} ||
 	   $Groff{'grn'} || $Groff{'grap'} || $Groff{'refer'} ||
 	   $Groff{'refer_open'} || $Groff{'refer_close'} ||
 	   $Groff{'chem'} ) {
@@ -422,7 +288,7 @@ EOF
 sub version {
   my ($exit_status) = @_;
   print "Perl version of GNU $Prog of $Last_Update " .
-    "in groff version " . '@VERSION@';
+    'in groff version @VERSION@' . "\n";
   exit $exit_status;
 }
 
@@ -431,15 +297,6 @@ sub version {
   my $is_man = 0;
   my $is_mm = 0;
   my $is_mom = 0;
-  my @preprograms = ();
-
-  if ( $Groff{'lilypond'} ) {
-    push @preprograms, 'glilypond';
-  }
-
-  if ( $Groff{'gperl'} ) {
-    push @preprograms, 'gperl';
-  }
 
   $Groff{'refer'} ||= $Groff{'refer_open'} && $Groff{'refer_close'};
 
@@ -447,41 +304,36 @@ sub version {
        $Groff{'grn'} || $Groff{'grap'} || $Groff{'refer'} ||
        $Groff{'chem'} ) {
     my $s = "-";
-    $s .= "e" if $Groff{'eqn'};
-    $s .= "g" if $Groff{'grn'};
+    $s .= "s" if $Groff{'soelim'};
+    $s .= "R" if $Groff{'refer'};
     $s .= "G" if $Groff{'grap'};
     $s .= "j" if $Groff{'chem'};
     $s .= "p" if $Groff{'pic'};
-    $s .= "R" if $Groff{'refer'};
-    $s .= "s" if $Groff{'soelim'};
+    $s .= "g" if $Groff{'grn'};
     $s .= "t" if $Groff{'tbl'};
+    $s .= "e" if $Groff{'eqn'};
     push(@Command, $s);
   }
 
-  if ( $Groff{'TH'} && $Groff{'SH'} ) {
-    push(@m, '-man');
-    push(@Command, '-man');
-    $is_man = 1;
-  }
   if ( $Groff{'me'} ) {
     push(@m, '-me');
     push(@Command, '-me');
   }
-  if ( $Groff{'mm'} || ($Groff{'P'} && ! $is_man) ) {
-    push(@m, '-mm');
-    push(@Command, '-mm');
-    $is_mm = 1;
-  }
-  if ( $Groff{'mdoc'} ) {
-    my $s = ( $Groff{'mdoc_old'} || $Groff{'Oo'} ) ? '-mdoc-old' : '-mdoc';
-    push(@m, $s);
-    push(@Command, $s);
+  if ( $Groff{'SH'} && $Groff{'TH'} ) {
+    push(@m, '-man');
+    push(@Command, '-man');
+    $is_man = 1;
   }
   if ( $Groff{'mom'} ) {
     push(@m, '-mom');
     push(@Command, '-mom');
     $is_mom = 1;
   }
+  if ( $Groff{'mm'} || ($Groff{'P'} && ! $is_man) ) {
+    push(@m, '-mm');
+    push(@Command, '-mm');
+    $is_mm = 1;
+  }
   if ( $Groff{'NH'} || ($Groff{'TL'} && ! $is_mm) ||
        ($Groff{'ILP'} && ! $is_man) ||
        ($Groff{'PP'} && ! $is_mom && ! $is_man) ) {
@@ -489,21 +341,14 @@ sub version {
     push(@m, '-ms');
     push(@Command, '-ms');
   }
+  if ( $Groff{'mdoc'} ) {
+    my $s = ( $Groff{'mdoc_old'} || $Groff{'Oo'} ) ? '-mdoc-old' : '-mdoc';
+    push(@m, $s);
+    push(@Command, $s);
+  }
 
   unshift @Command, 'groff';
-  if ( @preprograms ) {
-    my @progs;
-    $progs[0] = shift @preprograms;
-    push(@progs, @ARGV);
-    for ( @preprograms ) {
-      push @progs, '|';
-      push @progs, $_;
-    }
-    push @progs, '|';
-    unshift @Command, @progs;
-  } else {
-    push(@Command, @ARGV);
-  }
+  push(@Command, @ARGV);
 
   foreach (@Command) {
     next unless /\s/;
@@ -512,6 +357,12 @@ sub version {
 
   # We could implement an option to execute the command here.
 
+#  foreach (@Command) {
+#    next unless /[\$\\\"\';&()|<> \t\n]/;
+#    s/\'/\'\\\'\'/;
+#    $_ = "'" . $_ . "'";
+#  }
+
   my $n = scalar @m;
   my $np = scalar @Mparams;
   print STDERR "$Prog: more than 1 `-m' argument: @Mparams" if $np > 1;
@@ -519,14 +370,14 @@ sub version {
     unshift @Command, $Mparams[0] if $np == 1;
   } elsif ($n == 1) {
     if ($np == 1) {
-      print STDERR "$Prog: wrong `-m' argument: $Mparams[0]"
+      print STDERR "$Prog: wrong `-m' argument: $Mparams[0]\n"
 	if $m[0] ne $Mparams[0];
     }
   } else {
-    print STDERR "$Prog: error: there are several macro packages: @m";
+    print STDERR "$Prog: error: there are several macro packages: @m\n";
   }
 
-  print "@Command";
+  print "@Command\n";
 
   exit $n if $n > 1;
   exit 0;


From MAILER-DAEMON Mon Jun 02 13:11:25 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WrVld-00065S-Kj
	for mharc-groff-commit@gnu.org; Mon, 02 Jun 2014 13:11:25 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:56799)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrVla-00064U-Rf
	for groff-commit@gnu.org; Mon, 02 Jun 2014 13:11:23 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrVlZ-0001el-NV
	for groff-commit@gnu.org; Mon, 02 Jun 2014 13:11:22 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:33780)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WrVlZ-0001ee-JS
	for groff-commit@gnu.org; Mon, 02 Jun 2014 13:11:21 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WrVlY-0002fS-Ny
	for groff-commit@gnu.org; Mon, 02 Jun 2014 17:11:21 +0000
Date: Mon, 02 Jun 2014 17:11:20 +0000
Message-Id: <E1WrVlY-0002fS-Ny@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: Proposal to use -P-y -PU arguments for groff in
	-Tpdf mode.
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140602171120.10223.59272@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 624a1670b88108b2e1da6e6594affb2c1164b05d
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Jun 2014 17:11:23 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 624a1670b88108b2e1da6e6594affb2c1164b05d
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Mon Jun 2 19:11:09 2014 +0200

    Proposal to use -P-y -PU arguments for groff in -Tpdf mode.
---
 contrib/groffer/ChangeLog |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/contrib/groffer/ChangeLog b/contrib/groffer/ChangeLog
index 659dedd..efe3488 100644
--- a/contrib/groffer/ChangeLog
+++ b/contrib/groffer/ChangeLog
@@ -8,6 +8,10 @@
 
 	* version.sh: Upgrade to version 2.1.1.
 
+2014-06-01  Deri James  <deri@chuzzlewit.myzen.co.uk>
+
+	* Proposal to use `-P-y -PU' arguments for `groff' in `-Tpdf'.
+
 2014-05-31  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* groffer.pl, func.pl, groffer.man: Change all existing viewer


From MAILER-DAEMON Tue Jun 10 18:08:07 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WuUD9-0003Av-Jm
	for mharc-groff-commit@gnu.org; Tue, 10 Jun 2014 18:08:07 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41254)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WuUD4-0003Ak-Hm
	for groff-commit@gnu.org; Tue, 10 Jun 2014 18:08:06 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WuUCx-0007IA-5B
	for groff-commit@gnu.org; Tue, 10 Jun 2014 18:08:02 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:37947)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WuUCx-0007I5-05
	for groff-commit@gnu.org; Tue, 10 Jun 2014 18:07:55 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WuUCw-0000bt-5E
	for groff-commit@gnu.org; Tue, 10 Jun 2014 22:07:54 +0000
Date: Tue, 10 Jun 2014 22:07:54 +0000
Message-Id: <E1WuUCw-0000bt-5E@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: grog: rewrite program with many new sub functions,
	which are moved into the new file subs.pl
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140610220754.2314.58175@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 04547372acb53ff5778c172a399fd0d1a1d4124d
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Jun 2014 22:08:06 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 04547372acb53ff5778c172a399fd0d1a1d4124d
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Wed Jun 11 00:07:38 2014 +0200

    grog: rewrite program with many new sub functions, which are moved into the new file subs.pl
---
 ChangeLog                  |   13 +
 src/roff/grog/Makefile.sub |    8 +-
 src/roff/grog/grog.man     |   77 ++++--
 src/roff/grog/grog.pl      |  401 +++++-----------------------
 src/roff/grog/perl_test.pl |    6 +-
 src/roff/grog/subs.pl      |  626 ++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 775 insertions(+), 356 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index eb2eb9f..9f6a57c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2014-06-02  Bernd Warken  <groff-bernd.warken-72@web.de>
 
+	* src/roff/grog/grog.pl: Totally rewrite the `grog' version,
+	starting at the last stable version.  Write many parts as `sub'
+	functions.
+
+	* src/roff/grog/subs.pl: New file by splitting the src file
+	`grog.pl', such that all functions get into the new file
+	`subs.pl'.
+
+	* src/roff/grog/Makefile.sub: Add file `subs.pl', which goes into
+	the `grog' libdir.
+
+2014-06-02  Bernd Warken  <groff-bernd.warken-72@web.de>
+
 	* src/roff/grog/grog.pl: The `grog' version of yesterday has many
 	bugs.  So reinstall an old version of `grog'.
 
diff --git a/src/roff/grog/Makefile.sub b/src/roff/grog/Makefile.sub
index fcc0020..d5957bd 100644
--- a/src/roff/grog/Makefile.sub
+++ b/src/roff/grog/Makefile.sub
@@ -5,7 +5,7 @@
 # Copyright (C) 1993, 2006, 2009, 2013-2014
 #   Free Software Foundation, Inc.
 
-# Last update: 30 Mar 2014
+# Last update: 04 Jun 2014
 
 # This file is part of `grog' which is part of `groff'.
 
@@ -30,8 +30,7 @@ MOSTLYCLEANADD=grog $(MAN1)
 all: grog $(MAN1)
 
 # lib .pl-files
-#GROG=$(srcdir)/subs.pl
-GROG=
+GROG=$(srcdir)/subs.pl
 GROG_=`echo $(GROG) | sed 's|$(srcdir)/||g'`
 
 
@@ -40,9 +39,10 @@ GROG_=`echo $(GROG) | sed 's|$(srcdir)/||g'`
 grog: grog.pl $(GROG) $(SH_DEPS_SED_SCRIPT)
 	rm -f $@
 	sed -f "$(SH_DEPS_SED_SCRIPT)" \
+	    -e "1s|^\(#! \).*perl|\\1$(PERL)|" \
 	    -e "s|@g@|$(g)|g" \
 	    -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
-	    -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \
+	    -e "s|@grog_dir@|$(DESTDIR)$(grog_dir)|g" \
 	    -e "s|@EGREP@|$(EGREP)|g" \
 	    -e "s|@VERSION@|$(version)$(revision)|" \
 	    -e "$(SH_SCRIPT_SED_CMD)" \
diff --git a/src/roff/grog/grog.man b/src/roff/grog/grog.man
index 539ad69..234bbe2 100644
--- a/src/roff/grog/grog.man
+++ b/src/roff/grog/grog.man
@@ -76,7 +76,7 @@ GPL2
 .\" --------------------------------------------------------------------
 .SH NAME
 .
-grog \- guess options for groff command
+grog \- guess options for a groff command
 .
 .
 .\" --------------------------------------------------------------------
@@ -84,6 +84,8 @@ grog \- guess options for groff command
 .
 .SY grog
 .OP \-C
+.OP \-\-run
+.OP \-\-with_ligatures
 .RI [ \%groff\-option\~ .\|.\|.\&]
 .OP \-\-
 .RI [ \%filespec\~ .\|.\|.]
@@ -106,41 +108,75 @@ grog \- guess options for groff command
 .B grog
 reads the input (file names or standard input) and guesses which of
 the
-.BR groff  (@MAN1EXT@)
+.BR groff (@MAN1EXT@)
 options are needed to perform the input with the
 .B groff
 program.
 .
+.
+.RS
+.P
 The corresponding
 .B groff
-command is output.
+command is usually displayed in standard output.
+.
+With the option
+.BR \-\-run ,
+the generated line is output into standard error and the generated
+.B groff
+command is run on the
+.IR "standard output" .
+.RE
 .
 .
 .\" --------------------------------------------------------------------
 .SH OPTIONS
 .
-The only
-.B grog
-options recognized are
-.B \-C
-(which is also passed on) to enable compatibility mode;
+The option
 .B \-v
-and
+or
 .B \-\-version
-print information on the version number; and
+prints information on the version number.
+.
+Also
 .B \-h
-and
+or
 .B \-\-help
-print usage information.
+prints usage information.
 .
-.BR \-v ,
-.BR \-\-version ,
-.BR \-h ,
-and
-.B \-\-help
-stop the program directly without printing a
+Both of these options automatically end the
+.B grog
+program.
+.
+Other options are thenignored, and no
 .B groff
-command to standard output.
+command line is generated.
+.
+.
+The following 3 options are the only
+.B grog
+options,
+.
+.TP
+.B \-C
+this option means enabling the
+.I groff
+compatibility mode, which is also transfered to the generated
+.B groff
+command line.
+.
+.TP
+.B \-\-run
+with this option, the command line is output at standard error and
+then run on the computer.
+.
+.TP
+.B \-\-with_ligatures
+this option forces to include the arguments
+.B -P-y -PU
+within the generated
+.B groff
+command line.
 .
 .
 .P
@@ -318,8 +354,9 @@ grog.sh
 is used instead.
 .
 .
-.\" --------------------------------------------------------------------
+.\" ####################################################################
 .SH EXAMPLES
+.\" ####################################################################
 .
 .IP \(bu
 Calling
diff --git a/src/roff/grog/grog.pl b/src/roff/grog/grog.pl
index 1aca1f2..514f39d 100644
--- a/src/roff/grog/grog.pl
+++ b/src/roff/grog/grog.pl
@@ -6,15 +6,16 @@
 # Source file position: <groff-source>/src/roff/grog/grog.pl
 # Installed position: <prefix>/bin/grog
 
-# Copyright (C) 1993, 2006, 2009, 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 1993, 2006, 2009, 2011-2012, 2014
+#               Free Software Foundation, Inc.
 # Written by James Clark, maintained by Werner Lemberg.
 # Rewritten and put under GPL by Bernd Warken <groff-bernd.warken-72@web.de>.
 
 # This file is part of `grog', which is part of `groff'.
 
 # `groff' is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License (GPL) as published
-# by the Free Software Foundation, either version 3 of the License, or
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
 # (at your option) any later version.
 
 # `groff' is distributed in the hope that it will be useful, but
@@ -23,366 +24,108 @@
 # General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# along with this program. If not, see
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
 
 ########################################################################
-my $Last_Update = '24 May 2012';
+our $Last_Update = '10 Jun 2014';
 ########################################################################
 
 require v5.6;
 
 use warnings;
 use strict;
-use File::Spec;
 
-my $Prog = $0;
-{
-  my ($v, $d, $f) = File::Spec->splitpath($Prog);
-  $Prog = $f;
-}
-
-#my $Sp = "[\\s\\n]";
-my $Sp = qr([\s\n]);
-
-my @Command;			# stores the final output
-my @Mparams;			# stores the options -m*
-my %Groff;
+# $Bin is the directory where this script is located
+use FindBin;
 
+my $before_make;	# script before run of `make'
 {
-  my @filespec = ();
-  my $double_minus = 0;
-  my $was_minus = 0;
-  my $had_filespec = 0;
-
-  foreach my $arg (@ARGV) {
-    next unless $arg;
-    if ($double_minus) {
-      $had_filespec = 1;
-      if (-f $arg && -r $arg) {
-	push @filespec, $arg;
-      } else {
-	print STDERR "grog: $arg is not a readable file.\n";
-      }
-      next;
-    }
-
-    if ($arg eq '--') {
-      $double_minus = 1;
-      push(@Command, $arg);
-      next;
-    }
-    if ($arg eq '-') {
-      unless ($was_minus) {
-	push @filespec, $arg;
-	$was_minus = 1;
-      }
-      next;
-    }
-
-    &version(0) if $arg eq '-v' || '--version' =~ /^$arg/;
-    &help() if $arg eq '-h' || '--help' =~ /^$arg/;
-    print STDERR "grog: wrong option $arg.\n" if $arg =~ /^--/;
-
-    if ($arg =~ /^-m/) {
-      push @Mparams, $arg;
-      next;
-    }
-    $Sp = '' if $arg eq '-C';
-
-    if ($arg =~ /^-/) {
-      push(@Command, $arg);
-      next;
-    } else {
-      $had_filespec = 1;
-      if (-f $arg && -r $arg) {
-	push @filespec, $arg;
-      } else {
-	print STDERR "grog: $arg is not a readable file.\n";
-      }
-      next;
-    }
-  }
-  @filespec = ('-') if ! @filespec && ! $had_filespec;
-  exit 1 unless @filespec;
-  @ARGV = @filespec;
+  my $at = '@';
+  $before_make = 1 if '@VERSION@' eq "${at}VERSION${at}";
 }
 
-foreach my $arg (@ARGV) {
-  &process($arg, 0);
-}
-
-sub process {
-  my ($filename, $level) = @_;
-  local(*FILE);
-
-  if (!open(FILE, $filename eq "-" ? $filename : "< $filename")) {
-    print STDERR "$Prog: can't open \`$filename': $!\n";
-    exit 1 unless $level;
-    return;
-  }
-  while (<FILE>) {
-    chomp;
-    s/^[.']\s*/./;
-    s/^\s+|\s+$//g;
-    s/$/\n/;
 
-    if (/^(.cstart)|(begin\s+chem)$/) {
-      $Groff{'chem'}++;
-      $Groff{'soelim'}++ if $level;
-    } elsif (/^\.TS$Sp/) {
-      $_ = <FILE>;
-      if (!/^\./ || /^\.so/) {
-	$Groff{'tbl'}++;
-	$Groff{'soelim'}++ if $level;
-      }
-    } elsif (/^\.EQ$Sp/) {
-      $_ = <FILE>;
-      if (!/^\./ || /^\.[0-9]/ || /^\.so/) {
-	$Groff{'eqn'}++;
-	$Groff{'soelim'}++ if $level;
-      }
-    } elsif (/^\.GS$Sp/) {
-      $_ = <FILE>;
-      if (!/^\./ || /^\.so/) {
-	$Groff{'grn'}++;
-	$Groff{'soelim'}++ if $level;
-      }
-    } elsif (/^\.G1$Sp/) {
-      $_ = <FILE>;
-      if (!/^\./ || /^\.so/) {
-	$Groff{'grap'}++;
-	$Groff{'soelim'}++ if $level;
-      }
-#    } elsif (/^\.PS\Sp([ 0-9.<].*)?$/) {
-#      if (/^\.PS\s*<\s*(\S+)/) {
-#	$Groff{'pic'}++;
-#	$Groff{'soelim'}++ if $level;
-#	&process($1, $level);
-#      } else {
-#	$_ = <FILE>;
-#	if (!/^\./ || /^\.ps/ || /^\.so/) {
-#	  $Groff{'pic'}++;
-#	  $Groff{'soelim'}++ if $level;
-#	}
-#      }
-    } elsif (/^\.PS[\s\n<]/) {
-      $Groff{'pic'}++;
-      $Groff{'soelim'}++ if $level;
-      if (/^\.PS\s*<\s*(\S+)/) {
-	&process($1, $level);
-      }
-    } elsif (/^\.R1$Sp/) {
-      $Groff{'refer'}++;
-      $Groff{'soelim'}++ if $level;
-    } elsif (/^\.\[/) {
-      $Groff{'refer_open'}++;
-      $Groff{'soelim'}++ if $level;
-    } elsif (/^\.\]/) {
-      $Groff{'refer_close'}++;
-      $Groff{'soelim'}++ if $level;
-    } elsif (/^\.NH$Sp/) {
-      $Groff{'NH'}++;		# for ms
-    } elsif (/^\.TL$Sp/) {
-      $Groff{'TL'}++;		# for mm and ms
-    } elsif (/^\.PP$Sp/) {
-      $Groff{'PP'}++;		# for mom and ms
-    } elsif (/^\.[IL]P$Sp/) {
-      $Groff{'ILP'}++;		# for man and ms
-    } elsif (/^\.P$/) {
-      $Groff{'P'}++;
-    } elsif (/^\.(PH|SA)$Sp/) {
-      $Groff{'mm'}++;
-    } elsif (/^\.TH$Sp/) {
-      $Groff{'TH'}++;
-    } elsif (/^\.SH$Sp/) {
-      $Groff{'SH'}++;
-    } elsif (/^\.([pnil]p|sh)$Sp/) {
-      $Groff{'me'}++;
-    } elsif (/^\.Dd$Sp/) {
-      $Groff{'mdoc'}++;
-    } elsif (/^\.(Tp|Dp|De|Cx|Cl)$Sp/) {
-      $Groff{'mdoc_old'} = 1;
-    }
-    # In the old version of -mdoc `Oo' is a toggle, in the new it's
-    # closed by `Oc'.
-    elsif (/^\.Oo$Sp/) {
-      $Groff{'Oo'}++;
-      s/^\.Oo/\. /;
-      redo;
-    }
-    # The test for `Oo' and `Oc' not starting a line (as allowed by the
-    # new implementation of -mdoc) is not complete; it assumes that
-    # macro arguments are well behaved, i.e., "" is used within "..." to
-    # indicate a doublequote as a string element, and weird features
-    # like `.foo a"b' are not used.
-    elsif (/^\..* Oo( |$)/) {
-      s/\\\".*//;
-      s/\"[^\"]*\"//g;
-      s/\".*//;
-      if (s/ Oo( |$)/ /) {
-	$Groff{'Oo'}++;
-      }
-      redo;
-    } elsif (/^\.Oc$Sp/) {
-      $Groff{'Oo'}--;
-      s/^\.Oc/\. /;
-      redo;
-    } elsif (/^\..* Oc( |$)/) {
-      s/\\\".*//;
-      s/\"[^\"]*\"//g;
-      s/\".*//;
-      if (s/ Oc( |$)/ /) {
-	$Groff{'Oo'}--;
-      }
-      redo;
-    } elsif (/^\.(PRINTSTYLE|START)$Sp/) {
-      $Groff{'mom'}++;
-    }
-    if (/^\.so$Sp/) {
-      chop;
-      s/^.so *//;
-      s/\\\".*//;
-      s/ .*$//;
-      # The next if-clause catches e.g.
-      #
-      #   .EQ
-      #   .so foo
-      #   .EN
-      #
-      # However, the code is not fully correct since it is too generous.
-      # Theoretically, we should check for .so only within preprocessor
-      # blocks like .EQ/.EN or .TS/.TE; but it doesn't harm if we call
-      # soelim even if we don't need to.
-      if ( $Groff{'pic'} || $Groff{'tbl'} || $Groff{'eqn'} ||
-	   $Groff{'grn'} || $Groff{'grap'} || $Groff{'refer'} ||
-	   $Groff{'refer_open'} || $Groff{'refer_close'} ||
-	   $Groff{'chem'} ) {
-	$Groff{'soelim'}++;
-      }
-      &process($_, $level + 1) unless /\\/ || $_ eq "";
-    }
-  }
-  close(FILE);
+our %at_at;
+my $file_perl_test_pl;
+my $grog_dir;
+
+if ($before_make) { # before installation
+  my $grog_source_dir = $FindBin::Bin;
+  $at_at{'BINDIR'} = $grog_source_dir;
+  $grog_dir = $grog_source_dir;
+  $file_perl_test_pl = File::Spec->catfile($grog_source_dir,
+					   'perl_test.pl');
+  my $top = $grog_source_dir . '/../../../';
+  open FILE, '<', $top . 'VERSION' ||
+    die 'Could not open top file VERSION.';
+  my $version = <FILE>;
+  chomp $version;
+  close FILE;
+  open FILE, '<', $top . 'REVISION' ||
+    die 'Could not open top file REVISION.';
+  my $revision = <FILE>;
+  chomp $revision;
+  $at_at{'GROFF_VERSION'} = $version . '.' . $revision;
+} else { # after installation}
+  $at_at{'GROFF_VERSION'} = '@VERSION@';
+  $at_at{'BINDIR'} = '@BINDIR@';
+  $grog_dir = '@grog_dir@';
+  $file_perl_test_pl = File::Spec->catfile($grog_dir,
+					   'perl_test.pl');
 }
 
-sub help {
-  print <<EOF;
-usage: grog [option]... [--] [filespec]...
-
-"filespec" is either the name of an existing, readable file or "-" for
-standard input.  If no "filespec" is specified, standard input is
-assumed automatically.
+die "$grog_dir is not an existing directory;" unless -d $grog_dir;
 
-"option" is either a "groff" option or one of these:
+unshift(@INC, $grog_dir);
 
--C            compatibility mode
--h --help     print this uasge message
--v --version  print version information
+require 'subs.pl';
 
-"groff" options are appended to the output, "-m" options are checked.
-
-EOF
-  exit 0;
+our $Prog = $0;
+{
+  my ($v, $d, $f) = File::Spec->splitpath($Prog);
+  $Prog = $f;
 }
 
-sub version {
-  my ($exit_status) = @_;
-  print "Perl version of GNU $Prog of $Last_Update " .
-    'in groff version @VERSION@' . "\n";
-  exit $exit_status;
-}
 
-{
-  my @m = ();
-  my $is_man = 0;
-  my $is_mm = 0;
-  my $is_mom = 0;
+&minus_args();
 
-  $Groff{'refer'} ||= $Groff{'refer_open'} && $Groff{'refer_close'};
 
-  if ( $Groff{'pic'} || $Groff{'tbl'} || $Groff{'eqn'} ||
-       $Groff{'grn'} || $Groff{'grap'} || $Groff{'refer'} ||
-       $Groff{'chem'} ) {
-    my $s = "-";
-    $s .= "s" if $Groff{'soelim'};
-    $s .= "R" if $Groff{'refer'};
-    $s .= "G" if $Groff{'grap'};
-    $s .= "j" if $Groff{'chem'};
-    $s .= "p" if $Groff{'pic'};
-    $s .= "g" if $Groff{'grn'};
-    $s .= "t" if $Groff{'tbl'};
-    $s .= "e" if $Groff{'eqn'};
-    push(@Command, $s);
-  }
 
-  if ( $Groff{'me'} ) {
-    push(@m, '-me');
-    push(@Command, '-me');
-  }
-  if ( $Groff{'SH'} && $Groff{'TH'} ) {
-    push(@m, '-man');
-    push(@Command, '-man');
-    $is_man = 1;
+foreach my $file ( @ARGV ) { # test for each file name in the arguments
+  unless ( open(FILE, $file eq "-" ? $file : "< $file") ) {
+    print STDERR "$Prog: can't open \`$file\': $!";
+    next;
   }
-  if ( $Groff{'mom'} ) {
-    push(@m, '-mom');
-    push(@Command, '-mom');
-    $is_mom = 1;
-  }
-  if ( $Groff{'mm'} || ($Groff{'P'} && ! $is_man) ) {
-    push(@m, '-mm');
-    push(@Command, '-mm');
-    $is_mm = 1;
-  }
-  if ( $Groff{'NH'} || ($Groff{'TL'} && ! $is_mm) ||
-       ($Groff{'ILP'} && ! $is_man) ||
-       ($Groff{'PP'} && ! $is_mom && ! $is_man) ) {
-    # .PP occurs in -mom, -man and -ms, .IP and .LP occur in -man and -ms
-    push(@m, '-ms');
-    push(@Command, '-ms');
-  }
-  if ( $Groff{'mdoc'} ) {
-    my $s = ( $Groff{'mdoc_old'} || $Groff{'Oo'} ) ? '-mdoc-old' : '-mdoc';
-    push(@m, $s);
-    push(@Command, $s);
-  }
-
-  unshift @Command, 'groff';
-  push(@Command, @ARGV);
-
-  foreach (@Command) {
-    next unless /\s/;
-    $_ = "'" . $_ . "'";
-  }
-
-  # We could implement an option to execute the command here.
 
-#  foreach (@Command) {
-#    next unless /[\$\\\"\';&()|<> \t\n]/;
-#    s/\'/\'\\\'\'/;
-#    $_ = "'" . $_ . "'";
-#  }
+  my $line = <FILE>;
 
-  my $n = scalar @m;
-  my $np = scalar @Mparams;
-  print STDERR "$Prog: more than 1 `-m' argument: @Mparams" if $np > 1;
-  if ($n == 0) {
-    unshift @Command, $Mparams[0] if $np == 1;
-  } elsif ($n == 1) {
-    if ($np == 1) {
-      print STDERR "$Prog: wrong `-m' argument: $Mparams[0]\n"
-	if $m[0] ne $Mparams[0];
+  if ( defined $line ) {
+    if ( $line ) {
+      chomp $line;
+      unless ( &do_first_line( $line, $file ) ) {	# not an option line
+	&do_line( $line, $file );
+      }
+    } else {
+      # empty first line
     }
-  } else {
-    print STDERR "$Prog: error: there are several macro packages: @m\n";
+  } else {	# empty file, go to next filearg
+    close (FILE);
+    next;
   }
 
-  print "@Command\n";
+  while (<FILE>) {
+    chomp;
+    &do_line( $_, $file );
+  }
+  close(FILE);
 
-  exit $n if $n > 1;
-  exit 0;
 }
 
+&make_groff_line();
+
+
+1;
 ########################################################################
 ### Emacs settings
 # Local Variables:
diff --git a/src/roff/grog/perl_test.pl b/src/roff/grog/perl_test.pl
index 19c68ed..5cc18cc 100644
--- a/src/roff/grog/perl_test.pl
+++ b/src/roff/grog/perl_test.pl
@@ -5,11 +5,11 @@
 # Source file position: <groff-source>/roff/grog/perl_test.sh
 # Installed position: <prefix>/lib/groff/grog/perl_test.sh
 
-# Copyright (C) 2013
+# Copyright (C) 2013-14
 #   Free Software Foundation, Inc.
 # Written by Bernd Warken <groff-bernd.warken-72@web.de>.
 
-# Last update: 12 Apr 2013
+# Last update: 04 Jun 2014
 
 # This file is part of `grog', which is part of `groff'.
 
@@ -29,7 +29,7 @@
 ########################################################################
 
 # This file tests whether perl has a suitable version.  It is used by
-# glilypond.pl and Makefile.sub.
+# grog.pl and Makefile.sub.
 
 require v5.6;
 
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
new file mode 100644
index 0000000..9025bf5
--- /dev/null
+++ b/src/roff/grog/subs.pl
@@ -0,0 +1,626 @@
+#! /usr/bin/env perl
+# grog - guess options for groff command
+# Inspired by doctype script in Kernighan & Pike, Unix Programming
+# Environment, pp 306-8.
+
+# Source file position: <groff-source>/src/roff/grog/subs.pl
+# Installed position: <prefix>/lib/grog/subs.pl
+
+# Copyright (C) 1993, 2006, 2009, 2011-2012, 2014
+#               Free Software Foundation, Inc.
+# Split from grog.pl and put under GPL2 by
+#               Bernd Warken <groff-bernd.warken-72@web.de>.
+
+# This file is part of `grog', which is part of `groff'.
+
+# `groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+
+# `groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+# Last_Update = '10 Jun 2014';
+########################################################################
+
+require v5.6;
+
+use warnings;
+use strict;
+use File::Spec;
+
+$\ = "\n";
+
+# my $Sp = "[\\s\\n]";
+# my $Sp = qr([\s\n]);
+# my $Sp = '' if $arg eq '-C';
+my $Sp = '';
+
+my @Command;			# stores the final output
+my @Mparams;			# stores the options `-m*'
+my $do_run = 0;			# run generated `groff' command
+my $pdf_with_ligatures = 0;	# `-P-y -PU' for `pdf' device
+my $device = '';
+
+our $Prog;
+
+my %macros;
+my %Groff = (
+	     # preprocessors
+	     'chem' => 0,
+	     'eqn' => 0,
+	     'gperl' => 0,
+	     'grap' => 0,
+	     'grn' => 0,
+	     'lilypond' => 0,
+	     'pic' => 0,
+	     'refer' => 0,
+	     'refer_open' => 0,
+	     'refer_close' => 0,
+	     'soelim' => 0,
+	     'tbl' => 0,
+
+	     # tmacs
+	     'man' => 0,
+	     'mdoc' => 0,
+	     'mdoc_old' => 0,
+	     'me' => 0,
+	     'mm' => 0,
+	     'mom' => 0,
+	     'ms' => 0,
+
+	     # requests
+	     'NH' => 0,		# ms
+	     'TH' => 0,		# man and ms
+	     'SH' => 0,		# man and ms
+	     'SS' => 0,		# man
+	     'P' => 0,		# man
+
+	     # for mdoc and mdoc-old
+	     # .Oo and .Oc for modern mdoc, only .Oo for mdoc-old
+	     'Oo' => 0,		# mdoc and mdoc-old
+	     'Oc' => 0,		# mdoc
+	     'Dd' => 0,		# mdoc
+);
+
+
+############################ subs ######################################
+
+########################################################################
+# sub minus_args: command line arguments except file names
+########################################################################
+
+sub minus_args {
+  my @filespec = ();
+  my $double_minus = 0;
+  my $was_minus = 0;
+  my $was_T = 0;
+  my $had_filespec = 0;
+
+  foreach my $arg (@ARGV) {
+    next unless $arg;
+    if ($double_minus) {
+      $had_filespec = 1;
+      if (-f $arg && -r $arg) {
+	push @filespec, $arg;
+      } else {
+	print STDERR "grog: $arg is not a readable file.";
+      }
+      next;
+    }
+
+    if ( $was_T ) {
+      $was_T = 0;
+      $device = $arg;
+      next;
+    }
+
+    if ( $arg =~ /^--/ ) {
+
+      if ($arg eq '--') {
+	$double_minus = 1;
+	push(@Command, $arg);
+	next;
+      }
+
+      &version() if $arg =~ /^--?v/;	# --version, with exit
+      &help() if $arg  =~ /--?h/;	# --help, with exit
+
+      if ( $arg =~ /^--?r/ ) {		#  --run, no exit
+	$do_run = 1;
+	next;
+      }
+
+      if ( $arg =~ /^--?w/ ) {		#  --with_ligatures, no exit
+	$pdf_with_ligatures = 1;
+	next;
+      }
+    }
+
+    print STDERR "grog: wrong option $arg." if $arg =~ /^--/;
+
+    if ($arg eq '-') {
+      unless ($was_minus) {
+	push @filespec, $arg;
+	$was_minus = 1;
+      }
+      next;
+    }
+
+    if ($arg =~ /^-m/) {
+      push @Mparams, $arg;
+      next;
+    }
+
+    if ($arg =~ /^-T\s*$/) {
+      $was_T = 1;
+      next;
+    }
+
+    if ($arg =~ s/^-T(.+)$/$1/) {
+      $device = $arg;
+      next;
+    }
+
+    if ($arg =~ /^-/) {
+      push(@Command, $arg);
+      next;
+    } else {
+      $had_filespec = 1;
+      if (-f $arg && -r $arg) {
+	push @filespec, $arg;
+      } else {
+	print STDERR "grog: $arg is not a readable file.";
+      }
+      next;
+    }
+  }
+  @filespec = ('-') if ! @filespec && ! $had_filespec;
+  exit 1 unless @filespec;
+  @ARGV = @filespec;
+}
+
+
+########################################################################
+# sub do_first_line
+########################################################################
+
+# As documented for the `man' program, the first line can be
+# used as an groff option line.  This is done by:
+# - start the line with '\" (apostrophe, backslash, double quote)
+# - add a space character
+# - a word using the following characters can be appended: `egGjpRst'.
+#     Each of these characters means an option for the generated
+#     `groff' command line, e.g. `-t'.
+
+sub do_first_line {
+  my ( $line, $file ) = @_;
+
+  # For a leading groff options line use only [egGjpRst]
+  if  ( $line =~ /^[.']\\"[\segGjpRst]+&/ ) {
+    # this is a groff options leading line
+    if ( $line =~ /^\./ ) {
+      # line is a groff options line with . instead of '
+      print "First line in $file must start with an apostrophe \ " .
+	"instead of a period . for groff options line!";
+    }
+
+    if ( $line =~ /e/ ) {
+      $Groff{'eqn'}++;
+    }
+    if ( $line =~ /g/ ) {
+      $Groff{'grn'}++;
+    }
+    if ( $line =~ /G/ ) {
+      $Groff{'grap'}++;
+    }
+    if ( $line =~ /j/ ) {
+      $Groff{'chem'}++;
+    }
+    if ( $line =~ /p/ ) {
+      $Groff{'pic'}++;
+    }
+    if ( $line =~ /R/ ) {
+      $Groff{'refer'}++;
+    }
+    if ( $line =~ /s/ ) {
+      $Groff{'soelim'}++;
+    }
+    if ( $line =~ /t/ ) {
+      $Groff{'tbl'}++;
+    }
+    return 1;	# a leading groff options line
+  } else {
+    return 0;	# not a leading groff options line
+  }
+}	# sub do_first_line
+
+
+########################################################################
+# sub do_line
+########################################################################
+
+sub do_line {
+  my ( $line, $file ) = @_;
+
+  return if ( $line =~ /^[.']\s*\\"/ );	# comment
+
+  return unless ( $line =~ /^[.']/ );	# ignore text lines
+
+  $line =~ s/^['.]\s*/./;	# let only a dot as leading character,
+				# remove spaces after the leading dot
+  $line =~ s/\s+$//;		# remove final spaces
+
+  return if ( $line =~ /^\.$/ );	# ignore .
+  return if ( $line =~ /^\.\.$/ );	# ignore ..
+
+  # soelim
+  if ( $line =~ /^\.(so|mso|PS\s*<).*$/ ) {	# `.so', `.mso', `.PS<...'
+    $Groff{'soelim'}++;
+    return;
+  }
+  if ( $line =~ /^\.\s*do\s*(so|mso|PS\s*<).*$/ ) {	# `.do so', etc
+    $Groff{'soelim'}++;
+    return;
+  }
+
+  if ( $line =~ /^\.de1?\W?/ ) {
+    # this line is a macro definition, add it to %macros
+    my $macro = $line;
+    $macro =~ s/^\.de1?\s+(\w+)\W*/.$1/;
+    return if ( exists $macros{$macro} );
+    $macros{ $macro } = 1;
+    return;
+  }
+
+  $line =~ s/(\.\w+).*$/$1/;		# let only request left
+
+  {
+    # if line command is a defined macro, just ignore this line
+    my $macro = $line;
+    $macro =~ s/^(\.\w+)/$1/;
+    return if ( exists $macros{ $macro } );
+  }
+
+  # preprocessors
+  if ( $line =~ /^(\.cstart)|(begin\s+chem)$/ ) {
+    $Groff{'chem'}++;		# for chem
+    return;
+  }
+  if ( $line =~ /^\.EQ$/ ) {
+    $Groff{'eqn'}++;		# for eqn
+    return;
+  }
+  if ( $line =~ /^\.G1$/ ) {
+    $Groff{'grap'}++;		# for grap
+    return;
+  }
+  if ( $line =~ /^\.Perl$/ ) {
+    $Groff{'gperl'}++;		# for gperl
+    return;
+  }
+  if ( $line =~ /^\.GS$/ ) {
+    $Groff{'grn'}++;		# for grn
+    return;
+  }
+  if ( $line =~ /^\.lilypond$/ ) {
+    $Groff{'lilypond'}++;	# for glilypond
+    return;
+  }
+  if ( $line =~ /^\.PS$/ ) {
+    $Groff{'pic'}++;		# for gpic
+    return;
+  }
+  if ( $line =~ /^\.R1$/ ) {
+    $Groff{'refer'}++;		# for refer
+    return;
+  }
+  if ( $line =~ /^\.\[$/ ) {
+    $Groff{'refer_open'}++;	# for refer open
+    return;
+  }
+  if ( $line =~ /^\.\]$/ ) {
+    $Groff{'refer_close'}++;	# for refer close
+    return;
+  }
+  if ( $line =~ /^\.TS$/ ) {
+    $Groff{'tbl'}++;		# for tbl
+    return;
+  }
+
+
+  # devices
+
+  # for man
+  if ( $line =~ /^\.TH$/ ) {
+    $Groff{'TH'}++;
+    return;
+  }
+  if ( $line =~ /^\.SH$/ ) {
+    $Groff{'SH'}++;
+    return;
+  }
+  if ( $line =~ /^\.SS$/ ) {
+    $Groff{'SS'}++;
+    return;
+  }
+#  if ( $line =~ /^\.P$/ ) {
+#   $Groff{'P'}++;
+#    return;
+#  }
+
+  # In the old version of -mdoc `Oo' is a toggle, in the new it's
+  # closed by `Oc'.
+  if ( $line =~ /^\.Oc$/ ) {
+    $Groff{'Oc'}++;		# only for modern mdoc
+    return;
+  }
+  if ( $line =~ /^\.Oo$/ ) {
+    $Groff{'Oo'}++;		# for mdoc and mdoc-old
+    return;
+  }
+
+  if ( $line =~ /^\.(Dd)$/ ) {
+    $Groff{'Dd'}++;		# for modern mdoc
+    return;
+  }
+  if ( $line =~ /^\.(Tp|Dp|De|Cx|Cl)$/ ) {
+    $Groff{'mdoc_old'}++;	# true for old mdoc
+    return;
+  }
+
+  if ( $line =~ /^\.([ilnp]p|sh)$/ ) {
+    $Groff{'me'}++;		# for me
+    return;
+  }
+  if ( $line =~ /^\.(PH|SA)$/ ) {
+    $Groff{'mm'}++;		# for mm
+    return;
+  }
+  if ( $line =~ /^\.(PRINTSTYLE|START)$/ ) {
+    $Groff{'mom'}++;		# for mom
+    return;
+  }
+  if ( $line =~ /^\.NH$/ ) {
+    $Groff{'NH'}++;		# for ms
+    return;
+  }
+} # sub do_line
+
+
+########################################################################
+# sub make_groff_line
+########################################################################
+
+sub make_groff_line {
+  my @m = ();
+  my @preprograms = ();
+
+  # device from -T
+  $device = '' unless ( defined $device );
+
+  # default device when without `-T' is `ps' ($device empty)
+
+  if ( $device =~
+       /^(
+	  dvi
+	|
+	  html
+	|
+	  xhtml
+	|
+	  lbp
+	|
+	  lj4
+	|
+	  ps
+	|
+	  pdf
+	|
+	  ascii
+	|
+	  cp1047
+	|
+	  latin1
+	|
+	  utf8
+	)$/x ) {	# suitable device
+
+    push(@Command, '-T' . $device);	# for all suitable devices
+
+    if ( $device eq 'pdf' ) {
+      if ( $pdf_with_ligatures ) {	# with ligature argument
+	push( @Command, '-P-y -PU' );
+      } else {	# no ligature argument
+	print STDERR <<EOF;
+If you have trouble with ligatures like `fi' in the `groff' output, you
+can proceed as one of
+- add `grog' option `--with_ligatures' or
+- use the `grog' option combination `-P-y -PU' or
+- try to remove the font named similar to `fonts-texgyre' from your system.
+EOF
+      }	# end of ligature
+    }	# end of pdf device
+  } else {	# wrong device
+    if ( $device ) {
+      print STDERR 'The device ' . $device . ' for -T is wrong.';
+      $device = '';
+    }
+  }
+
+  # preprocessors
+  if ( $Groff{'lilypond'} ) {
+    push @preprograms, 'glilypond';
+  }
+  if ( $Groff{'gperl'} ) {
+    push @preprograms, 'gperl';
+  }
+  $Groff{'refer'} ||= $Groff{'refer_open'} && $Groff{'refer_close'};
+  if ( $Groff{'pic'} || $Groff{'tbl'} || $Groff{'eqn'} ||
+       $Groff{'grn'} || $Groff{'grap'} || $Groff{'refer'} ||
+       $Groff{'chem'} ) {
+    my $s = "-";
+    $s .= "e" if $Groff{'eqn'};
+    $s .= "g" if $Groff{'grn'};
+    $s .= "G" if $Groff{'grap'};
+    $s .= "j" if $Groff{'chem'};
+    $s .= "p" if $Groff{'pic'};
+    $s .= "R" if $Groff{'refer'};
+    $s .= "s" if $Groff{'soelim'};
+    $s .= "t" if $Groff{'tbl'};
+    push(@Command, $s);
+  }
+
+
+  # tmacs
+
+  if ( $Groff{'TH'} && ( $Groff{'SH'} ||  $Groff{'SS'} ) ) {
+    $Groff{'TH'} = 0;
+    $Groff{'SH'} = 0;
+    $Groff{'SS'} = 0;
+    $Groff{'man'} = 1;
+    push(@m, '-man');
+    push(@Command, '-man');
+  }
+
+  if ( $Groff{'NH'} ) {
+    $Groff{'ms'}++;
+    push(@m, '-ms');
+    push(@Command, '-ms');
+  }
+
+  if ( ( $Groff{'Oo'} && $Groff{'Oc'} ) || $Groff{'Dd'} ) {
+    $Groff{'Oc'} = 0;
+    $Groff{'Oo'} = 0;
+    push(@m, '-mdoc');
+    push(@Command, '-mdoc');
+  }
+
+  if ( $Groff{'mdoc_old'} || $Groff{'Oo'} ) {
+    push(@m, '-mdoc_old');
+    push(@Command, '-mdoc_old');
+  }
+
+
+  if ( $Groff{'me'} ) {
+    push(@m, '-me');
+    push(@Command, '-me');
+  }
+  if ( $Groff{'mm'} ) {
+    push(@m, '-mm');
+    push(@Command, '-mm');
+  }
+  if ( $Groff{'mom'} ) {
+    push(@m, '-mom');
+    push(@Command, '-mom');
+  }
+
+
+  unshift @Command, 'groff';
+  if ( @preprograms ) {
+    my @progs;
+    $progs[0] = shift @preprograms;
+    push(@progs, @ARGV);
+    for ( @preprograms ) {
+      push @progs, '|';
+      push @progs, $_;
+    }
+    push @progs, '|';
+    unshift @Command, @progs;
+  } else {
+    push(@Command, @ARGV);
+  }
+
+  foreach (@Command) {
+    next unless /\s/;
+    $_ = "'" . $_ . "'";
+  }
+
+
+  my $n = scalar @m;
+  my $np = scalar @Mparams;
+  print STDERR "$Prog: more than 1 `-m' argument: @Mparams" if $np > 1;
+  if ($n == 0) {
+    unshift @Command, $Mparams[0] if $np == 1;
+  } elsif ($n == 1) {
+    if ($np == 1) {
+      print STDERR "$Prog: wrong `-m' argument: $Mparams[0]"
+	if $m[0] ne $Mparams[0];
+    }
+  } else {
+    print STDERR "$Prog: error: there are several macro packages: @m";
+    exit 1;
+  }
+
+  # execute the `groff' command here with option `--run'
+  if ( $do_run ) {
+    print STDERR "@Command";
+    system(join ' ', @Command);
+  } else {
+    print "@Command";
+  }
+
+  exit $n if $n > 1;
+  exit 0;
+}	# sub make_groff_line
+
+
+########################################################################
+# sub help
+########################################################################
+
+sub help {
+  print <<EOF;
+usage: grog [option]... [--] [filespec]...
+
+"filespec" is either the name of an existing, readable file or "-" for
+standard input.  If no `filespec' is specified, standard input is
+assumed automatically.  All arguments after a `--' are regarded as file
+names, even if they start with a `-' character.
+
+`option' is either a `groff' option or one of these:
+
+-h --help		print this uasge message and exit
+-v --version		print version information and exit
+
+-C			compatibility mode
+--run			run the checked-out groff command
+--with_ligatures	include options `-P-y -PU' for internal font,
+			which preserverses the ligatures like `fi'
+
+All other options should be `groff' 1-character options.  These are then
+appended to the generated `groff' command line.  The `-m' options will
+be checked by `grog'.
+
+EOF
+  exit 0;
+} # sub help
+
+
+########################################################################
+# sub version
+########################################################################
+
+sub version {
+  our %at_at;
+  our $Last_Update;
+  print "Perl version of GNU $Prog of $Last_Update " .
+    "in groff version " . $at_at{'GROFF_VERSION'};
+  exit 0;
+} # sub version
+
+
+1;
+########################################################################
+### Emacs settings
+# Local Variables:
+# mode: CPerl
+# End:


From MAILER-DAEMON Wed Jun 11 14:48:05 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WunZ7-0001EK-Na
	for mharc-groff-commit@gnu.org; Wed, 11 Jun 2014 14:48:05 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:44032)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WunYy-0001E1-DF
	for groff-commit@gnu.org; Wed, 11 Jun 2014 14:48:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WunYs-0004la-19
	for groff-commit@gnu.org; Wed, 11 Jun 2014 14:47:56 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:49061)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WunYr-0004lU-RC
	for groff-commit@gnu.org; Wed, 11 Jun 2014 14:47:49 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WunYq-0002do-VR
	for groff-commit@gnu.org; Wed, 11 Jun 2014 18:47:49 +0000
Date: Wed, 11 Jun 2014 18:47:48 +0000
Message-Id: <E1WunYq-0002do-VR@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: groffer: rename func.pl to sub.pl;
	move all subs from groffer.pl to main_subs.pl
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140611184748.10118.26369@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: fc75fde3202f53327ea8d12d7e1afe8687628e96
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Jun 2014 18:48:03 -0000

bwarken pushed a commit to branch master
in repository groff.

commit fc75fde3202f53327ea8d12d7e1afe8687628e96
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Wed Jun 11 20:44:05 2014 +0200

    groffer: rename func.pl to sub.pl; move all subs from groffer.pl to main_subs.pl
---
 contrib/groffer/ChangeLog                    |    9 +
 contrib/groffer/Makefile.sub                 |    5 +-
 contrib/groffer/groffer.pl                   | 1984 +-------------------------
 contrib/groffer/{groffer.pl => main_subs.pl} |  415 ++----
 contrib/groffer/{func.pl => subs.pl}         |    7 +-
 contrib/groffer/version.sh                   |    4 +-
 6 files changed, 215 insertions(+), 2209 deletions(-)

diff --git a/contrib/groffer/ChangeLog b/contrib/groffer/ChangeLog
index efe3488..6d3550f 100644
--- a/contrib/groffer/ChangeLog
+++ b/contrib/groffer/ChangeLog
@@ -1,3 +1,12 @@
+2014-06-11  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* func.pl, subs.pl: Rename `func.pl' to `subs.pl'.
+
+	* groffer.pl, main_subs.pl: Move all subs in `groffer.pl' to
+	`main_subs.pl'.
+
+	* version.sh: Upgrade to version 2.1.2.
+
 2014-06-01  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* groffer.pl: Fix ligature error `fi', etc. in pdf-mode by
diff --git a/contrib/groffer/Makefile.sub b/contrib/groffer/Makefile.sub
index f1fd51d..7f5eef3 100644
--- a/contrib/groffer/Makefile.sub
+++ b/contrib/groffer/Makefile.sub
@@ -7,7 +7,7 @@
 # Written by Werner Lemberg <wl@gnu.org> and
 # Bernd Warken <groff-bernd.warken-72@web.de>.
 
-# Last update: 30 Mar 2014
+# Last update: 11 Jun 2014
 
 # This file is part of `groffer' which is part of `groff'.
 
@@ -44,7 +44,8 @@ MOSTLYCLEANADD=groffer HAVE_PERL $(MAN1) $(ROFF2MAN) $(ROFF2PROGS)
 
 all: groffer
 
-GROFFER_PERL=func.pl \
+GROFFER_PERL=subs.pl \
+             main_subs.pl \
              man.pl \
              perl_test.pl \
              split_env.sh
diff --git a/contrib/groffer/groffer.pl b/contrib/groffer/groffer.pl
index 5be47c9..e77ad70 100755
--- a/contrib/groffer/groffer.pl
+++ b/contrib/groffer/groffer.pl
@@ -10,7 +10,7 @@
 
 # Written by Bernd Warken <groff-bernd.warken-72@web.de>.
 
-# Last update: 01 Jun 2014
+# Last update: 11 Jun 2014
 
 # This file is part of `groffer', which is part of `groff'.
 
@@ -149,9 +149,9 @@ die "$File_split_env_sh does not exist;" unless -f "$File_split_env_sh";
 die "$file_perl_test_pl does not exist;" unless -f "$file_perl_test_pl";
 do "$file_perl_test_pl" or die "Perl test: $@";
 
-require 'func.pl';
+require 'subs.pl';
+require 'main_subs.pl';
 require 'man.pl';
-# require 'sub.pl';
 
 @Path = &path_uniq( File::Spec->path() );
 
@@ -166,19 +166,19 @@ if ( &where_is_prog('gzip') ) {
 ########################################################################
 
 # configuration files
-my @Conf_Files = (File::Spec->catfile(File::Spec->rootdir(),
+our @Conf_Files = (File::Spec->catfile(File::Spec->rootdir(),
 				      'etc', 'groff', 'groffer.conf'),
 		  File::Spec->catfile("$ENV{'HOME'}", '.groff',
 				      'groffer.conf')
 		 );
 
-my @Default_Modes = ('pdf', 'pdf2', 'html', 'ps', 'x', 'dvi', 'tty');
-my $Default_Resolution = 75;
-my $Default_tty_Device = 'latin1';
+our @Default_Modes = ('pdf', 'pdf2', 'html', 'ps', 'x', 'dvi', 'tty');
+our $Default_Resolution = 75;
+our $Default_tty_Device = 'latin1';
 
-my @Macro_Packages = ('-man', '-mdoc', '-me', '-mm', '-mom', '-ms');
+our @Macro_Packages = ('-man', '-mdoc', '-me', '-mm', '-mom', '-ms');
 
-my %Viewer_tty = ('DVI' => [],
+our %Viewer_tty = ('DVI' => [],
 		  'HTML' => ['lynx', 'w3m'],
 		  'PDF' => [],
 		  'PS' => [],
@@ -186,7 +186,7 @@ my %Viewer_tty = ('DVI' => [],
 		  'X' => [],
 		 );
 
-my %Viewer_X = ('DVI' => ['kdvi', 'xdvi', 'dvilx'],
+our %Viewer_X = ('DVI' => ['kdvi', 'xdvi', 'dvilx'],
 		'HTML' => ['konqueror', 'epiphany'. 'mozilla-firefox',
 			   'firefox', 'mozilla', 'netscape', 'galeon',
 			   'opera', 'amaya','arena', 'mosaic'],
@@ -220,557 +220,38 @@ $Man{'AUTO_SEC_CHARS'} = join('', @{$Man{'AUTO_SEC'}});
 
 
 ########################################################################
-# given options, main_set_options()
+# given options
 ########################################################################
 
-my %Opts_Cmdline_Short;
-my %Opts_Cmdline_Long;
-my $Opts_Cmdline_Long_Str;
-my %Opts_Cmdline_Double;
-my %Opts_Groff_Short;
+our %Opts_Cmdline_Short;
+our %Opts_Cmdline_Long;
+our $Opts_Cmdline_Long_Str;
+our %Opts_Cmdline_Double;
+our %Opts_Groff_Short;
 
-sub main_set_options {
-  # the following options are ignored in groffer.pl, but are kept from
-  # groffer.sh: --shell arg, --debug-shell
-
-  my @opts_ignored_short_na = ();
-  my @opts_ignored_short_arg = ();
-
-  my @opts_ignored_long_na = ('debug-shell');
-
-  my @opts_ignored_long_arg = ('shell');
-
-
-  ###### groffer native options
-
-  my @opts_groffer_short_na = ('h', 'Q', 'v', 'V', 'X', 'Z');
-  my @opts_groffer_short_arg = ('T');
-
-  my @opts_groffer_long_na = ('auto', 'apropos', 'apropos-data',
-  'apropos-devel', 'apropos-progs', 'debug', 'debug-all',
-  'debug-filenames', 'debug-func', 'debug-grog', 'debug-not-func',
-  'debug-keep', 'debug-lm', 'debug-params', 'debug-stacks',
-  'debug-tmpdir', 'debug-user', 'default', 'do-nothing', 'dvi',
-  'groff', 'help', 'intermediate-output', 'html', 'latin1', 'man',
-  'no-location', 'no-man', 'no-special', 'pdf', 'pdf2', 'ps', 'rv', 'source',
-  'text', 'to-stdout', 'text-device', 'tty', 'tty-device', 'version',
-  'whatis', 'where', 'www', 'x', 'X');
-
-### main_set_options()
-  my @opts_groffer_long_arg =
-    ('default-modes', 'device', 'extension', 'fg', 'fn', 'font',
-     'foreground', 'mode', 'print', 'title', 'viewer',
-     # tty viewers are ignored
-     'dvi-viewer-tty', 'html-viewer-tty', 'pdf-viewer-tty',
-     'ps-viewer-tty', 'tty-viewer-tty', 'www-viewer-tty',
-     'X-viewer-tty', 'x-viewer-tty',
-     # viewers for modes are ignored
-     'dvi-viewer', 'html-viewer', 'pdf-viewer', 'ps-viewer', 'tty-viewer',
-     'www-viewer', 'X-viewer', 'x-viewer',
-    );
-
-  ##### groffer options inhereted from groff
-
-  my @opts_groff_short_na = ('a', 'b', 'c', 'C', 'e', 'E', 'g', 'G',
-  'i', 'k', 'l', 'N', 'p', 'R', 's', 'S', 't', 'U', 'z');
-
-  my @opts_groff_short_arg = ('d', 'f', 'F', 'I', 'K', 'L', 'm', 'M', 'n',
-  'o', 'P', 'r', 'w', 'W');
-
-  my @opts_groff_long_na = ();
-  my @opts_groff_long_arg = ();
-
-  ##### groffer options inhereted from the X Window toolkit
-
-  my @opts_x_short_na = ();
-  my @opts_x_short_arg = ();
-
-  my @opts_x_long_na = ('iconic', 'rv');
-
-  my @opts_x_long_arg = ('background', 'bd', 'bg', 'bordercolor',
-  'borderwidth', 'bw', 'display', 'fg', 'fn', 'font', 'foreground',
-  'ft', 'geometry', 'resolution', 'title', 'xrm');
-
-### main_set_options()
-  ###### groffer options inherited from man
-
-  my @opts_man_short_na = ();
-  my @opts_man_short_arg = ();
-
-  my @opts_man_long_na = ('all', 'ascii', 'catman', 'ditroff',
-  'local-file', 'location', 'troff', 'update');
-
-  my @opts_man_long_arg = ('locale', 'manpath', 'pager',
-  'preprocessor', 'prompt', 'sections', 'systems', 'troff-device');
-
-  ###### additional options for parsing evironment variable $MANOPT only
-
-  my @opts_manopt_short_na = ('7', 'a', 'c', 'd', 'D', 'f', 'h', 'k',
-  'l', 't', 'u', 'V', 'w', 'Z');
-
-  my @opts_manopt_short_arg = ('e', 'L', 'm', 'M', 'p', 'P', 'r', 'S',
-  'T');
-
-  my @opts_manopt_long_na = (@opts_man_long_na, 'apropos', 'debug',
-  'default', 'help', 'html', 'ignore-case', 'location-cat',
-  'match-case', 'troff', 'update', 'version', 'whatis', 'where',
-  'where-cat');
-
-  my @opts_manopt_long_arg = (@opts_man_long_na, 'config_file',
-  'encoding', 'extension', 'locale');
-
-### main_set_options()
-  ###### collections of command line options
-
-  # There are two hashes that control the whole of the command line
-  # options, one for short and one for long options.  Options without
-  # and with arguments are mixed by advicing a value of 0 for an option
-  # without argument and a value of 1 for an option with argument.
-  # The options are with leading minus.
-
-  foreach (@opts_groffer_short_na, @opts_groff_short_na,
-	   @opts_x_short_na, @opts_man_short_na, @opts_ignored_short_na) {
-    $Opts_Cmdline_Short{"-$_"} = 0 if $_;
-  }
-  foreach (@opts_groffer_short_arg, @opts_groff_short_arg,
-	   @opts_x_short_arg, @opts_man_short_arg, @opts_ignored_short_arg) {
-    $Opts_Cmdline_Short{"-$_"} = 1 if $_;
-  }
-
-  foreach (@opts_groffer_long_na, @opts_groff_long_na,
-	   @opts_x_long_na, @opts_man_long_na, @opts_ignored_long_na) {
-    $Opts_Cmdline_Long{"--$_"} = 0 if $_;
-  }
-  foreach (@opts_groffer_long_arg, @opts_groff_long_arg,
-	   @opts_x_long_arg, @opts_man_long_arg, @opts_ignored_long_arg) {
-    $Opts_Cmdline_Long{"--$_"} = 1 if $_;
-  }
-
-  # For determining abbreviations of an option take two spaces as join
-  # for better check.
-  # The options are without leading minus.
-  $Opts_Cmdline_Long_Str = join '  ', keys %Opts_Cmdline_Long;
-  if ($Opts_Cmdline_Long_Str) {
-    $Opts_Cmdline_Long_Str = " $Opts_Cmdline_Long_Str ";
-    $Opts_Cmdline_Long_Str =~ s/--//g;
-  }
-
-### main_set_options()
-  # options with equal meaning are mapped to a single option name
-  # all of these have leading minus characters
-  %Opts_Cmdline_Double = ('-h' => '--help',
-			  '-Q' => '--source',
-			  '-T' => '--device',
-			  '-v' => '--version',
-			  '-Z' => '--intermediate-output',
-			  '--bd' => '--bordercolor',
-			  '--bg' => '--background',
-			  '--bw' => '--borderwidth',
-			  '--debug-all' => '--debug',
-			  '--ditroff' => '--intermediate-output',
-			  '--fg' => '--foreground',
-			  '--fn' => '--font',
-			  '--ft' => '--font',
-			  '--latin1' => '--tty',
-			  '--troff-device' => '--device',
-			  '--tty-device' => '--text-device',
-			  '--viewer' => '--viewer',
-			  '--where' => '--location',
-			  '--www' => '--html',
-			  '--X' => '--x',
-			  # '--dvi-viewer' => '--viewer',
-			  '--dvi-viewer-tty' => '--viewer',
-			  '--html-viewer-tty' => '--viewer',
-			  '--pdf-viewer-tty' => '--viewer',
-			  '--ps-viewer-tty' => '--viewer',
-			  '--tty-viewer' => '--pager',
-			  '--tty-viewer-tty' => '--pager',
-			  '--www-viewer' => '--viewer',
-			  '--www-viewer-tty' => '--pager',
-			  '--X-viewer' => '--viewer', '--X-viewer-tty'
-			  => '--pager', '--x-viewer' => '--viewer',
-			  '--x-viewer-tty' => '--pager', );
-
-  # groff short options with leading minus
-  foreach (@opts_groff_short_na) {
-    $Opts_Groff_Short{"-$_"} = 0;
-  }
-  foreach (@opts_groff_short_arg) {
-    $Opts_Groff_Short{"-$_"} = 1;
-  }
-
-} # main_set_options()
+&main_set_options();
 
 
 ########################################################################
-# $MANOPT, main_parse_MANOPT()
+# $MANOPT
 ########################################################################
 
 # handle environment variable $MANOPT
-my @Manopt;
-
-sub main_parse_MANOPT {
-  if ( $ENV{'MANOPT'} ) {
-    @Manopt = `sh $File_split_env_sh MANOPT`;
-    chomp @Manopt;
-
-    my @manopt;
-    # %opts stores options that are used by groffer for $MANOPT
-    # All options not in %opts are ignored.
-    # Check options used with %Opts_Cmdline_Double.
-    # 0: option used ('' for ignore), 1: has argument or not
-    ### main_parse_MANOPT()
-    my %opts = ('-7' => ['--ascii', 0],
-		'-L' => ['--locale', 1],
-		'-M' => ['--manpath', 1],
-		'-P' => ['--pager', 1],
-		'-S' => ['--sections', 1],
-		'-T' => ['-T', 1],
-		'-w' => ['--location', 0],
-		'-a' => ['--all', 0],
-		'-c' => ['', 1],
-		'-e' => ['--extension', 1],
-		'-f' => ['--whatis', 1],
-		'-m' => ['--systems', 1],
-		'-p' => ['', 1],
-		'-r' => ['', 1],
-		'-manpath' => ['--manpath', 1],
-		'-pager' => ['--pager', 1],
-		'-prompt' => ['', 1],
-		'-sections' => ['--sections', 1],
-		'--all' => ['--all', 0],
-		'--ascii' => ['--ascii', 0],
-		'--catman' => ['', 1],
-		'--device' => ['-T', 1],
-		'--extension' => ['--extension', 1],
-		'--locale' => ['--locale', 1],
-		'--location' => ['--location', 0],
-		'--manpath' => ['--manpath', 1],
-		'--preprocessor' => ['', 1],
-		'--systems' => ['--systems', 1],
-		'--whatis' => ['--whatis', 1],
-		'--where' => ['--location', 0],
-	       );
-
-### main_parse_MANOPT()
-    my ($opt, $has_arg);
-    my $i = 0;
-    my $n = $#Manopt;
-    while ($i <= $n) {
-      my $o = $Manopt[$i];
-      ++$i;
-      # ignore, when not in %opts
-      next unless (exists $opts{$o});
-      if (($o eq '-D') or ($o eq '--default')) {
-	@manopt = ();
-	next;
-      }
-      $opt = $opts{$o}[0];
-      $has_arg = $opts{$o}[1];
-      # ignore, when empty in %opts
-      unless ($opt) {
-	# ignore without argument
-	next unless ($has_arg);
-	# ignore the argument as well
-	++$i;
-	next;
-      }
-      if ($has_arg) {
-	last if ($i > $n);
-	push @manopt, $opt, $Manopt[$i];
-	++$i;
-	next;
-      } else {
-	push @manopt, $opt;
-	next;
-      }
-    }
-    @Manopt = @manopt;
-  }
-}				# main_parse_MANOPT()
+our @Manopt;
+
+&main_parse_MANOPT();
 
 
 ########################################################################
 # configuration files, $GROFFER_OPT, and command line, main_config_params()
 ########################################################################
 
-my @Options;
-my @Filespecs;
-my @Starting_Conf;
-my @Starting_ARGV = @ARGV;
-sub main_config_params {	# handle configuration files
-  # options may not be abbreviated, but must be exact
-  my @conf_args;
-  foreach my $f ( @Conf_Files ) {
-    if (-s $f) {
-      my $fh;
-      open $fh, "<$f" || next;
-      my $nr = 0;
-    LINE: foreach my $line (<$fh>) {
-	++ $nr;
-	chomp $line;
-	# remove starting and ending whitespace
-	$line =~ s/^\s+|\s+$//g;
-	# replace whitespace by single space
-	$line =~ s/\s+/ /g;
-	# ignore all lines that do not start with minus
-	next unless $line =~ /^-/;
-	# three minus
-	if ($line =~ /^---/) {
-	  warn "Wrong option $line in configuration file $f.\n";
-	  next;
-	}
-	if ( $line =~ /^--[ =]/ ) {
-	  warn "No option name in `$line' in configuration " .
-	    "file $f.\n";
-	  next;
-	}
-	push @Starting_Conf, $line;
-	# -- or -
-	if ($line =~ /^--?$/) {
-	  warn "`$line' is not allowed in configuration files.\n";
-	  next; }
-### main_config_params()
-	if ($line =~ /^--/) {		# line is long option
-	  my ($name, $arg);
-	  if ($line =~ /[ =]/) {	# has arg on line $line =~
-	    /^(--[^ =]+)[ =] ?(.*)$/;
-	    ($name, $arg) = ($1, $2);
-	    $arg =~ s/[\'\"]//g;
-	  } else {			# does not have an argument on line
-	    $name = $line;
-	  } $name =~ s/[\'\"]//g;
-	  unless (exists $Opts_Cmdline_Long{$name}) {
-	    # option does not exist
-	    warn "Option `$name' does not exist.\n";
-	    next LINE;
-	  }
-	  # option exists
-	  if ( $Opts_Cmdline_Long{$name} ) { # option has arg
-	    if (defined $arg) {
-	      push @conf_args, $name, $arg;
-	      next LINE;
-	    } else { warn "Option `$name' needs an argument in " .
-		       "configuration file $f\n";
-		     next LINE;
-		   }
-	  } else { # option has no arg
-	    if (defined $arg) {
-	      warn "Option `$name' may not have an argument " .
-		"in configuration file $f\n";
-	      next LINE;
-	    } else {
-	      push @conf_args, $name; next LINE;
-	    }
-	  }
-### main_config_params()
-	} else {			# line is short option or cluster
-	  $line =~ s/^-//;
-	  while ($line) {
-	    $line =~ s/^(.)//;
-	    my $opt = "-$1";
-	    next if ($opt =~ /\'\"/);
-	    if ($opt =~ /- /) {
-	      warn "Option `$conf_args[$#conf_args]' does not " .
-		"have an argument.\n";
-	      next LINE;
-	    }
-	    if ( exists $Opts_Cmdline_Short{$opt} ) {
-	      # short opt exists
-	      push @conf_args, $opt;
-	      if ( $Opts_Cmdline_Short{$opt} ) { # with arg
-		my $arg = $line;
-		$arg =~ s/^ //;
-		$arg =~ s/\'\"//g;
-		push @conf_args, "$arg";
-		next LINE;
-	      } else { # no arg
-		next;
-	      }
-	    } else { # short option does not exist
-	      warn "Wrong short option `-$opt' from " .
-		"configuration.  Rest of line ignored.\n";
-	      next LINE;
-	    }
-	  }
-	}
-      }
-      close $fh;
-    }
-  }
-
-### main_config_params()
-  #handle environment variable $GROFFER_OPT
-  my @GROFFER_OPT;
-  if ( $ENV{'GROFFER_OPT'} ) {
-    @GROFFER_OPT = `sh $File_split_env_sh GROFFER_OPT`;
-    chomp @GROFFER_OPT;
-  }
-
-  # Handle command line parameters together with $GROFFER_OPT.
-  # Options can be abbreviated, with each - as abbreviation place.
-  {
-    my @argv0 = (@GROFFER_OPT, @ARGV);
-    my @argv;
-    my $only_files = 0;
-    my $n = $#argv0;		# last element
-    my $n1 = scalar @GROFFER_OPT; # first element of @ARGV
-    my $i = 0;			# number of the element
-    my @s = ('the environment variable $GROFFER_OPT', 'the command line');
-    my $j = 0;			# index in @s, 0 before $n1, 1 then
-  ELT: while ($i <= $n) {
-      my $elt = $argv0[$i];
-      $j = 1 if $i >= $n1;
-      ++$i;
-      # remove starting and ending whitespace
-      $elt =~ s/^\s+|\s+$//g;
-      # replace whitespace by single space
-      $elt =~ s/\s+/ /g;
-
-      if ($only_files) {
-	push @Filespecs, $elt;
-	next ELT;
-      }
-
-### main_config_params()
-      if ( $elt =~ /^-$/ ) { # -
-	push @Filespecs, $elt;
-	next ELT;
-      }
-      if ($elt =~ /^--$/) { # --
-	$only_files = 1;
-	next ELT;
-      }
-
-      if ($elt =~ /^--[ =]/) { # no option name
-	warn "No option name in `$elt' at $s[$j].\n";
-	next ELT;
-      }
-      if ($elt =~ /^---/) { # wrong with three minus
-	warn "Wrong option `$elt' at $s[$j].\n";
-	next ELT;
-      }
-
-      if ($elt =~ /^--[^-]/) { # long option
-	my ($name, $opt, $abbrev, $arg);
-	if ($elt =~ /[ =]/) { # has arg on elt
-	  $elt =~ /^--([^ =]+)[ =] ?(.*)$/;
-	  ($name, $arg) = ($1, $2);
-	  $opt = "--$name";
-	  $abbrev = $name;
-	  $arg =~ s/[\'\"]//g;
-	} else {		# does not have an argument in the element
-	  $opt = $name = $elt;
-	  $name =~ s/^--//;
-	  $abbrev = $name;
-	}
-### main_config_params()
-	# remove quotes in name
-	$name =~ s/[\'\"]//g;
-	my $match = $name;
-	$match =~ s/-/[^- ]*-/g;
-	if ( exists $Opts_Cmdline_Long{$opt} ) {
-	  # option exists exactly
-	} elsif	( $Opts_Cmdline_Long_Str =~ / (${match}[^- ]*?) / ) {
-	  # option is an abbreviation without further -
-	  my $n0 = $1;
-	  if ( $Opts_Cmdline_Long_Str =~
-	       /\s(${match}[^-\s]*)\s.*\s(${match}[^-\s]*) / ) {
-	    warn "Option name `--$abbrev' is not unique: " .
-	      "--$1 --$2 \n";
-	    next ELT;
-	  }
-	  $name = $n0;
-	  $opt = "--$n0";
-	} elsif ( $Opts_Cmdline_Long_Str =~ /\s(${match}[^\s]*)\s/ ) {
-	  # option is an abbreviation with further -
-	  my $n0 = $1;
-	  if ( $Opts_Cmdline_Long_Str =~
-	       /\s(${match}[^\s]*)\s.*\s(${match}[^\s]*)\s/ ) {
-	    warn "Option name `--$abbrev' is not unique: " .
-	      "--$1 --$2 \n";
-	    next ELT;
-	  }
-	  $name = $n0;
-	  $opt = "--$n0";
-	} else {
-	  warn "Option `--$abbrev' does not exist.\n";
-	  next ELT;
-	}
-### main_config_params()
-	if ( $Opts_Cmdline_Long{$opt} ) { # option has arg
-	  if (defined $arg) {
-	    push @argv, "--$name", $arg;
-	    next ELT;
-	  } else { # $arg not defined, argument at next	element
-	    if (($i == $n1) || ($i > $n)) {
-	      warn "No argument left for option " .
-		"`$elt' at $s[$j].\n";
-	      next ELT; }
-	    # add argument as next element
-	    push @argv, "--$name", $argv0[$i];
-	    ++$i;
-	    next ELT;
-	  }		# if (defined $arg)
-	} else {	# option has no arg
-	  if (defined $arg) {
-	    warn "Option `$abbrev' may not have an argument " .
-	      "at $s[$j].\n";
-	    next ELT;
-	  } else {
-	    push @argv, "--$name";
-	    next ELT;
-	  }
-	}		# if ($Opts_Cmdline_Long{$opt})
-### main_config_params()
-      } elsif ( $elt =~ /^-[^-]/ ) { # short option or cluster
-	my $cluster = $elt;
-	$cluster =~ s/^-//;
-	while ($cluster) {
-	  $cluster =~ s/^(.)//;
-	  my $opt = "-$1";
-	  if ( exists $Opts_Cmdline_Short{$opt} ) {	# opt exists
-	    if ( $Opts_Cmdline_Short{$opt} ) {		# with arg
-	      if ($cluster) {	# has argument in this element
-		$cluster =~ s/^\s//;
-		$cluster =~ s/\'\"//g;
-		# add argument as rest of this element
-		push @argv, $opt, $cluster;
-		next ELT;
-	      } else { # argument at next element
-		if (($i == $n1) || ($i > $n)) {
-		  warn "No argument left for option " .
-		    "`$opt' at $s[$j].\n";
-		  next ELT; }
-### main_config_params()
-		# add argument as next element
-		push @argv, $opt, $argv0[$i];
-		++$i;
-		next ELT;
-	      }
-	    } else { # no arg
-	      push @argv, $opt; next;
-	    }
-	  } else { # short option does not exist
-	    warn "Wrong short option `$opt' at $s[$j].\n";
-	    next ELT;
-	  }		# if (exists $Opts_Cmdline_Short{$opt})
-	}		# while ($cluster)
-      } else {		# not an option, file name
-	push @Filespecs, $elt;
-	next;
-      }
-    }
-### main_config_params()
-    @Options = (@Manopt, @conf_args, @argv);
-    foreach my $i ( 0..$#Options ) {
-      if ( exists $Opts_Cmdline_Double{$Options[$i]} ) {
-	$Options[$i] = $Opts_Cmdline_Double{ $Options[$i] };
-      }
-    } @Filespecs = ('-') unless (@Filespecs);
-    @ARGV = (@Options, '--', @Filespecs);
-  }
-} # main_config_params()
+our @Options;
+our @Filespecs;
+our @Starting_Conf;
+our @Starting_ARGV = @ARGV;
+
+&main_config_params();
 
 if (0) {
   print STDERR "<$_>\n" foreach @ARGV;
@@ -781,655 +262,35 @@ if (0) {
 # main_parse_params()
 ########################################################################
 
-my $i; my $n;
-
 $Opt{'XRM'} = [];
 
-sub main_parse_params {
-  $i = 0;
-  $n = $#Options;
-
-  # options that are ignored in this part
-  # shell version of groffer: --debug*, --shell
-  # man options: --catman (only special in man),
-  #		 --preprocessor (force groff preproc., handled by grog),
-  #		 --prompt (prompt for less, ignored),
-  #		 --troff (-mandoc, handled by grog),
-  #		 --update (inode check, ignored)
-  my %ignored_opts = (
-		      '--catman' => 0,
-		      '--debug-func' => 0,
-		      '--debug-not-func' => 0,
-		      '--debug-lm' => 0,
-		      '--debug-shell' => 0,
-		      '--debug-stacks' => 0,
-		      '--debug-user' => 0,
-		      '--preprocessor' => 1,
-		      '--prompt' => 1,
-		      '--shell' => 1,
-		      '--troff' => 0,
-		      '--update' => 0,
-		     );
-
-### main_parse_params()
-  my %long_opts =
-    (
-     '--debug' =>
-     sub { $Debug{$_} = 1 foreach (qw/FILENAMES GROG KEEP PARAMS TMPDIR/); },
-     '--debug-filenames' => sub { $Debug{'FILENAMES'} = 1; },
-     '--debug-grog' => sub { $Debug{'GROG'} = 1; },
-     '--debug-keep' => sub { $Debug{'KEEP'} = 1; $Debug{'PARAMS'} = 1; },
-     '--debug-params' => sub { $Debug{'PARAMS'} = 1; },
-     '--debug-tmpdir' => sub { $Debug{'TMPDIR'} = 1; },
-     '--help' => sub { &usage(); $Opt{'DO_NOTHING'} = 1; },
-     '--source' => sub { $Opt{'MODE'} = 'source'; },
-     '--device' =>
-     sub { $Opt{'DEVICE'} = &_get_arg();
-	   my %modes = (
-			'ascii' => 'tty',
-			'cp1047' => 'tty',
-			'dvi'=> 'dvi',
-			'html' => 'html',
-			'latin1' => 'tty',
-			'lbp' => 'groff',
-			'lj4' => 'groff',
-			'pdf' => 'pdf',
-			'pdf2' => 'pdf2',
-			'ps' => 'ps',
-			'utf8' => 'tty',
-		       );
-	    if ($Opt{'DEVICE'} =~ /^X.*/) {
-	      $Opt{'MODE'} = 'x';
-	    } elsif ( exists $modes{ $Opt{'DEVICE'} } ) {
-	      if ( $modes{ $Opt{'DEVICE'} } eq 'tty' ) {
-		$Opt{'MODE'} = 'tty'
-		  unless ($Opt{'MODE'} eq 'text');
-	      } else {
-		$Opt{'MODE'} = $modes{ $Opt{'DEVICE'} };
-	      }
-	    } else {
-	      # for all elements not in %modes
-	      $Opt{'MODE'} = 'groff';
-	    }
-	  },
-### main_parse_params()
-     '--version' => sub { &version(); $Opt{'DO_NOTHING'} = 1; },
-     '--intermediate-output' => sub { $Opt{'Z'} = 1; },
-     '--all' => sub { $Opt{'ALL'} = 1; },
-     '--apropos' =>		# run apropos
-     sub { $Opt{'APROPOS'} = 1;
-	   delete $Opt{'APROPOS_SECTIONS'};
-	   delete $Opt{'WHATIS'}; },
-     '--apropos-data' =>	# run apropos for data sections
-     sub { $Opt{'APROPOS'} = 1;
-	   $Opt{'APROPOS_SECTIONS'} = '457';
-	   delete $Opt{'WHATIS'}; },
-     '--apropos-devel' =>	# run apropos for devel sections
-     sub { $Opt{'APROPOS'} = 1;
-	   $Opt{'APROPOS_SECTIONS'} = '239';
-	   delete $Opt{'WHATIS'}; },
-     '--apropos-progs' =>	# run apropos for prog sections
-     sub { $Opt{'APROPOS'} = 1;
-	   $Opt{'APROPOS_SECTIONS'} = '168';
-	   delete $Opt{'WHATIS'}; },
-     '--ascii' =>
-     sub { push @Addopts_Groff, '-mtty-char';
-	   $Opt{'MODE'} = 'text' unless $Opt{'MODE'}; },
-     '--auto' =>		# the default automatic mode
-     sub { delete $Opt{'MODE'}; },
-     '--bordercolor' =>		# border color for viewers, arg
-     sub { $Opt{'BD'} = &_get_arg(); },
-     '--background' =>		# background color for viewers, arg
-     sub { $Opt{'BG'} = &_get_arg(); },
-### main_parse_params()
-     '--borderwidth' =>		# border width for viewers, arg
-     sub { $Opt{'BW'} = &_get_arg(); },
-     '--default' =>		# reset variables to default
-     sub { %Opt = (); },
-     '--default-modes' =>	# sequence of modes in auto mode; arg
-     sub { $Opt{'DEFAULT_MODES'} = &_get_arg(); },
-     '--display' =>		# set X display, arg
-     sub { $Opt{'DISPLAY'} = &_get_arg(); },
-     '--do-nothing' => sub { $Opt{'DO_NOTHING'} = 1; },
-     '--dvi' => sub { $Opt{'MODE'} = 'dvi'; },
-     '--extension' =>		# the extension for man pages, arg
-     sub { $Opt{'EXTENSION'} = &_get_arg(); },
-     '--foreground' =>		# foreground color for viewers, arg
-     sub { $Opt{'FG'} = &_get_arg(); },
-     '--font' =>		# set font for viewers, arg
-     sub { $Opt{'FN'} = &_get_arg(); },
-     '--geometry' =>		# window geometry for viewers, arg
-     sub { $Opt{'GEOMETRY'} = &_get_arg(); },
-     '--groff' => sub { $Opt{'MODE'} = 'groff'; },
-     '--html' => sub { $Opt{'MODE'} = 'html'; },
-     '--iconic' =>		# start viewers as icons
-     sub { $Opt{'ICONIC'} = 1; },
-     '--locale' =>		# set language for man pages, arg
-     # argument is xx[_territory[.codeset[@modifier]]] (ISO 639,...)
-     sub { $Opt{'LANG'} = &_get_arg(); },
-     '--local-file' =>		# force local files; same as `--no-man'
-     sub { delete $Man{'ENABLE'}; delete $Man{'FORCE'}; },
-     '--location' =>		# print file locations to stderr
-     sub { $Opt{'LOCATION'} = 1; },
-### main_parse_params()
-     '--man' =>			# force all file params to be man pages
-     sub { $Man{'ENABLE'} = 1; $Man{'FORCE'} = 1; },
-     '--manpath' =>		# specify search path for man pages, arg
-     # arg is colon-separated list of directories
-     sub { $Opt{'MANPATH'} = &_get_arg(); },
-     '--mode' =>		# display mode
-     sub { my $arg = &_get_arg();
-	   my %modes = ( '' => '',
-			 'auto' => '',
-			 'groff' => 'groff',
-			 'html' => 'html',
-			 'www' => 'html',
-			 'dvi' => 'dvi',
-			 'pdf' => 'pdf',
-			 'pdf2' => 'pdf2',
-			 'ps' => 'ps',
-			 'text' => 'text',
-			 'tty' => 'tty',
-			 'X' => 'x',
-			 'x' => 'x',
-			 'Q' => 'source',
-			 'source' => 'source',
-		       );
-	   if ( exists $modes{$arg} ) {
-	     if ( $modes{$arg} ) {
-	       $Opt{'MODE'} = $modes{$arg};
-	     } else {
-	       delete $Opt{'MODE'};
-	     }
-	   } else {
-	     warn "Unknown mode in `$arg' for --mode\n";
-	   }
-	 },
-### main_parse_params()
-     '--no-location' =>		# disable former call to `--location'
-     sub { delete $Opt{'LOCATION'}; },
-     '--no-man' =>		# disable search for man pages
-     sub { delete $Man{'ENABLE'}; delete $Man{'FORCE'}; },
-     '--no-special' =>		# disable some special former calls
-     sub { delete $Opt{'ALL'}; delete $Opt{'APROPOS'};
-	   delete $Opt{'WHATIS'}; },
-     '--pager' =>		# set paging program for tty mode, arg
-     sub { $Opt{'PAGER'} = &_get_arg(); },
-     '--pdf' => sub { $Opt{'MODE'} = 'pdf'; },
-     '--pdf2' => sub { $Opt{'MODE'} = 'pdf2'; },
-     '--print' =>		# print argument, for argument test
-     sub { my $arg = &_get_arg; print STDERR "$arg\n"; },
-     '--ps' => sub { $Opt{'MODE'} = 'ps'; },
-     '--resolution' =>		# set resolution for X devices, arg
-     sub { my $arg = &_get_arg();
-	   my %res = ( '75' => 75,
-		       '75dpi' => 75,
-		       '100' => 100,
-		       '100dpi' => 100,
-		     );
-	   if (exists $res{$arg}) {
-	     $Opt{'RESOLUTION'} = $res{$arg};
-	   } else {
-	     warn "--resolution allows only 75, 75dpi, " .
-	       "100, 100dpi as argument.\n";
-	   }
-	 },
-### main_parse_params()
-     '--rv' => sub { $Opt{'RV'} = 1; },
-     '--sections' =>		# specify sections for man pages, arg
-     # arg is a `:'-separated (colon) list of section names
-     sub { my $arg = &_get_arg();
-	   my @arg = split /:/, $arg;
-	   my $s;
-	   foreach (@arg) {
-	     /^(.)/;
-	     my $c = $1;
-	     if ($Man{'AUTO_SEC_CHARS'} =~ /$c/) {
-	       $s .= $c;
-	     } else {
-	       warn "main_parse_params(): not a man section `$c';";
-	     }
-	   }
-	   $Opt{'SECTIONS'} = $s; },
-     '--systems' =>		# man pages for different OS's, arg
-     # argument is a comma-separated list
-     sub { $Opt{'SYSTEMS'} = &_get_arg(); },
-     '--text' =>		# text mode without pager
-     sub { $Opt{'MODE'} = 'text'; },
-     '--title' =>		# title for X viewers; arg
-     sub { my $arg = &_get_arg();
-	   if ($arg) {
-	     if ( $Opt{'TITLE'} ) {
-	       $Opt{'TITLE'} = "$Opt{'TITLE'} $arg";
-	     } else {
-	       $Opt{'TITLE'} = $arg;
-	     }
-	   }
-	 },
-     '--text-device' =>		# device for tty mode; arg
-     sub { $Opt{'TEXT_DEVICE'} = &_get_arg(); },
-     '--to-stdout' =>		# print mode file without display
-     sub { $Opt{'STDOUT'} = 1; },
-     '--tty' =>			# tty mode, text with pager
-     sub { $Opt{'MODE'} = 'tty'; },
-     '--viewer' =>		# viewer for actiual mode
-     sub { $Opt{'VIEWER'} = &_get_arg(); },
-     '--whatis' => sub { delete $Opt{'APROPOS'}; $Opt{'WHATIS'} = 1; },
-     '--x' => sub { $Opt{'MODE'} = 'x'; },
-### main_parse_params()
-     '--xrm' =>			# pass X resource string, arg
-     sub { my $arg = &_get_arg(); push @{$Opt{'XRM'}}, $arg if $arg; },
-    );
-
-#     '--dvi-viewer' =>		# viewer program for dvi mode; arg
-#     sub { $Opt{'VIEWER_DVI'} = &_get_arg(); },
-#     '--html-viewer' =>		# viewer program for html mode; arg
-#     sub { $Opt{'VIEWER_HTML'} = &_get_arg(); },
-#     '--pdf-viewer' =>		# viewer program for pdf and pdf2 mode; arg
-#     sub { $Opt{'VIEWER_PDF'} = &_get_arg(); },
-#     '--ps-viewer' =>		# viewer program for ps mode; arg
-#     sub { $Opt{'VIEWER_PS'} = &_get_arg(); },
-#     '--x-viewer' =>		# viewer program for x mode; arg
-#     sub { $Opt{'VIEWER_X'} = &_get_arg(); },
-
-  my %short_opts = (
-		    '-V' => sub { $Opt{'V'} = 1; },
-		    '-X' => sub { $Opt{'X'} = 1; },
-		   );
-
-  if (0) {
-    # check if all options are handled in parse parameters
-
-    # short options
-    my %these_opts = (%ignored_opts, %short_opts, %Opts_Groff_Short,
-		      %Opts_Cmdline_Double);
-    foreach my $key (keys %Opts_Cmdline_Short) {
-      warn "unused option: $key" unless exists $these_opts{$key};
-    }
-
-    # long options
-    %these_opts = (%ignored_opts, %long_opts, %Opts_Cmdline_Double);
-    foreach my $key (keys %Opts_Cmdline_Long) {
-      warn "unused option: $key" unless exists $these_opts{$key};
-    }
-  }				# if (0)
-
-### main_parse_params()
- OPTION: while ($i <= $n) {
-    my $opt = $Options[$i];
-    ++$i;
-    if ($opt =~ /^-([^-])$/) {	# single minus for short option
-      if (exists $short_opts{$opt}) { # short option handled by hash
-	$short_opts{$opt}->();
-	next OPTION;
-      } else {			# $short_opts{$opt} does not exist
-	my $c = $1;		# the option character
-	next OPTION unless $c;
-	if ( exists $Opts_Groff_Short{ $opt } ) { # groff short option
-	  if ( $Opts_Groff_Short{ $opt } ) { # option has argument
-	    my $arg = $Options[$i];
-	    ++$i;
-	    push @Addopts_Groff, $opt, $arg;
-	    next OPTION;
-	  } else {		# no argument for this option
-	    push @Addopts_Groff, $opt;
-	    next OPTION;
-	  }
-	} elsif ( exists $Opts_Cmdline_Short{ $opt } ) {
-	  # is a groffer short option
-	  warn "Groffer option $opt not handled " .
-	    "in parameter parsing";
-	} else {
-	  warn "$opt is not a groffer option.\n";
-	}
-      }				# if (exists $short_opts{$opt})
-    }				# if ($opt =~ /^-([^-])$/)
-    # now it is a long option
-
-    # handle ignored options
-    if ( exists $ignored_opts{ $opt } ) {
-      ++$i if ( $ignored_opts{ $opt } );
-      next OPTION;
-    }
-### main_parse_params()
-
-    # handle normal long options
-    if (exists $long_opts{$opt}) {
-      $long_opts{$opt}->();
-    } else {
-      warn "Unknown option $opt.\n";
-    }
-    next OPTION;
-  }				# while ($i <= $n)
-
-  if ($Debug{'PARAMS'}) {
-    print STDERR '$MANOPT: ' . "$ENV{'MANOPT'}\n" if $ENV{'MANOPT'};
-    foreach (@Starting_Conf) {
-      print STDERR "configuration: $_\n";
-    }
-    print STDERR '$GROFFER_OPT: ' . "$ENV{'GROFFER_OPT'}\n"
-      if $ENV{'GROFFER_OPT'};
-    print STDERR "command line: @Starting_ARGV\n";
-    print STDERR "parameters: @ARGV\n";
-  }
-
-  if ( $Opt{'WHATIS'} ) {
-    die "main_parse_params(): cannot handle both `whatis' and `apropos';"
-      if $Opt{'APROPOS'};
-    $Man{'ALL'} = 1;
-    delete $Opt{'APROPOS_SECTIONS'};
-  }
-
-  if ( $Opt{'DO_NOTHING'} ) {
-    exit;
-  }
-
-  if ( $Opt{'DEFAULT_MODES'} ) {
-    @Default_Modes = split /,/, $Opt{'DEFAULT_MODES'};
-  }
-}				# main_parse_params()
-
-
-sub _get_arg {
-  if ($i > $n) {
-    die '_get_arg(): No argument left for last option;';
-  }
-  my $arg = $Options[$i];
-  ++$i;
-  $arg;
-}				# _get_arg() of main_parse_params()
+our $i = 0;
+our $n = $#Options;
+
+&main_parse_params();
 
 
 ########################################################################
 # main_set_mode()
 ########################################################################
 
-my $Viewer_Background;
-my $PDF_Did_Not_Work;
-my $PDF_Has_gs;
-my $PDF_Has_ps2pdf;
-my %Display = ('MODE' => '',
+our $Viewer_Background;
+our $PDF_Did_Not_Work;
+our $PDF_Has_gs;
+our $PDF_Has_ps2pdf;
+our %Display = ('MODE' => '',
 	       'PROG' => '',
 	       'ARGS' => ''
 	      );
 
-sub main_set_mode {
-  my @modes;
-
-  # set display
-  $ENV{'DISPLAY'} = $Opt{'DISPLAY'} if $Opt{'DISPLAY'};
-
-  push @Addopts_Groff, '-V' if $Opt{'V'};
-
-  if ( $Opt{'X'} ) {
-    $Display{'MODE'} = 'groff';
-    push @Addopts_Groff, '-X';
-  }
-
-  if ( $Opt{'Z'} ) {
-    $Display{'MODE'} = 'groff';
-    push @Addopts_Groff, '-Z';
-  }
-
-  $Display{'MODE'} = 'groff' if $Opt{'MODE'} and $Opt{'MODE'} eq 'groff';
-
-  return 1 if $Display{'MODE'} and $Display{'MODE'} eq 'groff';
-
-### main_set_mode()
-  if ($Opt{'MODE'}) {
-    if ($Opt{'MODE'} =~ /^(source|text|tty)$/) {
-      $Display{'MODE'} = $Opt{'MODE'};
-      return 1;
-    }
-    $Display{'MODE'} = $Opt{'MODE'} if $Opt{'MODE'} =~ /^html$/;
-    @modes = ($Opt{'MODE'});
-  } else {			# empty mode
-    if ($Opt{'DEVICE'}) {
-      if ($Opt{'DEVICE'} =~ /^X/) {
-	&is_X() || die "no X display found for device $Opt{'DEVICE'}";
-	$Display{'MODE'} = 'x';
-	return 1;
-      }
-      ;
-      if ($Opt{'DEVICE'} =~ /^(ascii|cp1047|latin1|utf8)$/) {
-	$Display{'MODE'} ne 'text' and $Display{'MODE'} = 'tty';
-	return 1;
-      }
-      ;
-      unless (&is_X) {
-	$Display{'MODE'} = 'tty';
-	return 1;
-      }
-    }				# check device
-    @modes = @Default_Modes;
-  }				# check mode
-
-### main_set_mode()
- LOOP: foreach my $m (@modes) {
-    $Viewer_Background = 0;
-    if ($m =~ /^(test|tty|X)$/) {
-      $Display{'MODE'} = $m;
-      return 1;
-    } elsif ($m eq 'pdf') {
-      &_get_prog_args($m) ? return 1: next LOOP;
-    } elsif ($m eq 'pdf2') {
-      next LOOP if $PDF_Did_Not_Work;
-      $PDF_Has_gs = &where_is_prog('gs') ? 1 : 0
-	unless (defined $PDF_Has_gs);
-      $PDF_Has_ps2pdf = &where_is_prog('ps2pdf') ? 1 : 0
-	unless (defined $PDF_Has_ps2pdf);
-      if ( (! $PDF_Has_gs) and (! $PDF_Has_ps2pdf) ) {
-	$PDF_Did_Not_Work = 1;
-	next LOOP;
-      }
-
-      if (&_get_prog_args($m)) {
-	return 1;
-      } else {
-	$PDF_Did_Not_Work = 1;
-	next LOOP;
-      }
-    } else {			# other modes
-      &_get_prog_args($m) ? return 1 : next LOOP;
-    }				# if $m
-  }				# loop: foreach
-  die 'set mode: no suitable display mode found under ' .
-    join(', ', @modes) . ';' unless $Display{'MODE'};
-  die 'set mode: no viewer available for mode ' . $Display{'MODE'} . ';'
-    unless $Display{'PROG'};
-  0;
-} # main_set_mode()
-
-
-########################################################################
-# functions to main_set_mode()
-########################################################################
-
-##########
-# _get_prog_args(<MODE>)
-#
-# Simplification for loop in set mode.
-#
-# Globals in/out: $Viewer_Background
-# globals in    : $Opt{VIEWER}, $VIEWER_X{<MODE>},
-#                 $Viewer_tty{<MODE>}
-#
-## globals in    : $Opt{VIEWER_<MODE>}, $VIEWER_X{<MODE>},
-##                 $Viewer_tty{<MODE>}
-##
-sub _get_prog_args {
-  my $n = @_;
-  die "_get_prog_args(): one argument is needed; you used $n;"
-    unless $n == 1;
-
-  my $mode = lc($_[0]);
-  my $MODE = uc($mode);
-  $MODE = 'PDF' if ( $MODE =~ /^PDF2$/ );
-
-  my $xlist = $Viewer_X{$MODE};
-  my $ttylist = $Viewer_tty{$MODE};
-
-#  my $vm = "VIEWER_${MODE";
-  my $vm = "VIEWER";
-  my $opt = $Opt{$vm};
-
-  if ($opt) {
-    my %prog = &where_is_prog($opt);
-    my $prog_ref = \%prog;
-    unless (%prog) {
-      warn "_get_prog_args(): `$opt' is not an existing program;";
-      return 0;
-    }
-
-    # $prog from $opt is an existing program
-
-### _get_prog_args() of main_set_mode()
-    if (&is_X) {
-      if ( &_check_prog_on_list($prog_ref, $xlist) ) {
-	$Viewer_Background = 1;
-      } else {
-	$Viewer_Background = 0;
-	&_check_prog_on_list($prog_ref, $ttylist);
-      }
-    } else {			# is not X
-      $Viewer_Background = 0;
-      &_check_prog_on_list($prog_ref, $ttylist);
-    }				# if is X
-  } else {			# $opt is empty
-    $Viewer_Background = 0;
-    my $x;
-    if (&is_X) {
-      $x = &_get_first_prog($xlist);
-      $Viewer_Background = 1 if $x;
-    } else {			# is not X
-      $x = &_get_first_prog($ttylist);
-    }				# test on X
-    $Display{'MODE'} = $mode if $x;
-    return $x;
-  }
-  $Display{'MODE'} = $mode;
-  return 1;
-} # _get_prog_args() of main_set_mode()
-
-
-##########
-# _get_first_prog(<prog_list_ref>)
-#
-# Retrieve from the elements of the list in the argument the first
-# existing program in $PATH.
-#
-# Local function of main_set_mode().
-#
-# Return  : `0' if not a part of the list, `1' if found in the list.
-#
-sub _get_first_prog {
-  my $n = @_;
-  die "_get_first_prog(): one argument is needed; you used $n;"
-    unless $n == 1;
-
-  foreach my $i (@{$_[0]}) {
-    next unless $i;
-    my %prog = &where_is_prog($i);
-    if (%prog) {
-      $Display{'PROG'} = $prog{'fullname'};
-      $Display{'ARGS'} = $prog{'args'};
-      return 1;
-    }
-  }
-  return 0;
-} # _get_first_prog() of main_set_mode()
-
-
-##########
-# _check_prog_on_list (<prog-hash-ref> <prog_list_ref>)
-#
-# Check whether the content of <prog-hash-ref> is in the list
-# <prog_list_ref>.
-# The globals are set correspondingly.
-#
-# Local function for main_set_mode().
-#
-# Arguments: 2
-#
-# Return  : `0' if not a part of the list, `1' if found in the list.
-# Output  : none
-#
-# Globals in    : $Viewer_X{<MODE>}, $Viewer_tty{<MODE>}
-# Globals in/out: $Display{'PROG'}, $Display{'ARGS'}
-#
-sub _check_prog_on_list {
-  my $n = @_;
-  die "_get_first_prog(): 2 arguments are needed; you used $n;"
-    unless $n == 2;
-
-  my %prog = %{$_[0]};
-
-  $Display{'PROG'} = $prog{'fullname'};
-  $Display{'ARGS'} = $prog{'args'};
-
-  foreach my $i (@{$_[1]}) {
-    my %p = &where_is_prog($i);
-    next unless %p;
-    next unless $Display{'PROG'} eq $p{'fullname'};
-    if ($p{'args'}) {
-      if ($Display{'ARGS'}) {
-	$Display{'ARGS'} = $p{'args'};
-      } else {
-	$Display{'ARGS'} = "$p{'args'} $Display{'ARGS'}";
-      }
-    }				# if args
-    return 1;
-  }				# foreach $i
-  # prog was not in the list
-  return 0;
-} # _check_prog_on_list() of main_set_mode()
+&main_set_mode();
 
 
 ########################################################################
 # groffer temporary directory, main_temp()
 ########################################################################
 
-sub main_temp {
-  my $template = 'groffer_' . "$$" . '_XXXX';
-  foreach ($ENV{'GROFF_TMPDIR'}, $ENV{'TMPDIR'}, $ENV{'TMP'}, $ENV{'TEMP'},
-	   $ENV{'TEMPDIR'}, File::Spec->catfile($ENV{'HOME'}, 'tmp')) {
-    if ($_ && -d $_ && -w $_) {
-      if ($Debug{'KEEP'}) {
-	eval { $tmpdir = tempdir( $template, DIR => "$_" ); };
-      } else {
-	eval { $tmpdir = tempdir( $template,
-				  CLEANUP => 1, DIR => "$_" ); };
-      }
-      last if $tmpdir;
-    }
-  }
-  $tmpdir = tempdir( $template, CLEANUP => 1, DIR => File::Spec->tmpdir )
-    unless ($tmpdir);
-
-  # see Lerning Perl, page 205, or Programming Perl, page 413
-  # $SIG{'INT'} is for Ctrl-C interruption
-  $SIG{'INT'} = sub { &clean_up(); die "interrupted..."; };
-  $SIG{'QUIT'} = sub { &clean_up(); die "quit..."; };
-
-  if ($Debug{'TMPDIR'}) {
-    if ( $Debug{'KEEP'}) {
-      print STDERR "temporary directory is kept: $tmpdir\n";
-    } else {
-      print STDERR "temporary directory will be cleaned: $tmpdir\n";
-    }
-  }
-
-  # further argument: SUFFIX => '.sh'
-  if ($Debug{'KEEP'}) {
-    ($fh_cat, $tmp_cat) = tempfile(',cat_XXXX', DIR => $tmpdir);
-    ($fh_stdin, $tmp_stdin) = tempfile(',stdin_XXXX', DIR => $tmpdir);
-  } else {
-    ($fh_cat, $tmp_cat) = tempfile(',cat_XXXX', UNLINK => 1,
-				   DIR => $tmpdir);
-    ($fh_stdin, $tmp_stdin) = tempfile(',stdin_XXXX', UNLINK => 1,
-				       DIR => $tmpdir);
-  }
-}				# main_temp()
+&main_temp();
 
 
 ########################################################################
@@ -1437,788 +298,35 @@ sub main_temp {
 ########################################################################
 
 ########################################################################
-# further functions needed for main_do_fileargs()
+# main_do_fileargs() and related subs
 ########################################################################
 
-my @REG_TITLE = ();
-
-##########
-# register_file(<filename>)
-#
-# Write a found file and register the title element.
-#
-# Arguments: 1: a file name
-# Output: none
-#
-sub register_file {
-  my $n = @_;
-  die "register_file(): one argument is needed; you used $n;"
-    unless $n == 1;
-  die 'register_file(): file name is empty;' unless $_[0];
-
-  if ($_[0] eq '-') {
-    &to_tmp($tmp_stdin) && &register_title('stdin');
-  } else {
-    &to_tmp($_[0]) && &register_title($_[0]);
-  }
-  1;
-}				# register_file()
-
-
-##########
-# register_title(<filespec>)
-#
-# Create title element from <filespec> and append to $_REG_TITLE_LIST.
-# Basename is created.
-#
-# Globals in/out: @REG_TITLE
-#
-# Variable prefix: rt
-#
-sub register_title {
-  my $n = @_;
-  die "register_title(): one argument is needed; you used $n;"
-    unless $n == 1;
-  return 1 unless $_[0];
-
-  return 1 if scalar @REG_TITLE > 3;
-
-  my $title = &get_filename($_[0]);
-  $title =~ s/\s/_/g;
-  $title =~ s/\.bz2$//g;
-  $title =~ s/\.gz$//g;
-  $title =~ s/\.Z$//g;
-
-  if ($Debug{'FILENAMES'}) {
-    if ($_[0] eq 'stdin') {
-      print STDERR "register_title(): file title is stdin\n";
-    } else {
-      print STDERR "register_title(): file title is $title\n";
-    }
-  }				# if ($Debug{'FILENAMES'})
-
-  return 1 unless $title;
-  push @REG_TITLE, $title;
-  1;
-}				# register_title()
-
-
-##########
-# save_stdin()
-#
-# Store standard input to temporary file (with decompression).
-#
-sub save_stdin {
-  my ($fh_input, $tmp_input);
-  $tmp_input = File::Spec->catfile($tmpdir, ',input');
-  open $fh_input, ">$tmp_input" or
-    die "save_stdin(): could not open $tmp_input";
-  foreach (<STDIN>) {
-    print $fh_input $_;
-  }
-  close $fh_input;
-  open $fh_stdin, ">$tmp_stdin" or
-    die "save_stdin(): could not open $tmp_stdin";
-  foreach ( &cat_z("$tmp_input") ) {
-    print $fh_stdin "$_";
-  }
-  close $fh_stdin;
-  unlink $tmp_input unless $Debug{'KEEP'};
-}				# save_stdin()
+our @REG_TITLE = ();
 
+&main_do_fileargs();
 
-########################################################################
-# main_do_fileargs()
-########################################################################
-
-sub main_do_fileargs {
-  &special_setup();
-  if ($Opt{'APROPOS'}) {
-    if ($No_Filespecs) {
-      &apropos_filespec();
-      return 1;
-    }
-  } else {
-    foreach (@Filespecs) {
-      if (/^-$/) {
-	&save_stdin();
-	last;
-      }
-    }				# foreach (@Filespecs)
-  }				# if ($Opt{'APROPOS'})
-
-  my $section = '';
-  my $ext = '';
-  my $twoargs = 0;
-  my $filespec;
-  my $former_arg;
-
- FILESPEC: foreach (@Filespecs) {
-    $filespec = $_;
-    $Filespec_Arg = $_;
-    $Filespec_Is_Man = 0;
-    $Manspec = '';
-    $Special_Filespec = 0;
-
-    next FILESPEC unless $filespec;
-
-### main_do_fileargs()
-    if ($twoargs) {		# second run
-      $twoargs = 0;
-      # $section and $ext are kept from earlier run
-      my $h = { 'name' => $filespec, 'sec' => $section, 'ext' => $ext };
-      &man_setup();
-      if ( &is_man($h) ) {
-	$Filespec_Arg = "$former_arg $Filespec_Arg";
-	&special_filespec();
-	$Filespec_Is_Man = 1;
-	&man_get($h);
-	next FILESPEC;
-      } else {
-	warn "main_do_fileargs(): $former_arg is neither a file nor a " .
-	  "man page nor a section argument for $filespec;";
-      }
-    }
-    $twoargs = 0;
-
-    if ( $Opt{'APROPOS'} ) {
-      &apropos_filespec();
-      next FILESPEC;
-    }
-
-    if ($filespec eq '-') {
-      &register_file('-');
-      &special_filespec();
-      next FILESPEC;
-    } elsif ( &get_filename($filespec) ne $filespec ) { # path with dir
-      &special_filespec();
-      if (-f $filespec && -r $filespec) {
-	&register_file($filespec)
-      } else {
-	warn "main_do_fileargs: the argument $filespec is not a file;";
-      }
-      next FILESPEC;
-    } else {			# neither `-' nor has dir
-      # check whether filespec is an existing file
-      unless ( $Man{'FORCE'} ) {
-	if (-f $filespec && -r $filespec) {
-	  &special_filespec();
-	  &register_file($filespec);
-	  next FILESPEC;
-	}
-      }
-    }				# if ($filespec eq '-')
-
-### main_do_fileargs()
-    # now it must be a man page pattern
-
-    if ($Macro_Pkg and $Macro_Pkg ne '-man') {
-      warn "main_do_fileargs(): $filespec is not a file, " .
-	"man pages are ignored due to $Macro_Pkg;";
-      next FILESPEC;
-    }
-
-    # check for man page
-    &man_setup();
-    unless ( $Man{'ENABLE'} ) {
-      warn "main_do_fileargs(): the argument $filespec is not a file;";
-      next FILESPEC;
-    }
-    my $errmsg;
-    if ( $Man{'FORCE'} ) {
-      $errmsg = 'is not a man page';
-    } else {
-      $errmsg = 'is neither a file nor a man page';
-    }
-
-    $Filespec_Is_Man = 1;
-
-### main_do_fileargs()
-    # test filespec with `man:...' or `...(...)' on man page
-
-    my @names = ($filespec);
-    if ($filespec =~ /^man:(.*)$/) {
-      push @names, $1;
-    }
-
-    foreach my $i (@names) {
-      next unless $i;
-      my $h = { 'name' => $i };
-      if ( &is_man($h) ) {
-	&special_filespec();
-	&man_get($h);
-	next FILESPEC;
-      }
-      if ( $i =~ /^(.*)\(([$Man{'AUTO_SEC_CHARS'}])(.*)\)$/ ) {
-	$h = { 'name' => $1, 'sec' => $2, 'ext' => $3 };
-	if ( &is_man($h) ) {
-	  &special_filespec();
-	  &man_get($h);
-	  next FILESPEC;
-	}
-      }				# if //
-      if ( $i =~ /^(.*)\.([$Man{'AUTO_SEC_CHARS'}])(.*)$/ ) {
-	$h = { 'name' => $1, 'sec' => $2, 'ext' => $3 };
-	if ( &is_man($h) ) {
-	  &special_filespec();
-	  &man_get($h);
-	  next FILESPEC;
-	}
-      }				# if //
-    }				# foreach (@names)
-
-### main_do_fileargs()
-    # check on "s name", where "s" is a section with or without an extension
-    if ($filespec =~ /^([$Man{'AUTO_SEC_CHARS'}])(.*)$/) {
-      unless ( $Man{'ENABLE'} ) {
-	warn "main_do_fileargs(): $filespec $errmsg;";
-	next FILESPEC;
-      }
-      $twoargs = 1;
-      $section = $1;
-      $ext = $2;
-      $former_arg = $filespec;
-      next FILESPEC;
-    } else {
-      warn "main_do_fileargs(): $filespec $errmsg;";
-      next FILESPEC;
-    }
-  }				# foreach (@Filespecs)
-
-  if ($twoargs) {
-    warn "main_do_fileargs(): no filespec arguments left for second run;";
-    return 0;
-  }
-  1;
-} # main_do_fileargs()
 
 
 ########################################################################
 # main_set_resources()
 ########################################################################
 
-##########
-# main_set_resources ()
-#
-# Determine options for setting X resources with $_DISPLAY_PROG.
-#
-# Globals: $Display{PROG}, $Output_File_Name
-#
-sub main_set_resources {
-  # $prog   viewer program
-  # $rl     resource list
-  unlink $tmp_stdin unless $Debug{'KEEP'};
-  $Output_File_Name = '';
-
-  my @title = @REG_TITLE;
-  @title = ($Opt{'TITLE'}) unless @title;
-  @title = () unless @title;
-
-  foreach my $n (@title) {
-    next unless $n;
-    $n =~ s/^,+// if $n =~ /^,/;
-    next unless $n;
-    $Output_File_Name = $Output_File_Name . ',' if $Output_File_Name;
-    $Output_File_Name = "$Output_File_Name$n";
-  }				# foreach (@title)
-
-  $Output_File_Name =~ s/^,+//;
-  $Output_File_Name = '-' unless $Output_File_Name;
-  $Output_File_Name = File::Spec->catfile($tmpdir, $Output_File_Name);
-
-### main_set_resources()
-  unless ($Display{'PROG'}) {	# for example, for groff mode
-    $Display{'ARGS'} = '';
-    return 1;
-  }
-
-  my %h = &where_is_prog($Display{'PROG'});
-  my $prog = $h{'file'};
-  if ($Display{'ARGS'}) {
-    $Display{'ARGS'} = "$h{'args'} $Display{'ARGS'}";
-  } else {
-    $Display{'ARGS'} = $h{'args'};
-  }
-
-  my @rl = ();
-
-  if ($Opt{'BD'}) {
-    if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) {
-      push @rl, '-bd', $Opt{'BD'};
-    }
-  }
-
-  if ($Opt{'BG'}) {
-    if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) {
-      push @rl, '-bg', $Opt{'BG'};
-    } elsif ($prog eq 'kghostview') {
-      push @rl, '--bg', $Opt{'BG'};
-    } elsif ($prog eq 'xpdf') {
-      push @rl, '-papercolor', $Opt{'BG'};
-    }
-  }
-
-### main_set_resources()
-  if ($Opt{'BW'}) {
-    if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) {
-      push @rl, '-bw', $Opt{'BW'};
-    }
-  }
-
-  if ($Opt{'FG'}) {
-    if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) {
-      push @rl, '-fg', $Opt{'FG'};
-    } elsif ($prog eq 'kghostview') {
-      push @rl, '--fg', $Opt{'FG'};
-    }
-  }
-
-  if ($Opt{'FN'}) {
-    if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) {
-      push @rl, '-fn', $Opt{'FN'};
-    } elsif ($prog eq 'kghostview') {
-      push @rl, '--fn', $Opt{'FN'};
-    }
-  }
-
-  if ($Opt{'GEOMETRY'}) {
-    if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) {
-      push @rl, '-geometry', $Opt{'GEOMETRY'};
-    } elsif ($prog eq 'kghostview') {
-      push @rl, '--geometry', $Opt{'GEOMETRY'};
-    }
-  }
-
-### main_set_resources()
-  if ($Opt{'RESOLUTION'}) {
-    if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) {
-      push @rl, '-resolution', $Opt{'RESOLUTION'};
-    } elsif ($prog eq 'xpdf') {
-      if ($Display{'PROG'} !~ / -z/) { # if xpdf does not have option -z
-	if ($Default_Resolution == 75) {
-	  push @rl, '-z', 104;
-	} elsif ($Default_Resolution == 100) { # 72dpi is '100'
-	  push @rl, '-z', 139;
-	}
-      }
-    }				# if $prog
-  } else {			# empty $Opt{RESOLUTION}
-    $Opt{'RESOLUTION'} = $Default_Resolution;
-    if ($prog =~ /^(gxditview|xditview)$/) {
-      push @rl, '-resolution', $Default_Resolution;
-    } elsif ($prog eq 'xpdf') {
-      if ($Display{'PROG'} !~ / -z/) { # if xpdf does not have option -z
-	if ($Default_Resolution == 75) {
-	  push @rl, '-z', 104;
-	} elsif ($Default_Resolution == 100) { # 72dpi is '100'
-	  push @rl, '-z', 139;
-	}
-      }
-    }				# if $prog
-  }				# if $Opt{RESOLUTION}
-
-  if ($Opt{'ICONIC'}) {
-    if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) {
-      push @rl, '-iconic';
-    }
-  }
-
-### main_set_resources()
-  if ($Opt{'RV'}) {
-    if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi)$/) {
-      push @rl, '-rv';
-    }
-  }
-
-  if (@{$Opt{'XRM'}}) {
-    if ($prog =~ /^(ghostview|gv|gxditview|xditview|xdvi|xpdf)$/) {
-      foreach (@{$Opt{'XRM'}}) {
-	push @rl, '-xrm', $_;
-      }
-    }
-  }
-
-  if (@title) {
-    if ($prog =~ /^(gxditview|xditview)$/) {
-      push @rl, '-title', $Output_File_Name;
-    }
-  }
-
-  my $args = join ' ', @rl;
-  if ($Display{'ARGS'}) {
-    $Display{'ARGS'} = "$args $Display{'ARGS'}";
-  } else {
-    $Display{'ARGS'} = $args;
-  }
-
-  1;
-}				# main_set_resources()
+&main_set_resources();
 
 
 ########################################################################
 # set resources
 ########################################################################
 
-my $groggy;
-my $modefile;
-my $addopts;
-
-##########
-# main_display ()
-#
-# Do the actual display of the whole thing.
-#
-# Globals:
-#   in: $Display{MODE}, $Opt{DEVICE}, @Addopts_Groff,
-#       $fh_cat, $tmp_cat, $Opt{PAGER}, $Output_File_Name
-#
-sub main_display {
-  $addopts = join ' ', @Addopts_Groff;
-
-  if (-z $tmp_cat) {
-    warn "groffer: empty input\n";
-    &clean_up();
-    return 1;
-  }
-
-  $modefile = $Output_File_Name;
-
-  # go to the temporary directory to be able to access internal data files
-  chdir $tmpdir;
-
-### main_display()
- SWITCH: foreach ($Display{'MODE'}) {
-    /^groff$/ and do {
-      push @Addopts_Groff, "-T$Opt{'DEVICE'}" if $Opt{'DEVICE'};
-      $addopts = join ' ', @Addopts_Groff;
-      $groggy = `cat $tmp_cat | grog`;
-      die "main_display(): grog error;" if $?;
-      chomp $groggy;
-      print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
-      &_do_opt_V();
-      unlink $modefile;
-      rename $tmp_cat, $modefile;
-      system("cat $modefile | $groggy $addopts");
-      &clean_up();
-      next SWITCH;
-    };				# /groff/
-
-    /^(text|tty)$/ and do {
-      my $device;
-      if (! $Opt{'DEVICE'}) {
-	$device = $Opt{'TEXT_DEVICE'};
-	$device = $Default_tty_Device unless $device;
-      } elsif ($Opt{'DEVICE'} =~ /^(ascii||cp1047|latin1|utf8)$/) {
-	$device = $Opt{'DEVICE'};
-      } else {
-	warn "main_display(): wrong device for $Display{'MODE'} mode: " .
-	  "$Opt{'DEVICE'}";
-      }
-      $groggy = `cat $tmp_cat | grog -T$device`;
-      die "main_display(): grog error;" if $?;
-      chomp $groggy;
-      print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
-      if ($Display{'MODE'} eq 'text') {
-	&_do_opt_V();
-	system("cat $tmp_cat | $groggy $addopts");
-	&clean_up();
-	next SWITCH;
-      }
-
-### main_display()
-      # mode is not 'text', but `tty'
-      my %pager;
-      my @p;
-      push @p, $Opt{'PAGER'} if $Opt{'PAGER'};
-      push @p, $ENV{'PAGER'} if $ENV{'PAGER'};
-      foreach (@p) {
-	%pager = &where_is_prog($_);
-	next unless %pager;
-	if ($pager{'file'} eq 'less') {
-	  if ($pager{'args'}) {
-	    $pager{'args'} = "-r -R $pager{'args'}";
-	  } else {
-	    $pager{'args'} = '-r -R';
-	  }
-	}
-	last if $pager{'file'};
-      }				# foreach @p
-      unless (%pager) {
-	foreach (@{$Viewer_tty{'TTY'}}, @{$Viewer_X{'TTY'}}, 'cat') {
-	  next unless $_;
-	  %pager = &where_is_prog($_);
-	  last if %pager;
-	}
-      }
-      die "main_display(): no pager program found for tty mode;"
-	unless %pager;
-      &_do_opt_V();
-      system("cat $tmp_cat | $groggy $addopts | " .
-	     "$pager{'fullname'} $pager{'args'}");
-      &clean_up();
-      next SWITCH;
-    };				# /text|tty/
-
-    /^source$/ and do {
-      open $fh_cat, "<$tmp_cat";
-      foreach (<$fh_cat>) {
-	print "$_";
-      }
-      &clean_up();
-      next SWITCH;
-    };
-
-### main_display()
-    /^dvi$/ and do {
-      if ($Opt{'DEVICE'} && $Opt{'DEVICE'} ne 'dvi') {
-	warn "main_display(): " .
-	  "wrong device for $Display{'MODE'} mode: $Opt{'DEVICE'};"
-      }
-      $modefile .= '.dvi';
-      $groggy = `cat $tmp_cat | grog -Tdvi`;
-      die "main_display(): grog error;" if $?;
-      chomp $groggy;
-      print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
-      &_do_display();
-      next SWITCH;
-    };
-
-    /^html$/ and do {
-      if ($Opt{'DEVICE'} && $Opt{'DEVICE'} ne 'html') {
-	warn "main_display(): " .
-	  "wrong device for $Display{'MODE'} mode: $Opt{'DEVICE'};"
-      }
-      $modefile .= '.html';
-      $groggy = `cat $tmp_cat | grog -Thtml`;
-      die "main_display(): grog error;" if $?;
-      chomp $groggy;
-      print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
-      &_do_display();
-      next SWITCH;
-    };
-
-    /^pdf$/ and do {
-      $modefile .= '.pdf';
-      $groggy = `cat $tmp_cat | grog -Tpdf -P-y -PU`;
-      die "main_display(): grog error;" if $?;
-      chomp $groggy;
-      print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
-      &_do_display();
-      next SWITCH;
-    };
-
-
-    /^pdf2$/ and do {
-      if ($Opt{'DEVICE'} && $Opt{'DEVICE'} ne 'ps') {
-	warn "main_display(): " .
-	  "wrong device for $Display{'MODE'} mode: $Opt{'DEVICE'};"
-      }
-      $modefile .= '.ps';
-      $groggy = `cat $tmp_cat | grog -Tps`;
-      die "main_display(): grog error;" if $?;
-      chomp $groggy;
-      print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
-      &_do_display(\&_make_pdf2);
-      next SWITCH;
-    };
-
-### main_display()
-    /^ps$/ and do {
-      if ($Opt{'DEVICE'} && $Opt{'DEVICE'} ne 'ps') {
-	warn "main_display(): " .
-	  "wrong device for $Display{'MODE'} mode: $Opt{'DEVICE'};"
-      }
-      $modefile .= '.ps';
-      $groggy = `cat $tmp_cat | grog -Tps`;
-      die "main_display(): grog error;" if $?;
-      chomp $groggy;
-      print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
-      &_do_display();
-      next SWITCH;
-    };
-
-    /^x$/ and do {
-      my $device;
-      if ($Opt{'DEVICE'} && $Opt{'DEVICE'} =~ /^X/) {
-	$device = $Opt{'DEVICE'};
-      } else {
-	if ($Opt{'RESOLUTION'} == 100) {
-	  if ( $Display{'PROG'} =~ /^(g|)xditview$/ ) {
-	    # add width of 800dpi for resolution of 100dpi to the args
-	    $Display{'ARGS'} .= ' -geometry 800';
-	    $Display{'ARGS'} =~ s/^ //;
-	  }
-	} else {		# RESOLUTIOM != 100
-	  $device = 'X75-12';
-	}			# if RESOLUTIOM
-      }				# if DEVICE
-      $groggy = `cat $tmp_cat | grog -T$device -Z`;
-      die "main_display(): grog error;" if $?;
-      chomp $groggy;
-      print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
-      &_do_display();
-      next SWITCH;
-    };
-
-### main_display()
-    /^X$/ and do {
-      if (! $Opt{'DEVICE'}) {
-	$groggy = `cat $tmp_cat | grog -X`;
-	die "main_display(): grog error;" if $?;
-	chomp $groggy;
-	print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
-      } elsif ($Opt{'DEVICE'} =~ /^(X.*|dvi|html|lbp|lj4|ps)$/) {
-	# these devices work with
-	$groggy = `cat $tmp_cat | grog -T$Opt{'DEVICE'} -X`;
-	die "main_display(): grog error;" if $?;
-	chomp $groggy;
-	print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
-      } else {
-	warn "main_display(): wrong device for " .
-	  "$Display{'MODE'} mode: $Opt{'DEVICE'};";
-	$groggy = `cat $tmp_cat | grog -Z`;
-	die "main_display(): grog error;" if $?;
-	chomp $groggy;
-	print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
-      }				# if DEVICE
-      &_do_display();
-      next SWITCH;
-    };
-
-    /^.*$/ and do {
-      die "main_display(): unknown mode `$Display{'MODE'}';";
-    };
-
-  }				# SWITCH
-  1;
-} # main_display()
-
-
-########################
-# _do_display ([<prog>])
-#
-# Perform the generation of the output and view the result.  If an
-# argument is given interpret it as a function name that is called in
-# the midst (actually only for `pdf').
-#
-sub _do_display {
-  &_do_opt_V();
-  unless ($Display{'PROG'}) {
-    system("$groggy $addopts $tmp_cat");
-    &clean_up();
-    return 1;
-  }
-  unlink $modefile;
-  die "_do_display(): empty output;" if -z $tmp_cat;
-  system("cat $tmp_cat | $groggy $addopts >$modefile");
-  die "_do_display(): empty output;" if -z $modefile;
-  &print_times("before display");
-  if ($_[0] && ref($_[0]) eq 'CODE') {
-    $_[0]->();
-  }
-  unlink $tmp_cat unless $Debug{'KEEP'};
-
-  if ( $Opt{'STDOUT'} ) {
-    my $fh;
-    open $fh, "<$modefile";
-    foreach (<$fh>) {
-      print;
-    }
-    close $fh;
-    return 1;
-  }
-
-  if ($Viewer_Background) {
-    if ($Debug{'KEEP'}) {
-      exec "$Display{'PROG'} $Display{'ARGS'} $modefile &";
-    } else {
-      exec "{ $Display{'PROG'} $Display{'ARGS'} $modefile; " .
-	"rm -rf $tmpdir; } &";
-    }
-  } else {
-    system("$Display{'PROG'} $Display{'ARGS'} $modefile");
-    &clean_up();
-  }
-} # _do_display() of main_display()
-
-
-#############
-# _do_opt_V ()
-#
-# Check on option `-V'; if set print the corresponding output and leave.
-#
-# Globals: @ARGV, $Display{MODE}, $Display{PROG},
-#          $Display{ARGS}, $groggy,  $modefile, $addopts
-#
-sub _do_opt_V {
-  if ($Opt{'V'}) {
-    $Opt{'V'} = 0;
-    print "Parameters: @ARGV\n";
-    print "Display Mode: $Display{'MODE'}\n";
-    print "Output file: $modefile\n";
-    print "Display prog: $Display{'PROG'} $Display{'ARGS'}\n";
-    print "Output of grog: $groggy $addopts\n";
-    my $res = `$groggy $addopts\n`;
-    chomp $res;
-    print "groff -V: $res\n";
-    exit 0;
-  }
-  1;
-} # _do_opt_V() of main_display()
-
-
-##############
-# _make_pdf2 ()
-#
-# Transform to ps/pdf format; for pdf2 mode in _do_display().
-#
-# Globals: $md_modefile (from main_display())
-#
-sub _make_pdf2 {
-  die "_make_pdf2(): pdf2 mode did not work;" if $PDF_Did_Not_Work;
-  my $psfile = $modefile;
-  die "_make_pdf2(): empty output;" if -z $modefile;
-  $modefile =~ s/\.ps$/.pdf/;
-  unlink $modefile;
-  my $done;
-  if ($PDF_Has_ps2pdf) {
-    system("ps2pdf $psfile $modefile 2>$Dev_Null");
-    $done = ! $?;
-  }
-  if (! $done && $PDF_Has_gs) {
-    system("gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite " .
-       "-sOutputFile=$modefile -c save pop -f $psfile 2>$Dev_Null");
-    $done = ! $?;
-  }
-  if (! $done) {
-    $PDF_Did_Not_Work = 1;
-    warn '_make_pdf2(): Could not transform into pdf format, ' .
-      'the Postscript mode (ps) is used instead;';
-    $Opt{'MODE'} = 'ps';
-    &main_set_mode();
-    &main_set_resources();
-    &main_display();
-    exit 0;
-  }
-  unlink $psfile unless $Debug{'KEEP'};
-  1;
-} # _make_pdf2() of main_display()
-
-
-########################################################################
+our $groggy;
+our $modefile;
+our $addopts;
 
-&main_set_options();
-&main_parse_MANOPT();
-&main_config_params();
-&main_parse_params();
-&main_set_mode();
-&main_temp();
-&main_do_fileargs();
-&main_set_resources();
 &main_display();
 
 &clean_up();
 
+
 1;
 ########################################################################
 ### Emacs settings
diff --git a/contrib/groffer/groffer.pl b/contrib/groffer/main_subs.pl
old mode 100755
new mode 100644
similarity index 89%
copy from contrib/groffer/groffer.pl
copy to contrib/groffer/main_subs.pl
index 5be47c9..a591f99
--- a/contrib/groffer/groffer.pl
+++ b/contrib/groffer/main_subs.pl
@@ -2,15 +2,13 @@
 
 # groffer - display groff files
 
-# Source file position: <groff-source>/contrib/groffer/groffer.pl
-# Installed position: <prefix>/bin/groffer
-
-# Copyright (C) 2006, 2009, 2011, 2013-14
-#   Free Software Foundation, Inc.
+# Source file position: <groff-source>/contrib/groffer/subs.pl
+# Installed position: <prefix>/lib/groff/groffer/subs.pl
 
+# Copyright (C) 2006, 2009, 2014 Free Software Foundation, Inc.
 # Written by Bernd Warken <groff-bernd.warken-72@web.de>.
 
-# Last update: 01 Jun 2014
+# Last update: 11 Jun 2014
 
 # This file is part of `groffer', which is part of `groff'.
 
@@ -29,207 +27,23 @@
 # <http://www.gnu.org/licenses/gpl-2.0.html>.
 
 ########################################################################
+# This file contains the main functions formerly in `groff.pl'
 
 use strict;
 use warnings;
-#use diagnostics;
-
-# temporary dir and files
-use File::Temp qw/ tempfile tempdir /;
-
-# needed for temporary dir
-use File::Spec;
-
-# for `copy' and `move'
-use File::Copy;
-
-# for fileparse, dirname and basename
-use File::Basename;
-
-# current working directory
-use Cwd;
-
-# $Bin is the directory where this script is located
-use FindBin;
-
-
-########################################################################
-# system variables and exported variables
-########################################################################
-
-our $Dev_Null;
-our $Umask;
-our @Path;
-our $Start_Dir;
-
-our $tmpdir = '';
-our ($fh_cat, $tmp_cat);
-our ($fh_stdin, $tmp_stdin);
-
-our @Addopts_Groff;
-our %Debug;
-our %Opt;
-
-our $Has_Compression;
-our $Has_bzip;
-
-our $Output_File_Name;
-
-our $Apropos_Prog;
-our $Filespec_Arg;
-our $Filespec_Is_Man;
-our $Macro_Pkg;
-our $Manspec;
-our $No_Filespecs;
-our $Special_Filespec;
-our $Special_Setup;
-
-our %Man;
-
-BEGIN {
-  $Dev_Null = File::Spec->devnull();
-
-  $Umask = umask 077;
-
-  $Start_Dir = getcwd;
-
-  # flush after each print or write command
-  $| = 1;
-}
-
-
-########################################################################
-# read-only variables with double-@ construct
-########################################################################
-
-our $File_split_env_sh;
-our $File_version_sh;
-our $Groff_Version;
-
-my $before_make;		# script before run of `make'
-{
-  my $at = '@';
-  $before_make = 1 if '@VERSION@' eq "${at}VERSION${at}";
-}
-
-my %at_at;
-my $file_perl_test_pl;
-my $groffer_libdir;
-
-if ($before_make) {
-  my $groffer_source_dir = $FindBin::Bin;
-  $at_at{'BINDIR'} = $groffer_source_dir;
-  $at_at{'G'} = '';
-  $at_at{'LIBDIR'} = '';
-  $groffer_libdir = $groffer_source_dir;
-  $file_perl_test_pl = File::Spec->catfile($groffer_source_dir,
-					       'perl_test.pl');
-  $File_version_sh = File::Spec->catfile($groffer_source_dir, 'version.sh');
-  $Groff_Version = '';
-} else {
-  $Groff_Version = '@VERSION@';
-  $at_at{'BINDIR'} = '@BINDIR@';
-  $at_at{'G'} = '@g@';
-  $at_at{'LIBDIR'} = '@libdir@';
-  $groffer_libdir = '@groffer_dir@';
-  $file_perl_test_pl = File::Spec->catfile($groffer_libdir,
-					       'perl_test.pl');
-  $File_version_sh = File::Spec->catfile($groffer_libdir, 'version.sh');
-}
-
-die "$groffer_libdir is not an existing directory;"
-  unless -d $groffer_libdir;
-
-unshift(@INC, $groffer_libdir);
-
-$File_split_env_sh = File::Spec->catfile($groffer_libdir, 'split_env.sh');
-die "$File_split_env_sh does not exist;" unless -f "$File_split_env_sh";
-
-# test perl on suitable version
-die "$file_perl_test_pl does not exist;" unless -f "$file_perl_test_pl";
-do "$file_perl_test_pl" or die "Perl test: $@";
-
-require 'func.pl';
-require 'man.pl';
-# require 'sub.pl';
-
-@Path = &path_uniq( File::Spec->path() );
-
-if ( &where_is_prog('gzip') ) {
-  $Has_Compression = 1;
-  $Has_bzip = 1 if &where_is_prog('bzip2');
-}
-
-
-########################################################################
-# modes, viewers, man sections, and defaults
-########################################################################
-
-# configuration files
-my @Conf_Files = (File::Spec->catfile(File::Spec->rootdir(),
-				      'etc', 'groff', 'groffer.conf'),
-		  File::Spec->catfile("$ENV{'HOME'}", '.groff',
-				      'groffer.conf')
-		 );
-
-my @Default_Modes = ('pdf', 'pdf2', 'html', 'ps', 'x', 'dvi', 'tty');
-my $Default_Resolution = 75;
-my $Default_tty_Device = 'latin1';
-
-my @Macro_Packages = ('-man', '-mdoc', '-me', '-mm', '-mom', '-ms');
-
-my %Viewer_tty = ('DVI' => [],
-		  'HTML' => ['lynx', 'w3m'],
-		  'PDF' => [],
-		  'PS' => [],
-		  'TTY' => ['less -r -R', 'more', 'pager'],
-		  'X' => [],
-		 );
-
-my %Viewer_X = ('DVI' => ['kdvi', 'xdvi', 'dvilx'],
-		'HTML' => ['konqueror', 'epiphany'. 'mozilla-firefox',
-			   'firefox', 'mozilla', 'netscape', 'galeon',
-			   'opera', 'amaya','arena', 'mosaic'],
-		'PDF' => ['okular', 'kpdf', 'acroread', 'evince',
-			  'xpdf -z 150', 'gpdf', 'xpdf', 'zathura'.
-			  'epdfview', 'qpdfview', 'apvlv', 'qpdfview',
-			  'kghostview --scale 1.45', 'gv', 'ggv'],
-		'PS' => ['okular', 'evince', 'gv',
-			 'gs', 'gs_x11', 'ghostscript', 'ghostview',
-			 'kghostview --scale 1.45', 'ggv', 'kpdf'],
-		'TTY' => ['xless'],
-		'X' => ['gxditview', 'xditview'],
-	      );
-
-%Man = ('ALL' => 0,
-	'AUTO_SEC' => ['1', '2', '3', '4', '5', '6', '7', '8', '9',
-			  'n', 'o'],
-	'ENABLE' => 1,
-	   'EXT' => '',
-	   'FORCE' => 0,
-	   'IS_SETUP' => 0,
-	   'MANSPEC' => {},
-	   'LANG' => '',
-	   'LANG2' => '',
-	   'PATH' => [],
-	   'SEC' => [],
-	   'SEC_CHARS' => '',
-	   'SYS' => [],
-	  );
-$Man{'AUTO_SEC_CHARS'} = join('', @{$Man{'AUTO_SEC'}});
 
 
 ########################################################################
-# given options, main_set_options()
+# main_set_options()
 ########################################################################
 
-my %Opts_Cmdline_Short;
-my %Opts_Cmdline_Long;
-my $Opts_Cmdline_Long_Str;
-my %Opts_Cmdline_Double;
-my %Opts_Groff_Short;
-
 sub main_set_options {
+  our %Opts_Cmdline_Short;
+  our %Opts_Cmdline_Long;
+  our $Opts_Cmdline_Long_Str;
+  our %Opts_Cmdline_Double;
+  our %Opts_Groff_Short;
+
   # the following options are ignored in groffer.pl, but are kept from
   # groffer.sh: --shell arg, --debug-shell
 
@@ -403,13 +217,13 @@ sub main_set_options {
 
 
 ########################################################################
-# $MANOPT, main_parse_MANOPT()
+# main_parse_MANOPT
 ########################################################################
 
-# handle environment variable $MANOPT
-my @Manopt;
-
 sub main_parse_MANOPT {
+  our @Manopt;
+  our $File_split_env_sh;
+
   if ( $ENV{'MANOPT'} ) {
     @Manopt = `sh $File_split_env_sh MANOPT`;
     chomp @Manopt;
@@ -494,11 +308,22 @@ sub main_parse_MANOPT {
 # configuration files, $GROFFER_OPT, and command line, main_config_params()
 ########################################################################
 
-my @Options;
-my @Filespecs;
-my @Starting_Conf;
-my @Starting_ARGV = @ARGV;
 sub main_config_params {	# handle configuration files
+  our @Options;
+  our @Filespecs;
+  our @Starting_Conf;
+  our @Starting_ARGV = @ARGV;
+
+  our %Opts_Cmdline_Short;
+  our %Opts_Cmdline_Long;
+  our $Opts_Cmdline_Long_Str;
+  our %Opts_Cmdline_Double;
+  our %Opts_Groff_Short;
+
+  our $File_split_env_sh;
+  our @Manopt;
+  our @Conf_Files;
+
   # options may not be abbreviated, but must be exact
   my @conf_args;
   foreach my $f ( @Conf_Files ) {
@@ -772,23 +597,12 @@ sub main_config_params {	# handle configuration files
   }
 } # main_config_params()
 
-if (0) {
-  print STDERR "<$_>\n" foreach @ARGV;
-}
-
 
 ########################################################################
 # main_parse_params()
 ########################################################################
 
-my $i; my $n;
-
-$Opt{'XRM'} = [];
-
 sub main_parse_params {
-  $i = 0;
-  $n = $#Options;
-
   # options that are ignored in this part
   # shell version of groffer: --debug*, --shell
   # man options: --catman (only special in man),
@@ -796,6 +610,21 @@ sub main_parse_params {
   #		 --prompt (prompt for less, ignored),
   #		 --troff (-mandoc, handled by grog),
   #		 --update (inode check, ignored)
+  our %Opt;
+  our %Man;
+  our %Debug;
+  our %Opts_Cmdline_Short;
+  our %Opts_Cmdline_Double;
+  our %Opts_Cmdline_Long;
+  our %Opts_Groff_Short;
+  our $i;
+  our $n;
+  our @Starting_ARGV;
+  our @Starting_Conf;
+  our @Default_Modes;
+  our @Addopts_Groff;
+  our @Options;
+
   my %ignored_opts = (
 		      '--catman' => 0,
 		      '--debug-func' => 0,
@@ -958,7 +787,7 @@ sub main_parse_params {
      '--pdf' => sub { $Opt{'MODE'} = 'pdf'; },
      '--pdf2' => sub { $Opt{'MODE'} = 'pdf2'; },
      '--print' =>		# print argument, for argument test
-     sub { my $arg = &_get_arg; print STDERR "$arg\n"; },
+     sub { my $arg = &_get_arg; print STDERR $arg . "\n"; },
      '--ps' => sub { $Opt{'MODE'} = 'ps'; },
      '--resolution' =>		# set resolution for X devices, arg
      sub { my $arg = &_get_arg();
@@ -1103,11 +932,11 @@ sub main_parse_params {
   }				# while ($i <= $n)
 
   if ($Debug{'PARAMS'}) {
-    print STDERR '$MANOPT: ' . "$ENV{'MANOPT'}\n" if $ENV{'MANOPT'};
+    print STDERR '$MANOPT: ' . $ENV{'MANOPT'} . "\n" if $ENV{'MANOPT'};
     foreach (@Starting_Conf) {
-      print STDERR "configuration: $_\n";
+      print STDERR "configuration: " . $_ . "\n";
     }
-    print STDERR '$GROFFER_OPT: ' . "$ENV{'GROFFER_OPT'}\n"
+    print STDERR '$GROFFER_OPT: ' . $ENV{'GROFFER_OPT'} . "\n"
       if $ENV{'GROFFER_OPT'};
     print STDERR "command line: @Starting_ARGV\n";
     print STDERR "parameters: @ARGV\n";
@@ -1131,6 +960,9 @@ sub main_parse_params {
 
 
 sub _get_arg {
+  our $i;
+  our $n;
+  our @Options;
   if ($i > $n) {
     die '_get_arg(): No argument left for last option;';
   }
@@ -1144,16 +976,21 @@ sub _get_arg {
 # main_set_mode()
 ########################################################################
 
-my $Viewer_Background;
-my $PDF_Did_Not_Work;
-my $PDF_Has_gs;
-my $PDF_Has_ps2pdf;
-my %Display = ('MODE' => '',
-	       'PROG' => '',
-	       'ARGS' => ''
-	      );
-
 sub main_set_mode {
+  our %Opt;
+
+  our @Default_Modes;
+  our @Addopts_Groff;
+
+  our $Viewer_Background;
+  our $PDF_Did_Not_Work;
+  our $PDF_Has_gs;
+  our $PDF_Has_ps2pdf;
+  our %Display = ('MODE' => '',
+		  'PROG' => '',
+		  'ARGS' => ''
+		 );
+
   my @modes;
 
   # set display
@@ -1258,6 +1095,12 @@ sub main_set_mode {
 ##                 $Viewer_tty{<MODE>}
 ##
 sub _get_prog_args {
+  our %Opt;
+  our %Display;
+  our %Viewer_X;
+  our %Viewer_tty;
+
+  our $Viewer_Background;
   my $n = @_;
   die "_get_prog_args(): one argument is needed; you used $n;"
     unless $n == 1;
@@ -1323,6 +1166,7 @@ sub _get_prog_args {
 # Return  : `0' if not a part of the list, `1' if found in the list.
 #
 sub _get_first_prog {
+  our %Display;
   my $n = @_;
   die "_get_first_prog(): one argument is needed; you used $n;"
     unless $n == 1;
@@ -1358,6 +1202,7 @@ sub _get_first_prog {
 # Globals in/out: $Display{'PROG'}, $Display{'ARGS'}
 #
 sub _check_prog_on_list {
+  our %Display;
   my $n = @_;
   die "_get_first_prog(): 2 arguments are needed; you used $n;"
     unless $n == 2;
@@ -1390,6 +1235,12 @@ sub _check_prog_on_list {
 ########################################################################
 
 sub main_temp {
+  our %Debug;
+  our $tmpdir;
+  our $fh_cat;
+  our $fh_stdin;
+  our $tmp_cat;
+  our $tmp_stdin;
   my $template = 'groffer_' . "$$" . '_XXXX';
   foreach ($ENV{'GROFF_TMPDIR'}, $ENV{'TMPDIR'}, $ENV{'TMP'}, $ENV{'TEMP'},
 	   $ENV{'TEMPDIR'}, File::Spec->catfile($ENV{'HOME'}, 'tmp')) {
@@ -1413,9 +1264,10 @@ sub main_temp {
 
   if ($Debug{'TMPDIR'}) {
     if ( $Debug{'KEEP'}) {
-      print STDERR "temporary directory is kept: $tmpdir\n";
+      print STDERR "temporary directory is kept: " . $tmpdir . "\n";
     } else {
-      print STDERR "temporary directory will be cleaned: $tmpdir\n";
+      print STDERR "temporary directory will be cleaned: " .
+	$tmpdir . "\n";
     }
   }
 
@@ -1433,15 +1285,9 @@ sub main_temp {
 
 
 ########################################################################
-# tmp functions and compression
-########################################################################
-
-########################################################################
-# further functions needed for main_do_fileargs()
+# subs needed for main_do_fileargs()
 ########################################################################
 
-my @REG_TITLE = ();
-
 ##########
 # register_file(<filename>)
 #
@@ -1451,6 +1297,7 @@ my @REG_TITLE = ();
 # Output: none
 #
 sub register_file {
+  our $tmp_stdin;
   my $n = @_;
   die "register_file(): one argument is needed; you used $n;"
     unless $n == 1;
@@ -1476,6 +1323,8 @@ sub register_file {
 # Variable prefix: rt
 #
 sub register_title {
+  our @REG_TITLE;
+  our %Debug;
   my $n = @_;
   die "register_title(): one argument is needed; you used $n;"
     unless $n == 1;
@@ -1509,6 +1358,12 @@ sub register_title {
 # Store standard input to temporary file (with decompression).
 #
 sub save_stdin {
+  our $tmp_stdin;
+  our $fh_stdin;
+  our $tmpdir;
+
+  our %Debug;
+
   my ($fh_input, $tmp_input);
   $tmp_input = File::Spec->catfile($tmpdir, ',input');
   open $fh_input, ">$tmp_input" or
@@ -1520,11 +1375,11 @@ sub save_stdin {
   open $fh_stdin, ">$tmp_stdin" or
     die "save_stdin(): could not open $tmp_stdin";
   foreach ( &cat_z("$tmp_input") ) {
-    print $fh_stdin "$_";
+    print $fh_stdin $_;
   }
   close $fh_stdin;
   unlink $tmp_input unless $Debug{'KEEP'};
-}				# save_stdin()
+}	# save_stdin()
 
 
 ########################################################################
@@ -1532,6 +1387,18 @@ sub save_stdin {
 ########################################################################
 
 sub main_do_fileargs {
+  our %Man;
+  our %Opt;
+
+  our @Filespecs;
+
+  our $Filespec_Arg;
+  our $Filespec_Is_Man;
+  our $Special_Filespec;
+  our $No_Filespecs;
+  our $Macro_Pkg;
+  our $Manspec;
+
   &special_setup();
   if ($Opt{'APROPOS'}) {
     if ($No_Filespecs) {
@@ -1683,14 +1550,14 @@ sub main_do_fileargs {
       warn "main_do_fileargs(): $filespec $errmsg;";
       next FILESPEC;
     }
-  }				# foreach (@Filespecs)
+  }	# foreach (@Filespecs)
 
-  if ($twoargs) {
+  if ( $twoargs ) {
     warn "main_do_fileargs(): no filespec arguments left for second run;";
     return 0;
   }
   1;
-} # main_do_fileargs()
+}	# main_do_fileargs()
 
 
 ########################################################################
@@ -1705,6 +1572,17 @@ sub main_do_fileargs {
 # Globals: $Display{PROG}, $Output_File_Name
 #
 sub main_set_resources {
+  our %Opt;
+  our %Display;
+  our %Debug;
+
+  our @REG_TITLE;
+
+  our $Default_Resolution;
+  our $tmp_stdin;
+  our $tmpdir;
+  our $Output_File_Name;
+
   # $prog   viewer program
   # $rl     resource list
   unlink $tmp_stdin unless $Debug{'KEEP'};
@@ -1859,10 +1737,6 @@ sub main_set_resources {
 # set resources
 ########################################################################
 
-my $groggy;
-my $modefile;
-my $addopts;
-
 ##########
 # main_display ()
 #
@@ -1873,6 +1747,13 @@ my $addopts;
 #       $fh_cat, $tmp_cat, $Opt{PAGER}, $Output_File_Name
 #
 sub main_display {
+  our ( %Display, %Opt, %Debug, %Viewer_tty, %Viewer_X );
+
+  our @Addopts_Groff;
+
+  our ( $groggy, $modefile, $addopts, $fh_cat, $tmp_cat, $tmpdir );
+  our ( $Output_File_Name, $Default_tty_Device );
+
   $addopts = join ' ', @Addopts_Groff;
 
   if (-z $tmp_cat) {
@@ -1917,7 +1798,7 @@ sub main_display {
       $groggy = `cat $tmp_cat | grog -T$device`;
       die "main_display(): grog error;" if $?;
       chomp $groggy;
-      print STDERR "grog output: $groggy\n" if $Debug{'GROG'};
+      print STDERR "grog output: " . $groggy . "\n" if $Debug{'GROG'};
       if ($Display{'MODE'} eq 'text') {
 	&_do_opt_V();
 	system("cat $tmp_cat | $groggy $addopts");
@@ -2102,6 +1983,11 @@ sub main_display {
 # the midst (actually only for `pdf').
 #
 sub _do_display {
+  our ( %Display, %Debug, %Opt );
+
+  our ( $modefile, $tmpdir, $tmp_cat, $addopts, $groggy );
+  our ( $Viewer_Background );
+
   &_do_opt_V();
   unless ($Display{'PROG'}) {
     system("$groggy $addopts $tmp_cat");
@@ -2128,7 +2014,7 @@ sub _do_display {
     return 1;
   }
 
-  if ($Viewer_Background) {
+  if ( $Viewer_Background ) {
     if ($Debug{'KEEP'}) {
       exec "$Display{'PROG'} $Display{'ARGS'} $modefile &";
     } else {
@@ -2151,6 +2037,12 @@ sub _do_display {
 #          $Display{ARGS}, $groggy,  $modefile, $addopts
 #
 sub _do_opt_V {
+  our %Opt;
+  our %Display;
+  our @ARGV;
+
+  our ($groggy, $modefile, $addopts);
+
   if ($Opt{'V'}) {
     $Opt{'V'} = 0;
     print "Parameters: @ARGV\n";
@@ -2175,6 +2067,15 @@ sub _do_opt_V {
 # Globals: $md_modefile (from main_display())
 #
 sub _make_pdf2 {
+  our %Debug;
+  our %Opt;
+
+  our $PDF_Did_Not_Work;
+  our $PDF_Has_gs;
+  our $PDF_Has_ps2pdf;
+  our $Dev_Null;
+  our $modefile;
+
   die "_make_pdf2(): pdf2 mode did not work;" if $PDF_Did_Not_Work;
   my $psfile = $modefile;
   die "_make_pdf2(): empty output;" if -z $modefile;
@@ -2205,20 +2106,6 @@ sub _make_pdf2 {
 } # _make_pdf2() of main_display()
 
 
-########################################################################
-
-&main_set_options();
-&main_parse_MANOPT();
-&main_config_params();
-&main_parse_params();
-&main_set_mode();
-&main_temp();
-&main_do_fileargs();
-&main_set_resources();
-&main_display();
-
-&clean_up();
-
 1;
 ########################################################################
 ### Emacs settings
diff --git a/contrib/groffer/func.pl b/contrib/groffer/subs.pl
similarity index 99%
rename from contrib/groffer/func.pl
rename to contrib/groffer/subs.pl
index e4b21c5..8960c6d 100644
--- a/contrib/groffer/func.pl
+++ b/contrib/groffer/subs.pl
@@ -2,13 +2,13 @@
 
 # groffer - display groff files
 
-# Source file position: <groff-source>/contrib/groffer/func.pl
-# Installed position: <prefix>/lib/groff/groffer/func.pl
+# Source file position: <groff-source>/contrib/groffer/subs.pl
+# Installed position: <prefix>/lib/groff/groffer/subs.pl
 
 # Copyright (C) 2006, 2009, 2014 Free Software Foundation, Inc.
 # Written by Bernd Warken <groff-bernd.warken-72@web.de>.
 
-# Last update: 01 Jun 2014
+# Last update: 11 Jun 2014
 
 # This file is part of `groffer', which is part of `groff'.
 
@@ -792,6 +792,7 @@ sub wait {
   print "\n";
 }				# wait()
 
+
 1;
 ########################################################################
 ### Emacs settings
diff --git a/contrib/groffer/version.sh b/contrib/groffer/version.sh
index 96b9c63..5b06dbd 100644
--- a/contrib/groffer/version.sh
+++ b/contrib/groffer/version.sh
@@ -29,8 +29,8 @@
 export _PROGRAM_VERSION;
 export _LAST_UPDATE;
 
-_PROGRAM_VERSION='2.1.1';
-_LAST_UPDATE='01 Jun 2014';
+_PROGRAM_VERSION='2.1.2';
+_LAST_UPDATE='11 Jun 2014';
 
 # this setting of the groff version is only used before make is run,
 # otherwise @VERSION@ will set it, see groffer.sh.


From MAILER-DAEMON Wed Jun 11 15:03:30 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Wuno2-0004SB-UB
	for mharc-groff-commit@gnu.org; Wed, 11 Jun 2014 15:03:30 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48606)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wuno0-0004S3-9I
	for groff-commit@gnu.org; Wed, 11 Jun 2014 15:03:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wunnz-0002DQ-AQ
	for groff-commit@gnu.org; Wed, 11 Jun 2014 15:03:28 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:49248)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wunnz-0002DH-7T
	for groff-commit@gnu.org; Wed, 11 Jun 2014 15:03:27 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1Wunny-0003mz-8d
	for groff-commit@gnu.org; Wed, 11 Jun 2014 19:03:26 +0000
Date: Wed, 11 Jun 2014 19:03:26 +0000
Message-Id: <E1Wunny-0003mz-8d@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: grog: warn about TeX texgyre fonts, when in pdf device
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140611190326.14532.36775@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 8276b19816883d25de0eb3dffd74c64a2fd52c8c
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Jun 2014 19:03:29 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 8276b19816883d25de0eb3dffd74c64a2fd52c8c
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Wed Jun 11 21:02:57 2014 +0200

    grog: warn about TeX texgyre fonts, when in pdf device
---
 ChangeLog |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9f6a57c..951bc45 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-2014-06-02  Bernd Warken  <groff-bernd.warken-72@web.de>
+2014-06-10  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* src/roff/grog/grog.pl: Totally rewrite the `grog' version,
 	starting at the last stable version.  Write many parts as `sub'
@@ -11,6 +11,12 @@
 	* src/roff/grog/Makefile.sub: Add file `subs.pl', which goes into
 	the `grog' libdir.
 
+2014-06-03  James Cloos  <cloos@jhcloos.com>
+
+	* src/roff/grog/grog.pl: The errors with `ligatures' come also
+	from `TeX GYRE' fonts.  Print this information, when `grog' should
+	work with the `pdf' device.
+
 2014-06-02  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* src/roff/grog/grog.pl: The `grog' version of yesterday has many


From MAILER-DAEMON Fri Jun 13 12:17:39 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WvUAd-00009X-9f
	for mharc-groff-commit@gnu.org; Fri, 13 Jun 2014 12:17:39 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:53400)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WvUAa-00009E-1C
	for groff-commit@gnu.org; Fri, 13 Jun 2014 12:17:38 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WvUAX-0002Ly-26
	for groff-commit@gnu.org; Fri, 13 Jun 2014 12:17:35 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:44499)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WvUAW-0002Ls-U8
	for groff-commit@gnu.org; Fri, 13 Jun 2014 12:17:32 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WvUAW-0007YI-6f
	for groff-commit@gnu.org; Fri, 13 Jun 2014 16:17:32 +0000
Date: Fri, 13 Jun 2014 16:17:32 +0000
Message-Id: <E1WvUAW-0007YI-6f@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: grog: add file name extensions,
	add testing methods from grog.sh of R. Corderoy.
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140613161732.28999.86270@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 3617f42048f54cc3f0adc282ee3b9e481c75ebd5
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Jun 2014 16:17:38 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 3617f42048f54cc3f0adc282ee3b9e481c75ebd5
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Fri Jun 13 18:17:22 2014 +0200

    grog: add file name extensions, add testing methods from grog.sh of R. Corderoy.
---
 ChangeLog             |    6 +
 src/roff/grog/grog.pl |   67 +++++++++-
 src/roff/grog/subs.pl |  369 ++++++++++++++++++++++++++++++++++++++----------
 3 files changed, 361 insertions(+), 81 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 951bc45..b367ee3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-06-12  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* src/roff/grog/grog.pl, src/roff/grog/subs.pl: Add testing
+	methods of Ralph Corderoy's `grog.sh' of 2006.  Add primary usage
+	of file name extensions.
+
 2014-06-10  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* src/roff/grog/grog.pl: Totally rewrite the `grog' version,
diff --git a/src/roff/grog/grog.pl b/src/roff/grog/grog.pl
index 514f39d..0c4621b 100644
--- a/src/roff/grog/grog.pl
+++ b/src/roff/grog/grog.pl
@@ -9,7 +9,9 @@
 # Copyright (C) 1993, 2006, 2009, 2011-2012, 2014
 #               Free Software Foundation, Inc.
 # Written by James Clark, maintained by Werner Lemberg.
-# Rewritten and put under GPL by Bernd Warken <groff-bernd.warken-72@web.de>.
+# Rewritten with Perl by Bernd Warken <groff-bernd.warken-72@web.de>.
+# The macros for identifying the devices were taken from Ralph
+# Corderoy's `grog.sh' from 2006.
 
 # This file is part of `grog', which is part of `groff'.
 
@@ -28,7 +30,7 @@
 # <http://www.gnu.org/licenses/gpl-2.0.html>.
 
 ########################################################################
-our $Last_Update = '10 Jun 2014';
+our $Last_Update = '12 Jun 2014';
 ########################################################################
 
 require v5.6;
@@ -87,10 +89,22 @@ our $Prog = $0;
   $Prog = $f;
 }
 
+&args_with_minus();
 
-&minus_args();
+our %File_Name_Extensions = (
+		   'man' => 0,
+		   'mandoc' => 0,
+		   'mdoc' => 0,
+		   'me' => 0,
+		   'mm' => 0,
+		   'mmse' => 0,
+		   'mom' => 0,
+		   'ms' => 0,
+		  );
 
+our $is_mmse = 0;
 
+our @FILES = @ARGV;
 
 foreach my $file ( @ARGV ) { # test for each file name in the arguments
   unless ( open(FILE, $file eq "-" ? $file : "< $file") ) {
@@ -98,12 +112,57 @@ foreach my $file ( @ARGV ) { # test for each file name in the arguments
     next;
   }
 
+  if ( $file =~ /\./ ) {	# file name has a dot `.'
+    my $ext = $file =~ s/
+		     .*
+		     \.
+		     ([^.]*)
+		     $
+		   /$1/x;
+    if ( $ext =~ /^([1-9lno]|man|n)$/ ) {
+      $File_Name_Extensions{'man'}++;
+    } elsif ( $ext =~ /^mandoc$/ ) {
+      $File_Name_Extensions{'mandoc'}++;
+    } elsif ( $ext =~ /^mdoc$/ ) {
+      $File_Name_Extensions{'mdoc'}++;
+    } elsif ( $ext =~ /^me$/ ) {
+      $File_Name_Extensions{'me'}++;
+    } elsif ( $ext =~ /^mm$/ ) {
+      $File_Name_Extensions{'mm'}++;
+    } elsif ( $ext =~ /^mmse$/ ) {
+      $File_Name_Extensions{'mmse'}++;
+    } elsif ( $ext =~ /^mom$/ ) {
+      $File_Name_Extensions{'mom'}++;
+    } elsif ( $ext =~ /^ms$/ ) {
+      $File_Name_Extensions{'ms'}++;
+    } elsif ( $ext =~ /^(
+			 chem|
+			 eqn|
+			 pic|
+			 tbl|
+			 ref|
+			 t|
+			 tr|
+			 groff|
+			 roff|
+			 www|
+			 hdtbl|
+			 grap|
+			 grn|
+			 pdfroff
+		       )$/x ) {
+      # ignore
+    } else {
+      print STDERR 'Unknown file name extension '. $file . '.';
+    }
+  }
+
   my $line = <FILE>;
 
   if ( defined $line ) {
     if ( $line ) {
       chomp $line;
-      unless ( &do_first_line( $line, $file ) ) {	# not an option line
+      unless ( &do_first_line( $line, $file ) ) { # not an option line
 	&do_line( $line, $file );
       }
     } else {
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index 9025bf5..f753717 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -8,8 +8,10 @@
 
 # Copyright (C) 1993, 2006, 2009, 2011-2012, 2014
 #               Free Software Foundation, Inc.
-# Split from grog.pl and put under GPL2 by
+# This file was split from grog.pl and put under GPL2 by
 #               Bernd Warken <groff-bernd.warken-72@web.de>.
+# The macros for identifying the devices were taken from Ralph
+# Corderoy's `grog.sh' from 2006.
 
 # This file is part of `grog', which is part of `groff'.
 
@@ -28,7 +30,7 @@
 # <http://www.gnu.org/licenses/gpl-2.0.html>.
 
 ########################################################################
-# Last_Update = '10 Jun 2014';
+# Last_Update = '12 Jun 2014';
 ########################################################################
 
 require v5.6;
@@ -60,6 +62,7 @@ my %Groff = (
 	     'gperl' => 0,
 	     'grap' => 0,
 	     'grn' => 0,
+	     'ideal' => 0,
 	     'lilypond' => 0,
 	     'pic' => 0,
 	     'refer' => 0,
@@ -78,11 +81,25 @@ my %Groff = (
 	     'ms' => 0,
 
 	     # requests
+	     'AB' => 0,		# ms
+	     'AE' => 0,		# ms
+	     'AI' => 0,		# ms
+	     'AU' => 0,		# ms
 	     'NH' => 0,		# ms
-	     'TH' => 0,		# man and ms
+	     'TL' => 0,		# ms
+	     'XP' => 0,		# ms
+
+	     'IP' => 0,		# man and ms
+	     'LP' => 0,		# man and ms
+	     'P' => 0,		# man and ms
+	     'PP' => 0,		# man and ms
 	     'SH' => 0,		# man and ms
+	     'TH' => 0,		# man and ms
+
+	     'OP' => 0,		# man
 	     'SS' => 0,		# man
-	     'P' => 0,		# man
+	     'SY' => 0,		# man
+	     'YS' => 0,		# man
 
 	     # for mdoc and mdoc-old
 	     # .Oo and .Oc for modern mdoc, only .Oo for mdoc-old
@@ -92,13 +109,11 @@ my %Groff = (
 );
 
 
-############################ subs ######################################
-
 ########################################################################
-# sub minus_args: command line arguments except file names
+# sub args_with_minus: command line arguments that are not file names
 ########################################################################
 
-sub minus_args {
+sub args_with_minus {
   my @filespec = ();
   my $double_minus = 0;
   my $was_minus = 0;
@@ -222,6 +237,9 @@ sub do_first_line {
     if ( $line =~ /G/ ) {
       $Groff{'grap'}++;
     }
+    if ( $line =~ /i/ ) {
+      $Groff{'ideal'}++;
+    }
     if ( $line =~ /j/ ) {
       $Groff{'chem'}++;
     }
@@ -251,6 +269,8 @@ sub do_first_line {
 sub do_line {
   my ( $line, $file ) = @_;
 
+  our $is_mmse = 0;
+
   return if ( $line =~ /^[.']\s*\\"/ );	# comment
 
   return unless ( $line =~ /^[.']/ );	# ignore text lines
@@ -262,137 +282,278 @@ sub do_line {
   return if ( $line =~ /^\.$/ );	# ignore .
   return if ( $line =~ /^\.\.$/ );	# ignore ..
 
+  # split command
+  $line =~ /^(\.\w+)\s*(.*)$/;
+  my $command = $1;
+  $command = '' unless ( defined $command );
+  my $args = $2;
+  $args = '' unless ( defined $args );
+
+
+  ######################################################################
   # soelim
-  if ( $line =~ /^\.(so|mso|PS\s*<).*$/ ) {	# `.so', `.mso', `.PS<...'
+  if ( $line =~ /^\.(do)?\s*(so|mso|PS\s*<|SO_START).*$/ ) {
+    # `.so', `.mso', `.PS<...', `.SO_START'
     $Groff{'soelim'}++;
     return;
   }
-  if ( $line =~ /^\.\s*do\s*(so|mso|PS\s*<).*$/ ) {	# `.do so', etc
+  if ( $line =~ /^\.(do)?\s*(so|mso|PS\s*<|SO_START).*$/ ) {
+    # `.do so', `.do mso', `.do PS<...', `.do SO_START'
     $Groff{'soelim'}++;
     return;
   }
 
+  ######################################################################
+  # macros
+
   if ( $line =~ /^\.de1?\W?/ ) {
     # this line is a macro definition, add it to %macros
     my $macro = $line;
     $macro =~ s/^\.de1?\s+(\w+)\W*/.$1/;
     return if ( exists $macros{$macro} );
-    $macros{ $macro } = 1;
+    $macros{$macro} = 1;
     return;
   }
 
-  $line =~ s/(\.\w+).*$/$1/;		# let only request left
 
-  {
-    # if line command is a defined macro, just ignore this line
-    my $macro = $line;
-    $macro =~ s/^(\.\w+)/$1/;
-    return if ( exists $macros{ $macro } );
-  }
+  # if line command is a defined macro, just ignore this line
+  return if ( exists $macros{$command} );
+
 
+  ######################################################################
   # preprocessors
-  if ( $line =~ /^(\.cstart)|(begin\s+chem)$/ ) {
+
+  if ( $command =~ /^(\.cstart)|(begin\s+chem)$/ ) {
     $Groff{'chem'}++;		# for chem
     return;
   }
-  if ( $line =~ /^\.EQ$/ ) {
+  if ( $command =~ /^\.EQ$/ ) {
     $Groff{'eqn'}++;		# for eqn
     return;
   }
-  if ( $line =~ /^\.G1$/ ) {
+  if ( $command =~ /^\.G1$/ ) {
     $Groff{'grap'}++;		# for grap
     return;
   }
-  if ( $line =~ /^\.Perl$/ ) {
+  if ( $command =~ /^\.Perl$/ ) {
     $Groff{'gperl'}++;		# for gperl
     return;
   }
-  if ( $line =~ /^\.GS$/ ) {
+  if ( $command =~ /^\.GS$/ ) {
     $Groff{'grn'}++;		# for grn
     return;
   }
-  if ( $line =~ /^\.lilypond$/ ) {
+  if ( $command =~ /^\.IS$/ ) {
+    $Groff{'ideal'}++;		# for ideal
+    return;
+  }
+  if ( $command =~ /^\.lilypond$/ ) {
     $Groff{'lilypond'}++;	# for glilypond
     return;
   }
-  if ( $line =~ /^\.PS$/ ) {
+  if ( $command =~ /^\.PS$/ ) {
     $Groff{'pic'}++;		# for gpic
     return;
   }
-  if ( $line =~ /^\.R1$/ ) {
+  if ( $command =~ /^\.R1$/ ) {
     $Groff{'refer'}++;		# for refer
     return;
   }
-  if ( $line =~ /^\.\[$/ ) {
+  if ( $command =~ /^\.\[$/ ) {
     $Groff{'refer_open'}++;	# for refer open
     return;
   }
-  if ( $line =~ /^\.\]$/ ) {
+  if ( $command =~ /^\.\]$/ ) {
     $Groff{'refer_close'}++;	# for refer close
     return;
   }
-  if ( $line =~ /^\.TS$/ ) {
+  if ( $command =~ /^\.TS$/ ) {
     $Groff{'tbl'}++;		# for tbl
     return;
   }
 
 
+  ######################################################################
   # devices
+  ######################################################################
 
-  # for man
-  if ( $line =~ /^\.TH$/ ) {
-    $Groff{'TH'}++;
-    return;
-  }
-  if ( $line =~ /^\.SH$/ ) {
-    $Groff{'SH'}++;
-    return;
-  }
-  if ( $line =~ /^\.SS$/ ) {
-    $Groff{'SS'}++;
+  ##########
+  # modern mdoc
+
+  if ( $command =~ /^\.(Dd)$/ ) {
+    $Groff{'Dd'}++;		# for modern mdoc
     return;
   }
-#  if ( $line =~ /^\.P$/ ) {
-#   $Groff{'P'}++;
-#    return;
-#  }
 
   # In the old version of -mdoc `Oo' is a toggle, in the new it's
   # closed by `Oc'.
-  if ( $line =~ /^\.Oc$/ ) {
+  if ( $command =~ /^\.Oc$/ ) {
     $Groff{'Oc'}++;		# only for modern mdoc
     return;
   }
-  if ( $line =~ /^\.Oo$/ ) {
+
+
+  ##########
+  # old and modern mdoc
+
+  if ( $command =~ /^\.Oo$/ ) {
     $Groff{'Oo'}++;		# for mdoc and mdoc-old
     return;
   }
 
-  if ( $line =~ /^\.(Dd)$/ ) {
-    $Groff{'Dd'}++;		# for modern mdoc
-    return;
-  }
-  if ( $line =~ /^\.(Tp|Dp|De|Cx|Cl)$/ ) {
+
+  ##########
+  # old mdoc
+  if ( $command =~ /^\.(Tp|Dp|De|Cx|Cl)$/ ) {
     $Groff{'mdoc_old'}++;	# true for old mdoc
     return;
   }
 
-  if ( $line =~ /^\.([ilnp]p|sh)$/ ) {
-    $Groff{'me'}++;		# for me
+
+  ##########
+  # for ms
+
+  if ( $command =~ /^\.AB$/ ) {
+    $Groff{'AB'}++;		# for ms
     return;
   }
-  if ( $line =~ /^\.(PH|SA)$/ ) {
-    $Groff{'mm'}++;		# for mm
+  if ( $command =~ /^\.AE$/ ) {
+    $Groff{'AE'}++;		# for ms
     return;
   }
-  if ( $line =~ /^\.(PRINTSTYLE|START)$/ ) {
-    $Groff{'mom'}++;		# for mom
+  if ( $command =~ /^\.AI$/ ) {
+    $Groff{'AI'}++;		# for ms
+    return;
+  }
+  if ( $command =~ /^\.AU$/ ) {
+    $Groff{'AU'}++;		# for ms
     return;
   }
-  if ( $line =~ /^\.NH$/ ) {
+  if ( $command =~ /^\.NH$/ ) {
     $Groff{'NH'}++;		# for ms
     return;
   }
+  if ( $command =~ /^\.TL$/ ) {
+    $Groff{'TL'}++;		# for ms
+    return;
+  }
+  if ( $command =~ /^\.XP$/ ) {
+    $Groff{'XP'}++;		# for ms
+    return;
+  }
+
+
+  ##########
+  # for man and ms
+
+  if ( $command =~ /^\.IP$/ ) {
+    $Groff{'IP'}++;		# for man and ms
+    return;
+  }
+  if ( $command =~ /^\.LP$/ ) {
+    $Groff{'LP'}++;		# for man and ms
+    return;
+  }
+  if ( $command =~ /^\.P$/ ) {
+    $Groff{'P'}++;		# for man and ms
+    return;
+  }
+  if ( $command =~ /^\.PP$/ ) {
+    $Groff{'PP'}++;		# for man and ms
+    return;
+  }
+  if ( $command =~ /^\.SH$/ ) {
+    $Groff{'SH'}++;		# for man and ms
+    return;
+  }
+  if ( $command =~ /^\.TH$/ ) {
+    $Groff{'TH'}++;		# for man and ms
+    return;
+  }
+
+
+  ##########
+  # for man only
+
+  if ( $command =~ /^\.OP$/ ) {	# for man
+    $Groff{'OP'}++;
+    return;
+  }
+  if ( $command =~ /^\.SS$/ ) {	# for man
+    $Groff{'SS'}++;
+    return;
+  }
+  if ( $command =~ /^\.YS$/ ) {	# for man
+   $Groff{'YS'}++;
+    return;
+  }
+  if ( $command =~ /^\.SY$/ ) {	# for man
+    $Groff{'SY'}++;
+    return;
+  }
+
+
+  ##########
+  # me
+
+  if ( $command =~ /^\.(
+		      [ilnp]p|
+		      sh
+		    )$/x ) {
+    $Groff{'me'}++;		# for me
+    return;
+  }
+
+
+  #############
+  # mm and mmse
+
+  if ( $command =~ /^\.(
+		      H|
+		      MULB|
+		      LO|
+		      LT|
+		      NCOL|
+		      P\$|
+		      PH|
+		      SA
+		    )$/x ) {
+    $Groff{'mm'}++;		# for mm and mmse
+    if ( $command =~ /^\.LO$/ ) {
+      if ( $args =~ /^(DNAMN|MDAT|BIL|KOMP|DBET|BET|SIDOR)/ ) {
+	$Groff{'mmse'}++;	# for mmse
+      }
+    } elsif ( $command =~ /^\.LT$/ ) {
+      if ( $args =~ /^(SVV|SVH)/ ) {
+	$Groff{'mmse'}++;	# for mmse
+      }
+    }
+    return;
+  }
+
+
+  ##########
+  # mom
+
+  if ( $line =~ /^\.(
+		   ALD|
+		   DOCTYPE|
+		   FAMILY|
+		   FT|
+		   FAM|
+		   LL|
+		   LS|
+		   NEWPAGE|
+		   PAGE|
+		   PAPER|
+		   PRINTSTYLE|
+		   PT_SIZE|
+		   T_MARGIN
+		 )$/x ) {
+    $Groff{'mom'}++;		# for mom
+    return;
+  }
+
 } # sub do_line
 
 
@@ -401,6 +562,10 @@ sub do_line {
 ########################################################################
 
 sub make_groff_line {
+  our %File_Name_Extensions;
+  our $is_mmse;
+  our @FILES;
+
   my @m = ();
   my @preprograms = ();
 
@@ -456,7 +621,10 @@ EOF
     }
   }
 
+
+  ##########
   # preprocessors
+
   if ( $Groff{'lilypond'} ) {
     push @preprograms, 'glilypond';
   }
@@ -464,13 +632,14 @@ EOF
     push @preprograms, 'gperl';
   }
   $Groff{'refer'} ||= $Groff{'refer_open'} && $Groff{'refer_close'};
-  if ( $Groff{'pic'} || $Groff{'tbl'} || $Groff{'eqn'} ||
-       $Groff{'grn'} || $Groff{'grap'} || $Groff{'refer'} ||
-       $Groff{'chem'} ) {
+  if ( $Groff{'chem'} || $Groff{'eqn'} || $Groff{'grap'} ||
+       $Groff{'grn'} || $Groff{'ideal'} || $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 .= "j" if $Groff{'chem'};
     $s .= "p" if $Groff{'pic'};
     $s .= "R" if $Groff{'refer'};
@@ -480,50 +649,96 @@ EOF
   }
 
 
+  ######################################################################
   # tmacs
+  ######################################################################
 
-  if ( $Groff{'TH'} && ( $Groff{'SH'} ||  $Groff{'SS'} ) ) {
-    $Groff{'TH'} = 0;
-    $Groff{'SH'} = 0;
-    $Groff{'SS'} = 0;
-    $Groff{'man'} = 1;
-    push(@m, '-man');
-    push(@Command, '-man');
-  }
+  ###########
+  # man or ms
 
-  if ( $Groff{'NH'} ) {
-    $Groff{'ms'}++;
-    push(@m, '-ms');
-    push(@Command, '-ms');
+  {
+    my $is_ms = 0;
+    if ( $Groff{'TH'} || $Groff{'P'} || $Groff{'IP'}  ||
+	 $Groff{'LP'} || $Groff{'PP'} || $Groff{'SH'} ) {
+      # man or ms
+      if ( $Groff{'SS'} ||  $Groff{'SY'} ||  $Groff{'OP'} ) {
+	# it is `man', because these macros are not `ms'
+	$Groff{'man'} = 1;
+	push(@m, '-man');
+	push(@Command, '-man');
+      } elsif
+	(	# it must now be `ms'
+	 $Groff{'1C'} || $Groff{'2C'} ||
+	 $Groff{'AB'} || $Groff{'AE'} || $Groff{'AI'} || $Groff{'AU'} ||
+	 $Groff{'BX'} || $Groff{'CD'} || $Groff{'DA'} || $Groff{'DE'} ||
+	 $Groff{'DS'} || $Groff{'LD'} || $Groff{'ID'} || $Groff{'NH'} ||
+	 $Groff{'TL'} || $Groff{'UL'} || $Groff{'XP'}
+	) {
+	$is_ms = 1;
+      } else {	# maybe `ms'
+	print STDERR 'grog: device -ms assumed without proof.'
+	  unless ( $File_Name_Extensions{'ms'} );
+	$is_ms = 1;
+      }
+    }
+    if ( $is_ms ) {
+      $Groff{'ms'} = 1;
+      push(@m, '-ms');
+      push(@Command, '-ms');
+    }
   }
 
+
+  ##########
+  # mdoc
+
   if ( ( $Groff{'Oo'} && $Groff{'Oc'} ) || $Groff{'Dd'} ) {
     $Groff{'Oc'} = 0;
     $Groff{'Oo'} = 0;
     push(@m, '-mdoc');
     push(@Command, '-mdoc');
   }
-
   if ( $Groff{'mdoc_old'} || $Groff{'Oo'} ) {
     push(@m, '-mdoc_old');
     push(@Command, '-mdoc_old');
   }
 
 
+  ##########
+  # me
+
   if ( $Groff{'me'} ) {
     push(@m, '-me');
     push(@Command, '-me');
   }
+
+
+  ##########
+  # mm and mmse
+
   if ( $Groff{'mm'} ) {
-    push(@m, '-mm');
-    push(@Command, '-mm');
+    if ( $is_mmse ) {	# swedish mmse
+      push(@m, '-mmse');
+      push(@Command, '-mmse');
+    } else {		# normal mm
+      push(@m, '-mm');
+      push(@Command, '-mm');
+    }
   }
+
+
+  ##########
+  # mom
+
   if ( $Groff{'mom'} ) {
     push(@m, '-mom');
     push(@Command, '-mom');
   }
 
 
+  ######################################################################
+  # create groff command
+
   unshift @Command, 'groff';
   if ( @preprograms ) {
     my @progs;
@@ -536,7 +751,7 @@ EOF
     push @progs, '|';
     unshift @Command, @progs;
   } else {
-    push(@Command, @ARGV);
+    push(@Command, @FILES);
   }
 
   foreach (@Command) {


From MAILER-DAEMON Sat Jun 14 11:30:59 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Wvpv1-0007cp-6q
	for mharc-groff-commit@gnu.org; Sat, 14 Jun 2014 11:30:59 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43500)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wvpuy-0007cE-GZ
	for groff-commit@gnu.org; Sat, 14 Jun 2014 11:30:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wvpuw-0000tD-TQ
	for groff-commit@gnu.org; Sat, 14 Jun 2014 11:30:56 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:55643)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wvpuw-0000t9-Q8
	for groff-commit@gnu.org; Sat, 14 Jun 2014 11:30:54 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1Wvpuv-0002Kl-Tb
	for groff-commit@gnu.org; Sat, 14 Jun 2014 15:30:54 +0000
Date: Sat, 14 Jun 2014 15:30:53 +0000
Message-Id: <E1Wvpuv-0002Kl-Tb@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: grog: repair handling of filespec arguments
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140614153053.8940.35319@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 796e0bbf4ec77eeac6ca7449883e8c01108889ff
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 14 Jun 2014 15:30:57 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 796e0bbf4ec77eeac6ca7449883e8c01108889ff
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Sat Jun 14 17:30:46 2014 +0200

    grog: repair handling of filespec arguments
---
 ChangeLog             |    4 ++++
 src/roff/grog/subs.pl |   14 +++++++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b367ee3..af162f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-06-14  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* src/roff/grog/subs.pl: Repair handling of filespec arguments.
+
 2014-06-12  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* src/roff/grog/grog.pl, src/roff/grog/subs.pl: Add testing
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index f753717..933cc3f 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -30,7 +30,7 @@
 # <http://www.gnu.org/licenses/gpl-2.0.html>.
 
 ########################################################################
-# Last_Update = '12 Jun 2014';
+# Last_Update = '14 Jun 2014';
 ########################################################################
 
 require v5.6;
@@ -739,11 +739,17 @@ EOF
   ######################################################################
   # create groff command
 
+  @FILES = ( '-' ) unless ( @FILES );
+
+  for (@FILES) {
+    print STDERR 'filearg: ' . $_;
+  }
+
   unshift @Command, 'groff';
   if ( @preprograms ) {
     my @progs;
     $progs[0] = shift @preprograms;
-    push(@progs, @ARGV);
+    push(@progs, @FILES);
     for ( @preprograms ) {
       push @progs, '|';
       push @progs, $_;
@@ -778,7 +784,9 @@ EOF
   # execute the `groff' command here with option `--run'
   if ( $do_run ) {
     print STDERR "@Command";
-    system(join ' ', @Command);
+    my $cmd = join ' ', @Command;
+    print 'command will be: ' . $cmd;
+    # system($cmd);
   } else {
     print "@Command";
   }


From MAILER-DAEMON Sat Jun 14 11:44:07 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Wvq7j-0000WF-KJ
	for mharc-groff-commit@gnu.org; Sat, 14 Jun 2014 11:44:07 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:44762)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wvq7g-0000VV-QP
	for groff-commit@gnu.org; Sat, 14 Jun 2014 11:44:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wvq7e-0005MM-1F
	for groff-commit@gnu.org; Sat, 14 Jun 2014 11:44:04 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:55757)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wvq7d-0005MI-V8
	for groff-commit@gnu.org; Sat, 14 Jun 2014 11:44:01 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1Wvq7c-00035F-RF
	for groff-commit@gnu.org; Sat, 14 Jun 2014 15:44:01 +0000
Date: Sat, 14 Jun 2014 15:44:00 +0000
Message-Id: <E1Wvq7c-00035F-RF@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: grog: Remove some STDERR output.
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140614154400.11822.10271@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: dee3a93911fbbbcd0e7f0ed3a8263d34ff6b153c
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 14 Jun 2014 15:44:05 -0000

bwarken pushed a commit to branch master
in repository groff.

commit dee3a93911fbbbcd0e7f0ed3a8263d34ff6b153c
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Sat Jun 14 17:43:53 2014 +0200

    grog: Remove some STDERR output.
---
 src/roff/grog/subs.pl |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index 933cc3f..6c9c1dc 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -739,12 +739,6 @@ EOF
   ######################################################################
   # create groff command
 
-  @FILES = ( '-' ) unless ( @FILES );
-
-  for (@FILES) {
-    print STDERR 'filearg: ' . $_;
-  }
-
   unshift @Command, 'groff';
   if ( @preprograms ) {
     my @progs;


From MAILER-DAEMON Sat Jun 14 15:55:48 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Wvu3I-0004Xf-Gy
	for mharc-groff-commit@gnu.org; Sat, 14 Jun 2014 15:55:48 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51197)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wvu3F-0004XI-N0
	for groff-commit@gnu.org; Sat, 14 Jun 2014 15:55:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wvu3D-0007KK-6F
	for groff-commit@gnu.org; Sat, 14 Jun 2014 15:55:45 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:57715)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wvu3D-0007KE-1U
	for groff-commit@gnu.org; Sat, 14 Jun 2014 15:55:43 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1Wvu3B-0005np-Tc
	for groff-commit@gnu.org; Sat, 14 Jun 2014 19:55:42 +0000
Date: Sat, 14 Jun 2014 19:55:42 +0000
Message-Id: <E1Wvu3B-0005np-Tc@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: gperl: rewrite without subs;
	restrict storage to strings
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140614195541.22274.97640@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 3c32c8c15feb391cd96a11a0bfcdf60ba72f3072
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 14 Jun 2014 19:55:47 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 3c32c8c15feb391cd96a11a0bfcdf60ba72f3072
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Sat Jun 14 21:55:34 2014 +0200

    gperl: rewrite without subs; restrict storage to strings
---
 contrib/gperl/ChangeLog |    6 +
 contrib/gperl/gperl.man |  267 +++++++++++++++++++++++++++++++++--------------
 contrib/gperl/gperl.pl  |  169 +++++++++++++++---------------
 3 files changed, 278 insertions(+), 164 deletions(-)

diff --git a/contrib/gperl/ChangeLog b/contrib/gperl/ChangeLog
index 042601f..d5ece27 100644
--- a/contrib/gperl/ChangeLog
+++ b/contrib/gperl/ChangeLog
@@ -1,3 +1,9 @@
+2014-06-14  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* gperl.pl: Version 1.1.  New structure without subs.
+
+	* gperl.man: Major rewrite.  Omit `.nr'.
+
 2014-02-27  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* gperl.pl: Admit file name arguments.  Handle correct temporary
diff --git a/contrib/gperl/gperl.man b/contrib/gperl/gperl.man
index 52431cc..7b89b7f 100644
--- a/contrib/gperl/gperl.man
+++ b/contrib/gperl/gperl.man
@@ -9,11 +9,13 @@ gperl \- groff preprocessor for Perl parts in roff files
 .\" Legalese
 .\" --------------------------------------------------------------------
 .
-.de author
+.de authors
 This file was written by Bernd Warken <groff-bernd.warken-72@web.de>.
+.
+Latest update: 14 Jun 2014
 ..
 .
-.de co
+.de copyright
 Copyright (C) 2014 Free Software Foundation, Inc.
 .
 .P
@@ -43,7 +45,11 @@ The license text is available in the internet at
 .\" Setup
 .\" --------------------------------------------------------------------
 .
-.ds Ellipsis "\&.\|.\|.\&\"
+.
+.char \[Ellipsis] \f[S]\N'188'\fP
+.
+.\" ds Ellipsis \[el]
+.\" ds Ellipsis "\&.\|.\|.\&\"
 .
 .\" --------------------------------------------------------------------
 .\" Macro definitions
@@ -78,6 +84,21 @@ The license text is available in the internet at
 .  Text \\$*
 .  ft
 ..
+.
+.\" --------------------------------------------------------------------
+.\" .Topic  ([<indent>])
+.\"
+.\" A bulleted paragraph
+.\"
+.de Topic
+.  ie \\n[.$]=0 \
+.    ds @indent 2m\"
+.  el \
+.    ds @indent \\$1\"
+.  IP \[bu] \\*[@indent]
+.  rm @indent
+..
+.
 .\" End of macro definitions
 .
 .
@@ -86,9 +107,9 @@ The license text is available in the internet at
 .\" --------------------------------------------------------------------
 .
 .SY gperl
-.OP option \*[Ellipsis]
+.OP \fIoption \[Ellipsis]
 .OP --
-.OP \%filespec \*[Ellipsis]
+.OP \fI\%filespec \[Ellipsis]
 .YS
 .
 .SY gperl
@@ -115,40 +136,24 @@ files.
 .
 The result of a
 .I Perl part
-can be stored in
-.I roff
-strings
-.RB ( .ds )
-or numerical registers
-.RB ( .rn ).
-.
-.
-.\" --------------------------------------------------------------------
-.SH "OPTION OVERVIEW"
-.\" --------------------------------------------------------------------
-.
-.TP
-.I breaking options
-.RS
-.P
-.SY
-.OP -h\~\fR|\fB\~--help
-.OP -v\~\fR|\fB\~--version
-.YS
-.RE
+can be stored in a
+.I groff string
+within the final line of a
+.IR "Perl part" .
 .
 .
 .\" --------------------------------------------------------------------
-.SH "OPTION DETAILS"
+.SH "OPTIONS"
 .\" --------------------------------------------------------------------
 .
-As soon as one of these options is found on the command line it is
-executed, printed to standard output, and the running
-.B \%gperl
-preprocessor is finished thereafter.
+So far, there are only
+.IR "breaking options" ,
+that means that the program writes the asked for information and
+stops a running program line.
 .
 All other arguments are ignored.
 .
+These options are
 .
 .TP
 .B -h\~\fR|\fB\~--help
@@ -168,76 +173,173 @@ Print version information to standard output.
 .I Perl
 parts in
 .I groff files
-are created by the new command
-.BR .Perl .
+are enclosed by two
+.B .Perl
+requests with different arguments, a
+.I starting
+and an
+.I ending
+command.
 .
 .
-.P
-A
-.I Perl part
-is started either by the request
-.B .Perl
-wiothout arguments, or by a request that's has the term
+.\" --------------------------------------------------------------------
+.SS "Starting Perl Mode"
+.\" --------------------------------------------------------------------
+.
+The starting
+.I Perl request
+can either be without arguments, or by a request that has the term
 .B start
 as its first argument.
+.RS
+.Topic
+.B \&.Perl
+.Topic
+.B \&.Perl start
+.RE
 .
+All arguments after
+.B start
+are ignored.
 .
-.P
-All
+.
+.\" --------------------------------------------------------------------
+.SS "Ending Perl Mode without Storage"
+.\" --------------------------------------------------------------------
+.
+A
 .B .Perl
-command lines with other arguments finish a running
+command line with an argument different from
+.B start
+finishes a running
 .IR "Perl part" .
 .
-So one can add arbitrary arguments for closing.
-.
-It would be reasonable to add the argument
-.BI stop ;
+Of course, it would be reasonable to add the argument
+.BR stop ;
 that's possible, but not necessary.
 .
+.RS
+.Topic
+.B \&.Perl stop
+.Topic
+.BI \&.Perl " other_than_start"
+.RE
+.
+The argument
+.I other_than_start
+can additionally used as a variable name for storage, see next
+section.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Ending Perl Mode with Storage"
+.\" --------------------------------------------------------------------
+.
+A useful feature of
+.B gperl
+is to store some result from the
+.IR "Perl mode" .
+.
 .
 .P
-A useful feature is to store the standard output of a
+That can be done by running the
 .I Perl part
-into a
-.I roff
-string or register.
+within
+.B gperl
+using one of the
+.I Perl commands
+from
+.BR IPC::System::Simple .
 .
-Storable data can be reached by
-.I printing to standard output
-with the
-.I Perl
-command
-.BR print .
+We use now the program
+.B capture
+for running the
+.IR "Perl parts" .
 .
 .
 .P
-Numerical output can be stored into a
-.IR "roff register" ,
-by adding the following 2 arguments to a
-.B .Perl
-stopping command line; the argument
-.B ds
-or
-.B .ds
-and a suitable variable name.
+The related storage information comes from the collection of all
+printing to standard output with the normal Perl
+.B print
+command in a
+.IR "Perl part" .
+.
+This pseudo-printing information does not go to
+.I STDOUT
+as normally, but is received as the result from the program, which
+runs the
+.IR "Perl part" .
 .
 .
 .P
-String output can be stored into a
-.IR "roff string" ,
-by adding the following 2 arguments to a
-.B .Perl
-stopping command line; the argument
-.B nr
-or
-.B .nr
-and a suitable variable name.
+But the printing towards
+.IR STDERR ,
+(standard error) works as usual.
+.
+All error information goes to the real normal
+.IR "standard error" ,
+without other automatical storage.
 .
 .
 .P
-Other arguments in a
+To use that output from the
+.I Perl part
+for
+.IR roff ,
+.B gperl
+creates automatically a line with the string defining roff command
+.BR .ds .
+.
+Because of the Perl-structure of the result, only string output can be
+used, not
+.IR "numerical roff registers" .
+.
+In
+.BR \%groff (@MAN7EXT@),
+one can create registers from strings.
+.
+.
+.B
+As the
+.I Perl mode
+must first be finished to get the information, this storage can only
+be done by arguments in the final
 .B .Perl
-command line are just ignored.
+command.
+.
+Possible arguments are
+.
+.RS
+.Topic
+.BI .Perl " var_name"
+.Topic
+.BI ".Perl ds" " var_name"
+.Topic
+.BI ".Perl .ds" " var_name"
+.Topic
+.BI ".Perl stop" " var_name"
+.Topic
+.BI ".Perl stop ds" " var_name"
+.Topic
+.BI ".Perl stop .ds" " var_name"
+.RE
+.
+.
+.P
+The
+.I var_name
+is some word that will be used by
+.B gperl
+for a
+.B .ds
+roff string definition.
+.
+If this
+.I var_name
+is the only argument, it must be different from
+.BR start ,
+at other argument places it can be chosen arbitrarily, but without
+spaces.
 .
 .
 .\" --------------------------------------------------------------------
@@ -252,10 +354,10 @@ could look like that:
 .RS
 .EX
 before
-.Perl start
+\&.Perl start
 my $result = 'some data';
 print $result . \[rq]\[rs]n\[rq];
-.Perl stop .ds some_string 
+\&.Perl stop .ds some_string 
 after
 .EE
 .RE
@@ -274,6 +376,11 @@ such that the following line is printed:
 \&.ds some_string some data
 .EE
 .RE
+by
+.B gperl
+as food for the coming
+.B groff
+run.
 .
 .
 .\" --------------------------------------------------------------------
@@ -292,13 +399,13 @@ such that the following line is printed:
 .\" --------------------------------------------------------------------
 .SH "AUTHOR"
 .\" --------------------------------------------------------------------
-.author
+.authors
 .
 .
 .\" --------------------------------------------------------------------
 .SH "COPYING"
 .\" --------------------------------------------------------------------
-.co
+.copyright
 .
 .
 .\" --------------------------------------------------------------------
diff --git a/contrib/gperl/gperl.pl b/contrib/gperl/gperl.pl
index 93fbb28..ccb1670 100755
--- a/contrib/gperl/gperl.pl
+++ b/contrib/gperl/gperl.pl
@@ -10,8 +10,8 @@
 
 # Written by Bernd Warken <groff-bernd.warken-72@web.de>.
 
-# Last update: 27 Feb 2014
-my $version = '1.0';
+my $Latest_Update = '14 Jun 2014';
+my $version = '1.1';
 
 # This file is part of `gperl', which is part of `groff'.
 
@@ -54,14 +54,14 @@ use Cwd;
 use FindBin;
 
 # for running perl scripts
-use IPC::System::Simple qw(system capture);
+use IPC::System::Simple qw(system systemx capture capturex);
 
 
 ########################################################################
 # system variables and exported variables
 ########################################################################
 
-$\ = "\n";
+$\ = "\n";	# final part for print command
 
 ########################################################################
 # read-only variables with double-@ construct
@@ -92,17 +92,19 @@ if ($before_make) {
 
 
 ########################################################################
-# options
-#######################################################################
+# breaking options
+########################################################################
 
 foreach (@ARGV) {
   if ( /^(-h|--h|--he|--hel|--help)$/ ) {
-    print 'usage:';
-    print 'gperl [-h|--help]';
-    print 'gperl [-v|--version]';
+    print q(Usage for the `gperl' program:);
+    print 'gperl [-h|--help]     gives usage information';
+    print 'gperl [-v|--version]  displays the version number';
+    print q(This program is a `groff' preprocessor that handles Perl ) .
+      q(parts in `roff' files.);
     exit;
   } elsif ( /^(-v|--v|--ve|--ver|--vers|--versi|--versio|--version)$/ ) {
-    print 'gperl version ' . $version;
+    print q(`gperl' version ) . $version . ' of ' . $Latest_Update;
     exit;
   }
 }
@@ -131,106 +133,105 @@ my $out_file;
 
 ########################################################################
 # input
-#######################################################################
+########################################################################
 
 my $perl_mode = 0;
 my %set_cmd;
 
 foreach (<>) {
   chomp;
-  if ( /^[.']\s*Perl\s?/ ) { # .Perl ...
-    my $res = &perl_request( $_ );
-
-    if ( $res eq '' ) {
-      print $_;
-      next;
+  my $line = $_;
+  my $is_dot_Perl = $line =~ /^[.']\s*Perl(|\s+.*)$/;
+
+  unless ( $is_dot_Perl ) {	# not a `.Perl' line
+    if ( $perl_mode ) {		# is running in Perl mode
+      print OUT $line;
+    } else {			# normal line, not Perl-related
+      print $line;
     }
-
-    if ( $res eq 'start' ) {
-      if ( $perl_mode ) {
-	# `.Perl start' is called twice, ignore
-      } else { # new Perl start
-	$perl_mode = 1;
-	open OUT, '>', $out_file;
-      }
-      next;
-    } elsif ( $res eq 'stop' ) {
-      close OUT;
-      $perl_mode = 0;
-      my $res = capture('perl',  $out_file);
-      print $set_cmd{'command'} . ' ' . $set_cmd{'var'} . ' ' . $res
-	if ( exists $set_cmd{'command'} );
-      %set_cmd = ();
-      next;
-    }
-  }
-
-  if ( $perl_mode ) {
-    print OUT $_;
     next;
   }
 
-  print $_;
-}
 
+  ##########
+  # now the line is a `.Perl' line
 
-########################################################################
+  my $args = $line;
+  $args =~ s/\s+$//;	# remove final spaces
+  $args =~ s/^[.']\s*Perl\s*//;	# omit .Perl part, leave the arguments
 
-sub perl_request {
-  my $line = shift;
-  my @args = split /\s+/, $line;
-  my $is_ds = 0;
-  my $is_rn = 0;
+  my @args = split /\s+/, $args;
 
-  # 3 results:
-  # '' : error
-  # 'start'
-  # 'stop'
+  if ( @args == 0 || $args[0] eq 'start' ) {
+    # for `.Perl' no args or first arg `start' means opening `Perl' mode
+    if ( $perl_mode ) {
+      # `.Perl' was started twice, ignore
+      print STDERR q(`.Perl' starter was run several times);
+      next;
+    } else {	# new Perl start
+      $perl_mode = 1;
+      open OUT, '>', $out_file;
+      next;
+    }
+  }
 
-  # arg must be a command line starting with .Perl
-  return '' if ( $line !~ /^[.']\s*Perl/ );
+  ##########
+  # now the line must be a Perl ending line (stop)
 
-  # different numbers of arguments
+  unless ( $perl_mode ) {
+    print STDERR 'gperl: there was a Perl ending without being in ' .
+      'Perl mode.';
+    next;
+  }
 
-  shift @args; # ignore first argument `.Perl'
+  $perl_mode = 0;	# `Perl' stop calling is correct
+  close OUT;		# close the storing of `Perl' commands
 
-  return 'start' if ( @args == 0 ); # `.Perl' without args
-  return 'start' if ( $args[0] eq 'start' );
+  ##########
+  # run this `Perl' part, later on about storage of the result
+  my $print_res = capturex('perl',  $out_file);
 
-  # now everything means `stop', but only within Perl mode
-  return '' unless ( $perl_mode );
+  shift @args if ( $args[0] eq 'stop' ); # remove `stop' arg if exists
 
-  if ( $args[0] eq 'stop' ) {
-    shift @args; # remove `stop' arg
+  if ( @args == 0 ) {
+    # no args for saving, so $print_res doesn't matter
+    next;
   }
 
-  if ( @args <= 1 ) {
-    # ignore single arg, variable name for possible ds or rn is lacking
-    return 'stop';
-  }
+  # extract the now leading arg for saving mode
+  my $save_mode = shift @args;
 
-  # now >= 2 args for STDOUT result saving
-  if ( $args[0] =~ /^[.']?ds$/ ) {
-    $is_ds = 1;
-    %set_cmd = (
-	   'command' => $args[0],
-	   'var' => $args[1],
-	  );
-  } elsif ( $args[0] =~ /^[.']?rn$/ ) {
-    $is_rn = 1;
-    %set_cmd = (
-	   'command' => $args[0],
-	   'var' => $args[1],
-	  );
-  } else {
-    # ignore other args
-    return 'stop';
+  if ( @args == 0 ) {
+    # no args for saving variable name, so $print_res doesn't matter
+    print STDERR 'gperl: a variable name for the saving mode ' .
+      $save_mode . ' must be provided in the line:';
+    print STDERR '    ' . $line;
+    next;
   }
 
-  $set_cmd{'command'} = '.' . $set_cmd{'command'}
-    if ( $set_cmd{'command'} !~ /^[.']/ );
+  my $command;
+
+  # variable name for saving command the $print_res
+  my $var_name = shift @args;
+  # ignore all other args
+
+  if ( $save_mode =~ /^\.?ds$/ ) {		# string
+    $command = '.ds';
+  } elsif ( $save_mode =~ /^\.?nr$/ ) {
+    # Number registers do not work, just for compatibility.
+    # Storage is done into a `groff' string variable
+    $command = '.ds';
+  } else {	# no storage variables provided
+     print STDERR 'gperl: wrong argument ' . $save_mode .
+       'in Perl stop line:';
+     print STDERR '    ' . $line;
+     print STDERR 'allowed are only .ds for storing a string or .nr ' .
+       'for a number register';
+     next;
+  }
 
-  return 'stop';
+  $command .= ' ' . $var_name . ' ' . $print_res;
+  print $command;
 }
 
 


From MAILER-DAEMON Sat Jun 14 16:02:22 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Wvu9e-00053E-1p
	for mharc-groff-commit@gnu.org; Sat, 14 Jun 2014 16:02:22 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52421)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wvu9c-000538-C2
	for groff-commit@gnu.org; Sat, 14 Jun 2014 16:02:21 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wvu9a-00018R-3W
	for groff-commit@gnu.org; Sat, 14 Jun 2014 16:02:20 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:57796)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wvu9a-00018N-0W
	for groff-commit@gnu.org; Sat, 14 Jun 2014 16:02:18 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1Wvu9Z-0006NC-3m
	for groff-commit@gnu.org; Sat, 14 Jun 2014 20:02:17 +0000
Date: Sat, 14 Jun 2014 20:02:17 +0000
Message-Id: <E1Wvu9Z-0006NC-3m@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: gperl: correct Changelog
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140614200216.24466.69689@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: d38b014e91c8527fdbf5764c73e0a790622d5169
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sat, 14 Jun 2014 20:02:21 -0000

bwarken pushed a commit to branch master
in repository groff.

commit d38b014e91c8527fdbf5764c73e0a790622d5169
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Sat Jun 14 22:02:08 2014 +0200

    gperl: correct Changelog
---
 contrib/gperl/ChangeLog |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/contrib/gperl/ChangeLog b/contrib/gperl/ChangeLog
index d5ece27..ab9c26f 100644
--- a/contrib/gperl/ChangeLog
+++ b/contrib/gperl/ChangeLog
@@ -1,6 +1,7 @@
 2014-06-14  Bernd Warken  <groff-bernd.warken-72@web.de>
 
-	* gperl.pl: Version 1.1.  New structure without subs.
+	* gperl.pl: Version 1.1.  New structure without subs.  Restrict
+	storage to only strings by creating only `.ds'.
 
 	* gperl.man: Major rewrite.  Omit `.nr'.
 
@@ -11,10 +12,11 @@
 
 2014-02-25  Bernd Warken  <groff-bernd.warken-72@web.de>
 
-	* gperl.pl, gperl.man, ChangeLog, Makefile.sub: first version 1.0
+	* gperl.pl, gperl.man, ChangeLog, Makefile.sub:
+	first version 1.0
 
 2014-02-25  Bernd Warken  <groff-bernd.warken-72@web.de>
-________________________________________________________________
+________________________________________________________________________
 License
 
 Copyright (C) 2014


From MAILER-DAEMON Sun Jun 15 08:05:58 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Ww9CA-0006ec-1j
	for mharc-groff-commit@gnu.org; Sun, 15 Jun 2014 08:05:58 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51971)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Ww9C7-0006dv-W7
	for groff-commit@gnu.org; Sun, 15 Jun 2014 08:05:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Ww9C7-00044D-2e
	for groff-commit@gnu.org; Sun, 15 Jun 2014 08:05:55 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:37506)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Ww9C6-000449-VE
	for groff-commit@gnu.org; Sun, 15 Jun 2014 08:05:54 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1Ww9C5-0001J3-UH
	for groff-commit@gnu.org; Sun, 15 Jun 2014 12:05:54 +0000
Date: Sun, 15 Jun 2014 12:05:54 +0000
Message-Id: <E1Ww9C5-0001J3-UH@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: grog: activate --run for running the generated groff
	line
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140615120553.4990.12780@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: eb3b177a3e40d57181d131c24660b5efedbd3925
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 15 Jun 2014 12:05:56 -0000

bwarken pushed a commit to branch master
in repository groff.

commit eb3b177a3e40d57181d131c24660b5efedbd3925
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Sun Jun 15 14:05:42 2014 +0200

    grog: activate --run for running the generated groff line
---
 ChangeLog |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index af162f7..30ccba0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2014-06-14  Bernd Warken  <groff-bernd.warken-72@web.de>
 
+	* src/roff/grog/subs.pl: Activate handling of `--run', such that
+	now the generated `groff' command line can run.
+
+2014-06-14  Bernd Warken  <groff-bernd.warken-72@web.de>
+
 	* src/roff/grog/subs.pl: Repair handling of filespec arguments.
 
 2014-06-12  Bernd Warken  <groff-bernd.warken-72@web.de>


From MAILER-DAEMON Sun Jun 15 08:22:56 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Ww9Sa-0007ia-3O
	for mharc-groff-commit@gnu.org; Sun, 15 Jun 2014 08:22:56 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:53553)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Ww9SY-0007i3-7X
	for groff-commit@gnu.org; Sun, 15 Jun 2014 08:22:55 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Ww9SX-0000we-2G
	for groff-commit@gnu.org; Sun, 15 Jun 2014 08:22:54 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:37670)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Ww9SW-0000wa-Uj
	for groff-commit@gnu.org; Sun, 15 Jun 2014 08:22:52 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1Ww9SV-0002RW-Vi
	for groff-commit@gnu.org; Sun, 15 Jun 2014 12:22:52 +0000
Date: Sun, 15 Jun 2014 12:22:52 +0000
Message-Id: <E1Ww9SV-0002RW-Vi@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: grog: minor additions
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140615122251.9359.34256@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: d714a5f110146705300ee9d49340f9a7572e4667
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 15 Jun 2014 12:22:55 -0000

bwarken pushed a commit to branch master
in repository groff.

commit d714a5f110146705300ee9d49340f9a7572e4667
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Sun Jun 15 14:22:36 2014 +0200

    grog: minor additions
---
 src/roff/grog/grog.man |    4 ++--
 src/roff/grog/subs.pl  |    8 +++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/roff/grog/grog.man b/src/roff/grog/grog.man
index 234bbe2..16ec08d 100644
--- a/src/roff/grog/grog.man
+++ b/src/roff/grog/grog.man
@@ -10,7 +10,7 @@ grog.1 - man page for grog (section 1)
 Source file position:  <groff_source_top>/src/roff/grog/grog.man
 Installed position:    $prefix/share/man/man1/grog.1
 
-Last Update: 26 May 2014
+Last Update: 15 Jun 2014
 ..
 .de co
 Copyright (C) 1989\[en]2003, 2006, 2007, 2009\[en]2012, 2014
@@ -42,7 +42,7 @@ either
 of the License, or (at your option) any later version.
 .
 .
-P
+.P
 .I groff
 is distributed in the hope that it will be useful, but
 .IR "WITHOUT ANY WARRANTY" ;
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index 6c9c1dc..2f749d4 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -30,7 +30,7 @@
 # <http://www.gnu.org/licenses/gpl-2.0.html>.
 
 ########################################################################
-# Last_Update = '14 Jun 2014';
+# Last_Update = '15 Jun 2014';
 ########################################################################
 
 require v5.6;
@@ -39,6 +39,9 @@ use warnings;
 use strict;
 use File::Spec;
 
+# for running programs
+use IPC::System::Simple qw(capture capturex run runx system systemx);
+
 $\ = "\n";
 
 # my $Sp = "[\\s\\n]";
@@ -779,8 +782,7 @@ EOF
   if ( $do_run ) {
     print STDERR "@Command";
     my $cmd = join ' ', @Command;
-    print 'command will be: ' . $cmd;
-    # system($cmd);
+    system($cmd);
   } else {
     print "@Command";
   }


From MAILER-DAEMON Sun Jun 15 15:57:27 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WwGYR-0005LU-Mt
	for mharc-groff-commit@gnu.org; Sun, 15 Jun 2014 15:57:27 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49541)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwGYN-0005FW-Uy
	for groff-commit@gnu.org; Sun, 15 Jun 2014 15:57:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwGYK-0003IU-4u
	for groff-commit@gnu.org; Sun, 15 Jun 2014 15:57:23 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:41717)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwGYJ-0003IM-Uq
	for groff-commit@gnu.org; Sun, 15 Jun 2014 15:57:20 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WwGYG-0002mL-0i
	for groff-commit@gnu.org; Sun, 15 Jun 2014 19:57:16 +0000
Date: Sun, 15 Jun 2014 19:57:16 +0000
Message-Id: <E1WwGYG-0002mL-0i@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: gperl: from running Perl part use output variables
	for groff strings or number registers; allow; several varibales;
	rewrite gperl.man
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140615195715.10650.85322@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 5ec955592fa3f0b287e32f61bed9dd8810f0882a
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 15 Jun 2014 19:57:26 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 5ec955592fa3f0b287e32f61bed9dd8810f0882a
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Sun Jun 15 21:57:09 2014 +0200

    gperl: from running Perl part use output variables for groff strings or number registers; allow; several varibales; rewrite gperl.man
---
 contrib/gperl/ChangeLog    |    8 +
 contrib/gperl/Makefile.sub |   19 ++-
 contrib/gperl/gperl.man    |  317 ++++++++++++++++++++++++++++++++------------
 contrib/gperl/gperl.pl     |   99 ++++++++------
 4 files changed, 313 insertions(+), 130 deletions(-)

diff --git a/contrib/gperl/ChangeLog b/contrib/gperl/ChangeLog
index ab9c26f..09900b6 100644
--- a/contrib/gperl/ChangeLog
+++ b/contrib/gperl/ChangeLog
@@ -1,3 +1,11 @@
+2014-06-15  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* gperl.pl: Version 1.2.  Getting several storage variables from
+	printing in `Perl' with several lines.  Accept string and number
+	register variable names for `.ds' and `.nr'.
+
+	* gperl.man: Rewrite with the actual additions.
+
 2014-06-14  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* gperl.pl: Version 1.1.  New structure without subs.  Restrict
diff --git a/contrib/gperl/Makefile.sub b/contrib/gperl/Makefile.sub
index 7281250..02f24f4 100644
--- a/contrib/gperl/Makefile.sub
+++ b/contrib/gperl/Makefile.sub
@@ -30,12 +30,14 @@ MAN1=gperl.n
 
 MOSTLYCLEANADD=gperl $(MAN1)
 
+# not all make programs have $(RM) predefined.
+RM=rm -f
+
 all: gperl
 
 gperl: gperl.pl
-	rm -f $@
 	sed -f "$(SH_DEPS_SED_SCRIPT)" \
-	    -e "s|@g@|$(g)|g" \
+            -e "s|@g@|$(g)|g" \
 	    -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
 	    -e "s|@VERSION@|$(version)$(revision)|g" \
 	    -e "$(SH_SCRIPT_SED_CMD)" \
@@ -45,9 +47,18 @@ gperl: gperl.pl
 .PHONY: install_data
 install_data: gperl
 	-test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
-	rm -f $(DESTDIR)$(bindir)/gperl
+	$(RM) $(DESTDIR)$(bindir)/gperl
 	$(INSTALL_SCRIPT) gperl $(DESTDIR)$(bindir)/gperl
 
 .PHONY: uninstall_sub
 uninstall_sub:
-	rm -f $(DESTDIR)$(bindir)/gperl
+	$(RM) $(DESTDIR)$(bindir)/gperl
+
+
+########################################################################
+# Emacs settings
+########################################################################
+#
+# Local Variables:
+# mode: makefile
+# End:
diff --git a/contrib/gperl/gperl.man b/contrib/gperl/gperl.man
index 7b89b7f..409b1d9 100644
--- a/contrib/gperl/gperl.man
+++ b/contrib/gperl/gperl.man
@@ -190,7 +190,7 @@ The starting
 .I Perl request
 can either be without arguments, or by a request that has the term
 .B start
-as its first argument.
+as its only argument.
 .RS
 .Topic
 .B \&.Perl
@@ -198,10 +198,6 @@ as its first argument.
 .B \&.Perl start
 .RE
 .
-All arguments after
-.B start
-are ignored.
-.
 .
 .\" --------------------------------------------------------------------
 .SS "Ending Perl Mode without Storage"
@@ -227,8 +223,9 @@ that's possible, but not necessary.
 .
 The argument
 .I other_than_start
-can additionally used as a variable name for storage, see next
-section.
+can additionally be used as a
+.I groff
+string variable name for storage \[em] see next section.
 .
 .
 .\" --------------------------------------------------------------------
@@ -237,113 +234,221 @@ section.
 .
 A useful feature of
 .B gperl
-is to store some result from the
+is to store one or more results from the
 .IR "Perl mode" .
 .
 .
 .P
-That can be done by running the
+The output of a
 .I Perl part
-within
-.B gperl
-using one of the
+can be got by using one of the
 .I Perl commands
 from
-.BR IPC::System::Simple .
+.BR IPC::System::Simple :
+.BR capture ,
+.BR capturex ,
+.BR run ,
+.BR runx ,
+.BR system ,
+or
+.BR systemx .
 .
-We use now the program
-.B capture
-for running the
-.IR "Perl parts" .
+Several of these programs work, we use now the program
+.B capturex
+from running Perl parts.
 .
 .
 .P
-The related storage information comes from the collection of all
-printing to standard output with the normal Perl
+This program collects all printing to STDOUT (normal standard output)
+by the Perl
 .B print
-command in a
-.IR "Perl part" .
+program.
 .
-This pseudo-printing information does not go to
-.I STDOUT
-as normally, but is received as the result from the program, which
-runs the
-.IR "Perl part" .
+This pseudo-printing output can have several lines, due to printed
+line breaks with
+.BR \[rs]n .
+.
+By that, the output of a Perl run should be stored into a Perl array,
+with a single line for each array member.
 .
 .
 .P
-But the printing towards
-.IR STDERR ,
-(standard error) works as usual.
+This Perl array output can be stored by
+.B gperl
+in either
+.TP
+.I groff strings
+by creating a groff command
+.B .ds
 .
-All error information goes to the real normal
-.IR "standard error" ,
-without other automatical storage.
+.TP
+.I groff number register
+by creating a groff command
+.B .rn
 .
 .
 .P
-To use that output from the
-.I Perl part
-for
-.IR roff ,
-.B gperl
-creates automatically a line with the string defining roff command
-.BR .ds .
-.
-Because of the Perl-structure of the result, only string output can be
-used, not
-.IR "numerical roff registers" .
+The storage modes can be determined by arguments of a final stopping
+.B .Perl
+command.
 .
-In
-.BR \%groff (@MAN7EXT@),
-one can create registers from strings.
+Each argument
+.B .ds
+changes the mode into
+.I groff string
+and
+.B .nr
+changes the mode into
+.I groff number register
+for all following output parts.
 .
 .
-.B
-As the
-.I Perl mode
-must first be finished to get the information, this storage can only
-be done by arguments in the final
-.B .Perl
+.P
+By default, all output is saved as strings, so
+.B .ds
+is not really needed before the first
+.B .nr
 command.
 .
-Possible arguments are
+That suits to
+.BR \%groff (@MAN7EXT@),
+because every output can be saved as
+.I groff
+string, but the number registers can be very restrictive.
+.
+.
+.P
+In
+.IR "string mode" ,
+.B gperl
+generates a
+.I groff string
+storage line
+.RS
+.EX
+\&\fB.ds \fIvar_name content
+.EE
+.RE
 .
+In
+.I number register mode
+the following groff command is generated
 .RS
-.Topic
-.BI .Perl " var_name"
-.Topic
-.BI ".Perl ds" " var_name"
-.Topic
-.BI ".Perl .ds" " var_name"
-.Topic
-.BI ".Perl stop" " var_name"
-.Topic
-.BI ".Perl stop ds" " var_name"
-.Topic
-.BI ".Perl stop .ds" " var_name"
+.EX
+\&\fB.nr \fIvar_name content
+.EE
 .RE
 .
 .
 .P
-The
+We present argument collections in the following.
+.
+You can add as first argument for all
+.BR stop .
+.
+We omit this additional element. 
+.
+.
+.P
+.TP
+.BI ".Perl .ds " var_name
+This will store 1 output line into the groff string named
 .I var_name
-is some word that will be used by
-.B gperl
-for a
-.B .ds
-roff string definition.
+by the automatically created command
+.RS
+.RS
+.EX
+.BI .ds " var_name output"
+.EE
+.RE
+.RE
 .
-If this
+.
+.TP
+.BI .Perl " var_name"
+If
 .I var_name
-is the only argument, it must be different from
-.BR start ,
-at other argument places it can be chosen arbitrarily, but without
-spaces.
+is different from
+.B start
+this is equivalent to the former command, because the string mode is
+string with
+.B .ds
+command.
+default.
+.
+.
+.TP
+.BI .Perl " var_name1 var_name2"
+This will store 2 output lines into groff string names
+.I var_name1
+and
+.IR var_name2 ,
+because the default mode
+.B .ds
+is active, such that no
+.B .ds
+argument is needed.
+.
+Of course, this is equivalent to
+.RS
+.RS
+.EX
+.BI ".Perl .ds " "var_name1 var_name2"
+.EE
+.RE
+and
+.RS
+.EX
+.BI ".Perl .ds " "var_name1 " ".ds" " var_name2"
+.EE
+.RE
+.RE
+.
+.
+.TP
+.BI ".Perl .nr" " var_name1 varname2"
+stores both variables as number register variables.
+.
+.B gperl
+generates
+.RS
+.EX
+.BI .nr " var_name1 output_line1"
+.BI .nr " var_name2 output_line2"
+.EE
+.RE
+.
+.
+.TP
+.BI ".Perl .nr " var_name1 " .ds " var_name2
+stores the 1st argument as
+.I number register
+and the second as
+.I string
+by
+.RS
+.EX
+.BI .nr " var_name1 output_line1"
+.BI .ds " var_name2 output_line2"
+.EE
+.RE
 .
 .
 .\" --------------------------------------------------------------------
-.SH "EXAMPLE"
+.SS "Printing towards STDERR is without Storage"
+.\" --------------------------------------------------------------------
+.
+The printing towards
+.IR STDERR ,
+(standard error) works as usual.
+.
+All error information goes to the real normal
+.IR "standard error" ,
+without other automatical storage.
+.
+.
+.\" --------------------------------------------------------------------
+.SH "EXAMPLES"
 .\" --------------------------------------------------------------------
 .
 A possible
@@ -356,8 +461,8 @@ could look like that:
 before
 \&.Perl start
 my $result = 'some data';
-print $result . \[rq]\[rs]n\[rq];
-\&.Perl stop .ds some_string 
+print $result;
+\&.Perl stop .ds string_var
 after
 .EE
 .RE
@@ -369,11 +474,11 @@ This stores the result
 into the
 .I roff string
 called
-.BR some_string ,
+.BR string_var ,
 such that the following line is printed:
 .RS
 .EX
-\&.ds some_string some data
+\&.ds string_var some data
 .EE
 .RE
 by
@@ -383,17 +488,63 @@ as food for the coming
 run.
 .
 .
+.P
+A
+.I Perl part
+with several outputs is:
+.RS
+.EX
+\&.Perl start
+print \[rq]first\[rs]n\[rq];
+print \[rq]second line\[rs]n\[rq];
+print \[rq]3\[rs]n\[rq];
+\&.Perl var1 var2 .nr var3 
+.EE
+.RE
+.
+This stores 3 printed lines into 3
+.I groff
+strings.
+.BR var1 , var2 , var3 .
+.
+So the following
+.I groff
+command lines are created:
+.RS
+.EX
+\&.ds var1 first
+\&.ds var2 second line
+\&.nr var3 3
+.EE
+.RE
+.
+.
 .\" --------------------------------------------------------------------
 .SH "SEE ALSO"
 .\" --------------------------------------------------------------------
 .
 .P
+Man\-pages related to
+.I groff
+are
 .BR \%groff (@MAN1EXT@),
 .BR \%groff (@MAN7EXT@),
 .BR \%grog (@MAN1EXT@),
-.BR \%groffer (@MAN1EXT@),
+and
+.BR \%groffer (@MAN1EXT@).
+.
+.
+.P
+Documents related to
+.I Perl
+are
 .BR \%perl (@MAN1EXT@),
-.BR \%perl (@MAN7EXT@).
+.BR \%perl (@MAN7EXT@),
+and
+.UR http://\:search.cpan.org/\:~pjf/\:IPC-System-Simple-1.25/\:lib/\:\
+IPC/\:System/\:Simple.pm
+.IR "Perl " IPC:System:Simple
+.UE
 .
 .
 .\" --------------------------------------------------------------------
diff --git a/contrib/gperl/gperl.pl b/contrib/gperl/gperl.pl
index ccb1670..2412dd5 100755
--- a/contrib/gperl/gperl.pl
+++ b/contrib/gperl/gperl.pl
@@ -10,8 +10,8 @@
 
 # Written by Bernd Warken <groff-bernd.warken-72@web.de>.
 
-my $Latest_Update = '14 Jun 2014';
-my $version = '1.1';
+my $Latest_Update = '15 Jun 2014';
+my $version = '1.2';
 
 # This file is part of `gperl', which is part of `groff'.
 
@@ -25,9 +25,8 @@ my $version = '1.1';
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 # General Public License for more details.
 
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see
-# <http://www.gnu.org/licenses/gpl-2.0.html>.
+# You can find a copy of the GNU General Public License in the internet
+# at <http://www.gnu.org/licenses/gpl-2.0.html>.
 
 ########################################################################
 
@@ -53,8 +52,9 @@ use Cwd;
 # $Bin is the directory where this script is located
 use FindBin;
 
-# for running perl scripts
-use IPC::System::Simple qw(system systemx capture capturex);
+# for running the perl parts with the `Perl' programs and getting output
+# also useful for shell programs
+use IPC::System::Simple qw(capture capturex run runx system systemx);
 
 
 ########################################################################
@@ -136,7 +136,6 @@ my $out_file;
 ########################################################################
 
 my $perl_mode = 0;
-my %set_cmd;
 
 foreach (<>) {
   chomp;
@@ -162,8 +161,11 @@ foreach (<>) {
 
   my @args = split /\s+/, $args;
 
-  if ( @args == 0 || $args[0] eq 'start' ) {
-    # for `.Perl' no args or first arg `start' means opening `Perl' mode
+  ##########
+  # start Perl mode
+  if ( @args == 0 || @args == 1 && $args[0] eq 'start' ) {
+    # For `.Perl' no args or first arg `start' means opening `Perl' mode.
+    # Everything else means an ending command.
     if ( $perl_mode ) {
       # `.Perl' was started twice, ignore
       print STDERR q(`.Perl' starter was run several times);
@@ -180,7 +182,8 @@ foreach (<>) {
 
   unless ( $perl_mode ) {
     print STDERR 'gperl: there was a Perl ending without being in ' .
-      'Perl mode.';
+      'Perl mode:';
+    print STDERR '    ' . $line;
     next;
   }
 
@@ -189,49 +192,59 @@ foreach (<>) {
 
   ##########
   # run this `Perl' part, later on about storage of the result
-  my $print_res = capturex('perl',  $out_file);
+  # array stores prints with \n
+  my @print_res = capturex('perl',  $out_file);
 
-  shift @args if ( $args[0] eq 'stop' ); # remove `stop' arg if exists
+  # remove `stop' arg if exists
+  shift @args if ( $args[0] eq 'stop' );
 
   if ( @args == 0 ) {
-    # no args for saving, so $print_res doesn't matter
+    # no args for saving, so @print_res doesn't matter
     next;
   }
 
-  # extract the now leading arg for saving mode
-  my $save_mode = shift @args;
+  my @var_names = ();
+  my @mode_names = ();
 
-  if ( @args == 0 ) {
-    # no args for saving variable name, so $print_res doesn't matter
-    print STDERR 'gperl: a variable name for the saving mode ' .
-      $save_mode . ' must be provided in the line:';
-    print STDERR '    ' . $line;
-    next;
+  my $mode = 'ds';
+  for ( @args ) {
+    if ( /^\.?ds$/ ) {
+      $mode = '.ds';
+      next;
+    }
+    if ( /^\.?nr$/ ) {
+      $mode = '.nr';
+      next;
+    }
+    push @mode_names, $mode;
+    push @var_names, $_;
   }
 
-  my $command;
-
-  # variable name for saving command the $print_res
-  my $var_name = shift @args;
-  # ignore all other args
-
-  if ( $save_mode =~ /^\.?ds$/ ) {		# string
-    $command = '.ds';
-  } elsif ( $save_mode =~ /^\.?nr$/ ) {
-    # Number registers do not work, just for compatibility.
-    # Storage is done into a `groff' string variable
-    $command = '.ds';
-  } else {	# no storage variables provided
-     print STDERR 'gperl: wrong argument ' . $save_mode .
-       'in Perl stop line:';
-     print STDERR '    ' . $line;
-     print STDERR 'allowed are only .ds for storing a string or .nr ' .
-       'for a number register';
-     next;
+  my $n_res = @print_res;
+  my $n_vars = @var_names;
+
+  if ( $n_vars < $n_res ) {
+    print STDERR 'gperl: not enough variables for Perl part: ' .
+      $n_vars . ' variables for ' . $n_res . ' output lines.';
+  } elsif ( $n_vars > $n_res ) {
+    print STDERR 'gperl: too many variablenames for Perl part: ' .
+      $n_vars . ' variables for ' . $n_res . ' output lines.';
   }
+  if ( $n_vars < $n_res ) {
+    print STDERR 'gperl: not enough variables for Perl part: ' .
+      $n_vars . ' variables for ' . $n_res . ' output lines.';
+  }
+
+  my $n_min = $n_res;
+  $n_min = $n_vars if ( $n_vars < $n_res );
+  exit unless ( $n_min );
+  $n_min -= 1; # for starting with 0
 
-  $command .= ' ' . $var_name . ' ' . $print_res;
-  print $command;
+  for my $i ( 0..$n_min ) {
+    my $value = $print_res[$i];
+    chomp $value;
+    print $mode_names[$i] . ' ' . $var_names[$i] . ' ' . $value;
+  }
 }
 
 


From MAILER-DAEMON Sun Jun 15 18:02:01 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WwIUz-0000e2-Kw
	for mharc-groff-commit@gnu.org; Sun, 15 Jun 2014 18:02:01 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37040)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwIUx-0000dq-Bi
	for groff-commit@gnu.org; Sun, 15 Jun 2014 18:02:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwIUw-0000Z4-6V
	for groff-commit@gnu.org; Sun, 15 Jun 2014 18:01:59 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:44175)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwIUw-0000Yz-3W
	for groff-commit@gnu.org; Sun, 15 Jun 2014 18:01:58 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WwIUv-0005er-D2
	for groff-commit@gnu.org; Sun, 15 Jun 2014 22:01:57 +0000
Date: Sun, 15 Jun 2014 22:01:57 +0000
Message-Id: <E1WwIUv-0005er-D2@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: gperl: correct documentation of options
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140615220157.21718.88655@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: f377aa4ab11f582c6d34d377a00978a4c56a052a
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 15 Jun 2014 22:02:01 -0000

bwarken pushed a commit to branch master
in repository groff.

commit f377aa4ab11f582c6d34d377a00978a4c56a052a
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Mon Jun 16 00:01:49 2014 +0200

    gperl: correct documentation of options
---
 contrib/gperl/ChangeLog |    6 ++++++
 contrib/gperl/gperl.man |   45 +++++++++++++++++++++++++++++++++++----------
 contrib/gperl/gperl.pl  |   11 ++++++-----
 3 files changed, 47 insertions(+), 15 deletions(-)

diff --git a/contrib/gperl/ChangeLog b/contrib/gperl/ChangeLog
index 09900b6..589d4b1 100644
--- a/contrib/gperl/ChangeLog
+++ b/contrib/gperl/ChangeLog
@@ -1,5 +1,11 @@
 2014-06-15  Bernd Warken  <groff-bernd.warken-72@web.de>
 
+	* gperl.pl: Version 1.2.1.
+
+	* gperl.man: Correct the Legalese and documentation of options.
+
+2014-06-15  Bernd Warken  <groff-bernd.warken-72@web.de>
+
 	* gperl.pl: Version 1.2.  Getting several storage variables from
 	printing in `Perl' with several lines.  Accept string and number
 	register variable names for `.ds' and `.nr'.
diff --git a/contrib/gperl/gperl.man b/contrib/gperl/gperl.man
index 409b1d9..0271437 100644
--- a/contrib/gperl/gperl.man
+++ b/contrib/gperl/gperl.man
@@ -12,7 +12,7 @@ gperl \- groff preprocessor for Perl parts in roff files
 .de authors
 This file was written by Bernd Warken <groff-bernd.warken-72@web.de>.
 .
-Latest update: 14 Jun 2014
+Latest update: 16 Jun 2014
 ..
 .
 .de copyright
@@ -107,7 +107,7 @@ The license text is available in the internet at
 .\" --------------------------------------------------------------------
 .
 .SY gperl
-.OP \fIoption \[Ellipsis]
+.OP -
 .OP --
 .OP \fI\%filespec \[Ellipsis]
 .YS
@@ -136,9 +136,11 @@ files.
 .
 The result of a
 .I Perl part
-can be stored in a
-.I groff string
-within the final line of a
+can be stored in groff
+.I strings
+or
+.I numerical registers
+based on the arguments at a final line of a
 .IR "Perl part" .
 .
 .
@@ -147,13 +149,36 @@ within the final line of a
 .\" --------------------------------------------------------------------
 .
 So far, there are only
-.IR "breaking options" ,
-that means that the program writes the asked for information and
-stops a running program line.
+.I filespec
+or
+.I breaking
+options.
+.
+.
+.P
+.I filespec
+are file names or the minus character
+.B \[em]
+character for standard input.
+.
+As usual, the argument
+.B \[em]\[em]
+can be used in order to let all fowllowing arguments mean file names,
+even if the names begin with a minus character
+.BR \[em] .
+.
+.
+.P
+An option is
+.IR breaking ,
+when the program just writes the information that was asked for and
+then stops.
 .
-All other arguments are ignored.
+All other arguments will be ignored by that.
 .
-These options are
+These
+.I breaking
+options are heree
 .
 .TP
 .B -h\~\fR|\fB\~--help
diff --git a/contrib/gperl/gperl.pl b/contrib/gperl/gperl.pl
index 2412dd5..3729819 100755
--- a/contrib/gperl/gperl.pl
+++ b/contrib/gperl/gperl.pl
@@ -10,8 +10,8 @@
 
 # Written by Bernd Warken <groff-bernd.warken-72@web.de>.
 
-my $Latest_Update = '15 Jun 2014';
-my $version = '1.2';
+my $Latest_Update = '16 Jun 2014';
+my $version = '1.2.1';
 
 # This file is part of `gperl', which is part of `groff'.
 
@@ -92,14 +92,15 @@ if ($before_make) {
 
 
 ########################################################################
-# breaking options
+# options
 ########################################################################
 
 foreach (@ARGV) {
   if ( /^(-h|--h|--he|--hel|--help)$/ ) {
     print q(Usage for the `gperl' program:);
-    print 'gperl [-h|--help]     gives usage information';
-    print 'gperl [-v|--version]  displays the version number';
+    print 'gperl [-] [--] [filespec...] normal file name arguments';
+    print 'gperl [-h|--help]        gives usage information';
+    print 'gperl [-v|--version]     displays the version number';
     print q(This program is a `groff' preprocessor that handles Perl ) .
       q(parts in `roff' files.);
     exit;


From MAILER-DAEMON Sun Jun 15 18:09:36 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WwIcK-0001Dg-In
	for mharc-groff-commit@gnu.org; Sun, 15 Jun 2014 18:09:36 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:37971)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwIcI-0001D1-4L
	for groff-commit@gnu.org; Sun, 15 Jun 2014 18:09:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwIcH-0003GE-6v
	for groff-commit@gnu.org; Sun, 15 Jun 2014 18:09:34 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:44265)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwIcH-0003G9-3p
	for groff-commit@gnu.org; Sun, 15 Jun 2014 18:09:33 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WwIcG-00069T-D2
	for groff-commit@gnu.org; Sun, 15 Jun 2014 22:09:32 +0000
Date: Sun, 15 Jun 2014 22:09:32 +0000
Message-Id: <E1WwIcG-00069T-D2@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: grog: correct and add documentation for file name
	options
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140615220932.23616.56797@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: b7edea7857f6ff1e7ab3255ce5a883306a7fcdbc
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 15 Jun 2014 22:09:35 -0000

bwarken pushed a commit to branch master
in repository groff.

commit b7edea7857f6ff1e7ab3255ce5a883306a7fcdbc
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Mon Jun 16 00:09:25 2014 +0200

    grog: correct and add documentation for file name options
---
 ChangeLog              |    5 +++++
 src/roff/grog/grog.man |   12 ++++++------
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 30ccba0..6310cdc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-16  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* src/roff/grog/grog.pl, src/roff/grog/grog.man: Correct and add
+	the documentation for filespec options.
+
 2014-06-14  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* src/roff/grog/subs.pl: Activate handling of `--run', such that
diff --git a/src/roff/grog/grog.man b/src/roff/grog/grog.man
index 16ec08d..bbbc900 100644
--- a/src/roff/grog/grog.man
+++ b/src/roff/grog/grog.man
@@ -1,4 +1,10 @@
 .TH GROG @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
+.\" --------------------------------------------------------------------
+.SH NAME
+grog \[em] guess options for a following groff command
+.
+.\" The .SH was moved to this place in order to appease `apropos'.
+.
 .
 .\" --------------------------------------------------------------------
 .\" Legalese
@@ -74,12 +80,6 @@ GPL2
 .
 .
 .\" --------------------------------------------------------------------
-.SH NAME
-.
-grog \- guess options for a groff command
-.
-.
-.\" --------------------------------------------------------------------
 .SH SYNOPSIS
 .
 .SY grog


From MAILER-DAEMON Sun Jun 15 21:54:46 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WwM8E-0001pE-1o
	for mharc-groff-commit@gnu.org; Sun, 15 Jun 2014 21:54:46 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:44205)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwM8B-0001p0-Kr
	for groff-commit@gnu.org; Sun, 15 Jun 2014 21:54:45 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwM89-0003DI-Ug
	for groff-commit@gnu.org; Sun, 15 Jun 2014 21:54:43 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:45923)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwM89-0003D6-R9
	for groff-commit@gnu.org; Sun, 15 Jun 2014 21:54:41 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WwM88-0006eA-8U
	for groff-commit@gnu.org; Mon, 16 Jun 2014 01:54:40 +0000
Date: Mon, 16 Jun 2014 01:54:40 +0000
Message-Id: <E1WwM88-0006eA-8U@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: grog: repair handling of arguments for guessed groff
	command
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140616015439.25519.38453@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 3590e5774904da9d3c441040e2e9ac8c94c99950
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Jun 2014 01:54:45 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 3590e5774904da9d3c441040e2e9ac8c94c99950
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Mon Jun 16 03:54:26 2014 +0200

    grog: repair handling of arguments for guessed groff command
---
 ChangeLog             |    7 +++-
 src/roff/grog/grog.pl |    2 +-
 src/roff/grog/subs.pl |  115 +++++++++++++++++++++++++++++++++++--------------
 3 files changed, 89 insertions(+), 35 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6310cdc..18a89e3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,9 @@
-2014-06-16  Bernd Warken  <groff-bernd.warken-72@web.de>
+2014-06-15  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* src/roff/grog/grog.pl, src/roff/grog/subs.pl: Repair argument
+	handling for output `groff' line.
+
+2014-06-15  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* src/roff/grog/grog.pl, src/roff/grog/grog.man: Correct and add
 	the documentation for filespec options.
diff --git a/src/roff/grog/grog.pl b/src/roff/grog/grog.pl
index 0c4621b..c59d2f8 100644
--- a/src/roff/grog/grog.pl
+++ b/src/roff/grog/grog.pl
@@ -30,7 +30,7 @@
 # <http://www.gnu.org/licenses/gpl-2.0.html>.
 
 ########################################################################
-our $Last_Update = '12 Jun 2014';
+our $Last_Update = '16 Jun 2014';
 ########################################################################
 
 require v5.6;
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index 2f749d4..4bce9d0 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -30,7 +30,7 @@
 # <http://www.gnu.org/licenses/gpl-2.0.html>.
 
 ########################################################################
-# Last_Update = '15 Jun 2014';
+# Last_Update = '16 Jun 2014';
 ########################################################################
 
 require v5.6;
@@ -90,6 +90,7 @@ my %Groff = (
 	     'AU' => 0,		# ms
 	     'NH' => 0,		# ms
 	     'TL' => 0,		# ms
+	     'UL' => 0,		# ms
 	     'XP' => 0,		# ms
 
 	     'IP' => 0,		# man and ms
@@ -97,11 +98,13 @@ my %Groff = (
 	     'P' => 0,		# man and ms
 	     'PP' => 0,		# man and ms
 	     'SH' => 0,		# man and ms
-	     'TH' => 0,		# man and ms
 
 	     'OP' => 0,		# man
 	     'SS' => 0,		# man
 	     'SY' => 0,		# man
+	     'TH' => 0,		# man
+	     'TP' => 0,		# man
+	     'UR' => 0,		# man
 	     'YS' => 0,		# man
 
 	     # for mdoc and mdoc-old
@@ -188,7 +191,7 @@ sub args_with_minus {
       next;
     }
 
-    if ($arg =~ /^-/) {
+    if ($arg =~ /^-[^m]/) {
       push(@Command, $arg);
       next;
     } else {
@@ -469,8 +472,8 @@ sub do_line {
     $Groff{'SH'}++;		# for man and ms
     return;
   }
-  if ( $command =~ /^\.TH$/ ) {
-    $Groff{'TH'}++;		# for man and ms
+  if ( $command =~ /^\.UL$/ ) {
+    $Groff{'UL'}++;		# for man and ms
     return;
   }
 
@@ -486,14 +489,26 @@ sub do_line {
     $Groff{'SS'}++;
     return;
   }
-  if ( $command =~ /^\.YS$/ ) {	# for man
-   $Groff{'YS'}++;
-    return;
-  }
   if ( $command =~ /^\.SY$/ ) {	# for man
     $Groff{'SY'}++;
     return;
   }
+  if ( $command =~ /^\.TH$/ ) {
+    $Groff{'TH'}++;		# for man
+    return;
+  }
+  if ( $command =~ /^\.TP$/ ) {	# for man
+    $Groff{'TP'}++;
+    return;
+  }
+  if ( $command =~ /^\.UR$/ ) {
+    $Groff{'UR'}++;		# for man
+    return;
+  }
+  if ( $command =~ /^\.YS$/ ) {	# for man
+   $Groff{'YS'}++;
+    return;
+  }
 
 
   ##########
@@ -572,6 +587,7 @@ sub make_groff_line {
   my @m = ();
   my @preprograms = ();
 
+
   # device from -T
   $device = '' unless ( defined $device );
 
@@ -661,14 +677,14 @@ EOF
 
   {
     my $is_ms = 0;
-    if ( $Groff{'TH'} || $Groff{'P'} || $Groff{'IP'}  ||
+    if ( $Groff{'P'} || $Groff{'IP'}  ||
 	 $Groff{'LP'} || $Groff{'PP'} || $Groff{'SH'} ) {
       # man or ms
-      if ( $Groff{'SS'} ||  $Groff{'SY'} ||  $Groff{'OP'} ) {
+      if ( $Groff{'SS'} ||  $Groff{'SY'} ||  $Groff{'OP'} ||
+	   $Groff{'TH'} || $Groff{'TP'} || $Groff{'UR'} ) {
 	# it is `man', because these macros are not `ms'
 	$Groff{'man'} = 1;
 	push(@m, '-man');
-	push(@Command, '-man');
       } elsif
 	(	# it must now be `ms'
 	 $Groff{'1C'} || $Groff{'2C'} ||
@@ -687,7 +703,6 @@ EOF
     if ( $is_ms ) {
       $Groff{'ms'} = 1;
       push(@m, '-ms');
-      push(@Command, '-ms');
     }
   }
 
@@ -699,11 +714,9 @@ EOF
     $Groff{'Oc'} = 0;
     $Groff{'Oo'} = 0;
     push(@m, '-mdoc');
-    push(@Command, '-mdoc');
   }
   if ( $Groff{'mdoc_old'} || $Groff{'Oo'} ) {
     push(@m, '-mdoc_old');
-    push(@Command, '-mdoc_old');
   }
 
 
@@ -712,7 +725,6 @@ EOF
 
   if ( $Groff{'me'} ) {
     push(@m, '-me');
-    push(@Command, '-me');
   }
 
 
@@ -722,10 +734,8 @@ EOF
   if ( $Groff{'mm'} ) {
     if ( $is_mmse ) {	# swedish mmse
       push(@m, '-mmse');
-      push(@Command, '-mmse');
     } else {		# normal mm
       push(@m, '-mm');
-      push(@Command, '-mm');
     }
   }
 
@@ -735,13 +745,13 @@ EOF
 
   if ( $Groff{'mom'} ) {
     push(@m, '-mom');
-    push(@Command, '-mom');
   }
 
 
   ######################################################################
   # create groff command
 
+  my $file_args_included;	# file args now only at 1st preprog
   unshift @Command, 'groff';
   if ( @preprograms ) {
     my @progs;
@@ -753,31 +763,71 @@ EOF
     }
     push @progs, '|';
     unshift @Command, @progs;
+    $file_args_included = 1;
   } else {
-    push(@Command, @FILES);
+    $file_args_included = 0;
   }
 
   foreach (@Command) {
     next unless /\s/;
+    # when one argument has several words, use accents
     $_ = "'" . $_ . "'";
   }
 
 
-  my $n = scalar @m;
-  my $np = scalar @Mparams;
-  print STDERR "$Prog: more than 1 `-m' argument: @Mparams" if $np > 1;
-  if ($n == 0) {
-    unshift @Command, $Mparams[0] if $np == 1;
-  } elsif ($n == 1) {
-    if ($np == 1) {
-      print STDERR "$Prog: wrong `-m' argument: $Mparams[0]"
-	if $m[0] ne $Mparams[0];
+  ##########
+  # -m arguments
+  my $nr_m_guessed = scalar @m;
+  if ( $nr_m_guessed > 1 ) {
+    print STDERR 'More than 1 argument for -m found: ' . "@m";
+  }
+
+  my $nr_m_args = scalar @Mparams;	# m-arguments for grog
+  my $last_m_arg = '';	# last provided -m option
+  if ( $nr_m_args > 1 ) {
+    # take the last given -m argument of grog call,
+    # ignore other -m arguments and the found ones
+    $last_m_arg = $Mparams[-1];	# take the last -m argument
+    print STDERR $Prog . ": more than 1 `-m' argument: @Mparams";
+    print STDERR 'We take the last one: ' . $last_m_arg;
+  } elsif ( $nr_m_args == 1 ) {
+    $last_m_arg = $Mparams[0];
+  }
+
+  my $final_m = '';
+  if ( $last_m_arg ) {
+    my $is_equal = 0;
+    for ( @m ) {
+      if ( $_ eq $last_m_arg ) {
+	$is_equal = 1;
+	last;
+      }
+      next;
+    }	# end for @m
+    if ( $is_equal ) {
+      $final_m = $last_m_arg;
+    } else {
+      print STDERR 'Provided -m argument ' . $last_m_arg .
+	' differs from guessed -m args: ' . "@m";
+      print STDERR 'The argument is taken.';
+      $final_m = $last_m_arg;
+    }
+  } else {	# no -m arg provided
+    if ( $nr_m_guessed > 1 ) {
+      print STDERR 'More than 1 -m arguments were guessed: ' . "@m";
+      print STDERR 'Guessing stopped.';
+      exit 1;
+    } elsif ( $nr_m_guessed == 1 ) {
+      $final_m = $m[0];
+    } else {
+      # no -m provided or guessed
     }
-  } else {
-    print STDERR "$Prog: error: there are several macro packages: @m";
-    exit 1;
   }
+  push @Command, $final_m if ( $final_m );
+
+  push(@Command, @FILES) unless ( $file_args_included );
 
+  #########
   # execute the `groff' command here with option `--run'
   if ( $do_run ) {
     print STDERR "@Command";
@@ -787,7 +837,6 @@ EOF
     print "@Command";
   }
 
-  exit $n if $n > 1;
   exit 0;
 }	# sub make_groff_line
 


From MAILER-DAEMON Mon Jun 16 12:41:05 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WwZxx-00032Z-CM
	for mharc-groff-commit@gnu.org; Mon, 16 Jun 2014 12:41:05 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:53493)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwZxt-0002wm-02
	for groff-commit@gnu.org; Mon, 16 Jun 2014 12:41:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwZxq-0001AQ-8K
	for groff-commit@gnu.org; Mon, 16 Jun 2014 12:41:00 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:54383)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwZxq-0001AL-55
	for groff-commit@gnu.org; Mon, 16 Jun 2014 12:40:58 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WwZxp-0006ed-Bb
	for groff-commit@gnu.org; Mon, 16 Jun 2014 16:40:57 +0000
Date: Mon, 16 Jun 2014 16:40:57 +0000
Message-Id: <E1WwZxp-0006ed-Bb@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: gideal: new project for integrating ideal to groff;
	just for preliminary, not really working
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140616164057.25546.10889@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 972f14acc72b63df9631129ba123c7442871fe25
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Jun 2014 16:41:03 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 972f14acc72b63df9631129ba123c7442871fe25
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Mon Jun 16 18:40:48 2014 +0200

    gideal: new project for integrating ideal to groff; just for preliminary, not really working
---
 ChangeLog                   |    6 +
 Makefile.in                 |    3 +-
 contrib/gideal/ChangeLog    |   36 +++++
 contrib/gideal/Makefile.sub |   66 +++++++++
 contrib/gideal/gideal.man   |  335 +++++++++++++++++++++++++++++++++++++++++++
 contrib/gideal/gideal.pl    |  203 ++++++++++++++++++++++++++
 contrib/gideal/ideal.man    |  279 +++++++++++++++++++++++++++++++++++
 7 files changed, 927 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 18a89e3..60c44b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-06-16  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* contrib/gideal: New project for installing `ideal' for `groff'.
+
+	* Makefile.in: Add `gideal' for `OTHERDIRS'.
+
 2014-06-15  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* src/roff/grog/grog.pl, src/roff/grog/subs.pl: Repair argument
diff --git a/Makefile.in b/Makefile.in
index 65ae1fc..dd927c7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -2,7 +2,7 @@
 #   Free Software Foundation, Inc.
 #      Written by James Clark (jjc@jclark.com)
 #
-# Last update: 30 Mar 2014
+# Last update: 16 Jun 2014
 #
 # This file is part of groff.
 #
@@ -675,6 +675,7 @@ OTHERDIRS=\
   contrib/chem \
   contrib/eqn2graph \
   contrib/gdiffmk \
+  contrib/gideal \
   contrib/glilypond \
   contrib/gperl \
   contrib/grap2graph \
diff --git a/contrib/gideal/ChangeLog b/contrib/gideal/ChangeLog
new file mode 100644
index 0000000..21d7e39
--- /dev/null
+++ b/contrib/gideal/ChangeLog
@@ -0,0 +1,36 @@
+2014-06-16  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* Project: Project `gideal' with starting version 0.9 without real
+	running.
+
+	* gideal.pl: Preprocessor for the `ideal language' for `groff'.
+	This program doesn't work yet, it just displays all `ideal' lines
+	in another way.
+
+	* gideal.man: Man-page 1 for the preprocessor `gideal'.
+
+	* ideal.man: This should be the man-page 7 for the `ideal'
+	language in `groff'.  This language must first be included.
+
+	* Makefile.sub: Taken over from `gperl' and changed.  No libdir is
+	necessary now.
+
+	* ChangeLog: This file is a contrib change-log for only
+	`gideal'.
+________________________________________________________________________
+License
+
+Copyright (C) 2014
+	Free Software Foundation, Inc.
+Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+Copying and distribution of this file, with or without modification,
+are permitted provided the copyright notice and this notice are
+preserved.
+
+This file is part of `gideal', which is part of the `groff' project.
+
+####### Emacs settings
+Local Variables:
+mode: change-log
+End:
diff --git a/contrib/gideal/Makefile.sub b/contrib/gideal/Makefile.sub
new file mode 100644
index 0000000..01e60aa
--- /dev/null
+++ b/contrib/gideal/Makefile.sub
@@ -0,0 +1,66 @@
+# Makefile.sub for `gideal' (preprocessor for added Perl parts)
+
+# File position: <groff-source>/contrib/gideal/Makefile.sub
+
+# Copyright (C) 2014
+#   Free Software Foundation, Inc.
+# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+# Last update: 16 Jun 2014
+
+# This file is part of `gideal' which is part of `groff'.
+
+# `groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+
+# `groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+MAN1=gideal.n
+
+MAN7=ideal.n
+
+MOSTLYCLEANADD=gideal $(MAN1) $(MAN7)
+
+# not all make programs have $(RM) predefined.
+RM=rm -f
+
+all: gideal
+
+gideal: gideal.pl
+	sed -f "$(SH_DEPS_SED_SCRIPT)" \
+            -e "s|@g@|$(g)|g" \
+	    -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
+	    -e "s|@VERSION@|$(version)$(revision)|g" \
+	    -e "$(SH_SCRIPT_SED_CMD)" \
+	    $(srcdir)/gideal.pl >$@; \
+	chmod +x $@
+
+.PHONY: install_data
+install_data: gideal
+	-test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
+	$(RM) $(DESTDIR)$(bindir)/gideal
+	$(INSTALL_SCRIPT) gideal $(DESTDIR)$(bindir)/gideal
+
+.PHONY: uninstall_sub
+uninstall_sub:
+	$(RM) $(DESTDIR)$(bindir)/gideal
+
+
+########################################################################
+# Emacs settings
+########################################################################
+#
+# Local Variables:
+# mode: makefile
+# End:
diff --git a/contrib/gideal/gideal.man b/contrib/gideal/gideal.man
new file mode 100644
index 0000000..5badfc7
--- /dev/null
+++ b/contrib/gideal/gideal.man
@@ -0,0 +1,335 @@
+.\" t
+.TH GIDEAL @MAN1EXT@ "@MDATE@" "Groff Version @VERSION@"
+.SH NAME
+gideal \[em] \f[I]groff\f[] preprocessor for the \f[I]ideal\f[] language
+.
+.\" The .SH was moved to this place in order to appease `apropos'.
+.
+.\" --------------------------------------------------------------------
+.\" Legalese
+.\" --------------------------------------------------------------------
+.
+.ig
+gideal.1 - man page for the ideal roff preprocessor
+.
+Source file position:  <groff_source_top>/contrib/gideal/gideal.man
+Installed position:    $prefix/share/man/man1/gideal.1
+.
+Last update: 16 Jun 2014
+..
+.
+.de authors
+This file was written by Bernd Warken
+.MT bernd.warken@web.de
+.ME .
+..
+.
+.de copying
+Copyright \(co 2014
+.RS
+.ft CI
+Free Software Foundation, Inc.
+.ft R
+.RE
+.
+.P
+This file is part of
+.IR \%gideal ,
+which is part of
+.IR \%groff ,
+a free software project.
+.
+You can redistribute it and/or modify it under the terms of the
+.nh
+.ft CI
+GNU General Public License
+.ft R
+.hy
+as published by the
+.nh
+.ft CI
+Free Software Foundation version\~2
+.ft R
+.hy
+(\\f[CI]GPL2\\f[R]).
+.
+.P
+The license text is available in the internet at
+.UR http://www.gnu.org/licenses/gpl-2.0.html
+.UE .
+..
+.
+.
+.\" --------------------------------------------------------------------
+.\" Setup
+.\" --------------------------------------------------------------------
+.
+.\" ds Ellipsis "\&.\|.\|.\&\"
+.
+.
+.\" --------------------------------------------------------------------
+.\" Macro definitions
+.\" --------------------------------------------------------------------
+.
+.\" --------------------------------------------------------------------
+.\" .FONT (<font name> <text> [<font name> <text> ...])
+.\"
+.\" Print in different fonts: R, I, B, CR, CI, CB
+.\"
+.de FONT
+.  if (\\n[.$] = 0) \{\
+.	nop \&\f[P]\&
+.	return
+.  \}
+.  ds result \&
+.  while (\\n[.$] >= 2) \{\
+.	as result \,\f[\\$1]\\$2
+.	if !"\\$1"P .as result \f[P]
+.	shift 2
+.  \}
+.  if (\\n[.$] = 1) .as result \,\f[\\$1]
+.  nh
+.  nop \\*[result]\&
+.  hy
+..
+.
+.\" --------------------------------------------------------------------
+.\" .Topic  ([<indent>])
+.\"
+.\" A bulleted paragraph
+.\"
+.de Topic
+.  ie \\n[.$]=0 \
+.    ds @indent 2m\"
+.  el \
+.    ds @indent \\$1\"
+.  IP \[bu] \\*[@indent]
+.  rm @indent
+..
+.
+.\" --------------------------------------------------------------------
+.\" .UL (<text to underline> [<append>])
+.\"
+.\" Underline $1 and append $2 without underline
+.\"
+.de UL
+.  if t \}\
+.    nop \Z'\\$1'\v'.25m'\D'l \w'\\$1'u 0'\v'-.25m'\\$2
+.    return
+.  \}
+.  ul 1
+\\$1\c
+\\$2
+..
+.
+.
+.\" --------------------------------------------------------------------
+.\" End of macro definitions.
+.\" --------------------------------------------------------------------
+.
+.
+.\" --------------------------------------------------------------------
+.SH SYNOPSIS
+.\" --------------------------------------------------------------------
+.
+.SY gideal
+.OP \-
+.OP \-\-
+.OP \fI\%filespec \[Ellipsis]
+.YS
+.
+.SY gideal
+.BR \-h | \-\-help
+.YS
+.
+.SY gideal
+.BR \-v | \-\-version
+.YS
+.
+.
+.\" --------------------------------------------------------------------
+.SH DESCRIPTION
+..\" --------------------------------------------------------------------
+.
+.BR ideal (@MAN7EXT@)
+is a
+.I roff language
+for drawing pictures.
+.
+.
+.P
+.B gideal
+is a
+.I groff preprocessor
+for using this language within
+.I groff files
+(to be done).
+.
+.
+.\" --------------------------------------------------------------------
+.SH OPTIONS
+.\" --------------------------------------------------------------------
+.
+In
+.BR gideal ,
+there are the following kinds of options:
+.Topic
+.I breaking options
+.Topic
+.I filespec options
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Breaking Options"
+.\" --------------------------------------------------------------------
+.
+.I Breaking options
+are used to display a corresponding information, but then the whole
+program run is stopped and finished.
+.
+.
+.P
+The breaking options
+.B \-v
+or
+.B \-\-version
+prints information on the version number.
+.
+.
+.P
+The breaking options
+.B \-h
+or
+.B \-\-help
+prints usage information.
+.
+.
+.P
+Both of these options automatically end the
+.B grog
+program.
+.
+Other options are then ignored, and no
+.B groff
+command line is generated.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Filespec Options"
+.\" --------------------------------------------------------------------
+.
+Each argument that does not start with a minus
+.B \-
+character is interpreted as a file name.
+.
+.
+.P
+As usual, the single minus character argument
+.B \-
+means to integrate
+.IR "standard input" .
+.
+.
+.P
+The double minus
+.B \-\-
+argument means noting special by itself, but means that all following
+arguments will be interpreted as file names, even if the called file
+name starts with a minus
+.B \-
+character.
+.
+.
+.\" --------------------------------------------------------------------
+.SH "IDEAL PARTS"
+.\" --------------------------------------------------------------------
+.
+Within a roff file, an
+.I ideal part
+is started with the command
+.BR .IS .
+.
+.
+.P
+this part is ended with the command
+.B .IE
+or
+.BR .IF .
+.
+.
+.P
+The text between these requests is handled by the preprocessor
+.BR gideal .
+.
+.
+.\" --------------------------------------------------------------------
+.SH HISTORY
+.\" --------------------------------------------------------------------
+.
+The roff preprocessor and the roff language
+.I ideal
+were invented by
+.I Christopher J. Wyk
+in 1981 at AT&T.
+.
+.
+.\" --------------------------------------------------------------------
+.SH "SEE ALSO"
+.\" --------------------------------------------------------------------
+.
+.TP
+.BR ideal (@MAN7EXT@)
+for information about the
+.I ideal language
+in
+.IR groff .
+.
+.
+.TP
+.B Unix8 preprocessor
+freely available documentation for the
+.IR "ideal preprocessor" .
+.
+The
+.I preprocessor
+there is called
+.BR ideal ,
+not
+.B gideal
+as in
+.IR groff .
+.br
+.UR http://man.cat-v.org/unix_8th/1/ideal
+.UE .
+.
+.
+.TP
+.BR groff (@MAN1EXT@),
+.TQ
+.BR groff (@MAN7EXT@)
+Information about the
+.I groff
+system.
+.
+.
+.\" --------------------------------------------------------------------
+.SH "AUTHORS"
+.\" --------------------------------------------------------------------
+.
+.authors
+.
+.
+.\" --------------------------------------------------------------------
+.SH "COPYING"
+.\" --------------------------------------------------------------------
+.
+.copying
+.
+.
+.\" --------------------------------------------------------------------
+.\" Emacs settings
+.\" --------------------------------------------------------------------
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
diff --git a/contrib/gideal/gideal.pl b/contrib/gideal/gideal.pl
new file mode 100755
index 0000000..a51b7bd
--- /dev/null
+++ b/contrib/gideal/gideal.pl
@@ -0,0 +1,203 @@
+#!/usr/bin/env perl
+
+# groff ideal
+
+# Source file position: <groff-source>/contrib/gideal/gideal.pl
+# Installed position: <prefix>/bin/gideal
+
+# Copyright (C) 2014
+#   Free Software Foundation, Inc.
+
+# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+my $Latest_Update = '16 Jun 2014';
+my $version = '0.9';
+
+# This file is part of `gideal', which is part of `groff'.
+
+# `groff' is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+
+# `groff' is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see
+# <http://www.gnu.org/licenses/gpl-2.0.html>.
+
+########################################################################
+
+use strict;
+use warnings;
+
+# temporary dir and files
+use File::Temp qw/ tempfile tempdir /;
+
+# needed for temporary dir
+use File::Spec;
+
+# for `copy' and `move'
+use File::Copy;
+
+# for fileparse, dirname and basename
+use File::Basename;
+
+# current working directory
+use Cwd;
+
+# $Bin is the directory where this script is located
+use FindBin;
+
+# for running the ideal parts with the `IS' and `I[EF]' programs and
+# getting output also useful for shell programs
+use IPC::System::Simple qw(capture capturex run runx system systemx);
+
+# Perl package for complex numbers
+use Math::Complex;
+
+
+########################################################################
+# system variables
+########################################################################
+
+$\ = "\n";    # adds newline at each print
+$/ = "\n";    # newline separates input
+$| = 1;       # flush after each print or write command
+
+
+########################################################################
+# read-only variables with double-@ construct
+########################################################################
+
+my $before_make;        # script before run of `make'
+{
+  my $at = '@';
+  $before_make = 1 if '@VERSION@' eq "${at}VERSION${at}";
+}
+
+my %at_at;
+my $gideal_dir;
+
+if ($before_make) {
+  my $gideal_source_dir = $FindBin::Bin;
+  $at_at{'BINDIR'} = $gideal_source_dir;
+  $at_at{'G'} = '';
+} else {
+  $at_at{'BINDIR'} = '@BINDIR@';
+  $at_at{'G'} = '@g@';
+}
+
+
+########################################################################
+# options
+########################################################################
+
+foreach (@ARGV) {
+  if ( /^(-h|--h|--he|--hel|--help)$/ ) {
+    print q(Usage for the `gideal' program:);
+    print 'gideal [-] [--] [filespec...] normal file name arguments';
+    print 'gideal [-h|--help]            gives usage information';
+    print 'gideal [-v|--version]         displays the version number';
+    print q(This program is a `groff' preprocessor that handles ideal ) .
+      q(parts in `roff' files.);
+    exit;
+  } elsif ( /^(-v|--v|--ve|--ver|--vers|--versi|--versio|--version)$/ ) {
+    print q(`gideal' version ) . $version . ' of ' . $Latest_Update;
+    exit;
+  }
+}
+
+
+#######################################################################
+# temporary file
+#######################################################################
+
+my $out_file;
+{
+  my $template = 'gideal_' . "$$" . '_XXXX';
+  my $tmpdir;
+  foreach ($ENV{'GROFF_TMPDIR'}, $ENV{'TMPDIR'}, $ENV{'TMP'}, $ENV{'TEMP'},
+           $ENV{'TEMPDIR'}, 'tmp', $ENV{'HOME'},
+           File::Spec->catfile($ENV{'HOME'}, 'tmp')) {
+    if ($_ && -d $_ && -w $_) {
+      eval { $tmpdir = tempdir( $template,
+                                CLEANUP => 1, DIR => "$_" ); };
+      last if $tmpdir;
+    }
+  }
+  $out_file = File::Spec->catfile($tmpdir, $template);
+}
+
+
+########################################################################
+# input
+########################################################################
+
+my $nr = 0;
+my @ideal;
+
+my $ideal_mode = 0;
+foreach (<>) {
+  chomp;
+  my $line = $_;
+  my $is_start = $line =~ /^[.']\s*IS(|\s+.*)$/;	# start .IS
+  my $is_end = $line =~ /^[.']\s*(I[EF])(|\s+.*)$/;	# stop .IE/.IF
+
+  # .IE below ideal picture (after), .IF back at starting point (before)
+  my $end_mode = $1;
+
+  if ( $is_start ) {
+    if ( $ideal_mode ) {
+      print STDERR
+	'Within a running ideal part, you called another .IS!';
+      next;
+    } else {	# new start
+      $ideal_mode = 1;
+      open OUT, '>', $out_file;
+      @ideal = ();
+      next;
+    }
+  }
+
+  if ( $is_end ) {
+    $ideal_mode = 0;
+    close OUT;
+    &do_ideal();
+    next;
+  }
+
+  if ( $ideal_mode ) {	# normal `ideal' line, store in @ideal
+    push @ideal, $line;
+    next;
+  } else {		# not related to `ideal', so print to STDOUT
+    print $line;
+    next;
+  }
+  next;
+}
+
+
+########################################################################
+# &do_ideal()
+########################################################################
+
+sub do_ideal {
+    $nr++;
+    print '### ideal part number ' . $nr . ':';
+    foreach (@ideal) {
+      print $nr . '# ' . $_;
+    }
+    @ideal = ();
+} # &do_ideal()
+
+
+1;
+########################################################################
+### Emacs settings
+# Local Variables:
+# mode: CPerl
+# End:
diff --git a/contrib/gideal/ideal.man b/contrib/gideal/ideal.man
new file mode 100644
index 0000000..5b975ba
--- /dev/null
+++ b/contrib/gideal/ideal.man
@@ -0,0 +1,279 @@
+.\" t
+.TH IDEAL @MAN7EXT@ "@MDATE@" "Groff Version @VERSION@"
+.SH NAME
+ideal \[em] the groff \f[I]ideal\f[] language
+.
+.\" The .SH was moved to this place in order to appease `apropos'.
+.
+.\" --------------------------------------------------------------------
+.\" Legalese
+.\" --------------------------------------------------------------------
+.
+.ig
+ideal.7 - man page for the ideal roff language
+.
+Source file position:  <groff_source_top>/contrib/gideal/ideal.man
+Installed position:    $prefix/share/man/man7/ideal.7
+.
+Last update: 16 Jun 2014
+..
+.
+.de authors
+This file was written by Bernd Warken
+.MT bernd.warken@web.de
+.ME .
+..
+.
+.de copying
+Copyright \(co 2014
+.RS
+.ft CI
+Free Software Foundation, Inc.
+.ft R
+.RE
+.
+.P
+This file is part of
+.IR \%ideal ,
+which is part of
+.IR \%groff ,
+a free software project.
+.
+You can redistribute it and/or modify it under the terms of the
+.nh
+.ft CI
+GNU General Public License
+.ft R
+.hy
+as published by the
+.nh
+.ft CI
+Free Software Foundation version\~2
+.ft R
+.hy
+(\\f[CI]GPL2\\f[R]).
+.
+.P
+The license text is available in the internet at
+.UR http://www.gnu.org/licenses/gpl-2.0.html
+.UE .
+..
+.
+.
+.\" --------------------------------------------------------------------
+.\" Setup
+.\" --------------------------------------------------------------------
+.
+.char \[Ellipsis] \f[S]\N'188'\fP
+.
+.
+.\" --------------------------------------------------------------------
+.\" Macro definitions
+.\" --------------------------------------------------------------------
+.
+.\" --------------------------------------------------------------------
+.\" .FONT (<font name> <text> [<font name> <text> ...])
+.\"
+.\" Print in different fonts: R, I, B, CR, CI, CB
+.\"
+.de FONT
+.  if (\\n[.$] = 0) \{\
+.	nop \&\f[P]\&
+.	return
+.  \}
+.  ds result \&
+.  while (\\n[.$] >= 2) \{\
+.	as result \,\f[\\$1]\\$2
+.	if !"\\$1"P .as result \f[P]
+.	shift 2
+.  \}
+.  if (\\n[.$] = 1) .as result \,\f[\\$1]
+.  nh
+.  nop \\*[result]\&
+.  hy
+..
+.
+.\" --------------------------------------------------------------------
+.\" .Topic  ([<indent>])
+.\"
+.\" A bulleted paragraph
+.\"
+.de Topic
+.  ie \\n[.$]=0 \
+.    ds @indent 2m\"
+.  el \
+.    ds @indent \\$1\"
+.  IP \[bu] \\*[@indent]
+.  rm @indent
+..
+.
+.\" --------------------------------------------------------------------
+.\" .UL (<text to underline> [<append>])
+.\"
+.\" Underline $1 and append $2 without underline
+.\"
+.de UL
+.  if t \}\
+.    nop \Z'\\$1'\v'.25m'\D'l \w'\\$1'u 0'\v'-.25m'\\$2
+.    return
+.  \}
+.  ul 1
+\\$1\c
+\\$2
+..
+.
+.
+.\" --------------------------------------------------------------------
+.\" End of macro definitions.
+.\" --------------------------------------------------------------------
+.
+.
+.\" --------------------------------------------------------------------
+.SH DESCRIPTION
+..\" --------------------------------------------------------------------
+.
+.BR ideal (@MAN7EXT@)
+is a
+.I roff
+language for drawing pictures.
+.
+.BR gideal (@MAN1EXT@)
+is the corresponding
+.I groff
+preprocessor for using this language within
+.I groff files
+(to be done).
+.
+.
+.\" --------------------------------------------------------------------
+.SH "IDEAL PARTS"
+.\" --------------------------------------------------------------------
+.
+Within a roff file, an
+.I ideal part
+is started with the command
+.BR .IS .
+.
+.
+.P
+this part is ended with the command
+.B .IE
+or
+.BR .IF .
+.
+.
+.P
+The text between these requests is handled by the preprocessor
+.BR gideal (@MAN1EXT@).
+.
+.
+.\" --------------------------------------------------------------------
+.SH HISTORY
+.\" --------------------------------------------------------------------
+.
+The roff preprocessor and the roff language
+.I ideal
+were invented by
+.I Christopher J. Wyk
+in 1981 at AT&T.
+.
+.
+.P
+The
+.I ideal language
+is based on
+.IR "complex numbers" .
+.
+These are well documented at the documentation of the
+.UR http://\:search.cpan.org/\:~zefram/\:Math-Complex-1.59/\:lib/\:Math\
+/\:Complex.pm
+Math::Complex Perl package
+.UE .
+.
+This documentation is more about the complex mathematics, but also a
+bit about related Perl examles.
+.
+.
+.\" --------------------------------------------------------------------
+.SH "SEE ALSO"
+.\" --------------------------------------------------------------------
+.
+.TP
+.BR gideal (@MAN1EXT@)
+for information about the corresponding groff preprocesor
+.
+.
+.TP
+.B Unix8 preprocessor
+Freely available documentation for the
+.IR "ideal preprocessor" .
+.
+The
+.I preprocessor
+there is called
+.BR ideal ,
+not
+.BR gideal (@MAN1EXT@)
+as in
+.IR groff .
+.br
+.UR http://man.cat-v.org/unix_8th/1/ideal
+.UE .
+.
+.
+.TP
+.B ACM articles for buying
+.
+.RS
+.
+.TP
+.B p99-van_wyk.pdf.gz
+.nf
+A Graphics Typesetting Language
+Christopher J. Van Wyk
+.fi
+.UR http://dl.acm.org/citation.cfm?id=806460
+.UE
+.
+.TP
+.B p163-van_wyk.pdf.gz
+.nf
+A High-Level Language for Specifying Pictures
+Christopher J. Van Wyk
+.fi
+.UR http://dl.acm.org/citation.cfm?id=357303
+.UE
+.
+.RE
+.
+.
+.TP
+.BR groff (@MAN1EXT@),
+.TQ
+.BR groff (@MAN7EXT@)
+Information about the
+.I groff
+system.
+.
+.
+.\" --------------------------------------------------------------------
+.SH "AUTHORS"
+.\" --------------------------------------------------------------------
+.
+.authors
+.
+.
+.\" --------------------------------------------------------------------
+.SH "COPYING"
+.\" --------------------------------------------------------------------
+.
+.copying
+.
+.
+.\" --------------------------------------------------------------------
+.\" Emacs settings
+.\" --------------------------------------------------------------------
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" End:


From MAILER-DAEMON Mon Jun 16 16:20:35 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WwdON-0002cQ-N0
	for mharc-groff-commit@gnu.org; Mon, 16 Jun 2014 16:20:35 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:38920)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwdOK-0002cI-RO
	for groff-commit@gnu.org; Mon, 16 Jun 2014 16:20:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwdOJ-00013I-KD
	for groff-commit@gnu.org; Mon, 16 Jun 2014 16:20:32 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:56172)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WwdOJ-00013B-Gy
	for groff-commit@gnu.org; Mon, 16 Jun 2014 16:20:31 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WwdOI-0006Wu-DJ
	for groff-commit@gnu.org; Mon, 16 Jun 2014 20:20:30 +0000
Date: Mon, 16 Jun 2014 20:20:30 +0000
Message-Id: <E1WwdOI-0006Wu-DJ@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: grog: momentarily ignore groff preproc options for 3
	preprocessors
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140616202030.25069.60052@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: a18a7801fe030a8ddcde27e3869ccf1aed25faaf
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Jun 2014 20:20:34 -0000

bwarken pushed a commit to branch master
in repository groff.

commit a18a7801fe030a8ddcde27e3869ccf1aed25faaf
Author: Bernd Warken <groff-bernd.warken-72@web.de>
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  <groff-bernd.warken-72@web.de>
 
+	* src/roff/grog/subs.pl: Remove too early listing of 3 `groff'
+	preprocessors options: gideal, glilypond, gperl.
+
+2014-06-16  Bernd Warken  <groff-bernd.warken-72@web.de>
+
 	* 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'};


From MAILER-DAEMON Tue Jun 17 10:50:02 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Wwui1-0004lG-U8
	for mharc-groff-commit@gnu.org; Tue, 17 Jun 2014 10:50:01 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:41471)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wwuhv-0004d5-HP
	for groff-commit@gnu.org; Tue, 17 Jun 2014 10:50:00 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wwuhq-0001MC-Qa
	for groff-commit@gnu.org; Tue, 17 Jun 2014 10:49:55 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:37032)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wwuhq-0001M1-IF
	for groff-commit@gnu.org; Tue, 17 Jun 2014 10:49:50 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1Wwuhp-0000F3-8y
	for groff-commit@gnu.org; Tue, 17 Jun 2014 14:49:49 +0000
Date: Tue, 17 Jun 2014 14:49:49 +0000
Message-Id: <E1Wwuhp-0000F3-8y@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: groff.cpp and grog: add option -J for preproc gideal
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140617144948.895.31702@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: f5f5788e5d8b74f3f28857b2f02ac2e12a796664
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Jun 2014 14:50:00 -0000

bwarken pushed a commit to branch master
in repository groff.

commit f5f5788e5d8b74f3f28857b2f02ac2e12a796664
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Tue Jun 17 16:49:40 2014 +0200

    groff.cpp and grog: add option -J for preproc gideal
---
 ChangeLog                 |    5 +++++
 src/roff/groff/groff.cpp  |   17 +++++++++++++----
 src/roff/groff/pipeline.h |    9 ++++++---
 src/roff/grog/subs.pl     |   16 +++++++---------
 4 files changed, 31 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b636c1c..cd06d0e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-17  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* src/roff/groff/groff.cpp, src/roff/groff/pipeline.h,
+	* src/roff/grog/subs.pl: Add `groff' option `-J' for `gideal'.
+
 2014-06-16  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* src/roff/grog/subs.pl: Remove too early listing of 3 `groff'
diff --git a/src/roff/groff/groff.cpp b/src/roff/groff/groff.cpp
index 9ea8f71..38b221f 100644
--- a/src/roff/groff/groff.cpp
+++ b/src/roff/groff/groff.cpp
@@ -3,6 +3,8 @@
    Free Software Foundation, Inc.
      Written by James Clark (jjc@jclark.com)
 
+Latest update: 17 Jun 2014
+
 This file is part of groff.
 
 groff is free software; you can redistribute it and/or modify it under
@@ -51,14 +53,15 @@ extern "C" {
 
 // The number of commands must be in sync with MAX_COMMANDS in pipeline.h
 
-// grap and chem must come before pic;
+// grap, chem, and ideal must come before pic;
 // tbl must come before eqn
 const int PRECONV_INDEX = 0;
 const int SOELIM_INDEX = PRECONV_INDEX + 1;
 const int REFER_INDEX = SOELIM_INDEX + 1;
 const int GRAP_INDEX = REFER_INDEX + 1;
 const int CHEM_INDEX = GRAP_INDEX + 1;
-const int PIC_INDEX = CHEM_INDEX + 1;
+const int IDEAL_INDEX = CHEM_INDEX + 1;
+const int PIC_INDEX = IDEAL_INDEX + 1;
 const int TBL_INDEX = PIC_INDEX + 1;
 const int GRN_INDEX = TBL_INDEX + 1;
 const int EQN_INDEX = GRN_INDEX + 1;
@@ -139,7 +142,7 @@ int main(int argc, char **argv)
   };
   while ((opt = getopt_long(
 		  argc, argv,
-		  "abcCd:D:eEf:F:gGhiI:jkK:lL:m:M:n:No:pP:r:RsStT:UvVw:W:XzZ",
+		  "abcCd:D:eEf:F:gGhiI:jJkK:lL:m:M:n:No:pP:r:RsStT:UvVw:W:XzZ",
 		  long_options, NULL))
 	 != EOF) {
     char buf[3];
@@ -174,6 +177,10 @@ int main(int argc, char **argv)
     case 't':
       commands[TBL_INDEX].set_name(command_prefix, "tbl");
       break;
+    case 'J':
+      commands[_INDEX].set_name(command_prefix, "gideal");
+      // need_pic = 1;
+      break;
     case 'j':
       commands[CHEM_INDEX].set_name(command_prefix, "chem");
       need_pic = 1;
@@ -219,7 +226,8 @@ int main(int argc, char **argv)
 	"GNU groff comes with ABSOLUTELY NO WARRANTY.\n"
 	"You may redistribute copies of groff and its subprograms\n"
 	"under the terms of the GNU General Public License.\n"
-	"For more information about these matters, see the file named COPYING.\n");
+	"For more information about these matters, see the file\n"
+	"named COPYING.\n");
       printf("\ncalled subprograms:\n\n");
       fflush(stdout);
       commands[POST_INDEX].append_arg(buf);
@@ -773,6 +781,7 @@ void help()
 "-g\tpreprocess with grn\n"
 "-G\tpreprocess with grap\n"
 "-j\tpreprocess with chem\n"
+"-J\tpreprocess with gideal\n"
 "-s\tpreprocess with soelim\n"
 "-R\tpreprocess with refer\n"
 "-Tdev\tuse device dev\n"
diff --git a/src/roff/groff/pipeline.h b/src/roff/groff/pipeline.h
index 2795b53..19c93ef 100644
--- a/src/roff/groff/pipeline.h
+++ b/src/roff/groff/pipeline.h
@@ -1,7 +1,9 @@
-/* Copyright (C) 1989-1992, 2000, 2002, 2005, 2009, 2011
+/* Copyright (C) 1989-1992, 2000, 2002, 2005, 2009, 2011, 2014
    Free Software Foundation, Inc.
      Written by James Clark (jjc@jclark.com)
 
+Latest update: 17 Jun 2014
+
 This file is part of groff.
 
 groff is free software; you can redistribute it and/or modify it under
@@ -23,8 +25,9 @@ extern "C" {
 }
 #endif
 
-/* run_pipeline can handle at most this many commands */
-#define MAX_COMMANDS 14
+/* run_pipeline can handle at most this many commands,
+   see the const numbers in groff.cpp */
+#define MAX_COMMANDS 15
 
 /* Children exit with this status if execvp fails. */
 #define EXEC_FAILED_EXIT_STATUS 0xff
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index 991ebaf..ce32f79 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -30,7 +30,7 @@
 # <http://www.gnu.org/licenses/gpl-2.0.html>.
 
 ########################################################################
-# Last_Update = '16 Jun 2014';
+# Last_Update = '17 Jun 2014';
 ########################################################################
 
 require v5.6;
@@ -369,7 +369,7 @@ sub do_line {
     return;
   }
   if ( $command =~ /^\.PF$/ ) {
-    $Groff{'PF'}++;		# alternative opening for pic
+    $Groff{'PF'}++;		# alternate opening for pic
     return;
   }
   if ( $command =~ /^\.PE$/ ) {
@@ -667,24 +667,22 @@ EOF
   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{'pic'} ||
+
+  if ( $Groff{'chem'} || $Groff{'eqn'} ||  $Groff{'ideal'} ||
+       $Groff{'grap'} || $Groff{'grn'} || $Groff{'pic'} ||
        $Groff{'refer'} || $Groff{'tbl'} ) {
     my $s = "-";
     $s .= "e" if $Groff{'eqn'};
     $s .= "G" if $Groff{'grap'};
     $s .= "g" if $Groff{'grn'};
+    $s .= "J" if $Groff{'ideal'};
     $s .= "j" if $Groff{'chem'};
     $s .= "p" if $Groff{'pic'};
     $s .= "R" if $Groff{'refer'};


From MAILER-DAEMON Tue Jun 17 15:26:53 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Wwz1x-0004wv-LQ
	for mharc-groff-commit@gnu.org; Tue, 17 Jun 2014 15:26:53 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:55356)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wwz1u-0004vn-FS
	for groff-commit@gnu.org; Tue, 17 Jun 2014 15:26:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wwz1n-0001SO-Sg
	for groff-commit@gnu.org; Tue, 17 Jun 2014 15:26:50 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:39775)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wwz1n-0001SK-PA
	for groff-commit@gnu.org; Tue, 17 Jun 2014 15:26:43 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1Wwz1f-00075K-1c
	for groff-commit@gnu.org; Tue, 17 Jun 2014 19:26:43 +0000
Date: Tue, 17 Jun 2014 19:26:35 +0000
Message-Id: <E1Wwz1f-00075K-1c@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: chem: version 1.0.0; correct spaces in ChangeLog;
	add Emacs final part in Makefile.sub
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140617192634.27199.75313@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: a64a13cb8efba81d0b10fee2d1e26473b642228c
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Jun 2014 19:26:52 -0000

bwarken pushed a commit to branch master
in repository groff.

commit a64a13cb8efba81d0b10fee2d1e26473b642228c
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Tue Jun 17 21:26:27 2014 +0200

    chem: version 1.0.0; correct spaces in ChangeLog; add Emacs final part in Makefile.sub
---
 contrib/chem/ChangeLog |  116 ++++++++++++++++++++++++++----------------------
 1 files changed, 63 insertions(+), 53 deletions(-)

diff --git a/contrib/chem/ChangeLog b/contrib/chem/ChangeLog
index 77359cc..5d99579 100644
--- a/contrib/chem/ChangeLog
+++ b/contrib/chem/ChangeLog
@@ -1,3 +1,12 @@
+2014-06-17  Bernd Warken  <bernd.warken@web.de>
+	________________________________________________________________
+	* release of chem 1.0.0
+
+	* Makefile.sub: Add Emacs final part.
+
+	* ChangeLog: Correct the space characters in this file as Emacs
+	style.
+
 2014-03-29  Steffen Nurpmeso  <sdaoden@yandex.com>
 
 	* Makefile.sub (uninstall_examples): Remove superfluous `rmdir'.
@@ -49,10 +58,10 @@
 
 2007-02-06  Eric S. Raymond  <esr@snark.thyrsus.com>
 
-	* chem.man: Change .UR/.UE and .MT/.ME so the start macro no longer
-	takes a second argument that is pasted to the end of the generated
-	text.  Instead, the end macro takes an argument that does the same
-	thing.
+	* chem.man: Change .UR/.UE and .MT/.ME so the start macro no
+	longer takes a second argument that is pasted to the end of the
+	generated text.  Instead, the end macro takes an argument that
+	does the same thing.
 
 2007-02-02  Werner LEMBERG  <wl@gnu.org>
 
@@ -64,27 +73,27 @@
 	portability.  Conversion checked using the protocol described in
 	tmac/TESTING-HINTS.
 
-2006-11-10  Bernd Warken <groff-bernd.warken-72@web.de>
-       ________________________________________________________________
-        * release of chem 0.3.1
+2006-11-10  Bernd Warken  <groff-bernd.warken-72@web.de>
+	________________________________________________________________
+	* release of chem 0.3.1
 
 	* chem.man: Add information about example files.
 
 2006-11-10  Werner LEMBERG  <wl@gnu.org>
 
-        * chem.man1: Rename back to...
-        * chem.man: This.
-        Use @G@, @MACRODIR@, and @DATASUBDIR@.
+	* chem.man1: Rename back to...
+	* chem.man: This.
+	Use @G@, @MACRODIR@, and @DATASUBDIR@.
 
-        * Makefile.sub (CLEANADD, all): Don't handle chem.man.
-        (chem.man): Remove rule.
-        (chem): s/tmacdir/MACRODIR/, s/picdir/PICDIR/.
+	* Makefile.sub (CLEANADD, all): Don't handle chem.man.
+	(chem.man): Remove rule.
+	(chem): s/tmacdir/MACRODIR/, s/picdir/PICDIR/.
 
-        * chem.pl: s/tmacdir/MACRODIR/, s/picdir/PICDIR/.
+	* chem.pl: s/tmacdir/MACRODIR/, s/picdir/PICDIR/.
 
-2006-11-10  Bernd Warken <groff-bernd.warken-72@web.de>
-       ________________________________________________________________
-        * release of chem 0.3.0
+2006-11-10  Bernd Warken  <groff-bernd.warken-72@web.de>
+	________________________________________________________________
+	* release of chem 0.3.0
 
 	* chem.man1: Rename `chem.man' to translate some `@...@'
 	constructs.  Some minor corrections.  Remove some unused macros.
@@ -98,11 +107,11 @@
 
 2006-11-09  Werner LEMBERG  <wl@gnu.org>
 
-        * chem.man: Revised.
+	* chem.man: Revised.
 
-2006-11-08  Bernd Warken <groff-bernd.warken-72@web.de>
-       ________________________________________________________________
-        * release of chem 0.2.0
+2006-11-08  Bernd Warken  <groff-bernd.warken-72@web.de>
+	________________________________________________________________
+	* release of chem 0.2.0
 
 	* pic.tmac: Remove this file.  Use instead the installed pic.tmac
 	in $(tmacdir).
@@ -116,15 +125,15 @@
 	* Makefile.sub: Add and fix $(srcdir) where necessary to make it
 	compile with srcdir != builddir.  Other minor fixes improvements.
 
-2006-11-07  Bernd Warken <groff-bernd.warken-72@web.de>
-       ________________________________________________________________
-        * release of chem 0.1.2
+2006-11-07  Bernd Warken  <groff-bernd.warken-72@web.de>
+	________________________________________________________________
+	* release of chem 0.1.2
 
 	### `chem' works now with all example files (examples/*.chem and
 	examples/122/*.chem).
-	
+
 	* examples/122/README: Add some information on the example files.
-	
+
 	* examples/122/chAi_poly_vinyl_chloride.chem: Use .ps with
 	argument `-2' and recall `.ps +2' at the end of the file.  This
 	stops the size shift in the following files.
@@ -153,7 +162,7 @@
 	to `pic'.
 
 	### global variables
-	
+
 	* chem.pl:
 	- $Line: Add this variable to store the unchanged input line.
 	- %Params: Add the variables from setparams() to this hash.
@@ -168,22 +177,22 @@
 	constructs during `chem'.  Use the elements in `%Define' as `chem'
 	commands.
 
-2006-10-27  Bernd Warken <groff-bernd.warken-72@web.de>
-       ________________________________________________________________
-        * release of chem 0.1.1
+2006-10-27  Bernd Warken  <groff-bernd.warken-72@web.de>
+	________________________________________________________________
+	* release of chem 0.1.1
 
 	* chem.pl:
 	- Add handling of `[' and `]' (extension of chem awk).
 	- Restrict line break after labels.
 
 	* ChangeLog: Correct the former entry.
-	
-2006-10-26  Bernd Warken <groff-bernd.warken-72@web.de>
-       ________________________________________________________________
-        * release of chem 0.1.0
+
+2006-10-26  Bernd Warken  <groff-bernd.warken-72@web.de>
+	________________________________________________________________
+	* release of chem 0.1.0
 
 	### Extensions to the chem awk version.
-	
+
 	* chem.pl:
 	- parameters: -h, --help, -v, --version, -- are added as options.
 	The minus character - is added as filespec for standard input, it
@@ -209,7 +218,7 @@
 	* Makefile.sub: Make file for the groff system.
 
 	* ChangeLog: This file.
-	
+
 	* chem.man: Manual page for the Perl version of chem.
 
 	* README.txt: File for information on this chem version.
@@ -217,37 +226,38 @@
 	* examples/*.chem: Self-constructed example files for chem.
 
 	* examples/README.txt: Information on the example files.
-	
+
 	* examples/122/*.chem: Example files from the classical chem book
 	122.ps at <http://cm.bell-labs.com/cm/cs/cstr/122.ps.gz>.
 
 	* examples/122/README: Information on the example files in this
 	directory.
 
-2006-10-16  Bernd Warken <groff-bernd.warken-72@web.de>
+2006-10-16  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* awk version of chem
 	chem is a roff preprocessor that generates chemical structure
 	diagrams suitable for the pic preprocessor.  The original version
 	of chem is an awk script written by Brian Kernighan.  This project
 	is a rewrite of chem in Perl.
-	
-2006-10-15  Bernd Warken <groff-bernd.warken-72@web.de>
-	________________________________________________________________
-	License
 
-	Copyright (C) 2006-2010, 2013, 2014
-	Free Software Foundation, Inc.
-	Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+2006-10-15  Bernd Warken  <groff-bernd.warken-72@web.de>
+________________________________________________________________
+License
+
+Copyright (C) 2006-2010, 2013, 2014
+Free Software Foundation, Inc.
+Written by Bernd Warken <groff-bernd.warken-72@web.de>.
+
+Copying and distribution of this file, with or without
+modification, are permitted provided the copyright notice and this
+notice are preserved.
 
-	Copying and distribution of this file, with or without
-	modification, are permitted provided the copyright notice and this
-	notice are preserved.
+This file is part of `chem', which is part of the `groff' project.
 
-	This file is part of `chem', which is part of the `groff' project.
 
-        ####### Emacs settings
+####### Emacs settings
 
-        Local Variables:
-        mode: change-log
-        End:
+Local Variables:
+mode: change-log
+End:


From MAILER-DAEMON Tue Jun 17 16:53:37 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Wx0Nt-0006a0-Ax
	for mharc-groff-commit@gnu.org; Tue, 17 Jun 2014 16:53:37 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:45765)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wx0Np-0006Xs-WB
	for groff-commit@gnu.org; Tue, 17 Jun 2014 16:53:35 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wx0No-0006pM-Cr
	for groff-commit@gnu.org; Tue, 17 Jun 2014 16:53:33 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:40935)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wx0No-0006pI-8l
	for groff-commit@gnu.org; Tue, 17 Jun 2014 16:53:32 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1Wx0Nk-00057r-KO
	for groff-commit@gnu.org; Tue, 17 Jun 2014 20:53:31 +0000
Date: Tue, 17 Jun 2014 20:53:28 +0000
Message-Id: <E1Wx0Nk-00057r-KO@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: groff.cpp, gideal/listfiles/: minor corrections
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140617205328.19672.75367@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: d00ea0e8d29d2a2c130dff5463c2ec7470ced93b
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Jun 2014 20:53:35 -0000

bwarken pushed a commit to branch master
in repository groff.

commit d00ea0e8d29d2a2c130dff5463c2ec7470ced93b
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Tue Jun 17 22:53:18 2014 +0200

    groff.cpp, gideal/listfiles/: minor corrections
---
 contrib/gideal/Makefile.sub          |   19 ++++++++++++++++-
 contrib/gideal/libfiles/README.txt   |   11 ++++++++++
 contrib/gideal/libfiles/arc.ideal    |   37 ++++++++++++++++++++++++++++++++++
 contrib/gideal/libfiles/arrow.ideal  |   21 +++++++++++++++++++
 contrib/gideal/libfiles/circle.ideal |   19 +++++++++++++++++
 contrib/gideal/libfiles/dash.ideal   |   18 ++++++++++++++++
 contrib/gideal/libfiles/rect.ideal   |   30 +++++++++++++++++++++++++++
 contrib/gideal/libfiles/wavy.ideal   |   20 ++++++++++++++++++
 src/roff/groff/groff.cpp             |    2 +-
 9 files changed, 175 insertions(+), 2 deletions(-)

diff --git a/contrib/gideal/Makefile.sub b/contrib/gideal/Makefile.sub
index 01e60aa..76e8ea8 100644
--- a/contrib/gideal/Makefile.sub
+++ b/contrib/gideal/Makefile.sub
@@ -6,7 +6,7 @@
 #   Free Software Foundation, Inc.
 # Written by Bernd Warken <groff-bernd.warken-72@web.de>.
 
-# Last update: 16 Jun 2014
+# Last update: 17 Jun 2014
 
 # This file is part of `gideal' which is part of `groff'.
 
@@ -46,15 +46,32 @@ gideal: gideal.pl
 	    $(srcdir)/gideal.pl >$@; \
 	chmod +x $@
 
+.PHONY: libdirs
+libdires: 
+
 .PHONY: install_data
 install_data: gideal
 	-test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
 	$(RM) $(DESTDIR)$(bindir)/gideal
 	$(INSTALL_SCRIPT) gideal $(DESTDIR)$(bindir)/gideal
+	-test -d $(DESTDIR)$(datasubdir)/ideal \
+          || $(mkinstalldirs) $(DESTDIR)$(datasubdir)/ideal
+	-test -d $(DESTDIR)$(datasubdir)/ideal/libfiles \
+          || $(mkinstalldirs) $(DESTDIR)$(datasubdir)/ideal/libfiles
+	$(RM) $(DESTDIR)$(datasubdir)/ideal/libfiles/*
+	for i in $(srcdir)/libfiles/*.ideal; do \
+	  n=`echo $$i | sed 's|$(srcdir)/libfiles/||g'`; \
+	  $(INSTALL_DATA) $$i $(DESTDIR)$(datasubdir)/ideal/libfiles/$$n; \
+	done
+	$(RM) $(DESTDIR)$(datasubdir)/ideal/libfiles/README.txt
+	$(INSTALL_DATA) $$(srcdir)/libfiles//README.txt \
+		$(DESTDIR)$(datasubdir)/ideal/libfiles/README.txt;
+
 
 .PHONY: uninstall_sub
 uninstall_sub:
 	$(RM) $(DESTDIR)$(bindir)/gideal
+	$(RM) $(DESTDIR)$(datasubdir)/ideal/libfiles/*
 
 
 ########################################################################
diff --git a/contrib/gideal/libfiles/README.txt b/contrib/gideal/libfiles/README.txt
new file mode 100644
index 0000000..284868a
--- /dev/null
+++ b/contrib/gideal/libfiles/README.txt
@@ -0,0 +1,11 @@
+In this directory, there are stored a series of `ideal libfiles'.
+They all come from the `ideal' documentation
+     Computing Science Technical Report No. 103
+     IDEAL User’s Manual - Christopher J. Van Wyk
+
+Therein the name of the `libfile' files does not have an extension.
+But we added the extension `.ideal' to each libfile file.
+
+Only the libfile `arc' is lacking.  It's existence was mentioned, but
+not given.  We collected useful information and wrote a new file
+`arc.ideal'.
diff --git a/contrib/gideal/libfiles/arc.ideal b/contrib/gideal/libfiles/arc.ideal
new file mode 100644
index 0000000..2c139e1
--- /dev/null
+++ b/contrib/gideal/libfiles/arc.ideal
@@ -0,0 +1,37 @@
+.\" from `Computing Science Technical Report No. 103'
+.\" IDEAL User’s Manual - Christopher J. Van Wyk
+.
+.\" This file is not complete.  The basicdefinition is lacking -
+.\" better do not use it with `...libfile'.
+
+.IS
+/* giving center, radius, and
+starting and ending angles */
+put arc {
+	center = 0;
+	radius = 1;
+	startang = 0;
+	endang = 235;
+};
+/* giving center, starting point,
+and ending angle */
+put arc {
+	center = 0;
+	start = 1;
+	endang = 235;
+};
+/* giving three points on the arc */
+put arc {
+	start = cis(235);
+	midway = -1;
+	end = 0;
+};
+.IE
+.
+.\" --------------------------------------------------------------------
+.\" Emacs settings
+.\" --------------------------------------------------------------------
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
diff --git a/contrib/gideal/libfiles/arrow.ideal b/contrib/gideal/libfiles/arrow.ideal
new file mode 100644
index 0000000..387b9c4
--- /dev/null
+++ b/contrib/gideal/libfiles/arrow.ideal
@@ -0,0 +1,21 @@
+.\" from `Computing Science Technical Report No. 103'
+.\" IDEAL User’s Manual - Christopher J. Van Wyk
+.
+.IS
+arrow {
+      var tl, hd, head, perp, headang;
+      conn tl to hd;
+      perp = head*(tl-hd)/abs(tl-hd);
+      conn hd + cis(headang)*perp to hd to hd + cis(-headang)*perp;
+      head  ̃ 0.1;
+      headang  ̃ 25;
+}
+.IE
+.
+.\" --------------------------------------------------------------------
+.\" Emacs settings
+.\" --------------------------------------------------------------------
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
diff --git a/contrib/gideal/libfiles/circle.ideal b/contrib/gideal/libfiles/circle.ideal
new file mode 100644
index 0000000..988ba61
--- /dev/null
+++ b/contrib/gideal/libfiles/circle.ideal
@@ -0,0 +1,19 @@
+.\" from `Computing Science Technical Report No. 103'
+.\" IDEAL User’s Manual - Christopher J. Van Wyk
+.
+.IS
+circle {
+	var center, radius, z1, z2, z3;
+	put CIRCLE {
+		radius = 3;
+	}
+}
+.IE
+.
+.\" --------------------------------------------------------------------
+.\" Emacs settings
+.\" --------------------------------------------------------------------
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
diff --git a/contrib/gideal/libfiles/dash.ideal b/contrib/gideal/libfiles/dash.ideal
new file mode 100644
index 0000000..8c746fb
--- /dev/null
+++ b/contrib/gideal/libfiles/dash.ideal
@@ -0,0 +1,18 @@
+.\" from `Computing Science Technical Report No. 103'
+.\" IDEAL User’s Manual - Christopher J. Van Wyk
+.
+.IS
+dash {
+     var start, end;
+     conn start to 0.25[start,end];
+     conn 0.75[start,end] to end;
+}
+.IE
+.
+.\" --------------------------------------------------------------------
+.\" Emacs settings
+.\" --------------------------------------------------------------------
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
diff --git a/contrib/gideal/libfiles/rect.ideal b/contrib/gideal/libfiles/rect.ideal
new file mode 100644
index 0000000..70a215f
--- /dev/null
+++ b/contrib/gideal/libfiles/rect.ideal
@@ -0,0 +1,30 @@
+.\" from `Computing Science Technical Report No. 103'
+.\" IDEAL User’s Manual - Christopher J. Van Wyk
+.
+.IS
+rect {
+	var ne, nw, sw, se,
+	n, e, w, s, c,
+	ht, wd;
+	ne = se + (0,1)*ht;
+	nw = sw + (0,1)*ht;
+	ne = nw + wd;
+	n = (ne+nw)/2;
+	s = (se+sw)/2;
+	e = (ne+se)/2;
+	w = (nw+sw)/2;
+	c = (ne+sw)/2;
+	ht  ̃ 1;
+	wd  ̃ 1.5;
+	bdlist = ne, nw, sw, se;
+	conn ne to nw to sw to se to ne;
+}
+.IE
+.
+.\" --------------------------------------------------------------------
+.\" Emacs settings
+.\" --------------------------------------------------------------------
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
diff --git a/contrib/gideal/libfiles/wavy.ideal b/contrib/gideal/libfiles/wavy.ideal
new file mode 100644
index 0000000..0e23940
--- /dev/null
+++ b/contrib/gideal/libfiles/wavy.ideal
@@ -0,0 +1,20 @@
+.\" from `Computing Science Technical Report No. 103'
+.\" IDEAL User’s Manual - Christopher J. Van Wyk
+.
+.IS
+wavy {
+	var start, end, perp, pt1, pt2, ht;
+	perp = (0,1)*(start - end)/abs(start - end);
+	pt1 = 0.25[start,end] + perp*ht;
+	pt2 = 0.75[start,end] - perp*ht;
+	conn start to pt1 to pt2 to end;
+}
+.IE
+.
+.\" --------------------------------------------------------------------
+.\" Emacs settings
+.\" --------------------------------------------------------------------
+.
+.\" Local Variables:
+.\" mode: nroff
+.\" End:
diff --git a/src/roff/groff/groff.cpp b/src/roff/groff/groff.cpp
index 38b221f..9776473 100644
--- a/src/roff/groff/groff.cpp
+++ b/src/roff/groff/groff.cpp
@@ -178,7 +178,7 @@ int main(int argc, char **argv)
       commands[TBL_INDEX].set_name(command_prefix, "tbl");
       break;
     case 'J':
-      commands[_INDEX].set_name(command_prefix, "gideal");
+      commands[IDEAL_INDEX].set_name(command_prefix, "gideal");
       // need_pic = 1;
       break;
     case 'j':


From MAILER-DAEMON Tue Jun 17 17:04:49 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Wx0Yj-0005FD-D4
	for mharc-groff-commit@gnu.org; Tue, 17 Jun 2014 17:04:49 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48764)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wx0Yg-0005Cm-SX
	for groff-commit@gnu.org; Tue, 17 Jun 2014 17:04:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wx0Yg-0002P5-6D
	for groff-commit@gnu.org; Tue, 17 Jun 2014 17:04:46 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:41036)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wx0Yg-0002Oz-3l
	for groff-commit@gnu.org; Tue, 17 Jun 2014 17:04:46 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1Wx0Ye-0006CT-UN
	for groff-commit@gnu.org; Tue, 17 Jun 2014 21:04:45 +0000
Date: Tue, 17 Jun 2014 21:04:44 +0000
Message-Id: <E1Wx0Ye-0006CT-UN@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: gideal: minor correction for Makefile.sub
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140617210444.23802.61524@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: a96c16384ed3af36214ae43f65a6c12441ba0abe
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Jun 2014 21:04:47 -0000

bwarken pushed a commit to branch master
in repository groff.

commit a96c16384ed3af36214ae43f65a6c12441ba0abe
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Tue Jun 17 23:04:37 2014 +0200

    gideal: minor correction for Makefile.sub
---
 contrib/gideal/Makefile.sub |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/gideal/Makefile.sub b/contrib/gideal/Makefile.sub
index 76e8ea8..df5029d 100644
--- a/contrib/gideal/Makefile.sub
+++ b/contrib/gideal/Makefile.sub
@@ -64,7 +64,7 @@ install_data: gideal
 	  $(INSTALL_DATA) $$i $(DESTDIR)$(datasubdir)/ideal/libfiles/$$n; \
 	done
 	$(RM) $(DESTDIR)$(datasubdir)/ideal/libfiles/README.txt
-	$(INSTALL_DATA) $$(srcdir)/libfiles//README.txt \
+	$(INSTALL_DATA) $(srcdir)/libfiles/README.txt \
 		$(DESTDIR)$(datasubdir)/ideal/libfiles/README.txt;
 
 


From MAILER-DAEMON Tue Jun 17 17:27:07 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Wx0uH-00038c-8V
	for mharc-groff-commit@gnu.org; Tue, 17 Jun 2014 17:27:07 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:52768)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wx0uE-000360-O2
	for groff-commit@gnu.org; Tue, 17 Jun 2014 17:27:03 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wx0uD-0001B2-Od
	for groff-commit@gnu.org; Tue, 17 Jun 2014 17:27:02 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:41231)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wx0uD-000195-Jj
	for groff-commit@gnu.org; Tue, 17 Jun 2014 17:27:01 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1Wx0uC-0007ke-BP
	for groff-commit@gnu.org; Tue, 17 Jun 2014 21:27:00 +0000
Date: Tue, 17 Jun 2014 21:27:00 +0000
Message-Id: <E1Wx0uC-0007ke-BP@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: grog: correct handling of -J option for ideal
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140617212700.29765.15796@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 0b8797bdada894df364b0542989d8cdc069ff44b
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Jun 2014 21:27:03 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 0b8797bdada894df364b0542989d8cdc069ff44b
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Tue Jun 17 23:26:53 2014 +0200

    grog: correct handling of -J option for ideal
---
 ChangeLog              |    5 +++++
 src/roff/grog/grog.man |    9 +++++----
 src/roff/grog/subs.pl  |    3 +++
 3 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index cd06d0e..b30a8b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2014-06-17  Bernd Warken  <groff-bernd.warken-72@web.de>
 
+	* src/roff/grog/subs.pl: Correct handling of option `-J' for
+	ideal.
+
+2014-06-17  Bernd Warken  <groff-bernd.warken-72@web.de>
+
 	* src/roff/groff/groff.cpp, src/roff/groff/pipeline.h,
 	* src/roff/grog/subs.pl: Add `groff' option `-J' for `gideal'.
 
diff --git a/src/roff/grog/grog.man b/src/roff/grog/grog.man
index bbbc900..aadd2a6 100644
--- a/src/roff/grog/grog.man
+++ b/src/roff/grog/grog.man
@@ -16,10 +16,10 @@ grog.1 - man page for grog (section 1)
 Source file position:  <groff_source_top>/src/roff/grog/grog.man
 Installed position:    $prefix/share/man/man1/grog.1
 
-Last Update: 15 Jun 2014
+Last Update: 17 Jun 2014
 ..
-.de co
-Copyright (C) 1989\[en]2003, 2006, 2007, 2009\[en]2012, 2014
+.de copying
+Copyright (C) 1989\[en]2003, 2006\[en]7, 2009\[en]12, 2014
 Free Software Foundation, Inc.
 .
 Written by James Clark.
@@ -224,6 +224,7 @@ options are required for running the input under
 .BR \-g ,
 .BR \-G ,
 .BR \-j ,
+.BR \-J ,
 .BR \-p ,
 .BR \-R ,
 .BR \-s ,
@@ -538,7 +539,7 @@ this file does not use a macro package.
 .\" --------------------------------------------------------------------
 .SH "COPYING"
 .
-.co
+.copying
 .
 .
 .\" --------------------------------------------------------------------
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index ce32f79..49be389 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -254,6 +254,9 @@ sub do_first_line {
     if ( $line =~ /j/ ) {
       $Groff{'chem'}++;
     }
+    if ( $line =~ /J/ ) {
+      $Groff{'ideal'}++;
+    }
     if ( $line =~ /p/ ) {
       $Groff{'pic'}++;
     }


From MAILER-DAEMON Wed Jun 18 05:47:35 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WxCSt-0007Bb-9m
	for mharc-groff-commit@gnu.org; Wed, 18 Jun 2014 05:47:35 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34257)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxCSq-0007BT-Lq
	for groff-commit@gnu.org; Wed, 18 Jun 2014 05:47:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxCSp-00077I-2e
	for groff-commit@gnu.org; Wed, 18 Jun 2014 05:47:32 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:47729)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxCSo-00077E-VP
	for groff-commit@gnu.org; Wed, 18 Jun 2014 05:47:31 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WxCSo-0006D6-3Q
	for groff-commit@gnu.org; Wed, 18 Jun 2014 09:47:30 +0000
Date: Wed, 18 Jun 2014 09:47:30 +0000
Message-Id: <E1WxCSo-0006D6-3Q@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: top ChangeLog: add Emacs-mode,
	separate License by a line. grog: remove perl_test.pl.
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140618094729.23840.21042@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 6ad5b045e1d20359d2b69dd4a95658b69638bc1f
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Jun 2014 09:47:34 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 6ad5b045e1d20359d2b69dd4a95658b69638bc1f
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Wed Jun 18 11:47:17 2014 +0200

    top ChangeLog: add Emacs-mode, separate License by a line.
    grog: remove perl_test.pl.
---
 ChangeLog                  |   26 ++++++++++++++++++++++++--
 src/roff/grog/Makefile.sub |   22 +++++++++++++++++-----
 src/roff/grog/grog.pl      |    7 +------
 src/roff/grog/perl_test.pl |   41 -----------------------------------------
 src/roff/grog/subs.pl      |    2 +-
 5 files changed, 43 insertions(+), 55 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b30a8b3..6ac297a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2014-06-18  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* src/roff/grog/Makefile.sub: Add $(RM).
+
+	* src/roff/grog/grog.pl: Remove call to perl_test.pl.  `require
+	5.6;' is enough as Perl test.
+
+	* src/roff/grog/perl_test.pl: Remove this file.
+
+2014-06-18  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* ChangeLog: Add Emacs-mode and a separator for the license.
+
 2014-06-17  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* src/roff/grog/subs.pl: Correct handling of option `-J' for
@@ -524,7 +537,7 @@
 
 	Necessary for Bernd's code to extract groff options.
 
-2013-07-16  Ingo Schwarze <schwarze@openbsd.org>
+2013-07-16  Ingo Schwarze  <schwarze@openbsd.org>
 
 	* tmac/an-old.tmac (TP): Do not clobber line length after double
 	call to `.TP'.
@@ -1913,14 +1926,23 @@ Version 1.22 released
 
 	* doc/webpage.ms: Fix rendering of title image.
 
+
+________________________________________________________________________
+
+##### License
+
 Copyright 2011-2014
-  Free Software Foundation, Inc.
+	Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
 notice and this notice are preserved.
 
+
+##### Emacs settings
+
 Local Variables:
+mode: change-log
 version-control: never
 coding: utf-8
 End:
diff --git a/src/roff/grog/Makefile.sub b/src/roff/grog/Makefile.sub
index d5957bd..0257dcd 100644
--- a/src/roff/grog/Makefile.sub
+++ b/src/roff/grog/Makefile.sub
@@ -27,6 +27,9 @@
 MAN1=grog.n
 MOSTLYCLEANADD=grog $(MAN1)
 
+# not all make programs have $(RM) predefined.
+RM=rm -f
+
 all: grog $(MAN1)
 
 # lib .pl-files
@@ -37,7 +40,7 @@ GROG_=`echo $(GROG) | sed 's|$(srcdir)/||g'`
 # Perl version works for all parts of `groff'.
 
 grog: grog.pl $(GROG) $(SH_DEPS_SED_SCRIPT)
-	rm -f $@
+	$(RM) $@
 	sed -f "$(SH_DEPS_SED_SCRIPT)" \
 	    -e "1s|^\(#! \).*perl|\\1$(PERL)|" \
 	    -e "s|@g@|$(g)|g" \
@@ -52,19 +55,28 @@ grog: grog.pl $(GROG) $(SH_DEPS_SED_SCRIPT)
 .PHONY: install_data
 install_data: grog
 	-test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
-	rm -f $(DESTDIR)$(bindir)/grog
+	$(RM) $(DESTDIR)$(bindir)/grog
 	$(INSTALL_SCRIPT) grog $(DESTDIR)$(bindir)/grog
 	-test -d $(DESTDIR)$(grog_dir) || $(mkinstalldirs) $(DESTDIR)$(grog_dir)
 	for f in $(GROG_); do \
-	  rm -f $(DESTDIR)$(grog_dir)/$$f; \
+	  $(RM) $(DESTDIR)$(grog_dir)/$$f; \
 	  $(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(grog_dir)/$$f; \
 	done
 
 .PHONY: uninstall_data
 uninstall_sub:
-	rm -f $(DESTDIR)$(bindir)/grog
+	$(RM) $(DESTDIR)$(bindir)/grog
 	-for f in $(GROG_); do \
-	  rm -f $(DESTDIR)$(grog_dir)/$$f; \
+	  $(RM) $(DESTDIR)$(grog_dir)/$$f; \
 	done
 	-d=$(DESTDIR)$(grog_dir);\
 	  if test -d $$d; then rmdir $$d; fi
+
+
+########################################################################
+# Emacs settings
+########################################################################
+#
+# Local Variables:
+# mode: makefile
+# End:
diff --git a/src/roff/grog/grog.pl b/src/roff/grog/grog.pl
index c59d2f8..6ebde5c 100644
--- a/src/roff/grog/grog.pl
+++ b/src/roff/grog/grog.pl
@@ -30,7 +30,7 @@
 # <http://www.gnu.org/licenses/gpl-2.0.html>.
 
 ########################################################################
-our $Last_Update = '16 Jun 2014';
+our $Last_Update = '18 Jun 2014';
 ########################################################################
 
 require v5.6;
@@ -49,15 +49,12 @@ my $before_make;	# script before run of `make'
 
 
 our %at_at;
-my $file_perl_test_pl;
 my $grog_dir;
 
 if ($before_make) { # before installation
   my $grog_source_dir = $FindBin::Bin;
   $at_at{'BINDIR'} = $grog_source_dir;
   $grog_dir = $grog_source_dir;
-  $file_perl_test_pl = File::Spec->catfile($grog_source_dir,
-					   'perl_test.pl');
   my $top = $grog_source_dir . '/../../../';
   open FILE, '<', $top . 'VERSION' ||
     die 'Could not open top file VERSION.';
@@ -73,8 +70,6 @@ if ($before_make) { # before installation
   $at_at{'GROFF_VERSION'} = '@VERSION@';
   $at_at{'BINDIR'} = '@BINDIR@';
   $grog_dir = '@grog_dir@';
-  $file_perl_test_pl = File::Spec->catfile($grog_dir,
-					   'perl_test.pl');
 }
 
 die "$grog_dir is not an existing directory;" unless -d $grog_dir;
diff --git a/src/roff/grog/perl_test.pl b/src/roff/grog/perl_test.pl
deleted file mode 100644
index 5cc18cc..0000000
--- a/src/roff/grog/perl_test.pl
+++ /dev/null
@@ -1,41 +0,0 @@
-#! /usr/bin/env perl
-
-# grog - create groff arguments for `roff' files
-
-# Source file position: <groff-source>/roff/grog/perl_test.sh
-# Installed position: <prefix>/lib/groff/grog/perl_test.sh
-
-# Copyright (C) 2013-14
-#   Free Software Foundation, Inc.
-# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
-
-# Last update: 04 Jun 2014
-
-# This file is part of `grog', which is part of `groff'.
-
-# `groff' is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-
-# `groff' is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-########################################################################
-
-# This file tests whether perl has a suitable version.  It is used by
-# grog.pl and Makefile.sub.
-
-require v5.6;
-
-
-########################################################################
-### Emacs settings
-# Local Variables:
-# mode: CPerl
-# End:
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index 49be389..c7e747a 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -30,7 +30,7 @@
 # <http://www.gnu.org/licenses/gpl-2.0.html>.
 
 ########################################################################
-# Last_Update = '17 Jun 2014';
+# Last_Update = '18 Jun 2014';
 ########################################################################
 
 require v5.6;


From MAILER-DAEMON Wed Jun 18 06:26:53 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WxD4v-00045Q-1s
	for mharc-groff-commit@gnu.org; Wed, 18 Jun 2014 06:26:53 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:43382)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxD4s-00041u-Dd
	for groff-commit@gnu.org; Wed, 18 Jun 2014 06:26:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxD4q-0004iG-El
	for groff-commit@gnu.org; Wed, 18 Jun 2014 06:26:50 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:48166)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxD4q-0004iC-BK
	for groff-commit@gnu.org; Wed, 18 Jun 2014 06:26:48 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WxD4p-0000sO-Mr
	for groff-commit@gnu.org; Wed, 18 Jun 2014 10:26:47 +0000
Date: Wed, 18 Jun 2014 10:26:47 +0000
Message-Id: <E1WxD4p-0000sO-Mr@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: groffer: remove perl_test.pl and HAVE_PERL and
	related parts.
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140618102647.3337.12938@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 9038da1341eb1da73599db54eb3e7272c087b653
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Jun 2014 10:26:52 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 9038da1341eb1da73599db54eb3e7272c087b653
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Wed Jun 18 12:26:40 2014 +0200

    groffer: remove perl_test.pl and HAVE_PERL and related parts.
---
 contrib/groffer/ChangeLog    |   16 +++++++++++--
 contrib/groffer/Makefile.sub |   48 +++++++++++++++++++++--------------------
 contrib/groffer/groffer.pl   |   11 +-------
 contrib/groffer/perl_test.pl |   35 ------------------------------
 contrib/groffer/version.sh   |    4 +-
 5 files changed, 42 insertions(+), 72 deletions(-)

diff --git a/contrib/groffer/ChangeLog b/contrib/groffer/ChangeLog
index 6d3550f..ea60409 100644
--- a/contrib/groffer/ChangeLog
+++ b/contrib/groffer/ChangeLog
@@ -1,3 +1,13 @@
+2014-06-18  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* version.sh: Upgrade to version 2.1.3.
+
+	* perl_test.pl: Remove this file.
+
+	* Makefile.sub: Remove HAS_PERL.
+
+	* groffer.pl: Add `require' for Perl version.
+
 2014-06-11  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* func.pl, subs.pl: Rename `func.pl' to `subs.pl'.
@@ -42,7 +52,7 @@
 
 	* Makefile.sub (GROFFER_PERL, GROFFER_REST): Don't use $(srcdir).
 
-2014-03-11  Ingo Schwarze  <schwarze@openbsd.org> (tiny change)
+2014-03-11  Ingo Schwarze  <schwarze@openbsd.org>  (tiny change)
 
 	* Makefile.sub (clean): Don't remove checked-in file `groffer.man'.
 
@@ -335,8 +345,8 @@
 
 	* ChangeLog: This file.  It contains information for `groffer'
 	versions >= 1.0.0 with shell and Perl kinds.  For older `groffer'
-	versions, see `shell/ChangeLog.0' which contains information for the
-	shell only versions of groffer 0.*.
+	versions, see `shell/ChangeLog.0' which contains information for
+	the shell only versions of groffer 0.*.
 
 	* Makefile.sub: The old `Makefile.sub' was extended to support the
 	shell and the Perl version of `groffer' at the same time.  If the
diff --git a/contrib/groffer/Makefile.sub b/contrib/groffer/Makefile.sub
index 7f5eef3..d70c1e2 100644
--- a/contrib/groffer/Makefile.sub
+++ b/contrib/groffer/Makefile.sub
@@ -7,7 +7,7 @@
 # Written by Werner Lemberg <wl@gnu.org> and
 # Bernd Warken <groff-bernd.warken-72@web.de>.
 
-# Last update: 11 Jun 2014
+# Last update: 18 Jun 2014
 
 # This file is part of `groffer' which is part of `groff'.
 
@@ -40,14 +40,13 @@ MAN1=groffer.n \
      roff2text.n \
      roff2x.n
 
-MOSTLYCLEANADD=groffer HAVE_PERL $(MAN1) $(ROFF2MAN) $(ROFF2PROGS)
+MOSTLYCLEANADD=groffer $(MAN1) $(ROFF2MAN) $(ROFF2PROGS)
 
 all: groffer
 
 GROFFER_PERL=subs.pl \
              main_subs.pl \
              man.pl \
-             perl_test.pl \
              split_env.sh
 GROFFER_REST=roff2.man \
              version.sh \
@@ -57,21 +56,17 @@ GROFFER_REST=roff2.man \
 
 groffer: $(GROFFER_PERL) \
 		$(GROFFER_REST) $(SH_DEPS_SED_SCRIPT)
-	if perl $(srcdir)/perl_test.pl 2>&1 >/dev/null; then \
-	  : >HAVE_PERL; \
-	  echo "Using perl version of groffer."; \
-	  sed -f "$(SH_DEPS_SED_SCRIPT)" \
-	      -e "s|@g@|$(g)|g" \
-	      -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
-	      -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \
-	      -e "s|@groffer_dir@|$(DESTDIR)$(groffer_dir)|g" \
-	      -e "s|@VERSION@|$(version)$(revision)|g" \
-	      -e "$(SH_SCRIPT_SED_CMD)" \
-	      $(srcdir)/groffer.pl >$@; \
-	  for f in $(ROFF2PROGS); do \
-	    cp $(srcdir)/roff2.pl $$f; \
-	  done; \
-	fi
+	sed -f "$(SH_DEPS_SED_SCRIPT)" \
+	    -e "s|@g@|$(g)|g" \
+	    -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
+	    -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \
+	    -e "s|@groffer_dir@|$(DESTDIR)$(groffer_dir)|g" \
+	    -e "s|@VERSION@|$(version)$(revision)|g" \
+	    -e "$(SH_SCRIPT_SED_CMD)" \
+	     $(srcdir)/groffer.pl >$@; \
+	for f in $(ROFF2PROGS); do \
+	  cp $(srcdir)/roff2.pl $$f; \
+	done; \
 	chmod +x $@
 	for m in $(ROFF2MODES); do \
 	  cat $(srcdir)/roff2.man \
@@ -93,11 +88,9 @@ install_data: groffer
 	for f in $(GROFFER_PERL); do \
 	  rm -f $(DESTDIR)$(groffer_dir)/$$f; \
 	done
-	if test -f HAVE_PERL; then \
-	  for f in $(GROFFER_PERL); do \
-	    $(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(groffer_dir)/$$f; \
-	  done; \
-	fi
+	for f in $(GROFFER_PERL); do \
+	  $(INSTALL_SCRIPT) $(srcdir)/$$f $(DESTDIR)$(groffer_dir)/$$f; \
+	done;
 
 uninstall_sub:
 	rm -f $(DESTDIR)$(bindir)/groffer
@@ -106,3 +99,12 @@ uninstall_sub:
 	  rm -f $(DESTDIR)$(groffer_dir)/$$f;\
 	done
 	-rmdir $(DESTDIR)$(libdir)/groff/groffer
+
+
+########################################################################
+# Emacs settings
+########################################################################
+#
+# Local Variables:
+# mode: makefile
+# End:
diff --git a/contrib/groffer/groffer.pl b/contrib/groffer/groffer.pl
index e77ad70..26a8143 100755
--- a/contrib/groffer/groffer.pl
+++ b/contrib/groffer/groffer.pl
@@ -57,6 +57,8 @@ use FindBin;
 # system variables and exported variables
 ########################################################################
 
+require 5.6.1;
+
 our $Dev_Null;
 our $Umask;
 our @Path;
@@ -113,7 +115,6 @@ my $before_make;		# script before run of `make'
 }
 
 my %at_at;
-my $file_perl_test_pl;
 my $groffer_libdir;
 
 if ($before_make) {
@@ -122,8 +123,6 @@ if ($before_make) {
   $at_at{'G'} = '';
   $at_at{'LIBDIR'} = '';
   $groffer_libdir = $groffer_source_dir;
-  $file_perl_test_pl = File::Spec->catfile($groffer_source_dir,
-					       'perl_test.pl');
   $File_version_sh = File::Spec->catfile($groffer_source_dir, 'version.sh');
   $Groff_Version = '';
 } else {
@@ -132,8 +131,6 @@ if ($before_make) {
   $at_at{'G'} = '@g@';
   $at_at{'LIBDIR'} = '@libdir@';
   $groffer_libdir = '@groffer_dir@';
-  $file_perl_test_pl = File::Spec->catfile($groffer_libdir,
-					       'perl_test.pl');
   $File_version_sh = File::Spec->catfile($groffer_libdir, 'version.sh');
 }
 
@@ -145,10 +142,6 @@ unshift(@INC, $groffer_libdir);
 $File_split_env_sh = File::Spec->catfile($groffer_libdir, 'split_env.sh');
 die "$File_split_env_sh does not exist;" unless -f "$File_split_env_sh";
 
-# test perl on suitable version
-die "$file_perl_test_pl does not exist;" unless -f "$file_perl_test_pl";
-do "$file_perl_test_pl" or die "Perl test: $@";
-
 require 'subs.pl';
 require 'main_subs.pl';
 require 'man.pl';
diff --git a/contrib/groffer/perl_test.pl b/contrib/groffer/perl_test.pl
deleted file mode 100644
index 734c0cc..0000000
--- a/contrib/groffer/perl_test.pl
+++ /dev/null
@@ -1,35 +0,0 @@
-#! /usr/bin/env perl
-
-# groffer - display groff files
-
-# Source file position: <groff-source>/contrib/groffer/perl_test.sh
-# Installed position: <prefix>/lib/groff/groffer/perl_test.sh
-
-# Copyright (C) 2006, 2009 Free Software Foundation, Inc.
-# Written by Bernd Warken <groff-bernd.warken-72@web.de>.
-
-# Last update: 5 Jan 2009
-
-# This file is part of `groffer', which is part of `groff'.
-
-# `groff' is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-
-# `groff' is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see
-# <http://www.gnu.org/licenses/gpl-2.0.html>.
-
-########################################################################
-
-# This file tests whether perl has a suitable version.  It is used by
-# groffer.pl and Makefile.sub.
-
-# require 5.004_05;
-require v5.6.1;
diff --git a/contrib/groffer/version.sh b/contrib/groffer/version.sh
index 5b06dbd..f5b3d03 100644
--- a/contrib/groffer/version.sh
+++ b/contrib/groffer/version.sh
@@ -29,8 +29,8 @@
 export _PROGRAM_VERSION;
 export _LAST_UPDATE;
 
-_PROGRAM_VERSION='2.1.2';
-_LAST_UPDATE='11 Jun 2014';
+_PROGRAM_VERSION='2.1.3';
+_LAST_UPDATE='18 Jun 2014';
 
 # this setting of the groff version is only used before make is run,
 # otherwise @VERSION@ will set it, see groffer.sh.


From MAILER-DAEMON Wed Jun 18 09:08:22 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WxFbB-0005In-Vc
	for mharc-groff-commit@gnu.org; Wed, 18 Jun 2014 09:08:21 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:53756)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxFb9-0005Ia-3C
	for groff-commit@gnu.org; Wed, 18 Jun 2014 09:08:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxFb7-0000J1-IT
	for groff-commit@gnu.org; Wed, 18 Jun 2014 09:08:19 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:49790)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxFb7-0000Ix-FU
	for groff-commit@gnu.org; Wed, 18 Jun 2014 09:08:17 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WxFb6-0004eR-5K
	for groff-commit@gnu.org; Wed, 18 Jun 2014 13:08:16 +0000
Date: Wed, 18 Jun 2014 13:08:16 +0000
Message-Id: <E1WxFb6-0004eR-5K@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: grog: 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 word `ideal' by `gideal',
	when the preprocessor is meant.
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140618130816.17848.49370@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 0d354899bd02006d7ad2a8e2d7679d4f06c2ab77
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Jun 2014 13:08:20 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 0d354899bd02006d7ad2a8e2d7679d4f06c2ab77
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Wed Jun 18 15:06:37 2014 +0200

    grog: 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 word `ideal' by `gideal', when the preprocessor is meant.
---
 ChangeLog             |   12 ++++++++
 src/roff/grog/grog.pl |   30 +++++++++++++++++++++
 src/roff/grog/subs.pl |   69 +++++++++++++++++++++++++++++--------------------
 3 files changed, 83 insertions(+), 28 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 6ac297a..2b42094 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2014-06-18  Bernd Warken  <groff-bernd.warken-72@web.de>
 
+	* 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
+	word `ideal' by `gideal', when the preprocessor is meant.
+
+2014-06-18  Bernd Warken  <groff-bernd.warken-72@web.de>
+
 	* src/roff/grog/Makefile.sub: Add $(RM).
 
 	* src/roff/grog/grog.pl: Remove call to perl_test.pl.  `require
@@ -11,6 +18,11 @@
 
 	* ChangeLog: Add Emacs-mode and a separator for the license.
 
+2014-06-17  Ulrich Lauther  <ulrich.lauther@t-online.de>
+
+	* grog: Invent new first comment line of roff files with long
+	names of needed preprocessors and the tmac.
+
 2014-06-17  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* src/roff/grog/subs.pl: Correct handling of option `-J' for
diff --git a/src/roff/grog/grog.pl b/src/roff/grog/grog.pl
index 6ebde5c..7c288fb 100644
--- a/src/roff/grog/grog.pl
+++ b/src/roff/grog/grog.pl
@@ -86,6 +86,36 @@ our $Prog = $0;
 
 &args_with_minus();
 
+
+# for first line check
+our %preprocs_tmacs = (
+		       'chem' => 0,
+		       'eqn' => 0,
+		       'gideal' => 0,
+		       'grap' => 0,
+		       'grn' => 0,
+		       'pic' => 0,
+		       'refer' => 0,
+		       'soelim' => 0,
+		       'tbl' => 0,
+
+		       'geqn' => 0,
+		       'gpic' => 0,
+		       'neqn' => 0,
+		       'ideal' => 0,
+
+		       'man' => 0,
+		       'mandoc' => 0,
+		       'mdoc' => 0,
+		       'mdoc-old' => 0,
+		       'me' => 0,
+		       'mm' => 0,
+		       'mom' => 0,
+		       'ms' => 0,
+		      );
+
+
+# known extensions of roff file names
 our %File_Name_Extensions = (
 		   'man' => 0,
 		   'mandoc' => 0,
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index c7e747a..a32c901 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -65,7 +65,7 @@ my %Groff = (
 	     'gperl' => 0,
 	     'grap' => 0,
 	     'grn' => 0,
-	     'ideal' => 0,
+	     'gideal' => 0,
 	     'lilypond' => 0,
 
 	     'pic' => 0,
@@ -81,6 +81,7 @@ my %Groff = (
 
 	     # tmacs
 	     'man' => 0,
+	     'mandoc' => 0,
 	     'mdoc' => 0,
 	     'mdoc_old' => 0,
 	     'me' => 0,
@@ -223,15 +224,15 @@ sub args_with_minus {
 # used as an groff option line.  This is done by:
 # - start the line with '\" (apostrophe, backslash, double quote)
 # - add a space character
-# - a word using the following characters can be appended: `egGjpRst'.
+# - a word using the following characters can be appended: `egGjJpRst'.
 #     Each of these characters means an option for the generated
 #     `groff' command line, e.g. `-t'.
 
 sub do_first_line {
   my ( $line, $file ) = @_;
 
-  # For a leading groff options line use only [egGjpRst]
-  if  ( $line =~ /^[.']\\"[\segGjpRst]+&/ ) {
+  # For a leading groff options line use only [egGjJpRst]
+  if  ( $line =~ /^[.']\\"[\segGjJpRst]+&/ ) {
     # this is a groff options leading line
     if ( $line =~ /^\./ ) {
       # line is a groff options line with . instead of '
@@ -239,6 +240,9 @@ sub do_first_line {
 	"instead of a period . for groff options line!";
     }
 
+    if ( $line =~ /j/ ) {
+      $Groff{'chem'}++;
+    }
     if ( $line =~ /e/ ) {
       $Groff{'eqn'}++;
     }
@@ -249,13 +253,7 @@ sub do_first_line {
       $Groff{'grap'}++;
     }
     if ( $line =~ /i/ ) {
-      $Groff{'ideal'}++;
-    }
-    if ( $line =~ /j/ ) {
-      $Groff{'chem'}++;
-    }
-    if ( $line =~ /J/ ) {
-      $Groff{'ideal'}++;
+      $Groff{'gideal'}++;
     }
     if ( $line =~ /p/ ) {
       $Groff{'pic'}++;
@@ -269,11 +267,28 @@ sub do_first_line {
     if ( $line =~ /t/ ) {
       $Groff{'tbl'}++;
     }
-    return 1;	# a leading groff options line
-  } else {
-    return 0;	# not a leading groff options line
+    return 1;	# a leading groff options line, 1 means yes, 0 means no
   }
-}	# sub do_first_line
+
+  # not a leading short groff options line
+
+  return 0 if ( $line !~ /^[.']\\"\s*(.*)$/ );	# ignore non-comments
+
+  return 0 unless ( $1 );	# for empty comment
+
+  # all following array members are either preprocs or 1 tmac, in 
+  my @words = split '\s+', $1;
+
+  for my $word ( @words ) {
+    if ( $word eq 'ideal' ) {
+      $word = 'gideal';
+    } elsif ( $word eq 'gpic' ) {
+      $word = 'pic';
+    } elsif ( $word =~ /^(gn|)eqn$/ ) {
+      $word = 'eqn';
+    }
+  }
+}
 
 
 ########################################################################
@@ -358,7 +373,7 @@ sub do_line {
     return;
   }
   if ( $command =~ /^\.IS$/ ) {
-    $Groff{'ideal'}++;		# for ideal
+    $Groff{'gideal'}++;		# preproc gideal for ideal
     return;
   }
   if ( $command =~ /^\.lilypond$/ ) {
@@ -678,20 +693,18 @@ EOF
 
   $Groff{'refer'} ||= $Groff{'refer_open'} && $Groff{'refer_close'};
 
-  if ( $Groff{'chem'} || $Groff{'eqn'} ||  $Groff{'ideal'} ||
+  if ( $Groff{'chem'} || $Groff{'eqn'} ||  $Groff{'gideal'} ||
        $Groff{'grap'} || $Groff{'grn'} || $Groff{'pic'} ||
        $Groff{'refer'} || $Groff{'tbl'} ) {
-    my $s = "-";
-    $s .= "e" if $Groff{'eqn'};
-    $s .= "G" if $Groff{'grap'};
-    $s .= "g" if $Groff{'grn'};
-    $s .= "J" if $Groff{'ideal'};
-    $s .= "j" if $Groff{'chem'};
-    $s .= "p" if $Groff{'pic'};
-    $s .= "R" if $Groff{'refer'};
-    $s .= "s" if $Groff{'soelim'};
-    $s .= "t" if $Groff{'tbl'};
-    push(@Command, $s);
+    push(@Command, '-e') if $Groff{'eqn'};
+    push(@Command, '-G') if $Groff{'grap'};
+    push(@Command, '-g') if $Groff{'grn'};
+    push(@Command, '-J') if $Groff{'gideal'};
+    push(@Command, '-j') if $Groff{'chem'};
+    push(@Command, '-p') if $Groff{'pic'};
+    push(@Command, '-R') if $Groff{'refer'};
+    push(@Command, '-s') if $Groff{'soelim'};
+    push(@Command, '-t') if $Groff{'tbl'};
   }
 
 


From MAILER-DAEMON Wed Jun 18 09:39:48 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WxG5c-0004Bo-Dq
	for mharc-groff-commit@gnu.org; Wed, 18 Jun 2014 09:39:48 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34700)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxG5Z-00047f-S7
	for groff-commit@gnu.org; Wed, 18 Jun 2014 09:39:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxG5Y-00077C-Ql
	for groff-commit@gnu.org; Wed, 18 Jun 2014 09:39:45 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:50065)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxG5Y-000773-OO
	for groff-commit@gnu.org; Wed, 18 Jun 2014 09:39:44 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WxG5X-0006wv-Ig
	for groff-commit@gnu.org; Wed, 18 Jun 2014 13:39:44 +0000
Date: Wed, 18 Jun 2014 13:39:43 +0000
Message-Id: <E1WxG5X-0006wv-Ig@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01:  Adjust for first lines with non-preproc
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140618133943.26682.43856@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 70166d793a6da2710f6f39e0361bd75790d88a2c
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Jun 2014 13:39:47 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 70166d793a6da2710f6f39e0361bd75790d88a2c
Author: Bernd Warken <groff-bernd.warken-72@web.de>
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  <groff-bernd.warken-72@web.de>
 
+	* src/roff/grog/subs.pl: Adjust for first lines with non-preproc
+	and not-tmac names to be ignored.
+
+2014-06-18  Bernd Warken  <groff-bernd.warken-72@web.de>
+
 	* 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}++ ;
+  }
+
 }
 
 


From MAILER-DAEMON Wed Jun 18 13:46:44 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WxJwa-0006gI-4Q
	for mharc-groff-commit@gnu.org; Wed, 18 Jun 2014 13:46:44 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60935)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxJwW-0006ep-SI
	for groff-commit@gnu.org; Wed, 18 Jun 2014 13:46:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxJwV-0000Ku-SE
	for groff-commit@gnu.org; Wed, 18 Jun 2014 13:46:40 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:52614)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxJwV-0000J0-Oz
	for groff-commit@gnu.org; Wed, 18 Jun 2014 13:46:39 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WxJwU-0003xF-7A
	for groff-commit@gnu.org; Wed, 18 Jun 2014 17:46:38 +0000
Date: Wed, 18 Jun 2014 17:46:38 +0000
Message-Id: <E1WxJwU-0003xF-7A@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: grog: minor correction at &do_first_line()
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140618174638.15170.51516@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 4b26e161561ff4df7cc42bf7be4bdd0a222e71f9
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Jun 2014 17:46:42 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 4b26e161561ff4df7cc42bf7be4bdd0a222e71f9
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Wed Jun 18 19:46:28 2014 +0200

    grog: minor correction at &do_first_line()
---
 ChangeLog             |    4 ++++
 src/roff/grog/subs.pl |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 82d1f85..0241b17 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2014-06-18  Bernd Warken  <groff-bernd.warken-72@web.de>
 
+	* src/roff/grog/subs.pl: Minor correction at `do_first_line'.
+
+2014-06-18  Bernd Warken  <groff-bernd.warken-72@web.de>
+
 	* src/roff/grog/subs.pl: Adjust for first lines with non-preproc
 	and not-tmac names to be ignored.
 
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index 7206d14..0ed8dc8 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -230,7 +230,7 @@ sub args_with_minus {
 
 sub do_first_line {
   my ( $line, $file ) = @_;
-
+  our %preprocs_tmacs;
   # For a leading groff options line use only [egGjJpRst]
   if  ( $line =~ /^[.']\\"[\segGjJpRst]+&/ ) {
     # this is a groff options leading line
@@ -289,7 +289,7 @@ sub do_first_line {
     } elsif ( $word =~ /^(gn|)eqn$/ ) {
       $word = 'eqn';
     }
-    if ( exists $preproc_tmacs{$word} ) {
+    if ( exists $preprocs_tmacs{$word} ) {
       push $word, @in;
     } else {
       # not word for preproc or tmac


From MAILER-DAEMON Wed Jun 18 14:47:43 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WxKtb-0005Du-3g
	for mharc-groff-commit@gnu.org; Wed, 18 Jun 2014 14:47:43 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:51607)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxKtX-00058i-GU
	for groff-commit@gnu.org; Wed, 18 Jun 2014 14:47:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxKtW-0003Fb-7A
	for groff-commit@gnu.org; Wed, 18 Jun 2014 14:47:39 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:53222)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxKtW-0003FU-4y
	for groff-commit@gnu.org; Wed, 18 Jun 2014 14:47:38 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WxKtU-0000OF-Um
	for groff-commit@gnu.org; Wed, 18 Jun 2014 18:47:37 +0000
Date: Wed, 18 Jun 2014 18:47:37 +0000
Message-Id: <E1WxKtU-0000OF-Um@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: grog: split single character option collections
	"groff -JPT" into "groff -J -p -t" and the like
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140618184736.1467.84465@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: ab92634aa5b16c4b77b19f0aa98aa002a61ca17f
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Jun 2014 18:47:40 -0000

bwarken pushed a commit to branch master
in repository groff.

commit ab92634aa5b16c4b77b19f0aa98aa002a61ca17f
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Wed Jun 18 20:47:27 2014 +0200

    grog: split single character option collections "groff -JPT" into "groff -J -p -t" and the like
---
 ChangeLog             |    9 +++++++++
 src/roff/grog/grog.pl |   19 +++++++++++++++----
 src/roff/grog/subs.pl |    6 +++++-
 3 files changed, 29 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0241b17..54f73dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2014-06-18  Bernd Warken  <groff-bernd.warken-72@web.de>
 
+	* src/roff/grog/grog.pl: Corrections about `require' and `our'
+	definitions.
+
+	* src/roff/grog/subs.pl: In the `groff' output command line, split
+	the single character options collections into different
+	1-character options, each with a leading minus `-'..
+
+2014-06-18  Bernd Warken  <groff-bernd.warken-72@web.de>
+
 	* src/roff/grog/subs.pl: Minor correction at `do_first_line'.
 
 2014-06-18  Bernd Warken  <groff-bernd.warken-72@web.de>
diff --git a/src/roff/grog/grog.pl b/src/roff/grog/grog.pl
index 7c288fb..5b6186a 100644
--- a/src/roff/grog/grog.pl
+++ b/src/roff/grog/grog.pl
@@ -54,7 +54,8 @@ my $grog_dir;
 if ($before_make) { # before installation
   my $grog_source_dir = $FindBin::Bin;
   $at_at{'BINDIR'} = $grog_source_dir;
-  $grog_dir = $grog_source_dir;
+# $grog_dir = $grog_source_dir;
+  $grog_dir = '.';
   my $top = $grog_source_dir . '/../../../';
   open FILE, '<', $top . 'VERSION' ||
     die 'Could not open top file VERSION.';
@@ -74,18 +75,22 @@ if ($before_make) { # before installation
 
 die "$grog_dir is not an existing directory;" unless -d $grog_dir;
 
-unshift(@INC, $grog_dir);
 
+#############
+# import subs
+unshift(@INC, $grog_dir);
 require 'subs.pl';
 
+
+###############
+# our variables
+
 our $Prog = $0;
 {
   my ($v, $d, $f) = File::Spec->splitpath($Prog);
   $Prog = $f;
 }
 
-&args_with_minus();
-
 
 # for first line check
 our %preprocs_tmacs = (
@@ -131,6 +136,12 @@ our $is_mmse = 0;
 
 our @FILES = @ARGV;
 
+
+##########
+# run subs
+
+&args_with_minus();
+
 foreach my $file ( @ARGV ) { # test for each file name in the arguments
   unless ( open(FILE, $file eq "-" ? $file : "< $file") ) {
     print STDERR "$Prog: can't open \`$file\': $!";
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index 0ed8dc8..2150d20 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -37,6 +37,7 @@ require v5.6;
 
 use warnings;
 use strict;
+
 use File::Spec;
 
 # for running programs
@@ -703,6 +704,9 @@ EOF
   if ( ( $Groff{'PS'} ||  $Groff{'PF'} ) &&  $Groff{'PE'} ) {
     $Groff{'pic'} = 1;
   }
+  if ( $Groff{'gideal'} ) {
+    $Groff{'pic'} = 1;
+  }
 
   $Groff{'refer'} ||= $Groff{'refer_open'} && $Groff{'refer_close'};
 
@@ -891,7 +895,7 @@ EOF
   }
 
   exit 0;
-}	# sub make_groff_line
+}	# sub &make_groff_line()
 
 
 ########################################################################


From MAILER-DAEMON Wed Jun 18 17:03:26 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WxN0w-0003uE-TL
	for mharc-groff-commit@gnu.org; Wed, 18 Jun 2014 17:03:26 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33640)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxN0t-0003th-4M
	for groff-commit@gnu.org; Wed, 18 Jun 2014 17:03:25 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxN0p-0008Se-C7
	for groff-commit@gnu.org; Wed, 18 Jun 2014 17:03:23 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:54483)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxN0p-0008SX-8w
	for groff-commit@gnu.org; Wed, 18 Jun 2014 17:03:19 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WxN0o-0004FA-Cd
	for groff-commit@gnu.org; Wed, 18 Jun 2014 21:03:18 +0000
Date: Wed, 18 Jun 2014 21:03:18 +0000
Message-Id: <E1WxN0o-0004FA-Cd@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/02: gideal: include files/; restructure man-pages
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140618210318.16277.73826@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: d028727a678026e26871b72ce3f9c0d40713b97c
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Jun 2014 21:03:25 -0000

bwarken pushed a commit to branch master
in repository groff.

commit d028727a678026e26871b72ce3f9c0d40713b97c
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Wed Jun 18 23:00:15 2014 +0200

    gideal: include files/; restructure man-pages
---
 contrib/gideal/ChangeLog                 |   22 +++
 contrib/gideal/Makefile.sub              |   23 ++-
 contrib/gideal/files/README.txt          |    5 +
 contrib/gideal/files/opaque_MIT.ideal.ms |  252 ++++++++++++++++++++++++++++++
 contrib/gideal/files/test.groff          |   13 ++
 contrib/gideal/gideal.man                |  120 +++++++++++++--
 contrib/gideal/gideal.pl                 |    6 +-
 contrib/gideal/ideal.man                 |   79 ++++++++--
 8 files changed, 486 insertions(+), 34 deletions(-)

diff --git a/contrib/gideal/ChangeLog b/contrib/gideal/ChangeLog
index 21d7e39..7b5d3b7 100644
--- a/contrib/gideal/ChangeLog
+++ b/contrib/gideal/ChangeLog
@@ -1,3 +1,25 @@
+2014-06-18  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	New version 0.9.2
+
+	* gideal.pl: The preproc will transform the `ideal' parts into
+	`pic'.
+
+	* gideal.man, ideal.man: Restructure the `SEE ALSO' part.  Include
+	also the installed location with `@...@' variables.
+
+	* files/: New directory with example files with `ideal parts'.
+
+	* Makefile.sub: Install `files/' (into @DATASUBDIR@) and improve
+	`libfiles/' (into @EXAMPLEDIR@).
+
+2014-06-17  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* gideal.pl: New version 0.9.1.
+
+	* libfiles/: New directory for `ideal' inclusion files.  They will
+	be implemented in `roff' files with the ideal command `libfiles'.
+
 2014-06-16  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* Project: Project `gideal' with starting version 0.9 without real
diff --git a/contrib/gideal/Makefile.sub b/contrib/gideal/Makefile.sub
index df5029d..02a4654 100644
--- a/contrib/gideal/Makefile.sub
+++ b/contrib/gideal/Makefile.sub
@@ -46,26 +46,35 @@ gideal: gideal.pl
 	    $(srcdir)/gideal.pl >$@; \
 	chmod +x $@
 
-.PHONY: libdirs
-libdires: 
-
 .PHONY: install_data
 install_data: gideal
 	-test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
 	$(RM) $(DESTDIR)$(bindir)/gideal
 	$(INSTALL_SCRIPT) gideal $(DESTDIR)$(bindir)/gideal
+
+	-test -d $(DESTDIR)$(datasubdir) \
+          || $(mkinstalldirs) $(DESTDIR)$(datasubdir)
 	-test -d $(DESTDIR)$(datasubdir)/ideal \
           || $(mkinstalldirs) $(DESTDIR)$(datasubdir)/ideal
 	-test -d $(DESTDIR)$(datasubdir)/ideal/libfiles \
           || $(mkinstalldirs) $(DESTDIR)$(datasubdir)/ideal/libfiles
 	$(RM) $(DESTDIR)$(datasubdir)/ideal/libfiles/*
-	for i in $(srcdir)/libfiles/*.ideal; do \
+	for i in $(srcdir)/libfiles/*; do \
 	  n=`echo $$i | sed 's|$(srcdir)/libfiles/||g'`; \
 	  $(INSTALL_DATA) $$i $(DESTDIR)$(datasubdir)/ideal/libfiles/$$n; \
 	done
-	$(RM) $(DESTDIR)$(datasubdir)/ideal/libfiles/README.txt
-	$(INSTALL_DATA) $(srcdir)/libfiles/README.txt \
-		$(DESTDIR)$(datasubdir)/ideal/libfiles/README.txt;
+
+	-test -d $(DESTDIR)$(exampledir) \
+          || $(mkinstalldirs) $(DESTDIR)$(exampledir)
+	-test -d $(DESTDIR)$(exampledir)/ideal \
+          || $(mkinstalldirs) $(DESTDIR)$(exampledir)/ideal
+	-test -d $(DESTDIR)$(exampledir)/ideal/files \
+          || $(mkinstalldirs) $(DESTDIR)$(exampledir)/ideal/files
+	$(RM) $(DESTDIR)$(exampledir)/ideal/files/*
+	for i in $(srcdir)/files/*; do \
+	  n=`echo $$i | sed 's|$(srcdir)/files/||g'`; \
+	  $(INSTALL_DATA) $$i $(DESTDIR)$(exampledir)/ideal/files/$$n; \
+	done
 
 
 .PHONY: uninstall_sub
diff --git a/contrib/gideal/files/README.txt b/contrib/gideal/files/README.txt
new file mode 100644
index 0000000..36e64dc
--- /dev/null
+++ b/contrib/gideal/files/README.txt
@@ -0,0 +1,5 @@
+opaque_MIT.ideal.ms:
+	http://web.mit.edu/usrdoc/ditroff/ideal.man/opaque
+
+test.groff:
+	easy short file with `ideal parts'
diff --git a/contrib/gideal/files/opaque_MIT.ideal.ms b/contrib/gideal/files/opaque_MIT.ideal.ms
new file mode 100644
index 0000000..45dd389
--- /dev/null
+++ b/contrib/gideal/files/opaque_MIT.ideal.ms
@@ -0,0 +1,252 @@
+.NH 1
+Opaque Boxes
+.PP
+\*(id includes statements to blot out pieces
+of a picture.
+In this section we will sometimes place opaque boxes
+without explicitly drawing any background.
+In such cases, assume
+that we have painted over
+the area with pens as above.
+.NH 2
+Opaque Polygons
+.PP
+\*(id needs to know the vertices of a polygon in order
+to opaque the area it covers.
+The vertices are specified as a list in a
+.IT bdlist
+statement.
+For instance, to opaque a rectangular region using the
+.IT rect
+box defined in Section 3, we could use the following statement:
+.IS
+...libfile rect
+wavy {
+	var start, end, perp, pt1, pt2, ht;
+	perp = (0,1)*(start - end)/abs(start - end);
+	pt1 = 0.25[start,end] + perp*ht;
+	pt2 = 0.75[start,end] - perp*ht;
+	conn start to pt1 to pt2 to end;
+}
+brush {
+	var top, bot;
+	var bwd, bht;
+	var leftpt, rightpt;
+	leftpt = 0.5*(top+bot) - bwd/2;
+	rightpt = 0.5*(top+bot) +bwd/2;
+	conn leftpt to rightpt
+		using 7 wavy {
+			ht = bht;
+		}<start,end>;
+}
+background {
+	conn (0,1) to (0,-1)
+		using 7 brush {
+			bwd = 2;
+			bht = 0.1;
+			}<top,bot>;
+}
+main {
+	put background {
+	};
+	put rect {
+		opaque;
+		bdlist = sw, se, ne, nw;
+		sw = (-0.4,-0.4);
+		wd = ht = 1;
+	};
+}
+.IF
+.P1
+put rect {
+	opaque;
+	bdlist = sw, se, ne, nw;
+	sw = (-0.4,-0.4);
+	wd = ht = 1;
+};
+
+
+
+
+.P2
+.LP
+The sides of the rectangle are drawn by
+.IT rect :
+they are not supplied automatically by the opaqueing routine.
+If we wanted to save only the interior of the rectangle,
+we could use almost the same statement:
+.IS
+...minx -1.0
+...maxx 1.0
+...miny -1.0
+...maxy 1.0
+main {
+	put background {
+	};
+put rect {
+	opaque exterior;
+	bdlist = sw, se, ne, nw;
+	sw = (-0.4,-0.4);
+	wd = ht = 1;
+};
+}
+.IF
+.P1
+put rect {
+	opaque exterior;
+	bdlist = sw, se, ne, nw;
+	sw = (-0.4,-0.4);
+	wd = ht = 1;
+};
+.P2
+.PP
+If we plan to opaque a lot of rectangles,
+we should include a
+.IT bdlist
+in the definition of
+.IT rect .
+Such a default
+.IT bdlist
+would be referenced only if the parameter section
+of the put statement included an opaque statement
+.IT and
+did not include its own
+.IT bdlist .
+.NH 2
+Opaque Circular Arc Polygons
+.PP
+The edges of opaque regions can also be circular arcs.
+.Ts
+This generalization of the simple boundary statement
+is the most recent addition to \*(id.
+It avoids treating circles and their sectors and segments
+as special cases, and makes opaqueing circular
+arc polygons much easier.
+.Te
+.LP
+To specify a circular arc edge, one gives its endpoints
+and a point through which it passes;
+this ``pass-through'' point is marked in the boundary
+list by the symbol ``\f8^\fP''.
+For example, the boundary list for the sector shown below is
+.IS
+...libfile sector
+main {
+	put background {
+	};
+put sector {
+	center = (-1,-1);
+	radius = 2;
+	startang = 30;
+	endang = 60;
+	opaque;
+};
+}
+.IF
+.P1
+boundary = center, cis(30), ^ cis(45), cis(60);
+
+
+
+
+
+.P2
+.PP
+Another common opaque arc is the segment:
+.IS
+...libfile segment
+main {
+	put background {
+	};
+put segment {
+	center = (-1,-1);
+	radius = 2;
+	startang = 0;
+	endang = 90;
+	opaque;
+};
+}
+.IF
+.P1
+boundary = cis(0), ^ cis(45), cis(90);
+
+
+
+
+
+
+
+
+
+
+.P2
+.PP
+One can construct an opaque circle out of two semicircular edges:
+.IS
+...libfile circle
+main {
+	put background {
+	};
+put circle {
+	radius = 0.5;
+	center = 0;
+	opaque;
+};
+put circle {
+	radius = 1;
+	center = 0;
+	opaque exterior;
+};
+}
+.IF
+.P1
+boundary = cis(0), ^ cis(90), cis(180), ^ cis(270);
+
+
+
+
+
+
+.P2
+.LP
+Here, the outer circle has an opaque exterior,
+while the inner circle has an opaque interior.
+.NH 2
+Order is Important
+.PP
+Without the ability to opaque,
+the order in which boxes are put does not matter.
+But when some boxes are opaque, order obviously
+.IT does
+matter.
+Put statements are executed
+in the order in which they appear in the box definition.
+When an opaque box is drawn, the opaquing is done
+.IT first ,
+then the lines of the box are drawn;
+so, for instance, an opaque
+.IT listnode
+does include the line down its middle separating its
+.IT info
+field from its
+.IT next
+field.
+.NH 2
+Some Hard Facts
+.PP
+Neither text nor splines can be used to opaque objects,
+nor will they be clipped properly if they are in a
+picture and an opaque box is placed over them.
+.Ts
+The problem with text is that \*(id operates as a \*(tf preprocessor,
+so it cannot determine anything about the size of the
+text, and it needs to know that if it is to do anything
+involving opaquing and text.
+.Te
+.Ts
+The problem with splines is more subtle.
+When a line or circular arc is chopped,
+it is easy to specify the lines or circular arcs that remain.
+But when a spline is chopped, the guiding points of the resulting curve pieces
+are hard to determine.
+.Te
diff --git a/contrib/gideal/files/test.groff b/contrib/gideal/files/test.groff
new file mode 100644
index 0000000..74816b4
--- /dev/null
+++ b/contrib/gideal/files/test.groff
@@ -0,0 +1,13 @@
+.nf
+before
+.IS
+this is within
+the first ideal part
+.IE
+outside
+.IS
+the number
+is now 2
+.IF
+after
+.fi
\ No newline at end of file
diff --git a/contrib/gideal/gideal.man b/contrib/gideal/gideal.man
index 5badfc7..47a6c77 100644
--- a/contrib/gideal/gideal.man
+++ b/contrib/gideal/gideal.man
@@ -15,7 +15,7 @@ gideal.1 - man page for the ideal roff preprocessor
 Source file position:  <groff_source_top>/contrib/gideal/gideal.man
 Installed position:    $prefix/share/man/man1/gideal.1
 .
-Last update: 16 Jun 2014
+Last update: 18 Jun 2014
 ..
 .
 .de authors
@@ -59,14 +59,13 @@ The license text is available in the internet at
 .UE .
 ..
 .
-.
 .\" --------------------------------------------------------------------
 .\" Setup
 .\" --------------------------------------------------------------------
 .
+.char \[Ellipsis] \f[S]\N'188'\fP
 .\" ds Ellipsis "\&.\|.\|.\&\"
 .
-.
 .\" --------------------------------------------------------------------
 .\" Macro definitions
 .\" --------------------------------------------------------------------
@@ -261,22 +260,82 @@ or
 The text between these requests is handled by the preprocessor
 .BR gideal .
 .
+By that the
+.I ideal part
+is transformed into
+.IR "pic content" ,
+belonging to another graphical preprocessor
+.BR pic (1).
+.
 .
 .\" --------------------------------------------------------------------
 .SH HISTORY
 .\" --------------------------------------------------------------------
 .
-The roff preprocessor and the roff language
-.I ideal
-were invented by
+The roff language
+.BR ideal (@MAN7EXT@)
+was invented by
 .I Christopher J. Wyk
 in 1981 at AT&T.
 .
 .
+.P
+A roff preprocessor for this language with the same name was also
+invented by the same programmer, but this preprocessor is very
+old-fashioned.
+.
+That's why there is a completely new within groff is in the development.
+.
+It is called
+.BR gideal (@MAN1EXT@),
+other thatn the original preprocessor.
+.
+.
 .\" --------------------------------------------------------------------
 .SH "SEE ALSO"
 .\" --------------------------------------------------------------------
 .
+.\" --------------------------------------------------------------------
+.SS "libfiles"
+.\" --------------------------------------------------------------------
+.
+.I libfiles
+are files written in
+.IR ideal .
+.
+Such a file can be included into a roff file with
+.I ideal parts
+by the ideal command
+.BR ...libfile .
+.
+A
+.I libfile
+can also serve as an example.
+.
+.
+.P
+With the installation, the available
+.I libfiles
+get into
+.B @DATASUBDIR@/ideal/libfiles
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Examples"
+.\" --------------------------------------------------------------------
+.
+Some
+.I roff
+files with included 
+.Iideal parts
+will be stored at the installation into
+.BR @EXAMPLEDIR@/ideal .
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Man-Pages"
+.\" --------------------------------------------------------------------
+.
 .TP
 .BR ideal (@MAN7EXT@)
 for information about the
@@ -286,6 +345,26 @@ in
 .
 .
 .TP
+.BR groff (@MAN1EXT@),
+.TQ
+.BR groff (@MAN7EXT@),
+.TQ
+.BR grog (@MAN1EXT@),
+.TQ
+.BR pic (@MAN1EXT@),
+.TQ
+.BR gpic (@MAN1EXT@),
+.TQ
+Information about the
+.I groff
+system.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Documentation and Articles"
+.\" --------------------------------------------------------------------
+.
+.TP
 .B Unix8 preprocessor
 freely available documentation for the
 .IR "ideal preprocessor" .
@@ -304,12 +383,29 @@ as in
 .
 .
 .TP
-.BR groff (@MAN1EXT@),
-.TQ
-.BR groff (@MAN7EXT@)
-Information about the
-.I groff
-system.
+.B ACM articles for buying
+.
+.RS
+.
+.TP
+.B p99-van_wyk.pdf.gz
+.nf
+A Graphics Typesetting Language
+Christopher J. Van Wyk
+.fi
+.UR http://dl.acm.org/citation.cfm?id=806460
+.UE
+.
+.TP
+.B p163-van_wyk.pdf.gz
+.nf
+A High-Level Language for Specifying Pictures
+Christopher J. Van Wyk
+.fi
+.UR http://dl.acm.org/citation.cfm?id=357303
+.UE
+.
+.RE
 .
 .
 .\" --------------------------------------------------------------------
diff --git a/contrib/gideal/gideal.pl b/contrib/gideal/gideal.pl
index a51b7bd..ef5d44a 100755
--- a/contrib/gideal/gideal.pl
+++ b/contrib/gideal/gideal.pl
@@ -10,8 +10,8 @@
 
 # Written by Bernd Warken <groff-bernd.warken-72@web.de>.
 
-my $Latest_Update = '16 Jun 2014';
-my $version = '0.9';
+my $Latest_Update = '17 Jun 2014';
+my $version = '0.9.1';
 
 # This file is part of `gideal', which is part of `groff'.
 
@@ -73,7 +73,7 @@ $| = 1;       # flush after each print or write command
 # read-only variables with double-@ construct
 ########################################################################
 
-my $before_make;        # script before run of `make'
+my $before_make;	# script before run of `make'
 {
   my $at = '@';
   $before_make = 1 if '@VERSION@' eq "${at}VERSION${at}";
diff --git a/contrib/gideal/ideal.man b/contrib/gideal/ideal.man
index 5b975ba..ec5b44a 100644
--- a/contrib/gideal/ideal.man
+++ b/contrib/gideal/ideal.man
@@ -198,14 +198,78 @@ bit about related Perl examles.
 .SH "SEE ALSO"
 .\" --------------------------------------------------------------------
 .
+.\" --------------------------------------------------------------------
+.SS "libfiles"
+.\" --------------------------------------------------------------------
+.
+.I libfiles
+are file written in
+.IR ideal .
+.
+Such a file can be included into a roff file with
+.I ideal parts
+by the ideal command
+.BR ...libfile .
+.
+A
+.I libfile
+can also serve as an example.
+.
+.
+.P
+With the installation, the available
+.I libfiles
+will get into
+.B @DATASUBDIR@/ideal/libfiles
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Examples"
+.\" --------------------------------------------------------------------
+.
+Some
+.I roff
+files with included 
+.I ideal parts
+will be stored at the installation into
+.BR @EXAMPLEDIR@/ideal .
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Man-Pages"
+.\" --------------------------------------------------------------------
+.
 .TP
 .BR gideal (@MAN1EXT@)
-for information about the corresponding groff preprocesor
+for information about the
+.I ideal
+preprocessor in
+.IR groff .
 .
 .
 .TP
+.BR groff (@MAN1EXT@),
+.TQ
+.BR groff (@MAN7EXT@),
+.TQ
+.BR grog (@MAN1EXT@),
+.TQ
+.BR pic (@MAN1EXT@),
+.TQ
+.BR gpic (@MAN1EXT@),
+.TQ
+Information about the
+.I groff
+system.
+.
+.
+.\" --------------------------------------------------------------------
+.SS "Documentation and Articles"
+.\" --------------------------------------------------------------------
+.
+.TP
 .B Unix8 preprocessor
-Freely available documentation for the
+freely available documentation for the
 .IR "ideal preprocessor" .
 .
 The
@@ -213,7 +277,7 @@ The
 there is called
 .BR ideal ,
 not
-.BR gideal (@MAN1EXT@)
+.B gideal
 as in
 .IR groff .
 .br
@@ -247,15 +311,6 @@ Christopher J. Van Wyk
 .RE
 .
 .
-.TP
-.BR groff (@MAN1EXT@),
-.TQ
-.BR groff (@MAN7EXT@)
-Information about the
-.I groff
-system.
-.
-.
 .\" --------------------------------------------------------------------
 .SH "AUTHORS"
 .\" --------------------------------------------------------------------


From MAILER-DAEMON Wed Jun 18 17:03:29 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WxN0z-0003uv-3u
	for mharc-groff-commit@gnu.org; Wed, 18 Jun 2014 17:03:29 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33665)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxN0x-0003uf-Co
	for groff-commit@gnu.org; Wed, 18 Jun 2014 17:03:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxN0q-0008T3-0T
	for groff-commit@gnu.org; Wed, 18 Jun 2014 17:03:27 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:54486)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxN0p-0008Sx-TI
	for groff-commit@gnu.org; Wed, 18 Jun 2014 17:03:19 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WxN0p-0004FZ-0h
	for groff-commit@gnu.org; Wed, 18 Jun 2014 21:03:19 +0000
Date: Wed, 18 Jun 2014 21:03:19 +0000
Message-Id: <E1WxN0p-0004FZ-0h@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 02/02: repair gideal 0.9.2
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140618210318.16277.73826@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: e275adf0828cbe7848e4fd102188dfdf5067457b
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 18 Jun 2014 21:03:28 -0000

bwarken pushed a commit to branch master
in repository groff.

commit e275adf0828cbe7848e4fd102188dfdf5067457b
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Wed Jun 18 23:03:10 2014 +0200

    repair gideal 0.9.2
---
 contrib/gideal/gideal.pl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/gideal/gideal.pl b/contrib/gideal/gideal.pl
index ef5d44a..c51b935 100755
--- a/contrib/gideal/gideal.pl
+++ b/contrib/gideal/gideal.pl
@@ -10,8 +10,8 @@
 
 # Written by Bernd Warken <groff-bernd.warken-72@web.de>.
 
-my $Latest_Update = '17 Jun 2014';
-my $version = '0.9.1';
+my $Latest_Update = '18 Jun 2014';
+my $version = '0.9.2';
 
 # This file is part of `gideal', which is part of `groff'.
 


From MAILER-DAEMON Thu Jun 19 12:14:58 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WxezK-0006XW-Mk
	for mharc-groff-commit@gnu.org; Thu, 19 Jun 2014 12:14:58 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:55505)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxezI-0006UM-AV
	for groff-commit@gnu.org; Thu, 19 Jun 2014 12:14:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxezH-0000XV-Hg
	for groff-commit@gnu.org; Thu, 19 Jun 2014 12:14:56 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:36980)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxezH-0000XP-Eb
	for groff-commit@gnu.org; Thu, 19 Jun 2014 12:14:55 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WxezG-00083n-JR
	for groff-commit@gnu.org; Thu, 19 Jun 2014 16:14:55 +0000
Date: Thu, 19 Jun 2014 16:14:54 +0000
Message-Id: <E1WxezG-00083n-JR@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: 2 groff.man: add position and latest update
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140619161454.30952.27136@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 36a6e5d40801e525faee2491138263a9ff346865
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Jun 2014 16:14:57 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 36a6e5d40801e525faee2491138263a9ff346865
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Thu Jun 19 18:14:46 2014 +0200

    2 groff.man: add position and latest update
---
 ChangeLog                |    5 +++++
 man/groff.man            |    5 ++++-
 src/roff/groff/groff.man |    5 ++++-
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 54f73dd..211bdc0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-19  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* man/groff.man, src/roff/groff/groff.man: Add file position
+	before and after installation and the latest update.
+
 2014-06-18  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* src/roff/grog/grog.pl: Corrections about `require' and `our'
diff --git a/man/groff.man b/man/groff.man
index 07428a7..52dbee4 100644
--- a/man/groff.man
+++ b/man/groff.man
@@ -1,6 +1,9 @@
 '\" t
 .ig
-groff.man
+before installation: <top-groff-source>/man/groff.man
+after installation:  </usr or /usr/local>/share/man/man7/groff.7
+
+Latest update: 19 Jun 2014
 
 This file is part of groff, the GNU roff type-setting system.
 
diff --git a/src/roff/groff/groff.man b/src/roff/groff/groff.man
index 612b79e..89204a8 100644
--- a/src/roff/groff/groff.man
+++ b/src/roff/groff/groff.man
@@ -1,5 +1,8 @@
 .ig
-groff.man
+before installation: <top-groff-source>/src/roff/groff/groff.man
+after installation:  </usr or /usr/local>/share/man/man7/groff/groff.1
+
+Latest update: 19 Jun 2014
 
 Copyright (C) 1989, 2002-2009, 2011, 2014
 Free Software Foundation, Inc.


From MAILER-DAEMON Thu Jun 19 14:08:07 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Wxgko-00027u-Vq
	for mharc-groff-commit@gnu.org; Thu, 19 Jun 2014 14:08:06 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:56366)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wxgkl-00027a-RX
	for groff-commit@gnu.org; Thu, 19 Jun 2014 14:08:05 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wxgkg-0000Wa-5X
	for groff-commit@gnu.org; Thu, 19 Jun 2014 14:08:03 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:38029)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wxgkg-0000WW-1M
	for groff-commit@gnu.org; Thu, 19 Jun 2014 14:07:58 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1Wxgkf-000861-0q
	for groff-commit@gnu.org; Thu, 19 Jun 2014 18:07:57 +0000
Date: Thu, 19 Jun 2014 18:07:57 +0000
Message-Id: <E1Wxgkf-000861-0q@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: groff.1: add collection of all installation
	directories from @...@
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140619180756.31078.38215@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 0cb3903f23ab7b112fa1b41a5e8ca9360d91c57a
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Jun 2014 18:08:05 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 0cb3903f23ab7b112fa1b41a5e8ca9360d91c57a
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Thu Jun 19 20:07:45 2014 +0200

    groff.1: add collection of all installation directories  from @...@
---
 ChangeLog                |    5 +
 src/roff/groff/groff.man |  350 +++++++++++++++++++++++++++++-----------------
 2 files changed, 224 insertions(+), 131 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 211bdc0..fe2c94d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2014-06-19  Bernd Warken  <groff-bernd.warken-72@web.de>
 
+	* src/roff/groff/groff.man: Add the installation file and
+	directory positions of the whole package with @...@.
+
+2014-06-19  Bernd Warken  <groff-bernd.warken-72@web.de>
+
 	* man/groff.man, src/roff/groff/groff.man: Add file position
 	before and after installation and the latest update.
 
diff --git a/src/roff/groff/groff.man b/src/roff/groff/groff.man
index 89204a8..e6397ea 100644
--- a/src/roff/groff/groff.man
+++ b/src/roff/groff/groff.man
@@ -1,8 +1,5 @@
 .ig
-before installation: <top-groff-source>/src/roff/groff/groff.man
-after installation:  </usr or /usr/local>/share/man/man7/groff/groff.1
-
-Latest update: 19 Jun 2014
+groff.man
 
 Copyright (C) 1989, 2002-2009, 2011, 2014
 Free Software Foundation, Inc.
@@ -1499,7 +1496,93 @@ This device name is overwritten by the option
 .
 .
 .\" --------------------------------------------------------------------
-.SH FILES
+.SH EXAMPLES
+.\" --------------------------------------------------------------------
+.
+The following example illustrates the power of the
+.B groff
+program as a wrapper around
+.BR @g@troff .
+.
+.P
+To process a
+.I roff
+file using the preprocessors
+.B tbl
+and
+.B pic
+and the
+.B me
+macro set, classical
+.I troff
+had to be called by
+.
+.IP
+.EX
+pic foo.me | tbl | troff \-me \-Tlatin1 | grotty
+.EE
+.
+.P
+Using
+.BR groff ,
+this pipe can be shortened to the equivalent command
+.
+.IP
+.EX
+groff \-p \-t \-me \-T latin1 foo.me
+.EE
+.
+.P
+An even easier way to call this is to use
+.BR grog (@MAN1EXT@)
+to guess the preprocessor and macro options and execute the generated
+command (by using backquotes to specify shell command substitution)
+.
+.IP
+.EX
+\`grog \-Tlatin1 foo.me\`
+.EE
+.
+.P
+The simplest way is to view the contents in an automated way by
+calling
+.
+.IP
+.EX
+groffer foo.me
+.EE
+.
+.
+.\" --------------------------------------------------------------------
+.SH BUGS
+.\" --------------------------------------------------------------------
+.
+.P
+On \f[CR]EBCDIC\f[] hosts (e.g., \f[CR]OS/390 Unix\f[]), output
+devices
+.B ascii
+and
+.B latin1
+aren't available.
+.
+Similarly, output for \f[CR]EBCDIC\f[] code page
+.B cp1047
+is not available on \f[CR]ASCII\f[] based operating systems.
+.
+.P
+Report bugs to
+.MT bug-groff@gnu.org
+the groff mailing list
+.ME .
+.
+Include a complete, self-contained example that allows the bug to
+be reproduced, and say which version of
+.I groff
+you are using.
+.
+.
+.\" --------------------------------------------------------------------
+.SH "POSITIONS FROM INSTALLATION"
 .\" --------------------------------------------------------------------
 .
 There are some directories in which
@@ -1593,89 +1676,63 @@ of device
 .
 .
 .\" --------------------------------------------------------------------
-.SH EXAMPLES
+.SS "collection of installation positions"
 .\" --------------------------------------------------------------------
 .
-The following example illustrates the power of the
-.B groff
-program as a wrapper around
-.BR @g@troff .
-.
-.P
-To process a
-.I roff
-file using the preprocessors
-.B tbl
-and
-.B pic
-and the
-.B me
-macro set, classical
-.I troff
-had to be called by
-.
-.IP
-.EX
-pic foo.me | tbl | troff \-me \-Tlatin1 | grotty
-.EE
-.
-.P
-Using
-.BR groff ,
-this pipe can be shortened to the equivalent command
-.
-.IP
-.EX
-groff \-p \-t \-me \-T latin1 foo.me
-.EE
-.
-.P
-An even easier way to call this is to use
-.BR grog (@MAN1EXT@)
-to guess the preprocessor and macro options and execute the generated
-command (by using backquotes to specify shell command substitution)
-.
-.IP
-.EX
-\`grog \-Tlatin1 foo.me\`
-.EE
-.
-.P
-The simplest way is to view the contents in an automated way by
-calling
-.
-.IP
-.EX
-groffer foo.me
-.EE
-.
-.
-.\" --------------------------------------------------------------------
-.SH BUGS
-.\" --------------------------------------------------------------------
-.
-.P
-On \f[CR]EBCDIC\f[] hosts (e.g., \f[CR]OS/390 Unix\f[]), output
-devices
-.B ascii
-and
-.B latin1
-aren't available.
-.
-Similarly, output for \f[CR]EBCDIC\f[] code page
-.B cp1047
-is not available on \f[CR]ASCII\f[] based operating systems.
+This section describes the position of all files of the
+.I groff
+package after the installation.
 .
-.P
-Report bugs to
-.MT bug-groff@gnu.org
-the groff mailing list
-.ME .
+For other installation processes, the position can be quite different.
 .
-Include a complete, self-contained example that allows the bug to
-be reproduced, and say which version of
-.I groff
-you are using.
+.TP
+.B @DEFAULT_INDEX@
+index directory and index name
+.TP
+.B @LEGACYFONTDIR@
+legacy font directory
+.TP
+.B @BINDIR@
+directory for binary programs
+.TP
+.B @SYSTEMMACRODIR@
+system tmac directory
+.TP
+.B @DOCDIR@
+documentation directory
+.TP
+.B @EXAMPLEDIR@
+directory for examples
+.TP
+.B @HTMLDOCDIR@
+documentation directory for html files
+.TP
+.B @PDFDOCDIR@
+documentation directory for pdf files
+.TP
+.B @DATASUBDIR@
+data subdirectory
+.TP
+.B @COMMON_WORDS_FILE@
+file for common words
+.TP
+.B @FONTDIR@
+directory for fonts
+.TP
+.B @OLDFONTDIR@
+directory for old fonts
+.TP
+.B @MACRODIR@
+tmac directory
+.TP
+.B @TMAC_MDIR@
+mm tmac directory
+.TP
+.B @LOCALFONTDIR@
+local font directory
+.TP
+.B @LOCALMACRODIR@
+local tmac directory
 .
 .
 .\" --------------------------------------------------------------------
@@ -1741,53 +1798,6 @@ This is the only grap version supported by
 .
 .
 .\" --------------------------------------------------------------------
-.SH AUTHORS
-.\" --------------------------------------------------------------------
-.
-Copyright \(co 2014
-Free Software Foundation, Inc.
-.
-.P
-This document is distributed under the terms of the \f[CR]FDL\f[]
-(\f[CR]GNU Free Documentation License\f[]) version 1.3 or later.
-.
-You should have received a copy of the \f[CR]FDL\f[] on your system,
-it is also available on-line at the
-.UR http://\:www.gnu.org/\:copyleft/\:fdl.html
-GNU copyleft site
-.UE .
-.
-.P
-This document is based on the original
-.I groff
-man page written by
-.MT jjc@jclark.com
-James Clark
-.UE .
-.
-It was rewritten, enhanced, and put under the FDL license by
-Bernd Warken <groff-bernd.warken-72@web.de>.
-.
-It is maintained by
-.MT wl@gnu.org
-Werner Lemberg
-.ME .
-.
-.P
-.I groff
-is a \f[CR]GNU\f[] free software project.
-.
-All parts of the
-.I groff package
-are protected by \f[CR]GNU copyleft licenses\f[].
-.
-The software files are distributed under the terms of the \f[CR]GNU
-General Public License\f[] (\f[CR]GPL\f[]), while the documentation
-files mostly use the \f[CR]GNU Free Documentation License\f[]
-(\f[CR]FDL\f[]).
-.
-.
-.\" --------------------------------------------------------------------
 .SH "SEE ALSO"
 .\" --------------------------------------------------------------------
 .ad l
@@ -1813,6 +1823,37 @@ They can be read with
 or
 .BR \%groffer (@MAN1EXT@).
 .
+.P
+But there are special sections of
+.IR man-pages .
+.
+.groff
+has man-pages in sections
+.BR 1 , " 5" , and " 7" .
+.
+When there are several
+.I man-pages
+with the same name in the same
+.I man
+section, the one with the lowest section is should as first.
+.
+The other man-pages can be shown anyway by adding the section number
+as argument before the man-page name.
+.
+Reading the man-page about the
+.I groff
+language is done by one of
+.RS
+.nf
+.nh
+.EX
+.B man 7 groff
+.B groffer 7 groff
+.EE
+.hy
+.fi
+.RE
+.
 .TP
 Introduction, history and further readings:
 .BR roff (@MAN7EXT@).
@@ -1902,6 +1943,53 @@ The following utilities are available:
 .BR \%xtotroff (@MAN1EXT@).
 .
 .\" --------------------------------------------------------------------
+.SH AUTHORS
+.\" --------------------------------------------------------------------
+.
+Copyright \(co 2014
+Free Software Foundation, Inc.
+.
+.P
+This document is distributed under the terms of the \f[CR]FDL\f[]
+(\f[CR]GNU Free Documentation License\f[]) version 1.3 or later.
+.
+You should have received a copy of the \f[CR]FDL\f[] on your system,
+it is also available on-line at the
+.UR http://\:www.gnu.org/\:copyleft/\:fdl.html
+GNU copyleft site
+.UE .
+.
+.P
+This document is based on the original
+.I groff
+man page written by
+.MT jjc@jclark.com
+James Clark
+.UE .
+.
+It was rewritten, enhanced, and put under the FDL license by
+Bernd Warken <groff-bernd.warken-72@web.de>.
+.
+It is maintained by
+.MT wl@gnu.org
+Werner Lemberg
+.ME .
+.
+.P
+.I groff
+is a \f[CR]GNU\f[] free software project.
+.
+All parts of the
+.I groff package
+are protected by \f[CR]GNU copyleft licenses\f[].
+.
+The software files are distributed under the terms of the \f[CR]GNU
+General Public License\f[] (\f[CR]GPL\f[]), while the documentation
+files mostly use the \f[CR]GNU Free Documentation License\f[]
+(\f[CR]FDL\f[]).
+.
+.
+.\" --------------------------------------------------------------------
 .\" Emacs setup
 .\" --------------------------------------------------------------------
 .


From MAILER-DAEMON Thu Jun 19 16:20:54 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WxipK-0000iu-0n
	for mharc-groff-commit@gnu.org; Thu, 19 Jun 2014 16:20:54 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:55797)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxipE-0000cs-Db
	for groff-commit@gnu.org; Thu, 19 Jun 2014 16:20:51 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxipD-0005XJ-Cu
	for groff-commit@gnu.org; Thu, 19 Jun 2014 16:20:48 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:39240)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WxipD-0005X2-78
	for groff-commit@gnu.org; Thu, 19 Jun 2014 16:20:47 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WxipB-0001CC-RI
	for groff-commit@gnu.org; Thu, 19 Jun 2014 20:20:46 +0000
Date: Thu, 19 Jun 2014 20:20:45 +0000
Message-Id: <E1WxipB-0001CC-RI@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: groff.1: Correct the collection of the
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140619202045.4563.93966@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 24a53f3ba7626598a2f7c3b223a048adc1be4899
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Jun 2014 20:20:51 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 24a53f3ba7626598a2f7c3b223a048adc1be4899
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Thu Jun 19 22:19:28 2014 +0200

    groff.1: Correct the collection of the
---
 ChangeLog                |    5 ++
 src/roff/groff/groff.man |  123 +++++++++++++++++++++++----------------------
 2 files changed, 68 insertions(+), 60 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fe2c94d..bdf3dd6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2014-06-19  Bernd Warken  <groff-bernd.warken-72@web.de>
 
+	* src/roff/groff/groff.man: Correct the collection of the
+	installation directories.
+
+2014-06-19  Bernd Warken  <groff-bernd.warken-72@web.de>
+
 	* src/roff/groff/groff.man: Add the installation file and
 	directory positions of the whole package with @...@.
 
diff --git a/src/roff/groff/groff.man b/src/roff/groff/groff.man
index e6397ea..90a72d4 100644
--- a/src/roff/groff/groff.man
+++ b/src/roff/groff/groff.man
@@ -1595,6 +1595,69 @@ clearly defined and coincides on all systems.
 .
 .
 .\" --------------------------------------------------------------------
+.SS "Collection of Installation Directories"
+.\" --------------------------------------------------------------------
+.
+This section describes the position of all files of the
+.I groff
+package after the installation \[em] got from
+.B Makefile.comm
+at the top of the
+.I groff
+source package.
+.
+.
+.TP
+.B @DEFAULT_INDEX@
+index directory and index name
+.TP
+.B @LEGACYFONTDIR@
+legacy font directory
+.TP
+.B @BINDIR@
+directory for binary programs
+.TP
+.B @SYSTEMMACRODIR@
+system tmac directory
+.TP
+.B @DOCDIR@
+documentation directory
+.TP
+.B @EXAMPLEDIR@
+directory for examples
+.TP
+.B @HTMLDOCDIR@
+documentation directory for html files
+.TP
+.B @PDFDOCDIR@
+documentation directory for pdf files
+.TP
+.B @DATASUBDIR@
+data subdirectory
+.TP
+.B @COMMON_WORDS_FILE@
+file for common words
+.TP
+.B @FONTDIR@
+directory for fonts
+.TP
+.B @OLDFONTDIR@
+directory for old fonts
+.TP
+.B @MACRODIR@
+tmac directory
+.TP
+.B @TMAC_MDIR@
+mm tmac directory
+.TP
+.B @LOCALFONTDIR@
+local font directory
+.TP
+.B @LOCALMACRODIR@
+local tmac directory
+.
+.
+.\" --------------------------------------------------------------------
 .SS "groff Macro Directory"
 .\" --------------------------------------------------------------------
 .
@@ -1676,66 +1739,6 @@ of device
 .
 .
 .\" --------------------------------------------------------------------
-.SS "collection of installation positions"
-.\" --------------------------------------------------------------------
-.
-This section describes the position of all files of the
-.I groff
-package after the installation.
-.
-For other installation processes, the position can be quite different.
-.
-.TP
-.B @DEFAULT_INDEX@
-index directory and index name
-.TP
-.B @LEGACYFONTDIR@
-legacy font directory
-.TP
-.B @BINDIR@
-directory for binary programs
-.TP
-.B @SYSTEMMACRODIR@
-system tmac directory
-.TP
-.B @DOCDIR@
-documentation directory
-.TP
-.B @EXAMPLEDIR@
-directory for examples
-.TP
-.B @HTMLDOCDIR@
-documentation directory for html files
-.TP
-.B @PDFDOCDIR@
-documentation directory for pdf files
-.TP
-.B @DATASUBDIR@
-data subdirectory
-.TP
-.B @COMMON_WORDS_FILE@
-file for common words
-.TP
-.B @FONTDIR@
-directory for fonts
-.TP
-.B @OLDFONTDIR@
-directory for old fonts
-.TP
-.B @MACRODIR@
-tmac directory
-.TP
-.B @TMAC_MDIR@
-mm tmac directory
-.TP
-.B @LOCALFONTDIR@
-local font directory
-.TP
-.B @LOCALMACRODIR@
-local tmac directory
-.
-.
-.\" --------------------------------------------------------------------
 .SH AVAILABILITY
 .\" --------------------------------------------------------------------
 .


From MAILER-DAEMON Fri Jun 20 14:58:55 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Wy41X-0004Qe-L8
	for mharc-groff-commit@gnu.org; Fri, 20 Jun 2014 14:58:55 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:56126)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wy41U-0004Q0-Vv
	for groff-commit@gnu.org; Fri, 20 Jun 2014 14:58:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wy41T-00066N-PJ
	for groff-commit@gnu.org; Fri, 20 Jun 2014 14:58:52 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:50848)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wy41T-00066J-MD
	for groff-commit@gnu.org; Fri, 20 Jun 2014 14:58:51 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1Wy41S-0003Sa-AU
	for groff-commit@gnu.org; Fri, 20 Jun 2014 18:58:50 +0000
Date: Fri, 20 Jun 2014 18:58:50 +0000
Message-Id: <E1Wy41S-0003Sa-AU@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: grog: repair call of Perl push()
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140620185850.13264.26925@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 68d227915d6c4966a033e4fe38dba912efc7f3e7
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Fri, 20 Jun 2014 18:58:53 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 68d227915d6c4966a033e4fe38dba912efc7f3e7
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Fri Jun 20 20:58:41 2014 +0200

    grog: repair call of Perl push()
---
 ChangeLog             |    3 +++
 src/roff/grog/subs.pl |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bdf3dd6..ee22bc1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,9 @@
 	* src/roff/grog/subs.pl: In the `groff' output command line, split
 	the single character options collections into different
 	1-character options, each with a leading minus `-'..
+2014-06-20  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* src/roff/grog/subs.pl: Repair call of `push'.
 
 2014-06-18  Bernd Warken  <groff-bernd.warken-72@web.de>
 
diff --git a/src/roff/grog/subs.pl b/src/roff/grog/subs.pl
index 2150d20..1465bcf 100644
--- a/src/roff/grog/subs.pl
+++ b/src/roff/grog/subs.pl
@@ -291,7 +291,7 @@ sub do_first_line {
       $word = 'eqn';
     }
     if ( exists $preprocs_tmacs{$word} ) {
-      push $word, @in;
+      push @in, $word;
     } else {
       # not word for preproc or tmac
       return 0;


From MAILER-DAEMON Sun Jun 22 06:23:31 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1Wyevr-0000IN-O2
	for mharc-groff-commit@gnu.org; Sun, 22 Jun 2014 06:23:31 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:44475)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wyevp-0000I2-Du
	for groff-commit@gnu.org; Sun, 22 Jun 2014 06:23:30 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wyevo-0004ZJ-Cn
	for groff-commit@gnu.org; Sun, 22 Jun 2014 06:23:29 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:43184)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1Wyevo-0004Z4-9m
	for groff-commit@gnu.org; Sun, 22 Jun 2014 06:23:28 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1Wyevn-0003zt-Kq
	for groff-commit@gnu.org; Sun, 22 Jun 2014 10:23:27 +0000
Date: Sun, 22 Jun 2014 10:23:27 +0000
Message-Id: <E1Wyevn-0003zt-Kq@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: Makefile.in: add 2 directories from contrib/gideal:
	files and libfiles
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140622102327.15334.58492@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: 910b4557c92623ab5a47f225efbbabb87a40b898
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Jun 2014 10:23:30 -0000

bwarken pushed a commit to branch master
in repository groff.

commit 910b4557c92623ab5a47f225efbbabb87a40b898
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Sun Jun 22 12:23:21 2014 +0200

    Makefile.in: add 2 directories from contrib/gideal: files and libfiles
---
 ChangeLog   |    5 +++++
 Makefile.in |    2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ee22bc1..8ab5db8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-06-22  Bernd Warken  <groff-bernd.warken-72@web.de>
+
+	* Makefile.in: Add 2 directories of `contrib/gideal': `files' and
+	'libfiles`.
+
 2014-06-19  Bernd Warken  <groff-bernd.warken-72@web.de>
 
 	* src/roff/groff/groff.man: Correct the collection of the
diff --git a/Makefile.in b/Makefile.in
index dd927c7..33a30fd 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -676,6 +676,8 @@ OTHERDIRS=\
   contrib/eqn2graph \
   contrib/gdiffmk \
   contrib/gideal \
+  contrib/gideal/files \
+  contrib/gideal/libfiles \
   contrib/glilypond \
   contrib/gperl \
   contrib/grap2graph \


From MAILER-DAEMON Sun Jun 22 12:07:21 2014
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1WykIb-0003sP-FL
	for mharc-groff-commit@gnu.org; Sun, 22 Jun 2014 12:07:21 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60463)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WykIZ-0003sJ-IU
	for groff-commit@gnu.org; Sun, 22 Jun 2014 12:07:20 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WykIY-0004uh-Jq
	for groff-commit@gnu.org; Sun, 22 Jun 2014 12:07:19 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:46334)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bernd.warken@web.de>) id 1WykIY-0004uc-Fv
	for groff-commit@gnu.org; Sun, 22 Jun 2014 12:07:18 -0400
Received: from bwarken by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <bernd.warken@web.de>) id 1WykIX-0006oL-M4
	for groff-commit@gnu.org; Sun, 22 Jun 2014 16:07:18 +0000
Date: Sun, 22 Jun 2014 16:07:17 +0000
Message-Id: <E1WykIX-0006oL-M4@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
Subject: [groff] 01/01: Makefile.in: add 2 ideal directories to NOMAKEDIRS
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
In-Reply-To: groff@gnu.org
References: <20140622160717.26150.36178@vcs.savannah.gnu.org>
X-Git-Repo: groff
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Rev: c91222f0598669adc8f41807e75700645f555376
Auto-Submitted: auto-generated
From: Bernd Warken <bernd.warken@web.de>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 140.186.70.72
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
Reply-To: groff@gnu.org
List-Id: <groff-commit.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/groff-commit>
List-Post: <mailto:groff-commit@gnu.org>
List-Help: <mailto:groff-commit-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/groff-commit>,
	<mailto:groff-commit-request@gnu.org?subject=subscribe>
X-List-Received-Date: Sun, 22 Jun 2014 16:07:20 -0000

bwarken pushed a commit to branch master
in repository groff.

commit c91222f0598669adc8f41807e75700645f555376
Author: Bernd Warken <groff-bernd.warken-72@web.de>
Date:   Sun Jun 22 18:07:09 2014 +0200

    Makefile.in: add 2 ideal directories to NOMAKEDIRS
---
 ChangeLog   |    6 +++---
 Makefile.in |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8ab5db8..0a864c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
-2014-06-22  Bernd Warken  <groff-bernd.warken-72@web.de>
+2014-06-21  Ingo Schwarze  <schwarze@openbsd.org>
 
-	* Makefile.in: Add 2 directories of `contrib/gideal': `files' and
-	'libfiles`.
+	* Makefile.in: Unbreak make install:
+	Add missing gideal dirs to the dist tarball.
 
 2014-06-19  Bernd Warken  <groff-bernd.warken-72@web.de>
 
diff --git a/Makefile.in b/Makefile.in
index 33a30fd..8e6aed7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -676,8 +676,6 @@ OTHERDIRS=\
   contrib/eqn2graph \
   contrib/gdiffmk \
   contrib/gideal \
-  contrib/gideal/files \
-  contrib/gideal/libfiles \
   contrib/glilypond \
   contrib/gperl \
   contrib/grap2graph \
@@ -716,6 +714,8 @@ NOMAKEDIRS=\
   arch/djgpp \
   contrib/chem/examples \
   contrib/chem/examples/122 \
+  contrib/gideal/files \
+  contrib/gideal/libfiles \
   contrib/groffer/perl \
   contrib/groffer/shell \
   contrib/hdtbl/examples \


