[groff] 07/08: gropdf(1): Clarify.

2024-01-07 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit c578f11b111280429f43843048aae43e41914eb7
Author: G. Branden Robinson 
AuthorDate: Sun Jan 7 19:27:17 2024 -0600

gropdf(1): Clarify.

* Fix unfinished list of common pagination schemes.  Motivate the
  letter-prefix scheme.
* Clarify where the 'pagenumbering' device control command needs to be
  placed relative to a *roff page break.

Exhibit:

$ groff -ms -Tpdf 

[groff] 01/08: src/devices/gropdf/gropdf.pl: Bump copyright year.

2024-01-07 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit a26e39a369339797e9c9b13f32bfc0c29834b8e6
Author: G. Branden Robinson 
AuthorDate: Sun Jan 7 19:47:15 2024 -0600

src/devices/gropdf/gropdf.pl: Bump copyright year.

Commit 7c03588162 (earlier today) was certainly substantive.
---
 src/devices/gropdf/gropdf.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 79dde070a..38dea5ba4 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -2,7 +2,7 @@
 #
 #   gropdf  : PDF post processor for groff
 #
-# Copyright (C) 2011-2023 Free Software Foundation, Inc.
+# Copyright (C) 2011-2024 Free Software Foundation, Inc.
 #  Written by Deri James 
 #
 # This file is part of groff.

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 06/08: font/devpdf/Foundry.in: More Savannah #65115 fix.

2024-01-07 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit 9391a49dd615f47371ae5ebda5d85b762e226ed4
Author: G. Branden Robinson 
AuthorDate: Sat Jan 6 00:46:14 2024 -0600

font/devpdf/Foundry.in: More Savannah #65115 fix.

* font/devpdf/Foundry.in: More BMI, BMR mapping swap; swap the file name
  pairs "URWBookmanL-LighItal" and "URWBookmanL-Ligh"; and
  "b018032l.pfb" and "018012l.pfb" as well.

Continues commit 24691995e9, 4 January.
---
 ChangeLog  | 6 ++
 font/devpdf/Foundry.in | 4 ++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3a4d7ddd9..bb6d559fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-01-05  G. Branden Robinson 
+
+   * font/devpdf/Foundry.in: More BMI, BMR mapping swap; swap the
+   file name pairs "URWBookmanL-LighItal" and "URWBookmanL-Ligh";
+   and "b018032l.pfb" and "018012l.pfb" as well.
+
 2024-01-07  Deri James  
 
* src/devices/gropdf/gropdf.pl: Comment out line causing
diff --git a/font/devpdf/Foundry.in b/font/devpdf/Foundry.in
index e17ec8757..0db650f86 100644
--- a/font/devpdf/Foundry.in
+++ b/font/devpdf/Foundry.in
@@ -88,8 +88,8 @@ 
AI|N|i|text.map|text.enc|URWGothic-BookOblique.t1!URWGothic-BookOblique!URWGothi
 
AR|N|r|text.map|text.enc|URWGothic-Book.t1!URWGothic-Book!URWGothicL-Book!a010013l.pfb
 
BMB|N|r|text.map|text.enc|URWBookman-Demi.t1!URWBookman-Demi!URWBookmanL-DemiBold!b018015l.pfb
 
BMBI|N|i|text.map|text.enc|URWBookman-DemiItalic.t1!URWBookman-DemiItalic!URWBookmanL-DemiBoldItal!b018035l.pfb
-BMI|N|r|text.map|text.enc|URWBookman-LightItalic.t1!URWBookman-LightItalic!URWBookmanL-Ligh!b018012l.pfb
-BMR|N|i|text.map|text.enc|URWBookman-Light.t1!URWBookman-Light!URWBookmanL-LighItal!b018032l.pfb
+BMI|N|r|text.map|text.enc|URWBookman-LightItalic.t1!URWBookman-LightItalic!URWBookmanL-LighItal!b018032l.pfb
+BMR|N|i|text.map|text.enc|URWBookman-Light.t1!URWBookman-Light!URWBookmanL-Ligh!b018012l.pfb
 
CB|N|nr|text.map|text.enc|NimbusMonoPS-Bold.t1!NimbusMonoPS-Bold!NimbusMonL-Bold!n022004l.pfb
 
