From MAILER-DAEMON Fri May 11 23:50:48 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1ST3M0-0001h4-4g
	for mharc-groff-commit@gnu.org; Fri, 11 May 2012 23:50:48 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38401)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <wl@gnu.org>)
	id 1ST3Lx-0001gZ-0t
	for groff-commit@gnu.org; Fri, 11 May 2012 23:50:46 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <wl@gnu.org>) id 1ST3Lu-0001u9-VN
	for groff-commit@gnu.org; Fri, 11 May 2012 23:50:44 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:36454)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <wl@gnu.org>)
	id 1ST3Lu-0001u2-Rs
	for groff-commit@gnu.org; Fri, 11 May 2012 23:50:42 -0400
Received: from wl by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <wl@gnu.org>) id 1ST3Lt-0001S2-Ba
	for groff-commit@gnu.org; Sat, 12 May 2012 03:50:41 +0000
Date: Sat, 12 May 2012 03:50:41 +0000
Message-Id: <E1ST3Lt-0001S2-Ba@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
From: Werner LEMBERG <wl@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
Subject: [Groff-commit] groff/man groff.man
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
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, 12 May 2012 03:50:46 -0000

CVSROOT:	/cvsroot/groff
Module name:	groff
Changes by:	Werner LEMBERG <wl>	12/05/12 03:50:41

Modified files:
	man            : groff.man 

Log message:
	groff.man: Fix typo.
	
	From Bjarni Ingi Gislason <bjarniig@rhi.hi.is>.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/man/groff.man?cvsroot=groff&r1=1.106&r2=1.107

Patches:
Index: groff.man
===================================================================
RCS file: /cvsroot/groff/groff/man/groff.man,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -b -r1.106 -r1.107
--- groff.man	13 Dec 2010 15:30:20 -0000	1.106
+++ groff.man	12 May 2012 03:50:41 -0000	1.107
@@ -883,7 +883,7 @@
 .TPx
 .BI ! N
 True if the value of
-.I I
+.I N
 is\~0 (see below).
 .
 .TPx


From MAILER-DAEMON Sun May 20 09:58:21 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SW6eL-00079W-2S
	for mharc-groff-commit@gnu.org; Sun, 20 May 2012 09:58:21 -0400
Received: from eggs.gnu.org ([208.118.235.92]:44831)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <wl@gnu.org>)
	id 1SW6eF-00078z-MJ
	for groff-commit@gnu.org; Sun, 20 May 2012 09:58:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <wl@gnu.org>) id 1SW6eB-0004Ko-Ip
	for groff-commit@gnu.org; Sun, 20 May 2012 09:58:15 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:43949)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <wl@gnu.org>)
	id 1SW6eB-0004Kj-ED
	for groff-commit@gnu.org; Sun, 20 May 2012 09:58:11 -0400
Received: from wl by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <wl@gnu.org>) id 1SW6eA-0001Au-S5
	for groff-commit@gnu.org; Sun, 20 May 2012 13:58:10 +0000
Date: Sun, 20 May 2012 13:58:10 +0000
Message-Id: <E1SW6eA-0001Au-S5@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
From: Werner LEMBERG <wl@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
Subject: [Groff-commit] groff ChangeLog doc/groff.texinfo src/devices/g...
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
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, 20 May 2012 13:58:19 -0000

CVSROOT:	/cvsroot/groff
Module name:	groff
Changes by:	Werner LEMBERG <wl>	12/05/20 13:58:10

Modified files:
	.              : ChangeLog 
	doc            : groff.texinfo 
	src/devices/gropdf: Makefile.sub gropdf.man gropdf.pl 
	tmac           : pdf.tmac 

Log message:
	* doc/groff.texinfo: Add extra info about `.asciify'.
	Document new gropdf options -u and -s.
	
	* src/devices/gropdf/gropdf.man: Remove references to Type 42 fonts,
	they do not work in PDFs.
	Document new option -s which adds `statistics' line to end of PDF
	file showing number of pages in document.  This has always been the
	default behaviour (to add this line), all other software seems to
	ignore it as intended, but `gs' sometimes complains, so the default
	is now to omit the statistics.
	Document new option -u[cmapfilename] to allow a user ToUnicode CMap
	instead of gropdf's default.  If no `cmapfilename' given then do not
	include any ToUnicode CMap.
	
	* src/devices/gropdf/gropdf.pl <top>: Allow `bundled' flags on
	command line (i.e. -de = -d -e).
	Use $RT_SEP as multi path separator, not hard coded `:'.  Update all
	users.
	New flags -u and -s.
	Once a custom papersize has been set as \X'papersize x,y' make it
	sticky so all following pages use custom size.
	When importing pdf with \X'pdf: pdfpic ...' do not compress objects
	which are already compressed!  This caused problems with PDFs
	created with ImageMagick, now fixed.
	(IsText, PutLine, do_t): The troff `u' command can contain a kerning
	adjustment number, this was not being handled, now fixed.
	(do_c): The troff `c' command was not being handled correctly, now
	fixed.
	(FindChar, RemapChr, do_N): Handle fonts with more than 255 glyphs.
	($ucmap): Define CMap ToUnicode to convert ligatures
	(fl,fi,ff,ffl,ffi) back to individual characters, useful for
	cut'n'paste and text searching.
	(LoadFont): Handle it.
	(ToPoints, GetPoints): Handle `z' unit.
	(do_x, FixPDFColour, PutHotSpot): Allow Annotation colour to be
	groff colour, i.e. 0-65535 *3, or #rrggbb, or #rrrrbbbbgggg.
	(do_p):The papersize width/length in switch -p were reversed,
	corrected.
	
	* src/devices/gropdf/Makefile.sub (gropdf): Use $RT_SEP.
	Use $fontpath rather than $fontdir (this ensures site-font is
	included in searches).
	
	* tmac/pdf.tmac (PDFBOOKMARK.VIEW, PDFHREF.VIEW, PDFPAGE.Y): Fix
	strings.
	(pdfbookmark): Correct handling of bookmark levels.
	Convert \[em] to hyphen in bookmarks
	Rather use -N than -T for "named" bookmarks (-T already used for "tag"
	in pdfmark.tmac)
	(.pdfclean): New macro which attempts to asciify bookmark text.
	(.pdfpagename): New wrapper macro for \X'pdf: pagename'.
	(.pdfswitchtopage): New wrapper macro for \X'pdf: switchtopage'.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1332&r2=1.1333
http://cvs.savannah.gnu.org/viewcvs/groff/doc/groff.texinfo?cvsroot=groff&r1=1.309&r2=1.310
http://cvs.savannah.gnu.org/viewcvs/groff/src/devices/gropdf/Makefile.sub?cvsroot=groff&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/groff/src/devices/gropdf/gropdf.man?cvsroot=groff&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/groff/src/devices/gropdf/gropdf.pl?cvsroot=groff&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/groff/tmac/pdf.tmac?cvsroot=groff&r1=1.3&r2=1.4

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1332
retrieving revision 1.1333
diff -u -b -r1.1332 -r1.1333
--- ChangeLog	10 Mar 2012 09:16:01 -0000	1.1332
+++ ChangeLog	20 May 2012 13:58:09 -0000	1.1333
@@ -1,3 +1,58 @@
+2012-05-20  Deri James  <deri@chuzzlewit.demon.co.uk>
+
+	* doc/groff.texinfo: Add extra info about `.asciify'.
+	Document new gropdf options -u and -s.
+
+	* src/devices/gropdf/gropdf.man: Remove references to Type 42 fonts,
+	they do not work in PDFs.
+	Document new option -s which adds `statistics' line to end of PDF
+	file showing number of pages in document.  This has always been the
+	default behaviour (to add this line), all other software seems to
+	ignore it as intended, but `gs' sometimes complains, so the default
+	is now to omit the statistics.
+	Document new option -u[cmapfilename] to allow a user ToUnicode CMap
+	instead of gropdf's default.  If no `cmapfilename' given then do not
+	include any ToUnicode CMap.
+
+	* src/devices/gropdf/gropdf.pl <top>: Allow `bundled' flags on
+	command line (i.e. -de = -d -e).
+	Use $RT_SEP as multi path separator, not hard coded `:'.  Update all
+	users.
+	New flags -u and -s.
+	Once a custom papersize has been set as \X'papersize x,y' make it
+	sticky so all following pages use custom size.
+	When importing pdf with \X'pdf: pdfpic ...' do not compress objects
+	which are already compressed!  This caused problems with PDFs
+	created with ImageMagick, now fixed.
+	(IsText, PutLine, do_t): The troff `u' command can contain a kerning
+	adjustment number, this was not being handled, now fixed.
+	(do_c): The troff `c' command was not being handled correctly, now
+	fixed.
+	(FindChar, RemapChr, do_N): Handle fonts with more than 255 glyphs.
+	($ucmap): Define CMap ToUnicode to convert ligatures
+	(fl,fi,ff,ffl,ffi) back to individual characters, useful for
+	cut'n'paste and text searching.
+	(LoadFont): Handle it.
+	(ToPoints, GetPoints): Handle `z' unit.
+	(do_x, FixPDFColour, PutHotSpot): Allow Annotation colour to be
+	groff colour, i.e. 0-65535 *3, or #rrggbb, or #rrrrbbbbgggg.
+	(do_p):The papersize width/length in switch -p were reversed,
+	corrected.
+
+	* src/devices/gropdf/Makefile.sub (gropdf): Use $RT_SEP.
+	Use $fontpath rather than $fontdir (this ensures site-font is
+	included in searches).
+
+	* tmac/pdf.tmac (PDFBOOKMARK.VIEW, PDFHREF.VIEW, PDFPAGE.Y): Fix
+	strings.
+	(pdfbookmark): Correct handling of bookmark levels.
+	Convert \[em] to hyphen in bookmarks
+	Rather use -N than -T for "named" bookmarks (-T already used for "tag"
+	in pdfmark.tmac)
+	(.pdfclean): New macro which attempts to asciify bookmark text.
+	(.pdfpagename): New wrapper macro for \X'pdf: pagename'.
+	(.pdfswitchtopage): New wrapper macro for \X'pdf: switchtopage'.
+
 2012-03-10  Werner LEMBERG  <wl@gnu.org>
 
 	Fix compiler warnings.

Index: doc/groff.texinfo
===================================================================
RCS file: /cvsroot/groff/groff/doc/groff.texinfo,v
retrieving revision 1.309
retrieving revision 1.310
diff -u -b -r1.309 -r1.310
--- doc/groff.texinfo	8 Dec 2011 06:44:19 -0000	1.309
+++ doc/groff.texinfo	20 May 2012 13:58:10 -0000	1.310
@@ -26,7 +26,7 @@
 @copying
 This manual documents GNU @code{troff} version 1.21.
 
-Copyright @copyright{} 1994-2011 Free Software Foundation, Inc.
+Copyright @copyright{} 1994-2012 Free Software Foundation, Inc.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
@@ -472,7 +472,7 @@
 @title groff
 @subtitle The GNU implementation of @code{troff}
 @subtitle Edition 1.21
-@subtitle Winter 2010
+@subtitle Spring 2012
 @author by Trent A.@tie{}Fisher
 @author and Werner Lemberg (@email{bug-groff@@gnu.org})
 
@@ -13012,6 +13012,10 @@
 .x
 @endExample
 
+Note that @code{asciify} cannot return all items in a diversion back
+to their source equivalent, nodes such as @code{\N[...]} will still
+remain as nodes, so the result cannot be guaranteed to be a pure string.
+
 @xref{Copy-in Mode}.
 @endDefreq
 
@@ -15198,6 +15202,18 @@
 
 @item -v
 Print the version number.
+
+@item -s
+Append a comment line to end of PDF showing statistics, i.e. number of
+pages in document.  Ghostscript's @cite{ps2pdf(1)} complains about this
+line if it is included, but works anyway.
+
+@item -u@var{filename}
+@code{gropdf} normally includes a ToUnicode CMap with any font created
+using @file{text.enc} as the encoding file, this makes it easier to
+search for words which contain ligatures.  You can include your own CMap
+by specifying a @var{filename} or have no CMap at all by omitting the
+@var{filename}.
 @end table
 
 @c ---------------------------------------------------------------------

Index: src/devices/gropdf/Makefile.sub
===================================================================
RCS file: /cvsroot/groff/groff/src/devices/gropdf/Makefile.sub,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- src/devices/gropdf/Makefile.sub	26 Jul 2011 17:11:11 -0000	1.1
+++ src/devices/gropdf/Makefile.sub	20 May 2012 13:58:10 -0000	1.2
@@ -38,7 +38,8 @@
 	sed -f $(SH_DEPS_SED_SCRIPT) \
 	    -e "s|@VERSION@|$(version)$(revision)|" \
 	    -e "s|@PERLPATH@|$(PERLPATH)|" \
-	    -e "s|@GROFF_FONT_DIR@|$(fontdir)|" $(srcdir)/gropdf.pl >$@
+	    -e "s|@GROFF_FONT_DIR@|$(fontpath)|" \
+	    -e "s|@RT_SEP@|$(RT_SEP)|" $(srcdir)/gropdf.pl >$@
 	chmod +x $@
 
 install_data:

Index: src/devices/gropdf/gropdf.man
===================================================================
RCS file: /cvsroot/groff/groff/src/devices/gropdf/gropdf.man,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- src/devices/gropdf/gropdf.man	10 Aug 2011 18:23:01 -0000	1.2
+++ src/devices/gropdf/gropdf.man	20 May 2012 13:58:10 -0000	1.3
@@ -1,5 +1,5 @@
 .ig
-Copyright (C) 2011
+Copyright (C) 2011-2012
   Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of
@@ -43,12 +43,13 @@
 .SH SYNOPSIS
 .
 .SY gropdf
-.OP \-delv
+.OP \-delvs
 .OP \-F dir
 \#.OP \-I dir
 .OP \-p papersize
 \#.OP \-w n
 .OP \-y foundry
+.OP \-u [cmapfile]
 .RI [ files
 .IR .\|.\|. ]
 .YS
@@ -188,7 +189,30 @@
 .
 .TP
 .B \-e
-Forces gropdf to embed ALL fonts (even the 14 base PDF fonts). 
+Forces
+.B gropdf
+to embed ALL fonts (even the 14 base PDF fonts).
+.
+.TP
+.B \-s
+Append a comment line to end of PDF showing statistics,
+i.e. number of pages in document.
+Ghostscript's
+.B ps2pdf
+complains about this line if it is included, but works anyway.
+.
+.TP
+.B \-u
+.TQ
+.BI \-u cmapfilename
+.B Gropdf
+normally includes a ToUnicode CMap with any font created using
+.B text.enc
+as the encoding file,
+this makes it easier to search for words which contain ligatures.
+You can include your own CMap by specifying a
+.I cmapfilename
+or have no CMap at all by omitting the argument.
 .
 .
 .SH USAGE
@@ -804,52 +828,7 @@
 .SS TrueType and other font formats
 .
 .B gropdf
-does not support TrueType fonts natively within the PDF files it generates
-(but does support any fonts if they are in an imported PDF).
-.
-However, TrueType fonts can be used with
-.B gropdf
-if converted first to
-.B Type\~42
-format, a special PostScript wrapper equivalent to the PFA format mentioned
-in
-.BR \%pfbtops (@MAN1EXT@).
-.
-There are several different methods to generate a Type\~42
-wrapper and most of them involve the use of a PostScript
-interpreter such as Ghostscript \[en] see
-.BR gs (1).
-.
-.LP
-Yet, the easiest method involves the use of the application
-.BR ttftot42 (1).
-.
-This program uses
-.BR freetype (3)
-(version 1.3.1) to generate Type\~42
-font wrappers and well-formed AFM files that can be fed to the
-.BR \%afmtodit (@MAN1EXT@)
-script to create appropriate metric files.
-.
-The resulting font wrappers should be added to groff's
-.B download
-file.
-.
-.B ttftot42
-source code can be downloaded from
-.UR ftp://\:www.giga.or.at/\:pub/\:nih/\:ttftot42/
-ftp://\:www.giga.or.at/\:pub/\:nih/\:ttftot42/
-.UE .
-.
-.LP
-Another solution for creating Type\~42 wrappers is to use FontForge,
-available from
-.UR http://\:fontforge.sf.net
-http://\:fontforge.sf.net
-.UE .
-.
-This font editor can convert most outline font formats.
-.
+does not support any other fonts except Adobe Type 1 (PFA or PFB).
 .
 .SH FONT INSTALLATION
 .
@@ -865,8 +844,8 @@
 .LI
 Convert your font to something groff understands.
 .
-This is either a PostScript Type\~1 font in either PFA or PFB format or a
-PostScript Type\~42 font, together with an AFM file.
+This is either a PostScript Type\~1 font in either PFA or PFB,
+together with an AFM file.
 .
 .IP
 The very first line in a PFA/PFB file contains this:
@@ -880,29 +859,6 @@
 A PFB file has this also in the first line, but the string is
 preceded with some binary bytes.
 .
-.IP
-The very first characters in a Type\~42 font file look like this:
-.
-.RS
-.IP
-.B %!PS-TrueTypeFont
-.RE
-.
-.IP
-This is a wrapper format for TrueType fonts.
-.
-Old PS printers might not support it (this is, they don't have a
-built-in TrueType font interpreter).
-.
-.IP
-For TrueType fonts, try
-.B ttftot42
-or
-.BR fontforge .
-For all other font formats use
-.B fontforge
-which can convert most outline font formats.
-.
 .LI
 Convert the AFM file to a groff font description file with the
 .BR \%afmtodit (@MAN1EXT@)

Index: src/devices/gropdf/gropdf.pl
===================================================================
RCS file: /cvsroot/groff/groff/src/devices/gropdf/gropdf.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- src/devices/gropdf/gropdf.pl	15 Feb 2012 13:26:46 -0000	1.5
+++ src/devices/gropdf/gropdf.pl	20 May 2012 13:58:10 -0000	1.6
@@ -23,13 +23,14 @@
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
 
 use strict;
-use Getopt::Long;
+use Getopt::Long qw(:config bundling);
 use Compress::Zlib;
 
 my %cfg;
 
 $cfg{GROFF_VERSION}='@VERSION@';
 $cfg{GROFF_FONT_PATH}='@GROFF_FONT_DIR@';
+$cfg{RT_SEP}='@RT_SEP@';
 binmode(STDOUT);
 
 my @obj;	# Array of PDF objects
@@ -98,6 +99,8 @@
 my $pginsert=-1;    # Growth point for kids array
 my %pgnames;        # 'names' of pages for switchtopage
 my @outlines=();    # State of Bookmark Outlines at end of each page
+my $custompaper=0;  # Has there been an X papersize
+my $textenccmap=''; # CMap for groff text.enc encoding
 
 my %ppsz=(	'ledger'=>[1224,792],
 	'legal'=>[612,1008],
@@ -128,6 +131,29 @@
 	'c5'=>[459,649],
 	'c6'=>[323,459] );
 
+my $ucmap=<<'EOF';
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (Adobe)
+/Ordering (UCS)
+/Supplement 0
+>> def
+/CMapName /Adobe-Identity-UCS def
+/CMapType 2 def
+1 begincodespacerange
+<0000> <FFFF>
+endcodespacerange
+2 beginbfrange
+<008b> <008f> [<00660066> <00660069> <0066006c> <006600660069> <00660066006C>]
+<00ad> <00ad> <002d>
+endbfrange
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+EOF
 
 my $fd;
 my $frot;
@@ -135,10 +161,12 @@
 my $embedall=0;
 my $debug=0;
 my $version=0;
+my $stats=0;
+my $unicodemap;
 
 #Load_Config();
 
-GetOptions("F=s" => \$fd, 'l' => \$frot, 'p=s' => \$fpsz, 'd!' => \$debug, 'v' => \$version, 'e' => \$embedall, 'y=s' => \$Foundry);
+GetOptions("F=s" => \$fd, 'l' => \$frot, 'p=s' => \$fpsz, 'd!' => \$debug, 'v' => \$version, 'e' => \$embedall, 'y=s' => \$Foundry, 's' => \$stats, 'u:s' => \$unicodemap);
 
 if ($version)
 {
@@ -146,11 +174,30 @@
     exit;
 }
 
+if (defined($unicodemap))
+{
+    if ($unicodemap eq '')
+    {
+	$ucmap='';
+    }
+    elsif (-r $unicodemap)
+    {
+	local $/;
+	open(F,"<$unicodemap") or die "gropdf: Failed to open '$unicodemap'";
+	($ucmap)=(<F>);
+	close(F);
+    }
+    else
+    {
+	Msg(0,"Failed to find '$unicodemap' - ignoring");
+    }
+}
+
 # Search for 'font directory': paths in -f opt, shell var GROFF_FONT_PATH, default paths
 
 my $fontdir=$cfg{GROFF_FONT_PATH};
-$fontdir=$ENV{GROFF_FONT_PATH}.':'.$fontdir if exists($ENV{GROFF_FONT_PATH});
-$fontdir=$fd.':'.$fontdir if defined($fd);
+$fontdir=$ENV{GROFF_FONT_PATH}.$cfg{RT_SEP}.$fontdir if exists($ENV{GROFF_FONT_PATH});
+$fontdir=$fd.$cfg{RT_SEP}.$fontdir if defined($fd);
 
 $rot=90 if $frot;
 $matrix="0 1 -1 0" if $frot;
@@ -267,6 +314,19 @@
 
 PutObj($objct);
 
+foreach my $fontno (keys %fontlst)
+{
+    my $o=$fontlst{$fontno}->{FNT};
+    my $p=GetObj($fontlst{$fontno}->{OBJ});
+
+    if (exists($p->{LastChar}) and $p->{LastChar} > 255)
+    {
+	$p->{LastChar} = 255;
+	splice(@{$o->{GNO}},256);
+	splice(@{$o->{WID}},256);
+    }
+}
+
 foreach my $o (3..$objct)
 {
     PutObj($o) if (!exists($obj[$o]->{XREF}));
@@ -287,7 +347,8 @@
     printf("%010d 00000 n \n",$xr->{XREF});
 }
 
-print "trailer\n<<\n/Info $info\n/Root 1 0 R\n/Size $objct\n>>\nstartxref\n$fct\n\%\%EOF\n\% Pages=$pages->{Count}\n";
+print "trailer\n<<\n/Info $info\n/Root 1 0 R\n/Size $objct\n>>\nstartxref\n$fct\n\%\%EOF\n";
+print "\% Pages=$pages->{Count}\n" if $stats;
 
 
 sub MakeMatrix
@@ -431,6 +492,10 @@
     {
 	return($num*6);
     }
+    elsif ($unit eq 'z')
+    {
+	return($num/$unitwidth);
+    }
     else
     {
 	Msg(1,"Unknown scaling factor '$unit'");
@@ -488,7 +553,7 @@
 	return if -r "$fnm" and open($$f,"<$fnm");
     }
 
-    my (@dirs)=split(':',$dirs);
+    my (@dirs)=split($cfg{RT_SEP},$dirs);
 
     foreach my $dir (@dirs)
     {
@@ -683,6 +748,7 @@
 		    my $annot=$obj[$objct];
 		    $annot->{DATA}->{Type}='/Annot';
 		    FixRect($annot->{DATA}->{Rect}); # Y origin to ll
+		    FixPDFColour($annot->{DATA});
 		    push(@{$cpage->{Annots}},$annotno);
 		}
 		elsif ($pdfmark=~m/(.+) \/OUT/)
@@ -988,11 +1054,54 @@
 	    @mediabox=(0,0,$px,$py);
 	    my @mb=@mediabox;
 	    $matrixchg=1;
+	    $custompaper=1;
 	    $cpage->{MediaBox}=\@mb;
 	}
     }
 }
 
+sub FixPDFColour
+{
+    my $o=shift;
+    my $a=$o->{C};
+    my @r=();
+    my $c=$a->[0];
+
+    if ($#{$a}==3)
+    {
+	if ($c > 1)
+	{
+	    foreach my $j (0..2)
+	    {
+		push(@r,sprintf("%1.3f",$a->[$j]/0xffff));
+	    }
+
+	    $o->{C}=\@r;
+	}
+    }
+    elsif (substr($c,0,1) eq '#')
+    {
+	if (length($c) == 7)
+	{
+	    foreach my $j (0..2)
+	    {
+		push(@r,sprintf("%1.3f",hex(substr($c,$j*2+1,2))/0xff));
+	    }
+
+	    $o->{C}=\@r;
+	}
+	elsif (length($c) == 14)
+	{
+	    foreach my $j (0..2)
+	    {
+		push(@r,sprintf("%1.3f",hex(substr($c,$j*4+2,4))/0xffff));
+	    }
+
+	    $o->{C}=\@r;
+	}
+    }
+}
+
 sub PutHotSpot
 {
     my $endx=shift;
@@ -1005,6 +1114,7 @@
     my $annot=$obj[$objct];
     $annot->{DATA}->{Type}='/Annot';
     $annot->{DATA}->{Rect}=[$mark->{xpos},$mark->{ypos}-$mark->{rsb},$endx+$mark->{lead},$mark->{ypos}-$mark->{rst}];
+    FixPDFColour($annot->{DATA});
     FixRect($annot->{DATA}->{Rect}); # Y origin to ll
     push(@{$cpage->{Annots}},$annotno);
 }
@@ -1029,7 +1139,7 @@
 {
     my $val=shift;
 
-    $val=ToPoints($1,$2) if ($val=~m/(-?[\d.]+)([cipn])/);
+    $val=ToPoints($1,$2) if ($val=~m/(-?[\d.]+)([cipnz])/);
 
     return $val;
 }
@@ -1762,7 +1872,7 @@
     $obj[$ono]->{XREF}=$fct;
     if (exists($obj[$ono]->{STREAM}))
     {
-	if (!$debug)
+	if (!$debug && !exists($obj[$ono]->{DATA}->{'Filter'}))
 	{
 	    $obj[$ono]->{STREAM}=Compress::Zlib::compress($obj[$ono]->{STREAM});
 	    $obj[$ono]->{DATA}->{'Filter'}=['/FlateDecode'];
@@ -1899,7 +2009,7 @@
 	    }
 
 	    $r[0]='u0020' if $r[3] == 32;
-	    next if $r[3] >255;
+#	    next if $r[3] >255;
 	    $fnt{GNM}->{$r[0]}=$r[3];
 	    $fnt{GNO}->[$r[3]]='/'.$r[4];
 	    $fnt{WID}->[$r[3]]=$p[0];
@@ -2007,10 +2117,21 @@
 	$fontlst{$fontno}->{FNT}=\%fnt;
     }
 
-    PutObj($fno);
-    PutObj($fno+1);
-    PutObj($fno+2) if defined($obj[$fno+2]);
-    PutObj($fno+3) if defined($obj[$fno+3]);
+    if (defined($fnt{encoding}) and $fnt{encoding} eq 'text.enc' and $ucmap ne '')
+    {
+	if ($textenccmap eq '')
+	{
+	    $textenccmap = BuildObj($objct+1,{});
+	    $objct++;
+	    $obj[$objct]->{STREAM}=$ucmap;
+	}
+	$obj[$fno]->{DATA}->{'ToUnicode'}=$textenccmap;
+    }
+
+#     PutObj($fno);
+#     PutObj($fno+1);
+#     PutObj($fno+2) if defined($obj[$fno+2]);
+#     PutObj($fno+3) if defined($obj[$fno+3]);
 }
 
 sub GetType1
@@ -2164,6 +2285,7 @@
 
     if ($cpageno > 0)
     {
+	$cpage->{MediaBox}=\@mediabox if $custompaper;
 	PutObj($cpageno);
 	OutStream($cpageno+1);
     }
@@ -2189,7 +2311,7 @@
     $stream="q 1 0 0 1 0 0 cm\n";
     $mode='g';
     $curfill='';
-    @mediabox=@defaultmb;
+#    @mediabox=@defaultmb;
 }
 
 sub do_f
@@ -2248,6 +2370,7 @@
 	    $whtsz=$fontlst{$cft}->{FNT}->{spacewidth}*$cftsz;
 	    $stream.="/F$cft $cftsz Tf\n";
 	}
+	$stream.="$curkern Tc\n";
     }
 
     if ($poschg or $matrixchg)
@@ -2256,6 +2379,7 @@
 	$stream.="$matrix ".PutXY($xpos,$ypos)." Tm\n", $poschg=0;
 	$tmxpos=$xpos;
 	$matrixchg=0;
+	$stream.="$curkern Tc\n";
     }
 
     if ($fontchg)
@@ -2768,8 +2892,16 @@
     # 				$wt+=$whtsz/$cftsz;
     # 			}
 
-		$stream.=sprintf( "%.3f Tw ",-($whtsz+$wt*$cftsz)/$unitwidth );
+		$stream.=sprintf( "%.3f Tw ",-($whtsz+$wt*$cftsz)/$unitwidth-$curkern );
+		if (!defined($lin[0]->[0]) and defined($lin[0]->[1]))
+		{
+		    $stream.="[ $lin[0]->[1] (";
+		    shift @lin;
+		}
+		else
+		{
 		$stream.="[(";
+		}
 
 		foreach my $wd (@lin)
 		{
@@ -2787,6 +2919,7 @@
 		    }
 		    else
 		    {
+			$wwt=sprintf("%.3f",$wwt);
 			$stream.="$wd->[0]) $wwt (" if defined($wd->[0]);
 		    }
 		}
@@ -2936,11 +3069,13 @@
 	PutLine(0) if $#lin > -1;
 	MakeMatrix(1);
 	$stream.="$matrix ".PutXY($xpos,$ypos)." Tm\n", $poschg=0;
+	$stream.="$curkern Tc\n";
 	$stream.="0 Tw ";
 	$stream.="($par) Tj\n";
 	MakeMatrix();
 	$stream.="$matrix ".PutXY($xpos,$ypos)." Tm\n", $poschg=0;
 	$matrixchg=0;
+	$stream.="$curkern Tc\n";
 	return;
     }
 
@@ -3021,11 +3156,14 @@
 sub FindChar
 {
     my $chnm=shift;
+    my $fnt=$fontlst{$cft}->{FNT};
 
-    if (exists($fontlst{$cft}->{FNT}->{GNM}->{$chnm}))
+    if (exists($fnt->{GNM}->{$chnm}))
     {
-	my $ch=$fontlst{$cft}->{FNT}->{GNM}->{$chnm};
-	return(chr($ch),$fontlst{$cft}->{FNT}->{WID}->[$ch]*$cftsz);
+	my $ch=$fnt->{GNM}->{$chnm};
+	$ch=RemapChr($ch,$fnt,$chnm) if ($ch > 255);
+
+	return(chr($ch),$fnt->{WID}->[$ch]*$cftsz);
     }
     else
     {
@@ -3033,6 +3171,33 @@
     }
 }
 
+sub RemapChr
+{
+    my $ch=shift;
+    my $fnt=shift;
+    my $chnm=shift;
+    my $unused=0;
+
+    foreach my $un (2..$#{$fnt->{GNO}})
+    {
+	$unused=$un,last if $fnt->{GNO}->[$un] eq '/.notdef';
+    }
+
+    if (--$unused <= 255)
+    {
+	$fnt->{GNM}->{$chnm}=$unused++;
+	$fnt->{GNO}->[$unused]=$fnt->{GNO}->[$ch+1];
+	$fnt->{WID}->[$unused]=$fnt->{WID}->[$ch+1];
+	$ch=$unused-1;
+	return($ch);
+    }
+    else
+    {
+	Msg(0,"Too many glyphs used in font '$cft'");
+	return(32);
+    }
+}
+
 sub do_c
 {
     my $par=shift;
@@ -3040,7 +3205,7 @@
     push(@ahead,substr($par,1));
     $par=substr($par,0,1);
     my $ch=ord($par);
-    do_t($ch);
+    do_N($ch);
     $nomove=$fontlst{$cft}->{FNT}->{WID}->[$ch]*$cftsz;
 }
 
@@ -3048,6 +3213,19 @@
 {
     my $par=shift;
 
+    if ($par > 255)
+    {
+	my $fnt=$fontlst{$cft}->{FNT};
+	my $chnm='';
+
+	foreach my $c (keys %{$fnt->{GNM}})
+	{
+	    $chnm=$c,last if $fnt->{GNM}->{$c} == $par;
+	}
+
+	$par=RemapChr($par,$fnt,$chnm);
+    }
+
     do_t(chr($par));
     $nomove=$fontlst{$cft}->{FNT}->{WID}->[$par]*$cftsz;
 }

Index: tmac/pdf.tmac
===================================================================
RCS file: /cvsroot/groff/groff/tmac/pdf.tmac,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- tmac/pdf.tmac	15 Feb 2012 13:26:46 -0000	1.3
+++ tmac/pdf.tmac	20 May 2012 13:58:10 -0000	1.4
@@ -144,7 +144,7 @@
 .\" the page width to the viewing window, with the bookmarked entry
 .\" located at the top of the viewable area.
 .\"
-.ds PDFBOOKMARK.VIEW /FitH -\\n[PDFPAGE.Y] u
+.ds PDFBOOKMARK.VIEW /FitH \\n[PDFPAGE.Y] u
 .\"
 .\" "PDFOUTLINE.FOLDLEVEL" controls how the document outline will be
 .\" displayed.  It is a number, defining the maximum heading level
@@ -189,7 +189,7 @@
 .   \"
 .      nr pdf:bm.lev 0+\\$1
 .      if \\n[pdf:bm.lev]==0 .nr pdf:bm.lev 1
-.      if \\n[pdf:bm.lev]>\\n[PDFOUTLINE.FOLDLEVEL] .nr pdf:bm.lev \\n[pdf:bm.lev]*-1
+.      if \\n[pdf:bm.lev]-1==\\n[PDFOUTLINE.FOLDLEVEL] .nr pdf:bm.lev \\n[pdf:bm.lev]*-1
 .      nr pdf:bm.abslev 0+\\n[pdf:bm.lev]
 .      if \\n[pdf:bm.lev]<0 .nr pdf:bm.abslev 0+\\n[pdf:bm.abslev]*-1
 .      if \\n[pdf:bm.abslev]>\\n[pdf:bm.nl] .nr pdf:bm.nl \\n[pdf:bm.nl]+1
@@ -213,18 +213,24 @@
 .      pdf:href.sety
 .         ds pdf:cleaned \\$*
 .         ev pdfcln
+.         tr \[em]-
 .         nf
 .         box pdf:clean
 .         nop \\$*
-.         sp -1
+.         fl
 .         box
+.         chop pdf:clean
 .         asciify pdf:clean
+.         length pdf:clean:len \\*[pdf:clean]
 .         ds pdf:cleaned \\*[pdf:clean]
+.         rm pdf:clean
 .         ev
+.         tr \[em]\[em]
 .      ds pdf:look(\\*[PDFBOOKMARK.NAME]) \\*[pdf:cleaned]
 .      if dPDF.EXPORT .tm .ds pdf:look(\\*[PDFBOOKMARK.NAME]) \\*[pdf:cleaned]
 .      pdfmark /Dest /\\*[PDFBOOKMARK.NAME] /View [\\*[PDFBOOKMARK.VIEW]] /DEST
-.      pdfmark /Dest /\\*[PDFBOOKMARK.NAME] /Title (\\*[pdf:cleaned]) /Level \\n[pdf:bm.lev] /OUT
+.      nop \!x X ps:exec [/Dest /\\*[PDFBOOKMARK.NAME] /Title (\\*[pdf:cleaned]) /Level \\n[pdf:bm.lev] /OUT pdfmark
+.\".      pdfmark /Dest /\\*[PDFBOOKMARK.NAME] /Title "(\\*[pdf:cleaned])" /Level \\n[pdf:bm.lev] /OUT
 .      pdf:href.options.clear
 .      rr PDFPAGE.Y
 .      rm pdf:cleaned
@@ -240,6 +246,25 @@
 .   nop \!.pdfbookmark \\$@
 .   \}
 ..
+.
+.de pdfclean
+.  ie '\\n(.z'' \{\
+.         ds pdfcleaned \\$*
+.         ev pdfcln
+.         tr \[em]-
+.         nf
+.         box pdf:clean
+.         nop \\*[\\*[pdfcleaned]]
+.         fl
+.         box
+.         chop pdf:clean
+.         asciify pdf:clean
+.         ev
+.         ds \\*[pdfcleaned] "\\*[pdf:clean]
+.         rm pdf:clean
+.         tr \[em]\[em]
+.  el .nop \!.pdfclean \\$@
+..
 .\"
 .\" =============================================================
 .\" Module PDFHREF: Create Hypertext References in a PDF Document
@@ -248,7 +273,7 @@
 .\" "PDFHREF.VIEW" controls how the document will be displayed,
 .\" when the user follows a link to a named reference.
 .\"
-.ds PDFHREF.VIEW     /FitH -\\n[PDFPAGE.Y] u
+.ds PDFHREF.VIEW     /FitH \\n[PDFPAGE.Y] u
 .\"
 .\" This default setting will fit the page width to the viewing
 .\" window, with the bookmarked entry located close to the top
@@ -278,7 +303,7 @@
 .\" in groff's basic units; don't forget to append grops' "u"
 .\" conversion operator, when writing the pdfmark!
 .\"
-.nr PDFPAGE.Y \\n(nl-\\n[PDFHREF.VIEW.LEADING]
+.nr PDFPAGE.Y (\\n[PDFHREF.VIEW.LEADING]-\\n(nl)
 ..
 .\" When we create a link "hot-spot" ...
 .\" "PDFHREF.LEADING" sets the distance above the top of the glyph
@@ -647,7 +672,7 @@
 .   \" limits of its bounding box(es), as the before and after output
 .   \" text positions.
 .   \"
-.   if dPDFHREF.COLOUR .defcolor pdf:href.colour rgb \\*[PDFHREF.COLOUR]
+\#.   if dPDFHREF.COLOUR .defcolor pdf:href.colour rgb \\*[PDFHREF.COLOUR]
 .   nr pdf:bm.width \\w'\\*[PDFHREF.DESC]'
 .   nop \&\m[\\*[PDFHREF.TEXT.COLOUR]]\X'pdf: markstart \\n[rst] \\n[rsb] \\n[PDFHREF.LEADING] \\*[pdf:href.link]'\\*[PDFHREF.DESC]\X'pdf: markend'\m[]\c
 .   \"
@@ -735,5 +760,11 @@
 .de pdfmarkrestart
 .nop \!x X pdf: markrestart
 ..
+.de pdfpagename
+.nop \!x X pdf: pagename \\$1
+..
+.de pdfswitchtopage
+.nop \!x X pdf: switchtopage \\$*
+..
 .\"
 .\" pdf.tmac: end of file / vim: ft=groff


From MAILER-DAEMON Thu May 24 02:36:31 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SXRex-0001RG-6Q
	for mharc-groff-commit@gnu.org; Thu, 24 May 2012 02:36:31 -0400
Received: from eggs.gnu.org ([208.118.235.92]:60877)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <wl@gnu.org>)
	id 1SXReo-0001ON-T9
	for groff-commit@gnu.org; Thu, 24 May 2012 02:36:29 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <wl@gnu.org>) id 1SXRej-0008II-9j
	for groff-commit@gnu.org; Thu, 24 May 2012 02:36:22 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:56266)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <wl@gnu.org>)
	id 1SXRej-0008HH-69
	for groff-commit@gnu.org; Thu, 24 May 2012 02:36:17 -0400
Received: from wl by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <wl@gnu.org>) id 1SXRei-0005qT-0w
	for groff-commit@gnu.org; Thu, 24 May 2012 06:36:16 +0000
Date: Thu, 24 May 2012 06:36:16 +0000
Message-Id: <E1SXRei-0005qT-0w@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
From: Werner LEMBERG <wl@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
Subject: [Groff-commit] groff ChangeLog tmac/Makefile.sub tmac/fallback...
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
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, 24 May 2012 06:36:29 -0000

CVSROOT:	/cvsroot/groff
Module name:	groff
Changes by:	Werner LEMBERG <wl>	12/05/24 06:36:15

Modified files:
	.              : ChangeLog 
	tmac           : Makefile.sub 
Added files:
	tmac           : fallbacks.tmac 

Log message:
	Add some generic fallback characters.
	
	* tmac/fallbacks.tmac: New file.
	* tmac/troffrc: Include it.
	* tmac/Makefile.sub (NORMALFILES): Include it.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1333&r2=1.1334
http://cvs.savannah.gnu.org/viewcvs/groff/tmac/Makefile.sub?cvsroot=groff&r1=1.51&r2=1.52
http://cvs.savannah.gnu.org/viewcvs/groff/tmac/fallbacks.tmac?cvsroot=groff&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1333
retrieving revision 1.1334
diff -u -b -r1.1333 -r1.1334
--- ChangeLog	20 May 2012 13:58:09 -0000	1.1333
+++ ChangeLog	24 May 2012 06:36:15 -0000	1.1334
@@ -1,3 +1,11 @@
+2012-05-24  Ivan Shmakov  <oneingray@gmail.com>
+
+	Add some generic fallback characters.
+
+	* tmac/fallbacks.tmac: New file.
+	* tmac/troffrc: Include it.
+	* tmac/Makefile.sub (NORMALFILES): Include it.
+
 2012-05-20  Deri James  <deri@chuzzlewit.demon.co.uk>
 
 	* doc/groff.texinfo: Add extra info about `.asciify'.