CBI|N|ni|text.map|text.enc|NimbusMonoPS-BoldItalic.t1!NimbusMonoPS-BoldItalic!NimbusMonL-BoldObli!n022024l.pfb
 
CI|N|ni|text.map|text.enc|NimbusMonoPS-Italic.t1!NimbusMonoPS-Italic!NimbusMonL-ReguObli!n022023l.pfb

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 08/08: groff(1): Fix style nit.

2024-01-07 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit 05f58038b15771193f448ad85441096f55573f17
Author: G. Branden Robinson 
AuthorDate: Sun Jan 7 20:00:19 2024 -0600

groff(1): Fix style nit.

When setting long- and short-form command-line options as paragraph
tags, list the former first since it can overrun the tag width without
increasing the page length (the line breaks anyway for the subsequent
tag).  Prompted by discussion with Alex Colomar.

This is the only man page groff ships needing such revision, since (1)
we generally don't use long options except for `--help` and `--version`;
and (2) we usually dispose of those and any short option synonyms they
have in prose rather than in a tagged paragraph list.  But groff(1)'s
special handling of `--version` commands further discussion.
---
 src/roff/groff/groff.1.man | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/roff/groff/groff.1.man b/src/roff/groff/groff.1.man
index 5015f972e..3544739a6 100644
--- a/src/roff/groff/groff.1.man
+++ b/src/roff/groff/groff.1.man
@@ -481,9 +481,9 @@ and
 .
 .
 .TP
-.B \-v
-.TQ
 .B \%\-\-version
+.TQ
+.B \-v
 Write version information for
 .I groff
 and all programs run by it to the standard output stream;

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 05/08: src/devices/gropdf/gropdf.pl: Fix whitespace nit.

2024-01-07 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit 3bf9b3078573274b1ab50f3aedbbf69c413381ba
Author: G. Branden Robinson 
AuthorDate: Sun Jan 7 19:05:07 2024 -0600

src/devices/gropdf/gropdf.pl: Fix whitespace nit.

Avoid placing spaces to the left of tabs, to avoid merge grief later.
---
 src/devices/gropdf/gropdf.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 38dea5ba4..870eca5e8 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -1802,7 +1802,7 @@ sub do_x
else
{

($curoutlev,$curoutlevno,$thislev)=(@{$outlines[$pginsert]});
-#  $curoutlevno--;
+#  $curoutlevno--;
}
}
}

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 04/08: ChangeLog: Add entries for Deri's recent changes.

2024-01-07 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit ae6ad02fe56bbb546710143574a877f24f1b5290
Author: G. Branden Robinson 
AuthorDate: Sun Jan 7 19:16:23 2024 -0600

ChangeLog: Add entries for Deri's recent changes.
---
 ChangeLog | 34 ++
 1 file changed, 34 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 360a8eb4e..3a4d7ddd9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,37 @@
+2024-01-07  Deri James  
+
+   * src/devices/gropdf/gropdf.pl: Comment out line causing
+   incorrect table of contents relocation.
+
+   Thanks to Peter Schaffter for the report.
+
+2024-01-07  Deri James  
+
+   [gropdf]: Fix inclusion of PDF v1.7 files.
+
+   PDF 1.5 introduced the object type ObjStm, which can contain a
+   bunch of objects in its own compressed stream, but there is a
+   restriction that an object with its own stream cannot be
+   included into the ObjStm (i.e., no streams within streams).
+   Gropdf has supported this for some years, but it has come to
+   light that some PDFs have a "skeleton" object that contains the
+   stream, while the rest of the object is held in an ObjStm.
+
+   * src/devices/gropdf/gropdf.pl: If a skeleton object exists at
+   the top level and in an ObjStm stream, merge the two objects.
+
+2024-01-07  Deri James  
+
+   * src/devices/gropdf/gropdf.pl (subs_call): Fix bad fix for
+   Savannah #65112.
+
+   {Problem introduced by me in commit 6e45bb0bc6, 4 January, when
+   I manually merged Deri's patch that wouldn't merge
+   automatically, and I misread the magic constant "16" as "6".  My
+   fault, but this is also one reason symbolic constants with
+   human-readable names are usually preferred to numeric literals.
+   -- GBR}
+
 2024-01-05  G. Branden Robinson 
 