Index: tmac/Makefile.sub
===================================================================
RCS file: /cvsroot/groff/groff/tmac/Makefile.sub,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -b -r1.51 -r1.52
--- tmac/Makefile.sub	26 Jul 2011 17:11:12 -0000	1.51
+++ tmac/Makefile.sub	24 May 2012 06:36:15 -0000	1.52
@@ -1,4 +1,4 @@
-# Copyright (C) 1989-2007, 2009-2011
+# Copyright (C) 1989-2007, 2009-2012
 #   Free Software Foundation, Inc.
 #      Written by James Clark (jjc@jclark.com)
 # 
@@ -48,7 +48,7 @@
   html.tmac html-end.tmac \
   devtag.tmac \
   europs.tmac \
-  composite.tmac \
+  composite.tmac fallbacks.tmac \
   eqnrc \
   refer.tmac refer-me.tmac refer-ms.tmac \
   troffrc troffrc-end \

Index: tmac/fallbacks.tmac
===================================================================
RCS file: tmac/fallbacks.tmac
diff -N tmac/fallbacks.tmac
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tmac/fallbacks.tmac	24 May 2012 06:36:15 -0000	1.1
@@ -0,0 +1,61 @@
+.\" fallbacks.tmac
+.\"
+.\" This file contains generic fallback characters.
+.
+.
+.\" fall back to GREEK CAPITAL LETTER DELTA for INCREMENT
+.fchar \[u2206] \[u0394]
+.
+.
+.\" NB: as per http://unicode.org/Public/UNIDATA/NamesList.txt
+.\"
+.\" #!/usr/bin/perl
+.\" ## Ivan Shmakov, 2012.
+.\" ## This code is in the public-domain.
+.\" my $u;
+.\" while (<>) {
+.\"   $u = oct ("0x" . $1)
+.\"       if (/^([[:xdigit:]]{4})/);
+.\"   next unless (defined ($u) && $u >= 0x2160 && $u <= 0x217F);
+.\"   if (/^\s+#\s+([[:xdigit:][:blank:]]+)(\s.*)?$/) {
+.\"     ## NB: may make sense to map to \[uXXXX]'s instead
+.\"     printf (".fchar \\[u%04x] %s\n", $u,
+.\"             pack ("U*", map { oct ("0x" . $_); } split (/ /, $1)));
+.\"     $u = undef;
+.\"   }
+.\" }
+.
+.fchar \[u2160] I
+.fchar \[u2161] II
+.fchar \[u2162] III
+.fchar \[u2163] IV
+.fchar \[u2164] V
+.fchar \[u2165] VI
+.fchar \[u2166] VII
+.fchar \[u2167] VIII
+.fchar \[u2168] IX
+.fchar \[u2169] X
+.fchar \[u216a] XI
+.fchar \[u216b] XII
+.fchar \[u216c] L
+.fchar \[u216d] C
+.fchar \[u216e] D
+.fchar \[u216f] M
+.fchar \[u2170] i
+.fchar \[u2171] ii
+.fchar \[u2172] iii
+.fchar \[u2173] iv
+.fchar \[u2174] v
+.fchar \[u2175] vi
+.fchar \[u2176] vii
+.fchar \[u2177] viii
+.fchar \[u2178] ix
+.fchar \[u2179] x
+.fchar \[u217a] xi
+.fchar \[u217b] xii
+.fchar \[u217c] l
+.fchar \[u217d] c
+.fchar \[u217e] d
+.fchar \[u217f] m
+.
+.\" EOF


From MAILER-DAEMON Thu May 24 02:41:35 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SXRjr-00025Z-R3
	for mharc-groff-commit@gnu.org; Thu, 24 May 2012 02:41:35 -0400
Received: from eggs.gnu.org ([208.118.235.92]:58660)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <wl@gnu.org>)
	id 1SXRjm-00023U-GR
	for groff-commit@gnu.org; Thu, 24 May 2012 02:41:34 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <wl@gnu.org>) id 1SXRjk-0001pw-83
	for groff-commit@gnu.org; Thu, 24 May 2012 02:41:30 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:33326)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <wl@gnu.org>)
	id 1SXRjj-0001pa-Vs
	for groff-commit@gnu.org; Thu, 24 May 2012 02:41:28 -0400
Received: from wl by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <wl@gnu.org>) id 1SXRjj-0006CD-Gz
	for groff-commit@gnu.org; Thu, 24 May 2012 06:41:27 +0000
Date: Thu, 24 May 2012 06:41:27 +0000
Message-Id: <E1SXRjj-0006CD-Gz@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
From: Werner LEMBERG <wl@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
Subject: [Groff-commit] groff/src/roff/grog grog.man
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
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, 24 May 2012 06:41:34 -0000

CVSROOT:	/cvsroot/groff
Module name:	groff
Changes by:	Werner LEMBERG <wl>	12/05/24 06:41:27