[troff]: Fix Savannah #64592 (default color name).

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 03/08: groff_diff(7): Fix missing \c line continuation.

2024-01-07 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit c014f048c0b54232c3704ac1c1da54eb2c33b379
Author: G. Branden Robinson 
AuthorDate: Fri Jan 5 21:43:41 2024 -0600

groff_diff(7): Fix missing \c line continuation.
---
 man/groff_diff.7.man | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/groff_diff.7.man b/man/groff_diff.7.man
index 0a38b41ac..15479e74e 100644
--- a/man/groff_diff.7.man
+++ b/man/groff_diff.7.man
@@ -3224,7 +3224,7 @@ arguments.
 .
 .
 .TP
-.BR .return\~ [
+.BR .return\~ [\c
 .IR anything ]
 .\" XXX: useless request warning?
 Stop interpreting a macro,

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 02/08: ChangeLog: Repair old entries.

2024-01-07 Thread G. Branden Robinson
gbranden pushed a commit to branch master
in repository groff.

commit 37dae71913a7970b2de1b47b6c632a2060abd948
Author: G. Branden Robinson 
AuthorDate: Fri Jan 5 21:34:20 2024 -0600

ChangeLog: Repair old entries.

Add Savannah ticket reference.  Fix typo.  Ditch cruft.
---
 ChangeLog | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7c6c9ecc6..360a8eb4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -238,10 +238,6 @@
* src/roff/troff/request.h (class macro): Demote friend function
`operator==` from `int` to `bool`.
 
-Annotate nullptr.  Wrap long input lines.  Drop annotations of names of
-unused single parameters to member functions in definitions.  Emacs
-file-local variable thing.
-
 2024-01-04  G. Branden Robinson 
 
* src/roff/troff/node.cpp (make_glyph_node): Trivially refactor;
@@ -309,14 +305,15 @@ file-local variable thing.
 
 2024-01-03  G. Branden Robinson 
 
-   [gropdf]: Add "notice" diagnostic level for debugging.
+   [gropdf]: Fix Savannah #65111.  Add "notice" diagnostic level
+   for debugging.
 
* src/devices/gropdf/gropdf.pl (Notice): Add new subroutine.  It
emits a diagnostic message only if debugging ("gropdf -d").
(Warn): Prefix diagnostic with severity level here...
(Msg): ...instead of here.
(LoadFont): Demote diagnostic about fonts lacking space glyphs
-   from warning to ntoice.
+   from warning to notice.
 
Fixes .
 

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 02/02: Misplaced TOC in mom.

2024-01-07 Thread Deri James
deri pushed a commit to branch master
in repository groff.

commit d27c4644a098855051322a073a313fda165d4eaf
Author: Deri James 
AuthorDate: Sun Jan 7 20:14:34 2024 +

Misplaced TOC in mom.

See https://lists.gnu.org/archive/html/groff/2024-01/msg00015.html

* src/devices/gropdf/gropdf.pl: Remove incorrect line.
---
 src/devices/gropdf/gropdf.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 14b7b3312..79dde070a 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -1802,7 +1802,7 @@ sub do_x
else
{

($curoutlev,$curoutlevno,$thislev)=(@{$outlines[$pginsert]});
-   $curoutlevno--;
+#  $curoutlevno--;
}
}
}

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit


[groff] 01/02: Fix for including pdf v1.7 files.

2024-01-07 Thread Deri James
deri pushed a commit to branch master
in repository groff.

commit 7c0358816253817a3594be6402c4b9b7e68db01d
Author: Deri James 
AuthorDate: Sun Jan 7 19:51:35 2024 +

Fix for including pdf v1.7 files.

PDF 1.5 introduced object type ObjStm which can contain a bunch of
objects in its own compressed stream, but there is a restriction
that if an object has its own stream it cannot be included into
the ObjStm (i.e. no stream within stream). Gropdf has supported this
for some years, but it has come to light that some pdfs have a
"skeleton" object which contains the stream and the rest of the
object is held in the ObjStm stream.

Also fix incorrect application of patch in bug #65112.