Modified files:
	src/roff/grog  : grog.man 

Log message:
	Typo, found by Denis M. Wilson <dmw@oxytropis.plus.com>.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/src/roff/grog/grog.man?cvsroot=groff&r1=1.19&r2=1.20

Patches:
Index: grog.man
===================================================================
RCS file: /cvsroot/groff/groff/src/roff/grog/grog.man,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- grog.man	22 Jan 2011 15:18:57 -0000	1.19
+++ grog.man	24 May 2012 06:41:26 -0000	1.20
@@ -13,7 +13,7 @@
 Last Update: 22 Jan 2011
 ..
 .de co
-Copyright (C) 1989-2003, 2006, 2007, 2009-2011
+Copyright (C) 1989-2003, 2006, 2007, 2009-2012
 Free Software Foundation, Inc.
 .
 Written by James Clark.
@@ -290,7 +290,7 @@
 grog.sh
 .ft R
 is a shell script using
-BR awk (1).
+.BR awk (1).
 During the run of
 .BR make (1),
 it is determined whether the system contains a suitable version of


From MAILER-DAEMON Thu May 24 07:35:57 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SXWKj-0002Xi-Oi
	for mharc-groff-commit@gnu.org; Thu, 24 May 2012 07:35:57 -0400
Received: from eggs.gnu.org ([208.118.235.92]:37654)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <wl@gnu.org>)
	id 1SXWKd-0002XG-3A
	for groff-commit@gnu.org; Thu, 24 May 2012 07:35:56 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <wl@gnu.org>) id 1SXWKX-0001KN-Uq
	for groff-commit@gnu.org; Thu, 24 May 2012 07:35:50 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:54578)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <wl@gnu.org>)
	id 1SXWKX-0001Ju-Ip
	for groff-commit@gnu.org; Thu, 24 May 2012 07:35:45 -0400
Received: from wl by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <wl@gnu.org>) id 1SXWKV-0005Wy-IX
	for groff-commit@gnu.org; Thu, 24 May 2012 11:35:43 +0000
Date: Thu, 24 May 2012 11:35:43 +0000
Message-Id: <E1SXWKV-0005Wy-IX@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
From: Werner LEMBERG <wl@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
Subject: [Groff-commit] groff ChangeLog src/roff/grog/grog.sh
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
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, 24 May 2012 11:35:57 -0000

CVSROOT:	/cvsroot/groff
Module name:	groff
Changes by:	Werner LEMBERG <wl>	12/05/24 11:35:43

Modified files:
	.              : ChangeLog 
	src/roff/grog  : grog.sh 

Log message:
	* src/roff/grog/grog.sh: Fix .so handling.
	
	See
	
	  http://lists.gnu.org/archive/html/bug-groff/2012-05/msg00000.html
	
	for the report and the bug fix.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1334&r2=1.1335
http://cvs.savannah.gnu.org/viewcvs/groff/src/roff/grog/grog.sh?cvsroot=groff&r1=1.19&r2=1.20

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1334
retrieving revision 1.1335
diff -u -b -r1.1334 -r1.1335
--- ChangeLog	24 May 2012 06:36:15 -0000	1.1334
+++ ChangeLog	24 May 2012 11:35:43 -0000	1.1335
@@ -1,3 +1,13 @@
+2012-05-24  Denis M. Wilson  <dmw@oxytropis.plus.com>
+
+	* src/roff/grog/grog.sh: Fix .so handling.
+
+	See
+
+	  http://lists.gnu.org/archive/html/bug-groff/2012-05/msg00000.html
+
+	for the report and the bug fix.
+
 2012-05-24  Ivan Shmakov  <oneingray@gmail.com>
 
 	Add some generic fallback characters.

Index: src/roff/grog/grog.sh
===================================================================
RCS file: /cvsroot/groff/groff/src/roff/grog/grog.sh,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- src/roff/grog/grog.sh	22 Jan 2011 15:18:57 -0000	1.19
+++ src/roff/grog/grog.sh	24 May 2012 11:35:43 -0000	1.20
@@ -5,7 +5,7 @@
 # Source file position: <groff-source>/src/roff/grog/grog.sh
 # Installed position: <prefix>/bin/grog
 
-# Copyright (C) 1993, 2006, 2009, 2011 Free Software Foundation, Inc.
+# Copyright (C) 1993, 2006, 2009, 2011-2012 Free Software Foundation, Inc.
 # Written by James Clark, maintained by Werner Lemberg.
 # Rewritten by and put under GPL Bernd Warken.
 
@@ -159,7 +159,8 @@
 | @EGREP@ \
     '^\.(cstart|P|PS|[PLI]P|[pnil]p|sh|Dd|Tp|Dp|De|Cx|Cl|Oo|.* Oo|Oc|.* Oc|NH|TL|TS|TE|EQ|TH|TL|NH|SH|\[|\]|R1|GS|G1|PH|SA|SO_START|SO_END)' \
 | awk '
-/^\.SO_START$/ { so = 1 }
+/^\.SO_START$/ { so = 1
+  soelim = soelim||chem||eqn||grap||grn||pic||tbl||refer||(refer_start && !refer_end) }
 /^\.SO_END$/ { so = 0 }
 /^\.cstart$/ { chem++; if (so > 0) soelim++ }
 /^\.TS/ { tbl++; in_tbl = 1; if (so > 0) soelim++; }


From MAILER-DAEMON Thu May 24 07:38:27 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SXWN9-0002kK-72
	for mharc-groff-commit@gnu.org; Thu, 24 May 2012 07:38:27 -0400
Received: from eggs.gnu.org ([208.118.235.92]:38112)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <wl@gnu.org>)
	id 1SXWN3-0002jt-Mw
	for groff-commit@gnu.org; Thu, 24 May 2012 07:38:26 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <wl@gnu.org>) id 1SXWMx-0002AM-4c
	for groff-commit@gnu.org; Thu, 24 May 2012 07:38:21 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:51642)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <wl@gnu.org>)
	id 1SXWMx-0002AG-1D
	for groff-commit@gnu.org; Thu, 24 May 2012 07:38:15 -0400
Received: from wl by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <wl@gnu.org>) id 1SXWMw-0005iW-KI
	for groff-commit@gnu.org; Thu, 24 May 2012 11:38:14 +0000
Date: Thu, 24 May 2012 11:38:14 +0000
Message-Id: <E1SXWMw-0005iW-KI@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
From: Werner LEMBERG <wl@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
Subject: [Groff-commit] groff ChangeLog src/roff/grog/grog.pl
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
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, 24 May 2012 11:38:26 -0000

CVSROOT:	/cvsroot/groff
Module name:	groff
Changes by:	Werner LEMBERG <wl>	12/05/24 11:38:14

Modified files:
	.              : ChangeLog 
	src/roff/grog  : grog.pl 

Log message:
	* src/roff/grog/grog.pl (process): Fix .so handling.
	
	This does the same as the previous commit.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/ChangeLog?cvsroot=groff&r1=1.1335&r2=1.1336
http://cvs.savannah.gnu.org/viewcvs/groff/src/roff/grog/grog.pl?cvsroot=groff&r1=1.21&r2=1.22

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/groff/groff/ChangeLog,v
retrieving revision 1.1335
retrieving revision 1.1336
diff -u -b -r1.1335 -r1.1336
--- ChangeLog	24 May 2012 11:35:43 -0000	1.1335
+++ ChangeLog	24 May 2012 11:38:14 -0000	1.1336
@@ -1,3 +1,9 @@
+2012-05-24  Werner LEMBERG  <wl@gnu.org>
+
+	* src/roff/grog/grog.pl (process): Fix .so handling.
+
+	This does the same as the previous commit.
+
 2012-05-24  Denis M. Wilson  <dmw@oxytropis.plus.com>
 
 	* src/roff/grog/grog.sh: Fix .so handling.

Index: src/roff/grog/grog.pl
===================================================================
RCS file: /cvsroot/groff/groff/src/roff/grog/grog.pl,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- src/roff/grog/grog.pl	22 Jan 2011 15:18:57 -0000	1.21
+++ src/roff/grog/grog.pl	24 May 2012 11:38:14 -0000	1.22
@@ -131,25 +131,25 @@
       $Groff{'soelim'}++ if $level;
     } elsif (/^\.TS$Sp/) {
       $_ = <FILE>;
-      if (!/^\./) {
+      if (!/^\./ || /^\.so/) {
 	$Groff{'tbl'}++;
 	$Groff{'soelim'}++ if $level;
       }
     } elsif (/^\.EQ$Sp/) {
       $_ = <FILE>;
-      if (!/^\./ || /^\.[0-9]/) {
+      if (!/^\./ || /^\.[0-9]/ || /^\.so/) {
 	$Groff{'eqn'}++;
 	$Groff{'soelim'}++ if $level;
       }
     } elsif (/^\.GS$Sp/) {
       $_ = <FILE>;
-      if (!/^\./) {
+      if (!/^\./ || /^\.so/) {
 	$Groff{'grn'}++;
 	$Groff{'soelim'}++ if $level;
       }
     } elsif (/^\.G1$Sp/) {
       $_ = <FILE>;
-      if (!/^\./) {
+      if (!/^\./ || /^\.so/) {
 	$Groff{'grap'}++;
 	$Groff{'soelim'}++ if $level;
       }
@@ -160,7 +160,7 @@
 #	&process($1, $level);
 #      } else {
 #	$_ = <FILE>;
-#	if (!/^\./ || /^\.ps/) {
+#	if (!/^\./ || /^\.ps/ || /^\.so/) {
 #	  $Groff{'pic'}++;
 #	  $Groff{'soelim'}++ if $level;
 #	}
@@ -243,6 +243,22 @@
       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 "";
     }
   }


From MAILER-DAEMON Thu May 24 07:41:58 2012
Received: from list by lists.gnu.org with archive (Exim 4.71)
	id 1SXWQY-00032I-U1
	for mharc-groff-commit@gnu.org; Thu, 24 May 2012 07:41:58 -0400
Received: from eggs.gnu.org ([208.118.235.92]:36343)
	by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <wl@gnu.org>)
	id 1SXWQR-000324-W6
	for groff-commit@gnu.org; Thu, 24 May 2012 07:41:57 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <wl@gnu.org>) id 1SXWQP-0003Cb-TV
	for groff-commit@gnu.org; Thu, 24 May 2012 07:41:51 -0400
Received: from vcs.savannah.gnu.org ([140.186.70.72]:50861)
	by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <wl@gnu.org>)
	id 1SXWQP-0003CV-QI
	for groff-commit@gnu.org; Thu, 24 May 2012 07:41:49 -0400
Received: from wl by vcs.savannah.gnu.org with local (Exim 4.72)
	(envelope-from <wl@gnu.org>) id 1SXWQP-0005vm-5P
	for groff-commit@gnu.org; Thu, 24 May 2012 11:41:49 +0000
Date: Thu, 24 May 2012 11:41:49 +0000
Message-Id: <E1SXWQP-0005vm-5P@vcs.savannah.gnu.org>
To: groff-commit@gnu.org
From: Werner LEMBERG <wl@gnu.org>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2)
X-Received-From: 140.186.70.72
Subject: [Groff-commit] groff/src/roff/grog grog.pl
X-BeenThere: groff-commit@gnu.org
X-Mailman-Version: 2.1.14
Precedence: list
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, 24 May 2012 11:41:57 -0000

CVSROOT:	/cvsroot/groff
Module name:	groff
Changes by:	Werner LEMBERG <wl>	12/05/24 11:41:49

Modified files:
	src/roff/grog  : grog.pl 

Log message:
	Copyright update.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/groff/src/roff/grog/grog.pl?cvsroot=groff&r1=1.22&r2=1.23

Patches:
Index: grog.pl
===================================================================
RCS file: /cvsroot/groff/groff/src/roff/grog/grog.pl,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- grog.pl	24 May 2012 11:38:14 -0000	1.22
+++ grog.pl	24 May 2012 11:41:49 -0000	1.23
@@ -6,7 +6,7 @@
 # Source file position: <groff-source>/src/roff/grog/grog.pl
 # Installed position: <prefix>/bin/grog
 
-# Copyright (C) 1993, 2006, 2009, 2011 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.
 
@@ -26,7 +26,7 @@
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
 
 ########################################################################
-my $Last_Update = '22 Jan 2011';
+my $Last_Update = '24 May 2012';
 ########################################################################
 
 require v5.6;