* src/devices/gropdf/gropdf.pl: If a skeleton object exists at
the top-level and in an ObjStm stream, the two objects should be
merged.
---
 src/devices/gropdf/gropdf.pl | 57 +---
 1 file changed, 38 insertions(+), 19 deletions(-)

diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 3f70a4263..14b7b3312 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -2413,6 +2413,7 @@ sub LoadPDF
 my (@pdfwds)=split(' ',$pdftxt);
 my $wd;
 my $root;
+my @ObjStm;
 
 while ($wd=nextwd(\@pdfwds),length($wd))
 {
@@ -2424,24 +2425,7 @@ sub LoadPDF
$pdf->[$curobj]->{OBJ}=ParsePDFObj(\@pdfwds);
my $o=$pdf->[$curobj];
 
-   if (ref($o->{OBJ}) eq 'HASH' and exists($o->{OBJ}->{Type}) and 
$o->{OBJ}->{Type} eq '/ObjStm')
-   {
-   LoadStream($o,$pdf);
-   my $pos=$o->{OBJ}->{First};
-   my $s=$o->{STREAM};
-   my @o=split(' ',substr($s,0,$pos));
-   substr($s,0,$pos)='';
-   push(@o,-1,length($s));
-
-   for (my $j=0; $j<=$#o-2; $j+=2)
-   {
-   my @w=split(' ',substr($s,$o[$j+1],$o[$j+3]-$o[$j+1]));
-   $pdf->[$o[$j]]->{OBJ}=ParsePDFObj(\@w);
-   }
-
-   $pdf->[$curobj]=undef;
-   }
-
+push(@ObjStm,$curobj) if (ref($o->{OBJ}) eq 'HASH' and 
exists($o->{OBJ}->{Type}) and $o->{OBJ}->{Type} eq '/ObjStm');
$root=$curobj if ref($pdf->[$curobj]->{OBJ}) eq 'HASH' and 
exists($pdf->[$curobj]->{OBJ}->{Type}) and $pdf->[$curobj]->{OBJ}->{Type} eq 
'/XRef';
}
elsif ($wd eq 'trailer' and !exists($pdf->[0]->{OBJ}))
@@ -2454,6 +2438,25 @@ sub LoadPDF
}
 }
 
+foreach my $ObjStm (@ObjStm)
+{
+LoadStream($pdf->[$ObjStm],$pdf);
+my $pos=$pdf->[$ObjStm]->{OBJ}->{First};
+my $s=$pdf->[$ObjStm]->{STREAM};
+$s=~s/\%.*?$//m;
+my @o=split(' ',substr($s,0,$pos));
+substr($s,0,$pos)='';
+push(@o,-1,length($s));
+
+for (my $j=0; $j<=$#o-2; $j+=2)
+{
+my @w=split(' ',substr($s,$o[$j+1],$o[$j+3]-$o[$j+1]));
+
$pdf->[$o[$j]]->{OBJ}=ObjMerge($pdf->[$o[$j]]->{OBJ},ParsePDFObj(\@w));
+}
+
+$pdf->[$ObjStm]=undef;
+}
+
 $pdf->[0]=$pdf->[$root] if !defined($pdf->[0]);
 my $catalog=${$pdf->[0]->{OBJ}->{Root}};
 my $page=FindPage(1,$pdf);
@@ -2530,6 +2533,22 @@ sub LoadPDF
 return([$xonm,$BBox] );
 }
 
+sub ObjMerge
+{
+my $o1=shift;
+my $o2=shift;
+
+return $o1 if !defined($o2);
+return $o2 if !defined($o1);
+
+foreach my $k (keys %{$o2})
+{
+$o1->{$k}=$o2->{$k};
+}
+
+return $o1;
+}
+
 sub LoadStream
 {
 my $o=shift;
@@ -4736,7 +4755,7 @@ sub subs_call
{
$c[$#c-4]->[0]=MarkSub("#$c[$#c-4]->[0]") if ($c[$#c-4]->[1]);
}
-   elsif ($n2==16)  # seac
+   elsif ($n2==6)   # seac
{
my $ch=$StdEnc{$c[$#c-2]->[0]};
my $chf;

___
Groff-commit mailing list
Groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit