[groff] 09/10: [gxditview]: Fix Savannah #66076.

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

commit 4b3c10b03fdf72527ad0c6fa8b18d6b623ed4ae1
Author: Lukas Javorsky 
AuthorDate: Mon Aug 12 13:02:35 2024 +0200

[gxditview]: Fix Savannah #66076.

* src/devices/xditview/xditview.c (NewFile): Populate
  `current_file_name` with `name` more cautiously since the latter
  originates in the `argv` array.

Fixes .
---
 ChangeLog   | 8 
 src/devices/xditview/xditview.c | 3 ++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 974c732e6..c88aea9c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-08-12  Lukas Javorsky 
+
+   * src/devices/xditview/xditview.c (NewFile): Populate
+   `current_file_name` with `name` more cautiously since the latter
+   originates in the `argv` array.
+
+   Fixes .
+
 2024-08-14  Lukas Javorsky 
 
* src/preproc/refer/ref.cpp (same_reference): Fix array
diff --git a/src/devices/xditview/xditview.c b/src/devices/xditview/xditview.c
index 2be55230b..d8bd8cabd 100644
--- a/src/devices/xditview/xditview.c
+++ b/src/devices/xditview/xditview.c
@@ -367,7 +367,8 @@ NewFile (const char *name)
 }
 hadFile = 1;
 SelectPageNumber ("1");
-strcpy (current_file_name, name);
+strncpy(current_file_name, name, sizeof(current_file_name) - 1);
+current_file_name[sizeof(current_file_name) - 1] = '\0';  // Ensure 
null-termination
 current_file = new_file;
 }
 

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


[groff] 01/10: ChangeLog: Clarify old entry.

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

commit 4465cf3c9d100c8f0158103c0d3e5ed09d23a3d7
Author: G. Branden Robinson 
AuthorDate: Thu Oct 17 10:13:31 2024 -0500

ChangeLog: Clarify old entry.
---
 ChangeLog | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 10e97ee97..840e06e28 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -185,13 +185,14 @@
 
 2024-10-11  G. Branden Robinson 
 
-   * src/devices/grops/psrm.cpp (read_uint_arg): Thirty years ago
-   {see "ChangeLog.old"}, James Clark converted some code in
-   grolj4(1) from strtoul(3) to strtol(3), possibly because the
-   function was not widespread or standardized.  Presumably that
-   lesson was applied here as well.  It's standard now, in ISO C99,
-   for which we require compiler support.  Migrate text-to-integer
-   conversion and discard diagnosis of negative value.
+   * src/devices/grops/psrm.cpp (read_uint_arg): Migrate from
+   `strtol()` to `strtoul()`.  Thirty years ago {see
+   "ChangeLog.old"}, James Clark converted some code in grolj4(1)
+   from strtoul(3) to strtol(3), possibly because the function was
+   not widespread or standardized.  Presumably that lesson was
+   applied here as well.  It's standard now, in ISO C99, for which
+   we require compiler support.  Migrate text-to-integer conversion
+   and discard diagnosis of negative value.
 
 2024-10-11  Deri James  
 

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


[groff] 03/10: [troff]: Boolify `in_output_page_list()`.

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

commit 1260e9d76629fd6d35da97a4c3f13820350a02c3
Author: G. Branden Robinson 
AuthorDate: Thu Oct 17 10:22:51 2024 -0500

[troff]: Boolify `in_output_page_list()`.

* src/roff/troff/input.cpp (in_output_page_list): Demote return type
  from `int` to `bool`.  Return Boolean, not integer, literals.

* src/roff/troff/node.h: Boolify declaration.
---
 ChangeLog| 7 +++
 src/roff/troff/input.cpp | 8 
 src/roff/troff/node.h| 2 +-
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5ba8f8732..51311f5f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-10-17  G. Branden Robinson 
+
+   * src/roff/troff/input.cpp (in_output_page_list): Demote return
+   type from `int` to `bool`.  Return Boolean, not integer,
+   literals.
+   * src/roff/troff/node.h: Boolify declaration.
+
 2024-10-17  G. Branden Robinson 
 
* src/roff/troff/input.cpp (parse_output_page_list): `const`ify
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 5594c5075..48e2707f7 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -8586,14 +8586,14 @@ int page_range::contains(int n)
 
 page_range *output_page_list = 0 /* nullptr */;
 
-int in_output_page_list(int n)
+bool in_output_page_list(int n)
 {
   if (!output_page_list)
-return 1;
+return true;
   for (page_range *p = output_page_list; p; p = p->next)
 if (p->contains(n))
-  return 1;
-  return 0;
+  return true;
+  return false;
 }
 
 static void parse_output_page_list(const char *p)
diff --git a/src/roff/troff/node.h b/src/roff/troff/node.h
index 078bf37bf..39ea004a9 100644
--- a/src/roff/troff/node.h
+++ b/src/roff/troff/node.h
@@ -688,7 +688,7 @@ extern char *pipe_command;
 
 extern output_file *the_output;
 extern void init_output();
-int in_output_page_list(int);
+bool in_output_page_list(int);
 
 class font_family {
   int *map;

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


[groff] 08/10: [refer]: Fix Savannah #66078 (array comp thinko).

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

commit 6483156146591c986948149ee55beacfd937bb12
Author: Lukas Javorsky 
AuthorDate: Mon Aug 12 14:38:00 2024 +0200

[refer]: Fix Savannah #66078 (array comp thinko).

* src/preproc/refer/ref.cpp (same_reference): Fix array comparison
  warning by comparing elements individually.

Fixes .

[One such warning is "comparison between two arrays is deprecated in
C++20".  While groff uses C++98, if the compiler were to expand the
array reference into a loop on its own, then it was blowing up an O(n)
procedure to O(n^2).   And if it didn't do that, but translated the
expressions effectively to `r1.field_index[0] != r2.field_index[0]`,
comparing them `i` times, then it's an outright logic error.  Problem
dates back to groff 1.02 (June 1991), and perhaps earlier.  --GBR]
---
 ChangeLog | 7 +++
 src/preproc/refer/ref.cpp | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index bd47d77ca..974c732e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-08-14  Lukas Javorsky 
+
+   * src/preproc/refer/ref.cpp (same_reference): Fix array
+   comparison warning by comparing elements individually.
+
+   Fixes .
+
 2024-08-14  Lukas Javorsky 
 
* src/preproc/pic/object.cpp (object_spec::position_rectangle)
diff --git a/src/preproc/refer/ref.cpp b/src/preproc/refer/ref.cpp
index 5f6d5c63a..65b7edaf3 100644
--- a/src/preproc/refer/ref.cpp
+++ b/src/preproc/refer/ref.cpp
@@ -536,7 +536,7 @@ int same_reference(const reference &r1, const reference &r2)
 return 0;
   int i = 0; 
   for (i = 0; i < 256; i++)
-if (r1.field_index != r2.field_index)
+if (r1.field_index[i] != r2.field_index[i])
   return 0;
   for (i = 0; i < r1.nfields; i++)
 if (r1.field[i] != r2.field[i])

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


[groff] 04/10: [troff]: Handle invalid `-o` argument better.

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

commit 913dcac60e0fcfe11644c70fce61292ad4147807
Author: G. Branden Robinson 
AuthorDate: Thu Oct 17 10:28:27 2024 -0500

[troff]: Handle invalid `-o` argument better.

* src/roff/troff/input.cpp (parse_output_page_list): Enhance diagnostic
  message when `-o` option argument is nonsense; report the invalid
  expression and inform user that it's being ignored.

Exhibit:
$ echo hello | ./build/test-groff -z -o 99x
troff: error: ignoring invalid output page list argument '99x'
---
 ChangeLog| 6 ++
 src/roff/troff/input.cpp | 5 +++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 51311f5f9..a80ec8925 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-10-17  G. Branden Robinson 
+
+   * src/roff/troff/input.cpp (parse_output_page_list): Enhance
+   diagnostic message when `-o` option argument is nonsense; report
+   the invalid expression and inform user that it's being ignored.
+
 2024-10-17  G. Branden Robinson 
 
* src/roff/troff/input.cpp (in_output_page_list): Demote return
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 48e2707f7..b5d616ea3 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -8598,6 +8598,7 @@ bool in_output_page_list(int n)
 
 static void parse_output_page_list(const char *p)
 {
+  const char *pstart = p; // for diagnostic message
   for (;;) {
 int i;
 if (*p == '-')
@@ -8632,8 +8633,8 @@ static void parse_output_page_list(const char *p)
 ++p;
   }
   if (*p != '\0') {
-error("bad output page list");
-output_page_list = 0;
+error("ignoring invalid output page list argument '%1'", pstart);
+output_page_list = 0 /* nullptr */;
   }
 }
 

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


[groff] 06/10: doc/pic.ms: Fix Savannah #66335.

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

commit 2a266b66e1a3bd018eaa817efecb4f658e129974
Author: G. Branden Robinson 
AuthorDate: Thu Oct 17 11:42:34 2024 -0500

doc/pic.ms: Fix Savannah #66335.

...omission of `linethick` variable from "Semi-Formal Grammar" section.

Fixes <https://savannah.gnu.org/bugs/?66335>.  Thanks to an anonymous
contributor for the report and patch.
---
 ChangeLog  | 8 
 doc/pic.ms | 1 +
 2 files changed, 9 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index f2aa87cda..5d42caf92 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-10-17  G. Branden Robinson 
+
+   * doc/pic.ms: Fix omission of `linethick` variable from
+   "Semi-Formal Grammar" section.
+
+   Fixes <https://savannah.gnu.org/bugs/?66335>.  Thanks to an
+   anonymous contributor for the report and patch.
+
 2024-10-17  G. Branden Robinson 
 
[troff]: Better handle inapplicable or out-of-bounds (but still
diff --git a/doc/pic.ms b/doc/pic.ms
index 3b7160036..c1650afa2 100644
--- a/doc/pic.ms
+++ b/doc/pic.ms
@@ -3135,6 +3135,7 @@ boxht@0.5@Default height of a box
 boxwid@0.75@Default width of a box
 lineht@0.5@Default length of vertical line
 linewid@0.75@Default length of horizontal line
+linethick@-1@Default line thickness
 arcrad @0.25@Default radius of an arc
 circlerad@0.25@Default radius of a circle
 ellipseht@0.5@Default height of an ellipse

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


[groff] 07/10: [pic]: Fix Savannah #66080 (uninit'd struct mbrs).

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

commit 282e15e0709153337597b613bdc825699da6aace
Author: Lukas Javorsky 
AuthorDate: Mon Aug 12 15:52:14 2024 +0200

[pic]: Fix Savannah #66080 (uninit'd struct mbrs).

* src/preproc/pic/object.cpp (object_spec::position_rectangle)
  (object_spec::make_line): Initialize "x" and "y" elements of the
  `here` structure.  Using uninitialized variables in `path::follow()`
  could cause undefined behavior.

Fixes <https://savannah.gnu.org/bugs/?66080>.
---
 ChangeLog  | 9 +
 src/preproc/pic/object.cpp | 4 
 2 files changed, 13 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 5d42caf92..bd47d77ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-08-14  Lukas Javorsky 
+
+   * src/preproc/pic/object.cpp (object_spec::position_rectangle)
+   (object_spec::make_line): Initialize "x" and "y" elements of the
+   `here` structure.  Using uninitialized variables in
+   `path::follow()` could cause undefined behavior.
+
+   Fixes <https://savannah.gnu.org/bugs/?66080>.
+
 2024-10-17  G. Branden Robinson 
 
* doc/pic.ms: Fix omission of `linethick` variable from
diff --git a/src/preproc/pic/object.cpp b/src/preproc/pic/object.cpp
index d0b648c27..b197a02fa 100644
--- a/src/preproc/pic/object.cpp
+++ b/src/preproc/pic/object.cpp
@@ -891,6 +891,8 @@ int object_spec::position_rectangle(rectangle_object *p,
 if (flags & HAS_WITH) {
   place offset;
   place here;
+  here.x = 0;
+  here.y = 0;
   here.obj = p;
   if (!with->follow(here, &offset))
return 0;
@@ -1512,6 +1514,8 @@ linear_object *object_spec::make_line(position *curpos, 
direction *dirp)
 position pos = at;
 place offset;
 place here;
+here.x = 0;
+here.y = 0;
 here.obj = &tmpobj;
 if (!with->follow(here, &offset))
   return 0;

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


[groff] 10/10: [gxditview]: Fix code sytle nits.

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

commit 30e90e55ca1c21ae0cb16dda25d7fbfbcb6b5a0e
Author: G. Branden Robinson 
AuthorDate: Thu Oct 17 17:40:44 2024 -0500

[gxditview]: Fix code sytle nits.

* src/devices/xditview/xditview.c (NewFile): Fix code style nits.
  Promote repeated expression to temporary variable.  `sizeof` is an
  operator, not a function, so don't parenthesize its parameter when
  it's an lvalue (as opposed to a type name).
---
 ChangeLog   | 7 +++
 src/devices/xditview/xditview.c | 5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c88aea9c7..833617c1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-10-17  G. Branden Robinson 
+
+   * src/devices/xditview/xditview.c (NewFile): Fix code style
+   nits.  Promote repeated expression to temporary variable.
+   `sizeof` is an operator, not a function, so don't parenthesize
+   its parameter when it's an lvalue (as opposed to a type name).
+
 2024-08-12  Lukas Javorsky 
 
* src/devices/xditview/xditview.c (NewFile): Populate
diff --git a/src/devices/xditview/xditview.c b/src/devices/xditview/xditview.c
index d8bd8cabd..ff21fb6e7 100644
--- a/src/devices/xditview/xditview.c
+++ b/src/devices/xditview/xditview.c
@@ -367,8 +367,9 @@ NewFile (const char *name)
 }
 hadFile = 1;
 SelectPageNumber ("1");
-strncpy(current_file_name, name, sizeof(current_file_name) - 1);
-current_file_name[sizeof(current_file_name) - 1] = '\0';  // Ensure 
null-termination
+size_t len = (sizeof current_file_name) - 1;
+strncpy(current_file_name, name, len);
+current_file_name[len] = '\0';
 current_file = new_file;
 }
 

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


[groff] 02/10: [troff]: Mark unmodified function arg as `const`.

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

commit bbea22a13eb2c46ae3626500e42e9b6c128a1267
Author: G. Branden Robinson 
AuthorDate: Thu Oct 17 10:18:11 2024 -0500

[troff]: Mark unmodified function arg as `const`.

* src/roff/troff/input.cpp (parse_output_page_list): `const`ify function
  argument.
---
 ChangeLog| 5 +
 src/roff/troff/input.cpp | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 840e06e28..5ba8f8732 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-10-17  G. Branden Robinson 
+
+   * src/roff/troff/input.cpp (parse_output_page_list): `const`ify
+   function argument.
+
 2024-10-16  G. Branden Robinson 
 
* tmac/s.tmac (DS): Break line unconditionally, ensuring that
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index fcba09c76..5594c5075 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -8596,7 +8596,7 @@ int in_output_page_list(int n)
   return 0;
 }
 
-static void parse_output_page_list(char *p)
+static void parse_output_page_list(const char *p)
 {
   for (;;) {
 int i;

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


[groff] 05/10: [troff]: Fix Savannah #64469 (`-o` out of bounds).

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

commit 40644c648efc313eb818b89725787fe2a10ba773
Author: G. Branden Robinson 
AuthorDate: Thu Oct 17 11:11:45 2024 -0500

[troff]: Fix Savannah #64469 (`-o` out of bounds).

[troff]: Better handle inapplicable or out-of-bounds (but still
numerically valid) output page selection list (`-o` argument).

* src/roff/troff/node.cpp: New global Boolean
  `was_any_page_in_output_list` tracks this datum; defaults false.

  (troff_output_file::trailer): When finishing up, don't write a
  "trailer" grout command (and vertical motion) if no page ever began.
  Insted, throw a warning in category `range`.

  (real_output_file::begin_page): Make `was_any_page_in_output_list`
  true if any page is written.

Fixes <https://savannah.gnu.org/bugs/?64469>.  Thanks to Dave Kemper for
the report.

Exhibit:

$ echo hello | ~/groff-stable/bin/groff -o 2
grops::5: fatal error: 'V' command invalid before first 'p' 
command
$ echo hello | ./build/test-groff -o 2 > /dev/null
$ echo hello | ./build/test-groff -o 2 -wrange > /dev/null
troff: warning: no pages in output page selection list
---
 ChangeLog   | 16 
 src/roff/troff/node.cpp | 19 +--
 2 files changed, 29 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a80ec8925..f2aa87cda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2024-10-17  G. Branden Robinson 
+
+   [troff]: Better handle inapplicable or out-of-bounds (but still
+   numerically valid) output page selection list (`-o` argument).
+
+   * src/roff/troff/node.cpp: New global Boolean
+   `was_any_page_in_output_list` tracks this datum; defaults false.
+   (troff_output_file::trailer): When finishing up, don't write a
+   "trailer" grout command (and vertical motion) if no page ever
+   began.  Insted, throw a warning in category `range`.
+   (real_output_file::begin_page): Make
+   `was_any_page_in_output_list` true if any page is written.
+
+   Fixes <https://savannah.gnu.org/bugs/?64469>.  Thanks to Dave
+   Kemper for the report.
+
 2024-10-17  G. Branden Robinson 
 
* src/roff/troff/input.cpp (parse_output_page_list): Enhance
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 74b66672a..d18d4eebe 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -73,6 +73,7 @@ tfont *make_tfont(tfont_spec &);
 
 int image_no = 0;
 static int suppression_starting_page_number = 0;
+static bool was_any_page_in_output_list = false;
 
 #define STORE_WIDTH 1
 
@@ -1603,12 +1604,16 @@ troff_output_file::~troff_output_file()
 void troff_output_file::trailer(vunits page_length)
 {
   flush_tbuf();
-  if (page_length > V0) {
-put("x trailer\n");
-put('V');
-put(page_length.to_units());
-put('\n');
+  if (was_any_page_in_output_list) {
+if (page_length > V0) {
+  put("x trailer\n");
+  put('V');
+  put(page_length.to_units());
+  put('\n');
+}
   }
+  else
+warning(WARN_RANGE, "no pages in output page selection list");
   put("x stop\n");
 }
 
@@ -1735,8 +1740,10 @@ int real_output_file::is_printing()
 void real_output_file::begin_page(int pageno, vunits page_length)
 {
   printing = in_output_page_list(pageno);
-  if (printing)
+  if (printing) {
+was_any_page_in_output_list = true;
 really_begin_page(pageno, page_length);
+  }
 }
 
 void real_output_file::copy_file(hunits x, vunits y,

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


[groff] 01/01: ChangeLog: Fix ticket number in old entry.

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

commit 5a91a3b5c02f596399a0606615e5de4cf0506819
Author: G. Branden Robinson 
AuthorDate: Wed Oct 16 14:02:36 2024 -0500

ChangeLog: Fix ticket number in old entry.
---
 ChangeLog | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index a5802c919..10e97ee97 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -61,7 +61,7 @@
* tmac/tty.tmac: Define fallback character for groff `OK`
special character.
 
-   Fixes <https://savannah.gnu.org/bugs/?66328>.  Thanks to Bjarni
+   Fixes <https://savannah.gnu.org/bugs/?66162>.  Thanks to Bjarni
Ingi Gislason for the report.
 
 2024-10-14  G. Branden Robinson 

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


[groff] 07/23: [mm]: Fix Savannah #66287 (2/2) (coding tag).

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

commit a4bc9a0a3b054560b24eaf2843035b18067d4706
Author: G. Branden Robinson 
AuthorDate: Mon Oct 14 20:24:07 2024 -0500

[mm]: Fix Savannah #66287 (2/2) (coding tag).

* contrib/mm/groff_mmse.7.man: Add old-style Emacs file-local variable
  to supply preconv(1) a "coding tag".  Doing so throws that program a
  bone if the "uchardet" library is not available and the program is
  asked to guess the file's input encoding.

Fixes <https://savannah.gnu.org/bugs/?66287> (2/2).  Thanks to Dave
Kemper for the report.

Also update the command examples for readers interested in rendering the
file.  The examples specify the input encoding explicitly; the coding
tag is for the benefit of people who use the groff(1) option "-k"
instead of "-K".

This commit causes a preconv "smoke test" failure.
---
 contrib/mm/ChangeLog| 10 ++
 contrib/mm/groff_mmse.7.man |  5 -
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index cbb9a0cff..8457b855b 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,13 @@
+2024-10-14  G. Branden Robinson 
+
+   * groff_mmse.7.man: Add old-style Emacs file-local variable to
+   supply preconv(1) a "coding tag".  Doing so throws that program
+   a bone if the "uchardet" library is not available and the
+   program is asked to guess the file's input encoding.
+
+   Fixes <https://savannah.gnu.org/bugs/?66287> (2/2).  Thanks to
+   Dave Kemper for the report.
+
 2024-10-14  G. Branden Robinson 
 
* groff_mmse.7.man: Convert file encoding from Latin-1 to UTF-8.
diff --git a/contrib/mm/groff_mmse.7.man b/contrib/mm/groff_mmse.7.man
index 638cea1fa..f8ffbb54a 100644
--- a/contrib/mm/groff_mmse.7.man
+++ b/contrib/mm/groff_mmse.7.man
@@ -1,3 +1,6 @@
+.\" -*- coding: utf-8; -*-  Help preconv(1) if uchardet is not present.
+.\" groff -K utf8 -man -msv
+.\" nroff -K utf8 -man -msv
 .TH groff_mmse @MAN7EXT@ "@MDATE@" "groff @VERSION@"
 .SH Namn
 groff_mmse \- svenska \(rqmemorandum\(rq makro f\(:or GNU
@@ -181,7 +184,7 @@ Sweden
 .
 .
 .\" Local Variables:
-.\" coding: latin-1
+.\" coding: utf-8
 .\" fill-column: 72
 .\" mode: nroff
 .\" End:

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


[groff] 08/23: [preconv]: Disable a test.

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

commit ed5628e8161255b4b9d833f75f6f85741c32f0e1
Author: G. Branden Robinson 
AuthorDate: Mon Oct 14 20:24:58 2024 -0500

[preconv]: Disable a test.

* src/preproc/preconv/tests/smoke-test.sh: Comment out a test; we no
  longer have a specimen of a Latin-1 document in the build tree.
---
 ChangeLog   | 6 ++
 src/preproc/preconv/tests/smoke-test.sh | 8 
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 824799df5..f2a604753 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-10-14  G. Branden Robinson 
+
+   * src/preproc/preconv/tests/smoke-test.sh: Comment out a test;
+   we no longer have a specimen of a Latin-1 document in the build
+   tree.
+
 2024-10-14  G. Branden Robinson 
 
* doc/meintro_fr.me.in: Add back old-style Emacs file-local
diff --git a/src/preproc/preconv/tests/smoke-test.sh 
b/src/preproc/preconv/tests/smoke-test.sh
index 660f6c531..2bdbbf8ed 100755
--- a/src/preproc/preconv/tests/smoke-test.sh
+++ b/src/preproc/preconv/tests/smoke-test.sh
@@ -79,10 +79,10 @@ fi
 # cleaning them up even if we're interrupted, which in turn means
 # setting up signal handlers, we use files in the build tree.
 
-doc=contrib/mm/groff_mmse.7
-echo "testing uchardet detection on Latin-1 document $doc" >&2
-"$preconv" -d -D us-ascii 2>&1 >/dev/null $doc \
-| grep -q 'charset: ISO-8859-1' || wail
+#doc=contrib/mm/groff_mmse.7
+#echo "testing uchardet detection on UTF-8 document $doc" >&2
+#"$preconv" -d -D us-ascii 2>&1 >/dev/null $doc \
+#| grep -q 'charset: UTF-8' || wail
 
 # uchardet can't seek on a pipe either.
 echo "testing uchardet detection on pipe (expect fallback to -D)" >&2

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


[groff] 10/23: contrib/mom/ChangeLog: Add entry and bug closer.

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

commit ccc4083d392e6931f1148f6988ac7d66b1ca6b0b
Author: G. Branden Robinson 
AuthorDate: Tue Oct 15 06:57:55 2024 -0500

contrib/mom/ChangeLog: Add entry and bug closer.

...for Peter's further commits yesterday.
---
 contrib/mom/ChangeLog | 12 
 1 file changed, 12 insertions(+)

diff --git a/contrib/mom/ChangeLog b/contrib/mom/ChangeLog
index 6c3216221..fdd56bd1c 100644
--- a/contrib/mom/ChangeLog
+++ b/contrib/mom/ChangeLog
@@ -1,3 +1,15 @@
+2024-10-13
+
+   * om.tmac:
+   + Corrects PDF_IMAGE after only one line of text at the top of
+   documents placing the image on the next page.
+   + Correct graphical objects' color handling and placement
+
+   * BUGS: Update
+
+   Fixes <https://savannah.gnu.org/bugs/?66332>.  Thanks to наб for
+   the report.
+
 2024-10-13
 
* om.tmac: Add linked endnotes; fix graphical objects; tweaks

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


[groff] 16/23: [mm]: Trivially refactor.

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

commit 7405226e5df0aef017b4c0b2fd6f7e6781792f7b
Author: G. Branden Robinson 
AuthorDate: Tue Oct 15 10:36:10 2024 -0500

[mm]: Trivially refactor.

* m.tmac: Rename internal register `ref*flag` to `ref*was-RS-used`,
  which has the startling property of documenting what it's for.

  (TC, B2, RS, ref@eot-print, ref@print-refs): Do it.

  (ref@print-refs): Also drop autoincrement amount from register
  redefinition.  Autoincrementation was never used with it, and it looks
  like a copy-and-paste error from an `RP` call in `TC`.
---
 contrib/mm/ChangeLog | 10 ++
 contrib/mm/m.tmac| 12 ++--
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 17fc99672..d0dfdff65 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,13 @@
+2024-10-15  G. Branden Robinson 
+
+   * m.tmac: Trivially refactor.  Rename internal register
+   `ref*flag` to `ref*was-RS-used`, which has the startling
+   property of documenting what it's for.
+   (TC, B2, RS, ref@eot-print, ref@print-refs): Do it.
+   (ref@print-refs): Also drop autoincrement amount from register
+   redefinition.  Autoincrementation was never used with it, and it
+   looks like a copy-and-paste error from an `RP` call in `TC`.
+
 2024-10-15  G. Branden Robinson 
 
* m.tmac (EM): Simplify string definition: interpolate only the
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 453f4bfe2..c26c26f76 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -2700,7 +2700,7 @@ exceeds depth of nested lists (\\n[li*lvl])
 .br
 .\" print any pending displays and references
 .df@print-float 3
-.if \\n[ref*flag] .RP 0 1
+.if \\n[ref*was-RS-used] .RP 0 1
 .\"
 .if \w@\\$1@>0 .nr toc*slevel \\$1
 .if \w@\\$2@>0 .nr toc*spacing (u;\\$2*\\n[Lsp])
@@ -3079,7 +3079,7 @@ exceeds depth of nested lists (\\n[li*lvl])
 .nr ref*nr 0 1
 .aln :R ref*nr
 .nr ref*nr-width 5n
-.nr ref*flag 0 \" for end-of-text
+.nr ref*was-RS-used 0 \" for end-of-text
 .ds ref*nroff-( [
 .ds ref*troff-( \v'-.4m'\s-3
 .ds ref*nroff-) ]
@@ -3115,7 +3115,7 @@ exceeds depth of nested lists (\\n[li*lvl])
 .de RS
 .ref*set-mark-style \" in case the document changed it
 .if !''\\$1' .ds \\$1 \\*[ref*(]\\n[ref*nr]\\*[ref*)]
-.nr ref*flag 1
+.nr ref*was-RS-used 1
 .am ref*mac
 .ref@start-print \\n[ref*nr]
 \\..
@@ -3176,10 +3176,10 @@ argument: '\\$2'
 .\"---
 .\" called by end-of-text!
 .de ref@eot-print
-.\".if \\n[ref*flag] \{\
+.\".if \\n[ref*was-RS-used] \{\
 .if d ref*mac \{\
 .  if \\n[D]>2 .tm Print references, called by eot
-.  nr ref*flag 0
+.  nr ref*was-RS-used 0
 .  br
 .  misc@ev-keep ne
 .  @reset
@@ -3208,7 +3208,7 @@ argument: '\\$2'
 .in
 .rm ref*mac
 .ev
-.nr ref*flag 0 1
+.nr ref*was-RS-used 0
 ..
 .\"### module app 
 .\"

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


[groff] 09/23: contrib/mom/ChangeLog: Recode file to UTF-8.

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

commit 6f8857fe7d80644da482bc990bf861a7b667
Author: G. Branden Robinson 
AuthorDate: Wed Oct 16 13:37:36 2024 -0500

contrib/mom/ChangeLog: Recode file to UTF-8.

Also fix наб's name, update Emacs file-local variable, and bump
copyright date.
---
 contrib/mom/ChangeLog | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/contrib/mom/ChangeLog b/contrib/mom/ChangeLog
index 6e3af6f0e..6c3216221 100644
--- a/contrib/mom/ChangeLog
+++ b/contrib/mom/ChangeLog
@@ -18,7 +18,7 @@
* momdoc/docprocessing.html:
* momdoc/stylesheet.css: Update and emend docs
 
-   Fixes <https://savannah.gnu.org/bugs/?66322>.  Thanks to ��� for
+   Fixes <https://savannah.gnu.org/bugs/?66322>.  Thanks to наб for
the report.
 
 2024-09-02  Sven Schober 
@@ -1625,7 +1625,7 @@
 
o Macro .PS renamed to .PT_SIZE.  Alias .TS removed.
 
-   o .tr bits in .CAPS rewritten in the form .tr �\[`E].
+   o .tr bits in .CAPS rewritten in the form .tr é\[`E].
 
o General cleanup of docs to reflect changes
 
@@ -1944,7 +1944,7 @@ 

 
 # License
 
-Copyright 2004-2020 Free Software Foundation, Inc.
+Copyright 2004-2024 Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification,
 are permitted in any medium without royalty provided the copyright
@@ -1952,7 +1952,7 @@ notice and this notice are preserved.
 
 # Editor settings
 Local Variables:
-coding: latin-1
+coding: utf-8
 fill-column: 72
 mode: change-log
 version-control: never

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


[groff] 23/23: [ms]: Fix Savannah #66339 (starting doc w/ `DS`).

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

commit 7fbda04469c0581e7d6394291ca3d1c13483c3ed
Author: G. Branden Robinson 
AuthorDate: Wed Oct 16 13:08:39 2024 -0500

[ms]: Fix Savannah #66339 (starting doc w/ `DS`).

* tmac/s.tmac (DS): Break line unconditionally, ensuring that that the
  top-of-page trap springs even if the document starts with a call of
  this macro.

Fixes <https://savannah.gnu.org/bugs/?66339>.  Thanks to Joerg van den
Hoff for the report.  Problem introduced by me in commit 1887bbe68c, 5
November 2021.
---
 ChangeLog   | 10 ++
 tmac/s.tmac |  1 +
 2 files changed, 11 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 5432724c1..a5802c919 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-10-16  G. Branden Robinson 
+
+   * tmac/s.tmac (DS): Break line unconditionally, ensuring that
+   that the top-of-page trap springs even if the document starts
+   with a call of this macro.
+
+   Fixes <https://savannah.gnu.org/bugs/?66339>.  Thanks to Joerg
+   van den Hoff for the report.  Problem introduced by me in commit
+   1887bbe68c, 5 November 2021.
+
 2024-10-16  G. Branden Robinson 
 
[ms]: Regression-test Savannah #66339.
diff --git a/tmac/s.tmac b/tmac/s.tmac
index dd682e5b1..adf18e0c7 100644
--- a/tmac/s.tmac
+++ b/tmac/s.tmac
@@ -1071,6 +1071,7 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .el .@error-recover mismatched .DE
 ..
 .de DS
+.br
 .if '\\n(.z'ds*div' .@error-recover cannot begin display within display
 .nr ds*badarg 0
 .di ds*div

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


[groff] 21/23: contrib/mom/ChangeLog: Add entry.

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

commit 9dc861753c9c04f6049d73e71cab296040654460
Author: G. Branden Robinson 
AuthorDate: Wed Oct 16 13:11:49 2024 -0500

contrib/mom/ChangeLog: Add entry.

...for Peter's commit yesterday.
---
 contrib/mom/ChangeLog | 4 
 1 file changed, 4 insertions(+)

diff --git a/contrib/mom/ChangeLog b/contrib/mom/ChangeLog
index fdd56bd1c..f8001a385 100644
--- a/contrib/mom/ChangeLog
+++ b/contrib/mom/ChangeLog
@@ -1,3 +1,7 @@
+2024-10-15
+
+   * om.tmac: [PDF_IMAGE]: remove superfluous \!
+
 2024-10-13
 
* om.tmac:

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


[groff] 17/23: [mm]: Trivially refactor.

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

commit c85fb490a845ab429edeed7159cdfc72ee90cb72
Author: G. Branden Robinson 
AuthorDate: Tue Oct 15 10:42:18 2024 -0500

[mm]: Trivially refactor.

* m.tmac: Organize groff mm extensions together more cleanly with
  respect to `HF` and `HP` strings.
---
 contrib/mm/ChangeLog | 5 +
 contrib/mm/m.tmac| 6 --
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index d0dfdff65..bcaa46c64 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,8 @@
+2024-10-15  G. Branden Robinson 
+
+   * m.tmac: Trivially refactor.  Organize groff mm extensions
+   together more cleanly with respect to `HF` and `HP` strings.
+
 2024-10-15  G. Branden Robinson 
 
* m.tmac: Trivially refactor.  Rename internal register
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index c26c26f76..978c0daf5 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -199,14 +199,14 @@ http://savannah.gnu.org/bugs/?group=groff.
 .\"center headings of level <= Hc
 .nr Hc 0
 .\"heading font, per level
-.ds HF 2 2 2 2 2 2 2 2 2 2 2 2 2 2
+.ds HF 2 2 2 2 2 2 2
 .\"indentation policy of text after headings
 .\"0 -> no indentation
 .\"1 -> first-line indentation, like ".P 1"
 .\"2 -> indent to line up with text part of preceding heading
 .nr Hi 1
 .\"header point (type) size, per level
-.ds HP 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+.ds HP 0 0 0 0 0 0 0
 .\"put vertical space of \n[Hss] after headings of level <= Hs
 .nr Hs 2
 .\"heading numbering type
@@ -303,6 +303,8 @@ http://savannah.gnu.org/bugs/?group=groff.
 .\" spacing before and after static displays (if undefined, Lsp is used)
 .\" .nr Dsp 1v
 .\" more heading level counters
+.as HF " 2 2 2 2 2 2 2
+.as HP " 0 0 0 0 0 0 0
 .nr H8 0 1
 .nr H9 0 1
 .nr H10 0 1

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


[groff] 12/23: groff_mm(7): Revise discussion of RS/RF/RP macros.

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

commit 00eccd5c0583db8f1c323324dde5e8a5d7c59ae4
Author: G. Branden Robinson 
AuthorDate: Tue Oct 15 10:11:45 2024 -0500

groff_mm(7): Revise discussion of RS/RF/RP macros.
---
 contrib/mm/groff_mm.7.man | 47 +--
 1 file changed, 29 insertions(+), 18 deletions(-)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index cbb7f0e8f..8ff76a486 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -3345,12 +3345,11 @@ is also stored in a string of that name.
 .
 .TP
 .B RF
-Reference end.
-.
-Ends a reference definition and returns to normal processing.
+End a bibliographic reference citiation started with
+.BR RS .
 .
 See
-.BR RS .
+.BR RP .
 .
 .
 .TP
@@ -3404,7 +3403,7 @@ bibliographic reference list facilities.
 .TP
 .BR RP \~\c \" space in roman; we must use 2-font macro with \c
 .RI [ suppress-counter-reset \~[ page-ejection-policy ]]
-Format a reference page,
+Format a reference list,
 listing items accumulated within
 .BR RS / RF
 pairs.
@@ -3466,25 +3465,37 @@ followed by another vee of space.
 .TP
 .BR RS \~[\c
 .IR reference-string ]
-Begin an automatically numbered reference definition.
+Begin citation of an automatically numbered bibliographic reference
+entry.
 .
-By default,
-references are numbered starting at 1;
-the number is available in register
-.BR :R .
+.I mm
+collects input until
+.B RF
+is called.
+.
+A subsequent
+.B RP
+call emits the accumulated entries.
+.
+References are numbered starting at 1;
+the register
+.B :R
+stores the most recently assigned number.
 .
 Interpolate the string
 .B Rf
-where the reference mark should be and write the reference between
-.BR RS / RF
-on an input line after the reference mark.
+where the reference mark should be,
+then place the entry between
+.B RS
+and
+.B RF
+calls on text lines after the reference mark.
 .
-The mark may be bracketed,
-superscripted,
-or both;
-see the
+The
 .B \%Rfstyle
-register.
+register determines whether the mark is bracketed,
+superscripted,
+or both.
 .
 If
 .I reference-string

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


[groff] 14/23: groff_mm(7): Revise `TM` macro description.

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

commit 9d34d3ad4c46c8c62722ff7bad128ecf057a4af9
Author: G. Branden Robinson 
AuthorDate: Tue Oct 15 10:17:32 2024 -0500

groff_mm(7): Revise `TM` macro description.
---
 contrib/mm/groff_mm.7.man | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 3aadae6ce..0ab7acc11 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -3924,8 +3924,9 @@ for use in all memorandum types except 4.
 .TP
 .BI TM\~ number\c
 \~.\|.\|.
-Declare technical memorandum number(s) used by
-.BR MT .
+Declare technical memorandum number(s) used with
+.B MT
+memoranda.
 .
 .
 .br

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


[groff] 13/23: groff_mm(7): Revise BU, EM string descriptions.

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

commit 546665cabc4552df7bb387b6bd9f84cdabc6fadd
Author: G. Branden Robinson 
AuthorDate: Tue Oct 15 10:16:17 2024 -0500

groff_mm(7): Revise BU, EM string descriptions.

They can be used anywhere, and the `BL` and `DL` macro descriptions now
present their use of these.
---
 contrib/mm/groff_mm.7.man | 10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 8ff76a486..3aadae6ce 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -4234,9 +4234,8 @@ except the second
 .
 .TP
 .B BU
-interpolates a bullet mark in
-.B BL
-lists.
+interpolates a bullet mark,
+.BR \[rs][bu] .
 .
 .
 .TP
@@ -4273,9 +4272,8 @@ and register
 .
 .TP
 .B EM
-interpolates an em dash mark in
-.B DL
-lists.
+interpolates an em dash,
+.BR \[rs][em] .
 .
 .
 .TP

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


[groff] 11/23: groff_mm(7): Introduce "new" reference system.

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

commit 34bd63e375c7e99cf6eb06a6f05ba0ab6cc0f697
Author: G. Branden Robinson 
AuthorDate: Tue Oct 15 09:56:11 2024 -0500

groff_mm(7): Introduce "new" reference system.

...in initial overview of package.
---
 contrib/mm/groff_mm.7.man | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index ab122f969..cbb7f0e8f 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -258,6 +258,21 @@ strings.
 .
 .
 .P
+.I "groff mm"
+features a new citation system that permits a bibliographic reference
+list to be sorted,
+an alternative to
+.BR RS / RE / RP .
+.
+See the
+.B INITR
+macro description below
+and the
+.MR mmroff @MAN1EXT@
+man page.
+.
+.
+.P
 Macro,
 register,
 and string descriptions in this page frequently mention each other;

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


[groff] 20/23: [mm]: Fix derpy error in a test script.

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

commit 0d2fb4afa97f088fa526c77f677c4e473906eeb2
Author: G. Branden Robinson 
AuthorDate: Tue Oct 15 16:42:42 2024 -0500

[mm]: Fix derpy error in a test script.

We're testing the `LT` macro here, not `MT`--copy-n-waste.

Also dial formatter warnings to maximum.
---
 contrib/mm/tests/letters-format-correctly.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/mm/tests/letters-format-correctly.sh 
b/contrib/mm/tests/letters-format-correctly.sh
index aa9d09e12..991a35775 100755
--- a/contrib/mm/tests/letters-format-correctly.sh
+++ b/contrib/mm/tests/letters-format-correctly.sh
@@ -63,9 +63,9 @@ input="$examples_dir"/letter.mm
 
 for t in BL SB FB SP
 do
-echo "checking formatting of MT type '$t'" >&2
+echo "checking formatting of LT type '$t'" >&2
 expected=$(cksum "$artifacts_dir"/letter.$t | cut -d' ' -f1-2)
-actual=$("$groff" -mm -dlT=$t -Tascii -P-cbou "$input" | cksum \
+actual=$("$groff" -ww -mm -dlT=$t -Tascii -P-cbou "$input" | cksum \
 | cut -d' ' -f1-2)
 test "$actual" = "$expected" || wail
 done

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


[groff] 22/23: [ms]: Regression-test Savannah #66339.

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

commit bc0103ddd08966578989d717f31cd1f273a9544f
Author: G. Branden Robinson 
AuthorDate: Wed Oct 16 13:01:42 2024 -0500

[ms]: Regression-test Savannah #66339.

* tmac/tests/s_can-start-document-with-DS-call.sh: Do it.
* tmac/tmac.am (tmac_TESTS): Run test.

Test fails at this commit.
---
 ChangeLog   |  7 +
 tmac/tests/s_can-start-document-with-DS-call.sh | 37 +
 tmac/tmac.am|  1 +
 3 files changed, 45 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index f180fdad2..5432724c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-10-16  G. Branden Robinson 
+
+   [ms]: Regression-test Savannah #66339.
+
+   * tmac/tests/s_can-start-document-with-DS-call.sh: Do it.
+   * tmac/tmac.am (tmac_TESTS): Run test.
+
 2024-10-15  G. Branden Robinson 
 
Rename some test scripts for clarity.
diff --git a/tmac/tests/s_can-start-document-with-DS-call.sh 
b/tmac/tests/s_can-start-document-with-DS-call.sh
new file mode 100755
index 0..cdd17305c
--- /dev/null
+++ b/tmac/tests/s_can-start-document-with-DS-call.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# Copyright (C) 2024 Free Software Foundation, Inc.
+#
+# This file 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/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+# Regression-test Savannah #66339.
+#
+# Render a static display correctly if it begins the document.
+
+input='.
+.DS
+Hello, world!  The type size is .s=\n(.s points.
+.DE
+.'
+
+output=$(printf "%s\n" "$input" | "$groff" -a -ms -T ps)
+echo "$output"
+echo "$output" | grep -Fq '.s=10 points'
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 09ff3c14e..a8c3390d6 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -240,6 +240,7 @@ tmac_TESTS = \
   tmac/tests/s_TC-works-with-percent-in-custom-titles.sh \
   tmac/tests/s_XA-literal-no-argument-suppresses-leader.sh \
   tmac/tests/s_XA-reduces-line-length.sh \
+  tmac/tests/s_can-start-document-with-DS-call.sh \
   tmac/tests/s_honor-MINGW-when-two-columns.sh \
   tmac/tests/s_honor-page-break-after-display.sh \
   tmac/tests/s_honor-page-break-in-text.sh \

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


[groff] 05/23: [me]: Fix Savannah #66287 (1/2) (coding tag).

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

commit 0fea2c3e7f6ae74a7f723466544b0e257255aa67
Author: G. Branden Robinson 
AuthorDate: Mon Oct 14 14:56:18 2024 -0500

[me]: Fix Savannah #66287 (1/2) (coding tag).

* doc/meintro_fr.me.in: Add back old-style Emacs file-local variable to
  supply preconv(1) a "coding tag".  Doing so throws that program a bone
  if the "uchardet" library is not available and the program is asked to
  guess the file's input encoding.

Fixes <https://savannah.gnu.org/bugs/?66287> (1/2).  Thanks to Dave
Kemper for the report.

Also update the command examples for readers interested in rendering the
file.  The examples specify the input encoding explicitly; the coding
tag is for the benefit of people who use the groff(1) option "-k"
instead of "-K".
---
 ChangeLog| 10 ++
 doc/meintro_fr.me.in |  5 +++--
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index adf9568d1..824799df5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-10-14  G. Branden Robinson 
+
+   * doc/meintro_fr.me.in: Add back old-style Emacs file-local
+   variable to supply preconv(1) a "coding tag".  Doing so throws
+   that program a bone if the "uchardet" library is not available
+   and the program is asked to guess the file's input encoding.
+
+   Fixes <https://savannah.gnu.org/bugs/?66287> (1/2).  Thanks to
+   Dave Kemper for the report.
+
 2024-10-14  Dave Kemper 
 
* tmac/en.tmac: Map hcodes of Latin-1 characters with
diff --git a/doc/meintro_fr.me.in b/doc/meintro_fr.me.in
index 5b75a6a79..f63b9e9ef 100644
--- a/doc/meintro_fr.me.in
+++ b/doc/meintro_fr.me.in
@@ -1,5 +1,6 @@
-.\" groff -kt -me -mfr
-.\" nroff -kt -me -mfr
+.\" -*- coding: utf-8; -*-  Help preconv(1) if uchardet is not present.
+.\" groff -K utf8 -t -me -mfr
+.\" nroff -K utf8 -t -me -mfr
 .\"
 .\" Copyright (c) 1986, 1993
 .\"   The Regents of the University of California.  All rights reserved.

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


[groff] 06/23: groff_mmse(7): Convert from Latin-1 to UTF-8.

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

commit 4fc7d977dd659efe3957b376554b23e113a45a41
Author: G. Branden Robinson 
AuthorDate: Mon Oct 14 15:01:38 2024 -0500

groff_mmse(7): Convert from Latin-1 to UTF-8.

* contrib/mm/groff_mmse.7.man: Convert file encoding from Latin-1 to
  UTF-8.
---
 contrib/mm/ChangeLog|  4 
 contrib/mm/groff_mmse.7.man | 44 ++--
 2 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 2720612d0..cbb9a0cff 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,7 @@
+2024-10-14  G. Branden Robinson 
+
+   * groff_mmse.7.man: Convert file encoding from Latin-1 to UTF-8.
+
 2024-10-12  G. Branden Robinson 
 
Handle `nP` paragraphs more compatibly with DWB 3.3 mm.
diff --git a/contrib/mm/groff_mmse.7.man b/contrib/mm/groff_mmse.7.man
index 02c5600a1..638cea1fa 100644
--- a/contrib/mm/groff_mmse.7.man
+++ b/contrib/mm/groff_mmse.7.man
@@ -4,7 +4,7 @@ groff_mmse \- svenska \(rqmemorandum\(rq makro f\(:or GNU
 .I roff
 .
 .
-.\" Skrivet av J�rgen H�gg, Lund, Sverige
+.\" Skrivet av Jörgen Hägg, Lund, Sverige
 .
 .\" 
 .\" Legal Terms
@@ -68,42 +68,42 @@ groff_mmse \- svenska \(rqmemorandum\(rq makro f\(:or GNU
 .\" 
 .
 .I m@TMAC_M_PREFIX@mse
-�r en svensk variant av
+är en svensk variant av
 .IR m@TMAC_M_PREFIX@m .
-Alla texter �r �versatta.
-En A4 sida f�r text som �r 13\~cm bred,
-3,5\~cm indragning samt �r 28,5\~cm h�g.
-Det finns st�d f�r brevuppst�llning enligt svensk standard
-f�r v�nster och h�gerjusterad text.
+Alla texter är översatta.
+En A4 sida får text som är 13\~cm bred,
+3,5\~cm indragning samt är 28,5\~cm hög.
+Det finns stöd för brevuppställning enligt svensk standard
+för vänster och högerjusterad text.
 .
 .LP
 .B COVER
-kan anv�nda
+kan använda
 .I se_ms
 som argument.
-Detta ger ett svenskt f�rs�ttsblad.
+Detta ger ett svenskt försättsblad.
 Se
 .MR groff_mm @MAN7EXT@
-f�r �vriga detaljer.
+för övriga detaljer.
 .
 .
 .\" 
 .SH Brev
 .\" 
 .
-Tillg�ngliga brevtyper:
+Tillgängliga brevtyper:
 .
 .TP
 .B ".LT SVV"
-V�nsterst�lld l�ptext med adressat i position T0 (v�nsterst�llt).
+Vänsterställd löptext med adressat i position T0 (vänsterställt).
 .
 .TP
 .B ".LT SVH"
-H�gerst�lld l�ptext med adressat i position T4 (passar
-f�nsterkuvert).
+Högerställd löptext med adressat i position T4 (passar
+fönsterkuvert).
 .
 .LP
-F�ljande extra LO-variabler anv�nds.
+Följande extra LO-variabler används.
 .
 .TP
 .BI ".LO DNAMN\ " namn
@@ -116,8 +116,8 @@ Mottagarens datum, anges under
 .RB ( LetMDAT ).
 .
 .TP
-.BI ".LO BIL\ " str�ng
-Anger bilaga, nummer eller str�ng med
+.BI ".LO BIL\ " sträng
+Anger bilaga, nummer eller sträng med
 .B Bilaga
 .RB ( LetBIL )
 som prefix.
@@ -133,7 +133,7 @@ Anger dokumentbeteckning eller dokumentnummer.
 .TP
 .BI ".LO BET\ " beteckning
 Anger beteckning
-(�rendebeteckning i form av diarienummer eller liknande).
+(ärendebeteckning i form av diarienummer eller liknande).
 .
 .TP
 .BI ".LO SIDOR\ " antal
@@ -143,8 +143,8 @@ parenteser.
 .LP
 Om makrot
 .B .TP
-�r definierat anropas det efter utskrift av brevhuvudet.
-D�r l�gger man l�mpligen in postadress och annat som brevfot.
+är definierat anropas det efter utskrift av brevhuvudet.
+Där lägger man lämpligen in postadress och annat som brevfot.
 .
 .
 .\" 
@@ -152,7 +152,7 @@ D
 .\" 
 .
 .MT jorgen.h...@axis.se
-J�rgen H�gg
+Jörgen Hägg
 .ME ,
 Lund,
 Sweden
@@ -169,7 +169,7 @@ Sweden
 .
 .
 .\" 
-.SH "Se ocks�"
+.SH "Se också"
 .\" 
 .
 .MR groff_mm @MAN7EXT@

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


[groff] 19/23: [mdoc]: Rename some test scripts for clarity.

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

commit 912ff14b626839f80d47c9b8451604dba08ad96e
Author: G. Branden Robinson 
AuthorDate: Tue Oct 15 11:25:36 2024 -0500

[mdoc]: Rename some test scripts for clarity.

* tmac/tests/doc_CS-works.sh:
* tmac/tests/doc_CT-works.sh: Rename these...

* tmac/tests/doc_CS-register-works.sh:
* tmac/tests/doc_CT-register-works.sh: ...to these.

* tmac/tmac.am (tmac_TESTS): Update.
---
 ChangeLog| 12 
 tmac/tests/{doc_CS-works.sh => doc_CS-register-works.sh} |  0
 tmac/tests/{doc_CT-works.sh => doc_CT-register-works.sh} |  0
 tmac/tmac.am |  4 ++--
 4 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f2a604753..f180fdad2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2024-10-15  G. Branden Robinson 
+
+   Rename some test scripts for clarity.
+
+   * tmac/tests/doc_CS-works.sh:
+   * tmac/tests/doc_CT-works.sh: Rename these...
+
+   * tmac/tests/doc_CS-register-works.sh:
+   * tmac/tests/doc_CT-register-works.sh: ...to these.
+
+   * tmac/tmac.am (tmac_TESTS): Update.
+
 2024-10-14  G. Branden Robinson 
 
* src/preproc/preconv/tests/smoke-test.sh: Comment out a test;
diff --git a/tmac/tests/doc_CS-works.sh b/tmac/tests/doc_CS-register-works.sh
similarity index 100%
rename from tmac/tests/doc_CS-works.sh
rename to tmac/tests/doc_CS-register-works.sh
diff --git a/tmac/tests/doc_CT-works.sh b/tmac/tests/doc_CT-register-works.sh
similarity index 100%
rename from tmac/tests/doc_CT-works.sh
rename to tmac/tests/doc_CT-register-works.sh
diff --git a/tmac/tmac.am b/tmac/tmac.am
index dd47bd393..09ff3c14e 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -195,8 +195,8 @@ tmac_TESTS = \
   tmac/tests/andoc_check-an-to-doc-transition.sh \
   tmac/tests/andoc_clear-doc-traps.sh \
   tmac/tests/andoc_flush-between-packages.sh \
-  tmac/tests/doc_CS-works.sh \
-  tmac/tests/doc_CT-works.sh \
+  tmac/tests/doc_CS-register-works.sh \
+  tmac/tests/doc_CT-register-works.sh \
   tmac/tests/doc_D-register-places-page-numbers-correctly.sh \
   tmac/tests/doc_Lk-respects-sentence-ending-punctuation.sh \
   tmac/tests/doc_Lk-works.sh \

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


[groff] 04/23: [tmac]: Fix Savannah #66112.

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

commit d0933894c66d5c4f759bd4a924bdcf6e2c9ca03f
Author: Dave Kemper 
AuthorDate: Thu Sep 12 03:37:33 2024 +

[tmac]: Fix Savannah #66112.

* tmac/en.tmac: Map hcodes of Latin-1 characters with diacritical marks
  that are used in English words to their unadorned ASCII counterparts.

Fixes <https://savannah.gnu.org/bugs/?66112>.
---
 ChangeLog|  8 
 tmac/en.tmac | 27 +++
 2 files changed, 35 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 24706cd4b..adf9568d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-10-14  Dave Kemper 
+
+   * tmac/en.tmac: Map hcodes of Latin-1 characters with
+   diacritical marks that are used in English words to their
+   unadorned ASCII counterparts.
+
+   Fixes <https://savannah.gnu.org/bugs/?66112>.
+
 2024-10-14  G. Branden Robinson 
 
* man/groff_tmac.5.man:
diff --git a/tmac/en.tmac b/tmac/en.tmac
index 86e331574..2c79e1322 100644
--- a/tmac/en.tmac
+++ b/tmac/en.tmac
@@ -51,6 +51,33 @@
 .el \
 .  hydefault \n[\*[locale]*hyphenation-mode-base]
 .
+.\" Map hcodes of Latin-1 characters with diacritical marks that are
+.\" used in English words to their unadorned ASCII counterparts.
+.\" See http://savannah.gnu.org/bugs/?66112 for rationale.
+.
+.hcode \['A] a \['a] a
+.hcode \[:A] a \[:a] a
+.hcode \[^A] a \[^a] a
+.hcode \[`A] a \[`a] a
+.hcode \[oA] a \[oa] a
+.hcode \[,C] c \[,c] c
+.hcode \['E] e \['e] e
+.hcode \[:E] e \[:e] e
+.hcode \[^E] e \[^e] e
+.hcode \[`E] e \[`e] e
+.hcode \['I] i \['i] i
+.hcode \[:I] i \[:i] i
+.hcode \[^I] i \[^i] i
+.hcode \[~N] n \[~n] n
+.hcode \['O] o \['o] o
+.hcode \[:O] o \[:o] o
+.hcode \[^O] o \[^o] o
+.hcode \[/O] o \[/o] o
+.hcode \['U] u \['u] u
+.hcode \[:U] u \[:u] u
+.hcode \[^U] u \[^u] u
+.hcode \[`U] u \[`u] u
+.
 .hy
 .
 .rr locale*use-trap-hyphenation-mode

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


[groff] 03/23: groff_tmac(5),gropdf(1): Revise `PDFPIC` docs.

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

commit b2e407c55d7470751caef57156f790b6e0fddd23
Author: G. Branden Robinson 
AuthorDate: Mon Oct 14 14:08:06 2024 -0500

groff_tmac(5),gropdf(1): Revise `PDFPIC` docs.

Fix content and style nits.

Content:
* Convert column headings in tables to style them like man page cross
  references to clue in the user.  (If we converted them to text blocks
  we could make them full-on hyperlinks.)

Style:
* Capitalize proper nouns more idiomatically and in line with their
  vendors' branding.
* Protect `PDFPIC` from hyphenation.
* Recast.
---
 man/groff_tmac.5.man| 70 +++--
 src/devices/gropdf/gropdf.1.man | 29 -
 2 files changed, 67 insertions(+), 32 deletions(-)

diff --git a/man/groff_tmac.5.man b/man/groff_tmac.5.man
index 61162c963..f7df3eb67 100644
--- a/man/groff_tmac.5.man
+++ b/man/groff_tmac.5.man
@@ -649,49 +649,71 @@ file when formatting for a typesetter
 .TP
 .I pdfpic
 provides a single macro,
-.BR PDFPIC ,
-it operates in two modes.
-If it is not used with the pdf output driver -T
-.IR pdf ,
+.BR \%PDFPIC ,
+that operates in two modes.
+.
+If it is not used with
+.IR gropdf ,
 the given
 .I file
-must be a pdf and it relies on the external program
+must be a PDF;
+.B \%PDFPIC
+then relies on the external program
 .MR pdftops 1
-to convert the pdf to an encapsulated postscript file
+to convert the PDF to an encapsulated PostScript (EPS) file
 and calls the
 .B PSPIC
 macro with which it shares an interface.
-If output is to a pdf it calls
-.BR "\[rs]X\[aq]pdf: pdfpic" \~.\|.\|. \[aq]
+.
+If output is to a PDF,
+.B \%PDFPIC
+uses the
+.RB \[lq] "pdf: \%pdfpic" \[rq]
+device extension command
 (see
-.MR gropdf @MAN1EXT@ )
-and the given
+.MR gropdf @MAN1EXT@ );
+the given
 .I file
-can be a pdf or any graphic format supported by
+can then be a PDF or any graphic file format supported by
 .IR gropdf .
+.
+.
+.IP
+Since
+.B \%PDFPIC
+needs to discover the width and height of the image
+(to check if sufficient room exists to place it on the page),
+it has dependencies on external programs as shown below.
+.
+.
 .IP
-Since this macro needs to discover the actual width and
-height of the image (in order to check if there is sufficient
-room on the page) there are dependencies on external programs
-shown in this table:-
 .TS
-allbox  centre;
-Cb Cb Cb Cb
-L C C C.
-   pdfinfo fileidentify
+allbox center;
+Cb Ci Ci Ci
+L  C  C  C.
+\& pdfinfo\fR(1)   file\fR(1)  identify\fR(1)
 \&.pdf \[OK]   \[OK]   \[OK]
 \&.jpg \[u2717]\[OK]   \[OK]
 \&.jp2 \[u2717]\[u2717]\[OK]
 other  \[u2717]\[u2717]\[OK]
 .TE
+.
+.
 .IP
-To include \[oq]other\[cq] (e.g. png/pam/gif) image formats the
-perlmagick modules must be installed as well, they are used by
+To include image formats such as PNG,
+PAM,
+and GIF,
 .I gropdf
-to embed the graphic. They are not needed for the other 3 types.
+relies upon PerlMagick modules to embed the graphic.
+.
+They are not needed for the types listed in the table above.
+.
+.
 .IP
-If the required programs are not available, the file is treated as
-a pdf, so will likely fail if it is not a pdf.
+If the required programs are not available,
+.I file
+is treated as a PDF;
+failure is likely if it is not one.
 .
 .
 .TP
diff --git a/src/devices/gropdf/gropdf.1.man b/src/devices/gropdf/gropdf.1.man
index ac85a5871..f9b6329fc 100644
--- a/src/devices/gropdf/gropdf.1.man
+++ b/src/devices/gropdf/gropdf.1.man
@@ -972,25 +972,38 @@ and
 .I height
 are non-zero the image is scaled to \[oq]best fit\[cq].
 .
+.
+.IP
+The availability of other software on the system,
+such as
+.IR PerlMagick ,
+influences the types of image files
+.I gropdf
+can embed in its output.
+.
+.
 .IP
-Three elements control which type of image files you can now embed into a -T 
pdf produced file. If you have perlmagick installed, if you have the program 
"identify" installed (part of ImageMagick), if you have the program "file" 
installed, or if you have none of these. Here's a table showing the different 
possibilities:-
 .TS
-allbox  centre;
-Cb Cb Cb Cb Cb
-L C C C C.
-   nonefileidentifyperlmagick
+allbox center;
+Cb Ci Ci Ci Ci
+L  C  C  C  C.
+\& nonefile\fR(1)  identify\fR(1)  Image::Magick\fR(3pm)
 \&.pdf \[OK]   \[OK]   \[OK]   \[OK]
 \&.jpg \[u2717]\[OK]   \[OK]   \[OK]
 \&.jp2 \[u2717]\[u2717]\[OK]   \[OK]
 other  \[u2717]\[u2717]\[u2717]\[OK]
 .TE
+.
+.
 .IP
 See
 .MR groff_tmac @MAN5EXT@
 for a description of the
-.B PDFPIC
-macro which provides a convenient high-level interface for inclusion
-of various graphics files.
+.B \%PDFPIC
+macro,
+which provides a convenient high-level interface for i

[groff] 15/23: [mm]: Simplify `EM` string definition.

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

commit 22a3a50e0c0040ecc6b883325306d4644343dbe7
Author: G. Branden Robinson 
AuthorDate: Tue Oct 15 10:31:33 2024 -0500

[mm]: Simplify `EM` string definition.

* m.tmac (EM): Simplify string definition: interpolate only the `\[em]`
  special character always, even in nroff mode, and without leading
  space.  It's the output device's responsibility to fall back
  gracefully when encountering this Ossanna troff special character.
  This also makes the indentation of `DL` list items consistent with
  those of other lists on nroff devices.
---
 contrib/mm/ChangeLog | 10 ++
 contrib/mm/m.tmac|  3 +--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 8457b855b..17fc99672 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,13 @@
+2024-10-15  G. Branden Robinson 
+
+   * m.tmac (EM): Simplify string definition: interpolate only the
+   `\[em]` special character always, even in nroff mode, and
+   without leading space.  It's the output device's responsibility
+   to fall back gracefully when encountering this Ossanna troff
+   special character.  This also makes the indentation of `DL`
+   list items consistent with those of other lists on nroff
+   devices.
+
 2024-10-14  G. Branden Robinson 
 
* groff_mmse.7.man: Add old-style Emacs file-local variable to
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 817958fc1..453f4bfe2 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -181,8 +181,7 @@ http://savannah.gnu.org/bugs/?group=groff.
 .\"eject page before headings of level <= Ej
 .nr Ej 0
 .\"em dash string
-.ie n .ds EM " --
-.el   .ds EM \[em]
+.ds EM \[em]
 .\"align equation labels to the left instead of the right?
 .nr Eq 0
 .\"multiple of Lsp to put between items of footnote text

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


[groff] 18/23: doc/groff.texi.in: Recast `output`/`\!` advice.

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

commit da01b95bed31f7c341b93e13f91aa361745e17d0
Author: G. Branden Robinson 
AuthorDate: Tue Oct 15 11:15:23 2024 -0500

doc/groff.texi.in: Recast `output`/`\!` advice.
---
 doc/groff.texi.in | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/groff.texi.in b/doc/groff.texi.in
index df7ae39ea..1564c732d 100644
--- a/doc/groff.texi.in
+++ b/doc/groff.texi.in
@@ -15760,10 +15760,10 @@ which is read to the end of the input line in copy 
mode.
 
 @strong{Caution:@:} Use of these features can put syntactically invalid
 content into GNU @command{troff}'s output, which @code{groff}'s output
-drivers then fail to process.  They are normally needed only for
-instructions to a postprocessor that does something with the output
-before sending it to the output device, filtering out @var{contents}
-again.
+drivers then fail to process.  @code{output} and use of @code{\!} from
+the top-level diversion are normally needed only for instructions to a
+postprocessor that does something with the output before sending it to
+the output device, filtering out @var{contents} again.
 @c TODO: Once the dust settles from Savannah #63074, document how these
 @c can be used to construct device extension commands without special
 @c character processing.

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


[groff] 02/23: Define fallbacks for `OK` and `u2717` spec chars.

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

commit 5c41c317778ed9d7c049fb5668f0af03f6659b90
Author: G. Branden Robinson 
AuthorDate: Mon Oct 14 13:26:31 2024 -0500

Define fallbacks for `OK` and `u2717` spec chars.

* man/groff_tmac.5.man:
* src/devices/gropdf/gropdf.1.man: These man pages employ an unusual
  character, U+2717 "BALLOT X".  Define a fallback character for devices
  incapable of rendering that.

* tmac/tty.tmac: Define fallback character for groff `OK` special
  character.

Fixes <https://savannah.gnu.org/bugs/?66328>.  Thanks to Bjarni Ingi
Gislason for the report.
---
 ChangeLog   | 13 +
 man/groff_tmac.5.man|  3 +++
 src/devices/gropdf/gropdf.1.man |  5 -
 tmac/tty.tmac   |  2 ++
 4 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 37ad37e60..24706cd4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2024-10-14  G. Branden Robinson 
+
+   * man/groff_tmac.5.man:
+   * src/devices/gropdf/gropdf.1.man: These man pages employ an
+   unusual character, U+2717 "BALLOT X".  Define a fallback
+   character for devices incapable of rendering that.
+
+   * tmac/tty.tmac: Define fallback character for groff `OK`
+   special character.
+
+   Fixes <https://savannah.gnu.org/bugs/?66328>.  Thanks to Bjarni
+   Ingi Gislason for the report.
+
 2024-10-14  G. Branden Robinson 
 
* src/devices/grops/ps.cpp (ps_printer::special): Fix off-by-one
diff --git a/man/groff_tmac.5.man b/man/groff_tmac.5.man
index 8b5ca1212..61162c963 100644
--- a/man/groff_tmac.5.man
+++ b/man/groff_tmac.5.man
@@ -44,6 +44,9 @@ typesetting system
 .\}
 .rr do-fallback
 .
+.\" This man page employs an unusual character.
+.fchar \[u2717] X
+.
 .
 .\" TODO: Consider parallelizing with our Texinfo node "Macro Packages".
 .\" 
diff --git a/src/devices/gropdf/gropdf.1.man b/src/devices/gropdf/gropdf.1.man
index f0334402d..ac85a5871 100644
--- a/src/devices/gropdf/gropdf.1.man
+++ b/src/devices/gropdf/gropdf.1.man
@@ -46,7 +46,6 @@ output driver for Portable Document Format
 .\}
 .rr do-fallback
 .
-.
 .\" This macro definition is poor style from a portability standpoint,
 .\" but it's a good test and demonstration of the standard font
 .\" repertoire for the devices where it has any effect at all, and so
@@ -56,6 +55,10 @@ output driver for Portable Document Format
 .  if '\\*(.T'pdf' .ft \\$1
 ..
 .
+.\" This man page employs an unusual character.
+.fchar \[u2717] X
+.
+.
 .\" 
 .SH Synopsis
 .\" 
diff --git a/tmac/tty.tmac b/tmac/tty.tmac
index 2545a8273..6d2bab525 100644
--- a/tmac/tty.tmac
+++ b/tmac/tty.tmac
@@ -128,6 +128,7 @@
 .fchar \[sq] []
 .fchar \[lh] <=
 .fchar \[rh] =>
+.fchar \[OK] /
 .fchar \[lA] <=
 .fchar \[rA] =>
 .fchar \[hA] <=>
@@ -152,6 +153,7 @@
 .fchar \[radicalex] \[rn]
 .fchar \[sqrtex] \[rn]
 .
+.
 .\" color definitions
 .defcolor black rgb #00
 .defcolor red rgb #ff

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


[groff] 01/23: [grops]: Fix erroneous line number in diagnostic.

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

commit 3962a9ce789b6615773d5074260b9cef77baf3fb
Author: G. Branden Robinson 
AuthorDate: Mon Oct 14 10:50:24 2024 -0500

[grops]: Fix erroneous line number in diagnostic.

* src/devices/grops/ps.cpp (ps_printer::special): Fix off-by-one error
  in diagnostic message's line number report.

Line numbers do not appear to be generally off; I damaged the input file
in varying ways to see.

Exhibit:

$ cat -n minimal.grout | grep -C3 pdf:
   115  H226000
   116  V138474
   117  H226000
   118  x X pdf: pdfpic IMG_4025.pdf -L 16z 12z
   119  n16158 0
   120  x font 40 TI
   121  f40

Before (going back to groff 1.22.4 at least):

$ /usr/bin/grops minimal.grout >/dev/null
/usr/bin/grops:minimal.grout:119: X command without 'ps:' tag ignored

Now:

$ ./build/grops minimal.grout >/dev/null
./build/grops:minimal.grout:118: error: X command without 'ps:' tag ignored
---
 ChangeLog| 5 +
 src/devices/grops/ps.cpp | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 2e210c821..37ad37e60 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-10-14  G. Branden Robinson 
+
+   * src/devices/grops/ps.cpp (ps_printer::special): Fix off-by-one
+   error in diagnostic message's line number report.
+
 2024-10-15  Deri James  
 
Work around debian's ImageMagick policy.
diff --git a/src/devices/grops/ps.cpp b/src/devices/grops/ps.cpp
index f553f0f61..053bb6045 100644
--- a/src/devices/grops/ps.cpp
+++ b/src/devices/grops/ps.cpp
@@ -1551,7 +1551,8 @@ void ps_printer::special(char *arg, const environment 
*env, char type)
   for (; *p != '\0' && *p != ':' && *p != ' ' && *p != '\n'; p++)
 ;
   if (*p == '\0' || strncmp(tag, "ps", p - tag) != 0) {
-error("X command without 'ps:' tag ignored");
+error_with_file_and_line(current_filename, (current_lineno - 1),
+"X command without 'ps:' tag ignored");
 return;
   }
   p++;

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


[groff] 10/12: [ms]: Regression-test Savannah #66328.

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

commit 2f99042f7e1212e6fe37aa610e140dfded1d38f3
Author: G. Branden Robinson 
AuthorDate: Sun Oct 13 15:05:45 2024 -0500

[ms]: Regression-test Savannah #66328.

* tmac/tests/s_XA-reduces-line-length.sh: Do it.
* tmac/tmac.am (tmac_TESTS): Run test.

Test fails at this commit.
---
 ChangeLog  |  7 +++
 tmac/tests/s_XA-reduces-line-length.sh | 97 ++
 tmac/tmac.am   |  1 +
 3 files changed, 105 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 5c4c9a144..5cf6fa846 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2024-10-13  G. Branden Robinson 
+
+   [ms]: Regression-test Savannah #66328.
+
+   * tmac/tests/s_XA-reduces-line-length.sh: Do it.
+   * tmac/tmac.am (tmac_TESTS): Run test.
+
 2024-10-13  G. Branden Robinson 
 
* src/preproc/tbl/table.cpp (table::add_entry): Refactor.  Since
diff --git a/tmac/tests/s_XA-reduces-line-length.sh 
b/tmac/tests/s_XA-reduces-line-length.sh
new file mode 100755
index 0..1d10adafa
--- /dev/null
+++ b/tmac/tests/s_XA-reduces-line-length.sh
@@ -0,0 +1,97 @@
+#!/bin/sh
+#
+# Copyright (C) 2024 Free Software Foundation, Inc.
+#
+# This file 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/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+fail=
+
+wail () {
+echo "...FAILED" >&2
+fail=YES
+}
+
+# Regression-test Savannah #66328.
+
+input='.
+.ds C1 Chapter the First, \
+in which we Ramble On at Excessive Length for the Purpose of \
+Contriving a Table of Contents Entry So Garrulous That It Will Surely \
+Overrun the Line in Any Sensible Page Configuration\"
+.ds C2 Chapter the Second, \
+in which we Do Much the Same, \
+but Apply an Added Twist\"
+.ds C3 Of a Supplement for the Table of Contents, \
+Which in a Traditional Work Might Be Something Like \
+an Em-Dash-Separated List of Subsections or Sundry Other Topics \
+Covered Therein
+.NH 1
+\*(C1
+.XS
+\*(C1
+.XE
+.LP
+This is an
+.I ms
+document.
+.NH 1
+\*(C2
+.XS
+\*(C2
+.XA no
+.in 8n
+\*(C3
+.in
+.XE
+.LP
+It is part of a regression test.
+.TC
+.'
+
+# Expected output (page 2 only):
+#-i-
+#
+#
+#
+# Table of Contents
+#
+#
+# Chapter the First, in which we Ramble On at Excessive
+# Length for the Purpose of Contriving a Table of Contents
+# Entry So Garrulous That It Will Surely Overrun the Line
+# in Any Sensible Page Configuration  . . . . . . . . . . . . .   1
+# Chapter the Second, in which we Do Much the Same, but Ap-
+# ply an Added Twist  . . . . . . . . . . . . . . . . . . . . .   1
+# Of a Supplement for the Table of Contents, Which
+# in a Traditional Work Might Be Something Like an
+# Em-Dash-Separated List of Subsections or Sundry
+# Other Topics Covered Therein
+
+output=$(printf '%s\n' "$input" | "$groff" -Tascii -P-cbou -ms)
+echo "$output"
+
+echo "testing line length of primary TOC entry" >&2
+echo "$output" | grep -qx 'Chapter the First.*Excessive' || wail
+
+echo "testing line length of supplemental TOC entry" >&2
+echo "$output" | grep -qx ' *Of a Supplement.*, Which' || wail
+
+test -z "$fail"
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 1b6613141..dd47bd393 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -239,6 +239,7 @@ tmac_TESTS = \
   tmac/tests/s_SH-resets-IP-indentation-amount.sh \
   tmac/tests/s_TC-works-with-percent-in-custom-titles.sh \
   tmac/tests/s_XA-literal-no-argument-suppresses-leader.sh \
+  tmac/tests/s_XA-reduces-line-length.sh \
   tmac/tests/s_honor-MINGW-when-two-columns.sh \
   tmac/tests/s_honor-page-break-after-display.sh \
   tmac/tests/s_honor-page-break-in-text.sh \

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


[groff] 05/12: groff_mm(7): Clarify `H1txt` string description.

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

commit 759d52e29b41888259ef17d758330884f866f517
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 14:45:17 2024 -0500

groff_mm(7): Clarify `H1txt` string description.
---
 contrib/mm/groff_mm.7.man | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index dbb1b04a0..3007301b7 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -4274,7 +4274,7 @@ it is surrounded by square brackets.
 .
 .TP
 .B H1txt
-stores the text of the current heading;
+stores the text of the current first-level heading;
 .B H
 and
 .B HU

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


[groff] 07/12: groff_mm(7): Tweak `APP` macro description.

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

commit 0b6ea7fef9fc76c6faf7a8770a37d7a44e0a8eeb
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 14:50:24 2024 -0500

groff_mm(7): Tweak `APP` macro description.
---
 contrib/mm/groff_mm.7.man | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 0c212e8f1..01f6c02ad 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -787,8 +787,8 @@ Begin an appendix.
 If
 .I sequence-number
 is omitted,
-it is incremented
-(or initialized
+it increments
+(or is initialized
 .RB to\~ 1 ,
 .\" ...technically, initialized to zero but autoincremented.
 if necessary).

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


[groff] 09/12: [tbl]: Refactor for less inefficiency.

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

commit 1a2fa76cad761f57aa07cfaa488f7d5be19b686a
Author: G. Branden Robinson 
AuthorDate: Sun Oct 13 13:41:51 2024 -0500

[tbl]: Refactor for less inefficiency.

* src/preproc/tbl/table.cpp (table::add_entry): Refactor.  Since we use
  the C string `extract()`ion of the groff `string` table entry
  repeatedly, move logic that stores its pointer to an automatic
  variable much earlier, and reference that in diagnostic messages
  instead of repeatedly calling a member function.

A thing to know about groff's `string::extract()` is that it allocates
memory.[1]  One might wonder, as I did, when that memory is ever freed.
The answer is: when tbl(1) exits.  That's because tbl needs these string
pointers after `table::add_entry()` returns, or there won't be much in
your table.  Ah, to program like it's 1989 again.

A more fastidious approach would copy the pointers to each of these
allocations into an STL `vector` (possibly a private member of class
`table`), and then, when a table region is finished (`.T&` or `.TE` is
encountered), walk the vector and free the storage.

[1] 
https://git.savannah.gnu.org/cgit/groff.git/tree/src/libs/libgroff/string.cpp?h=1.23.0#n285
---
 ChangeLog |  9 +
 src/preproc/tbl/table.cpp | 13 +
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 221c3fa1d..5c4c9a144 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-10-13  G. Branden Robinson 
+
+   * src/preproc/tbl/table.cpp (table::add_entry): Refactor.  Since
+   we use the C string `extract()`ion of the groff `string` table
+   entry repeatedly, move logic that stores its pointer to an
+   automatic variable much earlier, and reference that in
+   diagnostic messages instead of repeatedly calling a member
+   function.
+
 2024-10-12  G. Branden Robinson 
 
* src/preproc/preconv/preconv.cpp (do_file): Fix incorrect
diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index 3ffbe3471..612c93666 100644
--- a/src/preproc/tbl/table.cpp
+++ b/src/preproc/tbl/table.cpp
@@ -1526,6 +1526,7 @@ void table::add_entry(int r, int c, const string &str,
   allocate(r);
   table_entry *e = 0 /* nullptr */;
   int len = str.length();
+  char *s = str.extract();
   // Diagnose escape sequences that can wreak havoc in generated output.
   if (len > 1) {
 // A comment on a control line or in a text block is okay.
@@ -1536,8 +1537,7 @@ void table::add_entry(int r, int c, const string &str,
  && ((-1 == controlpos) // (no control character in line OR
  || (0 == controlpos))) // control character at line start)
warning_with_file_and_line(fn, ln, "comment escape sequence"
-  " '\\\"' in entry \"%1\"",
-  str.extract());
+  " '\\\"' in entry \"%1\"", s);
 }
 int gcommentpos = str.find("\\#");
 // If both types of comment are present, the first is what matters.
@@ -1549,8 +1549,7 @@ void table::add_entry(int r, int c, const string &str,
  && ((-1 == controlpos) // (no control character in line OR
  || (0 == controlpos))) // control character at line start)
warning_with_file_and_line(fn, ln, "comment escape sequence"
-  " '\\#' in entry \"%1\"",
-  str.extract());
+  " '\\#' in entry \"%1\"", s);
 }
 // A \! escape sequence after a comment has started is okay.
 int exclpos = str.find("\\!");
@@ -1560,7 +1559,7 @@ void table::add_entry(int r, int c, const string &str,
   if (-1 == str.search('\n')) // not a text block
warning_with_file_and_line(fn, ln, "transparent throughput"
   " escape sequence '\\!' in entry"
-  " \"%1\"", str.extract());
+  " \"%1\"", s);
   else
warning_with_file_and_line(fn, ln, "transparent throughput"
   " escape sequence '\\!' in text"
@@ -1570,14 +1569,12 @@ void table::add_entry(int r, int c, const string &str,
 if (str.find("\\z") == (len - 2)) { // max valid index is (len - 1)
   if (-1 == str.search('\n')) // not a text block
error_with_file_and_line(fn, ln, "zero-motion escape sequence"
-" '\\z' at end

[groff] 11/12: Revert "[ms]: Drop apparently useless `ll` request in `XA`."

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

commit c8e6768d42fefe1e052fd80e20a97739b0ac09d1
Author: G. Branden Robinson 
AuthorDate: Sun Oct 13 14:32:24 2024 -0500

Revert "[ms]: Drop apparently useless `ll` request in `XA`."

This reverts commit a6e09ca7fb88fcba8f4b0b5af11f5b51353e4bcb.

Fixes <https://savannah.gnu.org/bugs/?66328>.  Thanks to Joerg van den
Hoff for the report.
---
 tmac/s.tmac | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tmac/s.tmac b/tmac/s.tmac
index c69cbfabd..dd682e5b1 100644
--- a/tmac/s.tmac
+++ b/tmac/s.tmac
@@ -1780,6 +1780,7 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .  br
 .  par@reset
 .  na
+.  ll -8n \" XXX: take TC-MARGIN into account?
 .  in (n;0\\$2)
 .\}
 .el .@error .XA without .XS

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


[groff] 08/12: groff_mm(7): Correct `AL` macro description.

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

commit aae14b0b468770a02299947cf32c7ff747011cb7
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 14:58:39 2024 -0500

groff_mm(7): Correct `AL` macro description.

* Drop copy-and-pasted language.  There is no "default type".
* Spell default register format as "0", not "1".  The former is what
  `\g` and `pnr` report.
---
 contrib/mm/groff_mm.7.man | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 01f6c02ad..ab122f969 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -749,11 +749,7 @@ assigns the register format
 uses for the list item enumerators.
 .
 The default
-.RB is\~ 1 .
-.
-An explicitly empty
-.I type
-also indicates the default.
+.RB is\~ 0 .
 .
 A
 .I text-indent

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


[groff] 02/12: ChangeLog: Fix typo.

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

commit f8056c3a23a1851147f5f44896019d48f73946a0
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 15:00:00 2024 -0500

ChangeLog: Fix typo.
---
 ChangeLog | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 22c5eebd6..d4cb5c37d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,7 +38,7 @@
 
* tmac/an.tmac (AT, UC): Fix code style nits.  In formatted
output comparisons, use `'` as the delimiter, as is done
-   everywhere else in the file.  Drop leading quotating marks from
+   everywhere else in the file.  Drop leading quotation marks from
string assignments when unnecessary (the value is known not to
contain leading space).
 

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


[groff] 03/12: [preconv]: Fix incorrect string handling.

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

commit a2216fe0c3e9a92501e6f9ded6e76e1e39eb16fc
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 12:03:09 2024 -0500

[preconv]: Fix incorrect string handling.

* src/preproc/preconv/preconv.cpp (do_file): Fix incorrect handling of
  file name string (a post-groff 1.23.0 regression).
---
 ChangeLog   |  5 +
 src/preproc/preconv/preconv.cpp | 12 
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d4cb5c37d..221c3fa1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-10-12  G. Branden Robinson 
+
+   * src/preproc/preconv/preconv.cpp (do_file): Fix incorrect
+   handling of file name string (a post-groff 1.23.0 regression).
+
 2024-10-12  G. Branden Robinson 
 
Rename some test scripts for clarity.
diff --git a/src/preproc/preconv/preconv.cpp b/src/preproc/preconv/preconv.cpp
index cc661c525..cbd9adae1 100644
--- a/src/preproc/preconv/preconv.cpp
+++ b/src/preproc/preconv/preconv.cpp
@@ -1105,13 +1105,17 @@ do_file(const char *filename)
 fp = fopen(filename, FOPEN_RB);
 reported_filename = "'" + string(filename) + "'";
   }
+  char *c_reported_filename = reported_filename.extract();
   if (!fp) {
-error("can't open %1: %2", reported_filename.contents(),
- strerror(errno));
+error("can't open %1: %2", c_reported_filename, strerror(errno));
+free(c_reported_filename);
 return 0;
   }
-  if (is_debugging)
-fprintf(stderr, "processing %s\n", reported_filename.contents());
+  if (is_debugging) {
+fprintf(stderr, "processing %s\n", c_reported_filename);
+fflush(stderr);
+  }
+  free(c_reported_filename);
   if (fseek(fp, 0L, SEEK_SET) == 0)
 is_seekable = true;
   else {

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


[groff] 01/12: contrib/mom/ChangeLog: Add entry and bug closer.

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

commit d88f9ab3e125db0c145c31d9a1c32ddb28259177
Author: G. Branden Robinson 
AuthorDate: Sun Oct 13 13:26:33 2024 -0500

contrib/mom/ChangeLog: Add entry and bug closer.

...for Peter's commits today.
---
 contrib/mom/ChangeLog | 23 +++
 1 file changed, 23 insertions(+)

diff --git a/contrib/mom/ChangeLog b/contrib/mom/ChangeLog
index 0210b368c..6e3af6f0e 100644
--- a/contrib/mom/ChangeLog
+++ b/contrib/mom/ChangeLog
@@ -1,3 +1,26 @@
+2024-10-13
+
+   * om.tmac: Add linked endnotes; fix graphical objects; tweaks
+   + adds internally linked endnotes
+   + fixes graphical objects clobbering bottom of footer trap
+ - move restoration of traps to the bottom of affected macros
+   + resets $QUAD_VALUE before exiting ENDNOTE
+   + tweaks QUOTE/BLOCKQUOTE and centred/right LISTs so they play
+ nice with line numbering
+   + makes UNDERSCORE2 clobber UNDERSCORE and vice versa in
+ HEADING_STYLE
+   + TYPEWRITE: fix spacing before first para after docheader
+
+   * BUGS, NEWS: Update
+   * examples/sample_docs.mom: small fix to sample_docs.mom for
+   TYPEWRITE
+   * momdoc/docelement.html:
+   * momdoc/docprocessing.html:
+   * momdoc/stylesheet.css: Update and emend docs
+
+   Fixes <https://savannah.gnu.org/bugs/?66322>.  Thanks to ��� for
+   the report.
+
 2024-09-02  Sven Schober 
 
* examples/test-mom.sh.in: Handle discrepant

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


[groff] 04/12: groff_mm(7): Tighten description of `Np` register.

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

commit 043fc6a74cb5892b853a62b515493f41a0855493
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 14:43:39 2024 -0500

groff_mm(7): Tighten description of `Np` register.
---
 contrib/mm/groff_mm.7.man | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 9c59b1e49..dbb1b04a0 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -5264,14 +5264,11 @@ T}
 .
 .TP
 .B Np
-causes paragraphs after first-level headings (only) to be numbered
-in the format
+numbers paragraphs with a leading mark in the format
 .IR s . p ,
 where
 .IR s \~is
-is the section number
-(the number of the current first-level heading)
-and
+is first-level heading number and
 .IR p \~is
 the paragraph number,
 starting at 1;

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


[groff] 06/12: groff_mm(7): Set example literals in boldface.

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

commit 48b1208ff51f4dbdc37411f4e51a7c34e7166220
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 14:46:30 2024 -0500

groff_mm(7): Set example literals in boldface.
---
 contrib/mm/groff_mm.7.man | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 3007301b7..0c212e8f1 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -2471,7 +2471,7 @@ type@Output for a mark \[lq]x\[rq]
 .IP
 If
 .I type
-is\~0,
+.RB is\~ 0 ,
 .I mark-or-format
 specifies each item's mark
 (which can be overridden by an argument to
@@ -2503,7 +2503,8 @@ as a register format.
 .IP
 A
 .I type
-of\~\-1 causes
+.RB of\~ \-1
+causes
 .I "groff mm"
 to break the line after the mark
 even if it fits within

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


[groff] 12/12: [ms]: Fix Savannah #66328.

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

commit ae54c13de00f28fae87adee48f14553d2fd56dee
Author: G. Branden Robinson 
AuthorDate: Sun Oct 13 14:39:19 2024 -0500

[ms]: Fix Savannah #66328.

* tmac/s.tmac (XA): Revert commit a6e09ca7fb, 2022-04-17.  The macro
  once again reduces the line length by eight ens for the entire TOC if
  used.  This looks a little funny (shouldn't it apply only to the entry
  augmentation?), but is consistent with 4.2BSD and 4.3BSD-Reno ms
  behavior, whence comes this extension.

Fixes <https://savannah.gnu.org/bugs/?66328>.  Thanks to Joerg van den
Hoff for the report.

Because this is a Git reversion, there is no visible code change in this
commit.
---
 ChangeLog | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 5cf6fa846..11c5a83b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2024-10-13  G. Branden Robinson 
+
+   * tmac/s.tmac (XA): Revert commit a6e09ca7fb, 2022-04-17.  The
+   macro once again reduces the line length by eight ens for the
+   entire TOC if used.  This looks a little funny (shouldn't it
+   apply only to the entry augmentation?), but is consistent with
+   4.2BSD and 4.3BSD-Reno ms behavior, whence comes this extension.
+
+   Fixes <https://savannah.gnu.org/bugs/?66328>.  Thanks to Joerg
+   van den Hoff for the report.
+
 2024-10-13  G. Branden Robinson 
 
[ms]: Regression-test Savannah #66328.

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


[groff] 29/30: [man]: Coalesce some tests.

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

commit 66fa00bedaf6a3475616c60208de33ccde1e87e6
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 09:56:28 2024 -0500

[man]: Coalesce some tests.

* tmac/tests/an_CS-register-off.sh:
* tmac/tests/an_CS-register-on.sh:
* tmac/tests/an_CS-register-unspecified.sh:
* tmac/tests/an_CT-register-off.sh:
* tmac/tests/an_CT-register-on.sh:
* tmac/tests/an_CT-register-unspecified.sh: Delete files, replacing
  with...

* tmac/tests/an_CS-register-works.sh:
* tmac/tests/an_CT-register-works.sh: ...these new files.

* tmac/tmac.am (tmac_TESTS): Update.
---
 ChangeLog| 16 ++
 tmac/tests/an_CS-register-off.sh | 27 
 tmac/tests/an_CS-register-on.sh  | 27 
 tmac/tests/an_CS-register-unspecified.sh | 27 
 tmac/tests/an_CS-register-works.sh   | 55 
 tmac/tests/an_CT-register-off.sh | 27 
 tmac/tests/an_CT-register-on.sh  | 27 
 tmac/tests/an_CT-register-unspecified.sh | 27 
 tmac/tests/an_CT-register-works.sh   | 55 
 tmac/tmac.am |  8 ++---
 10 files changed, 128 insertions(+), 168 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index e633f013b..ad01d1e7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2024-10-12  G. Branden Robinson 
+
+   [man]: Coalesce some tests.
+
+   * tmac/tests/an_CS-register-off.sh:
+   * tmac/tests/an_CS-register-on.sh:
+   * tmac/tests/an_CS-register-unspecified.sh:
+   * tmac/tests/an_CT-register-off.sh:
+   * tmac/tests/an_CT-register-on.sh:
+   * tmac/tests/an_CT-register-unspecified.sh: Delete files,
+   replacing with...
+   * tmac/tests/an_CS-register-works.sh:
+   * tmac/tests/an_CT-register-works.sh: ...these new files.
+
+   * tmac/tmac.am (tmac_TESTS): Update.
+
 2024-10-11  G. Branden Robinson 
 
* tmac/an.tmac (AT, UC): Fix code style nits.  In formatted
diff --git a/tmac/tests/an_CS-register-off.sh b/tmac/tests/an_CS-register-off.sh
deleted file mode 100755
index 0b615da35..0
--- a/tmac/tests/an_CS-register-off.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2019-2020 Free Software Foundation, Inc.
-#
-# This file 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/>.
-#
-
-groff="${abs_top_builddir:-.}/test-groff"
-
-"$groff" -rCS=0 -Tascii -P-cbou -man <http://www.gnu.org/licenses/>.
-#
-
-groff="${abs_top_builddir:-.}/test-groff"
-
-"$groff" -rCS=1 -Tascii -P-cbou -man <http://www.gnu.org/licenses/>.
-#
-
-groff="${abs_top_builddir:-.}/test-groff"
-
-"$groff" -Tascii -P-cbou -man <http://www.gnu.org/licenses/>.
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+fail=
+
+wail() {
+echo ...FAILED >&2
+fail=yes
+}
+
+input='.
+.TH sample 1 2020-10-31 "groff test suite"
+.SH Name
+sample \- test subject for groff
+.'
+
+output=$(printf "%s" "$input" | "$groff" -Tascii -P -cbou -man)
+echo "$output"
+
+echo "testing package default 'CS' register setting" >&2
+echo "$output" | grep -q Name || fail
+
+output=$(printf "%s" "$input" | "$groff" -Tascii -P -cbou -rCS=0 -man)
+echo "$output"
+
+echo "testing '-rCS=0' argument " >&2
+echo "$output" | grep -q Name || fail
+
+output=$(printf "%s" "$input" | "$groff" -Tascii -P -cbou -rCS=1 -man)
+echo "$output"
+
+echo "testing '-rCS=1' argument " >&2
+echo "$output" | grep -q NAME || fail
+
+test -z "$fail"
+
+# vim:set ai et sw=4 ts=4 tw=72:
diff --git a/tmac/tests/an_CT-register-off.sh b/tmac/tests/an_CT-register-off.sh
deleted file mode 100755
index 9920543e8..0
--- a/tmac/tests/an_CT-register-off.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2019-2020 Free Software Foundation, Inc.
-#
-# This file is part of groff.
-#
-# groff is free software; you can redistribute it and/or modify it under
-# the

[groff] 09/30: groff_mm(7): Tighten wording.

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

commit 44502af98d88bccddfc86f4bd1a255d69033e684
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 11:03:53 2024 -0500

groff_mm(7): Tighten wording.
---
 contrib/mm/groff_mm.7.man | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 2c2e79757..53ca2d75c 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -2869,7 +2869,7 @@ implies
 .BR 1 .
 .
 .I addressee
-sets a string analogous to one used by AT&T cover sheet macros that are
+sets a string analogous to one used by AT&T cover sheet macros
 not implemented in
 .IR "groff mm" .
 .

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


[groff] 06/30: groff_mm(7): Revise `LB`, `LI` macro descriptions.

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

commit 0155f8d7236b042d676f98cba78f611ed9c610cb
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 01:18:06 2024 -0500

groff_mm(7): Revise `LB`, `LI` macro descriptions.
---
 contrib/mm/groff_mm.7.man | 77 +--
 1 file changed, 41 insertions(+), 36 deletions(-)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 52fbbf98c..6c4ad8b97 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -2445,25 +2445,19 @@ purpose.
 tracks the nesting level of lists;
 the outermost is\~0.
 .
-Each list item is indented by
-.I text-indent,
-and its mark
-by
-.I mark-indent.
-.
-The mark is normally left-aligned.
+Each list item
+(text lines after an
+.B LI
+call)
+is indented by
+.I text-indent.
 .
-If
-.I pad
-is greater than zero,
-it overrides
-.I mark-indent
-such that
+The mark is left-aligned at
+.IR mark-indent ,
+padded on the left with
 .I pad
-ens of space follow the mark.
-.
+ens of space.
 .
-.IP
 .I type
 determines the mark's format.
 .
@@ -2474,6 +2468,7 @@ tab(@);
 Lf(BI) Lb
 L L.
 type@Output for a mark \[lq]x\[rq]
+0@x
 1@x.
 2@x)
 3@(x)
@@ -2487,8 +2482,10 @@ type@Output for a mark \[lq]x\[rq]
 If
 .I type
 is\~0,
-.I mm
-assumes that the marks are not numeric.
+.I mark-or-format
+specifies each item's mark
+(which can be overridden by an argument to
+.BR LI ).
 .
 If
 .I mark-or-format
@@ -2496,25 +2493,29 @@ is empty
 (or the dummy character
 .RB \[lq] \[rs]& \[rq])
 .I mm
-sets items with a hanging indent;
-otherwise,
-.I mm
-treats
-.I mark-or-format
-as a string defining the mark.
+sets items at
+.I mark-indent
+with a hanging indent at
+.I text-indent.
 .
 .
 .IP
 If
 .I type
 is greater than zero,
-items are automatically numbered and
+.I mm
+supplies an automatically incrementing numeric mark,
+and interprets
 .I mark-or-format
-is interpreted as a register format.
+as a register format.
+.
 .
+.IP
 A
 .I type
-of\~\-1 breaks the line after the mark
+of\~\-1 causes
+.I "groff mm"
+to break the line after the mark
 even if it fits within
 .I text-indent;
 this is a GNU extension.
@@ -2588,15 +2589,18 @@ is called again.
 By default,
 the item's text is preceded by any mark configured by the current list.
 .
-If only
+If
 .I mark
-is specified,
-it replaces the configured mark.
+is the only argument,
+it replaces the mark configured in the corresponding
+.B LB
+call.
 .
-If the width of the mark plus any padding
-(specified in the list's
+If the width of the mark plus any
+.I pad
+specified in the
 .B LB
-call)
+call
 exceeds the text indentation,
 .I "groff mm"
 warns and uses one en of padding between the mark and the text.
@@ -2604,9 +2608,10 @@ warns and uses one en of padding between the mark and 
the text.
 A second argument
 prefixes
 .I mark
-to the configured mark
-and conditionally puts an unbreakable space between the prefix and mark
-per the argument's Boolean value.
+to the
+.BR LB -configured
+mark and conditionally puts an unbreakable space
+between the prefix and mark per the argument's Boolean value.
 .
 .
 .TP

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


[groff] 19/30: tmac/an.tmac: Revise comments.

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

commit 6929fcfb8d5560c12e6c8c76a4d11623f39c2f3c
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 12:07:27 2024 -0500

tmac/an.tmac: Revise comments.
---
 tmac/an.tmac | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tmac/an.tmac b/tmac/an.tmac
index 881c41cf7..ee9a4c12d 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -26,7 +26,7 @@
 .
 .
 .\" Put site additions in the file man.local, loaded near the end of
-.\" this file.  To add things to TH, use '.am1 TH'.
+.\" this file.  To add things to `TH`, use '.am1 TH'.
 .
 .if !\n(.g \
 .  ab groff man macros require groff extensions; aborting
@@ -240,7 +240,7 @@
 .
 .
 .\" Begin man page.
-.\" .TH topic section[ extra1[ extra2[ extra3]]]
+.\" .TH identifier section[ extra1[ extra2[ extra3]]]
 .de1 TH
 .  if ((\\n[.$] < 2) : (\\n[.$] > 5)) \
 .an-style-warn .\\$0 expects 2 to 5 arguments, got \\n[.$]
@@ -536,6 +536,9 @@
 .  while (\\n[an*index] < \\n[an*max-index]) \{\
 .ds an*char \\$*
 .substring an*char \\n[an*index] \\n[an*index]
+.\" Note: Nasty hack alert!  DEL is a useful escape character for
+.\" this string-iterating application because it is vanishingly
+.\" unlikely to appear in man(7) document text--see Savannah #65469.
 .ec 
 .\" Use a weird delimiter to reduce lexical colorizer confusion.
 .if _*[an*char]_\\_ .nr an*string-contains-backslash 1

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


[groff] 07/30: groff_mm(7): Revise `AL`, `RL` macro descriptions.

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

commit 0600a2aab6f9bc37f02d6deef1e10192dc59c3bb
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 01:34:40 2024 -0500

groff_mm(7): Revise `AL`, `RL` macro descriptions.
---
 contrib/mm/groff_mm.7.man | 22 --
 1 file changed, 12 insertions(+), 10 deletions(-)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 6c4ad8b97..baa5c7670 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -750,9 +750,8 @@ and
 .BR AL \~[\c
 .IR number-format \~[ text-indent \~[\c
 .BR 1 ]]]
-Begin an auto-incrementing numbered list.
-.
-Item numbers start at one.
+Begin an auto-incrementing numbered list,
+where item numbers start at one and are followed by a dot.
 .
 .I number-format
 assigns the register format
@@ -3367,15 +3366,13 @@ without space between the arguments.
 .BR RL \~[\c
 .IR text-indent \~[\c
 .BR 1 ]]
-Begin reference list.
-.
-Each item is preceded by an automatically incremented number between
-square brackets;
-compare
-.BR AL .
+Begin an auto-incrementing numbered list,
+where item numbers start at one and set between square brackets.
 .
+A
 .I text-indent
-changes the default indentation.
+argument overrides register
+.BR Li .
 .
 A second argument suppresses the vertical space that normally precedes
 each list item;
@@ -3395,6 +3392,11 @@ and
 .B LE
 to end the list.
 .
+\[lq]RL\[rq] is a mnemonic for \[lq]reference list\[rq],
+but this macro has no relationship with
+.IR mm 's
+bibliographic reference list facilities.
+.
 .
 .TP
 .BR RP \~\c \" space in roman; we must use 2-font macro with \c

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


[groff] 30/30: Rename some test scripts for clarity.

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

commit e004bd1b7ed9c236fa602932f770a6d1aa22c57a
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 10:10:04 2024 -0500

Rename some test scripts for clarity.

* tmac/tests/an_FT-bad-value-should-not-trash-titles.sh:
* tmac/tests/an_LL-init-sanely.sh:
* tmac/tests/an_ME-punct-hyphenates.sh:
* tmac/tests/an_UE-punct-hyphenates.sh:
* tmac/tests/doc_D-places-page-numbers-correctly.sh:
* tmac/tests/s_PN-works.sh: Rename these...

* tmac/tests/an_FT-register-value-should-not-trash-titles.sh:
* tmac/tests/an_LL-register-initializes-sanely.sh:
* tmac/tests/an_ME-second-argument-hyphenates.sh:
* tmac/tests/an_UE-second-argument-hyphenates.sh:
* tmac/tests/doc_D-register-places-page-numbers-correctly.sh:
* tmac/tests/s_PN-register-works.sh: ...to these.

* tmac/tmac.am (tmac_TESTS): Update.
---
 ChangeLog| 20 
 ... an_FT-register-value-should-not-trash-titles.sh} |  0
 ...anely.sh => an_LL-register-initializes-sanely.sh} |  0
 ...enates.sh => an_ME-second-argument-hyphenates.sh} |  0
 ...enates.sh => an_UE-second-argument-hyphenates.sh} |  0
 ... doc_D-register-places-page-numbers-correctly.sh} |  0
 tmac/tests/{s_PN-works.sh => s_PN-register-works.sh} |  0
 tmac/tmac.am | 12 ++--
 8 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ad01d1e7d..22c5eebd6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2024-10-12  G. Branden Robinson 
+
+   Rename some test scripts for clarity.
+
+   * tmac/tests/an_FT-bad-value-should-not-trash-titles.sh:
+   * tmac/tests/an_LL-init-sanely.sh:
+   * tmac/tests/an_ME-punct-hyphenates.sh:
+   * tmac/tests/an_UE-punct-hyphenates.sh:
+   * tmac/tests/doc_D-places-page-numbers-correctly.sh:
+   * tmac/tests/s_PN-works.sh: Rename these...
+
+   * tmac/tests/an_FT-register-value-should-not-trash-titles.sh:
+   * tmac/tests/an_LL-register-initializes-sanely.sh:
+   * tmac/tests/an_ME-second-argument-hyphenates.sh:
+   * tmac/tests/an_UE-second-argument-hyphenates.sh:
+   * tmac/tests/doc_D-register-places-page-numbers-correctly.sh:
+   * tmac/tests/s_PN-register-works.sh: ...to these.
+
+   * tmac/tmac.am (tmac_TESTS): Update.
+
 2024-10-12  G. Branden Robinson 
 
[man]: Coalesce some tests.
diff --git a/tmac/tests/an_FT-bad-value-should-not-trash-titles.sh 
b/tmac/tests/an_FT-register-value-should-not-trash-titles.sh
similarity index 100%
rename from tmac/tests/an_FT-bad-value-should-not-trash-titles.sh
rename to tmac/tests/an_FT-register-value-should-not-trash-titles.sh
diff --git a/tmac/tests/an_LL-init-sanely.sh 
b/tmac/tests/an_LL-register-initializes-sanely.sh
similarity index 100%
rename from tmac/tests/an_LL-init-sanely.sh
rename to tmac/tests/an_LL-register-initializes-sanely.sh
diff --git a/tmac/tests/an_ME-punct-hyphenates.sh 
b/tmac/tests/an_ME-second-argument-hyphenates.sh
similarity index 100%
rename from tmac/tests/an_ME-punct-hyphenates.sh
rename to tmac/tests/an_ME-second-argument-hyphenates.sh
diff --git a/tmac/tests/an_UE-punct-hyphenates.sh 
b/tmac/tests/an_UE-second-argument-hyphenates.sh
similarity index 100%
rename from tmac/tests/an_UE-punct-hyphenates.sh
rename to tmac/tests/an_UE-second-argument-hyphenates.sh
diff --git a/tmac/tests/doc_D-places-page-numbers-correctly.sh 
b/tmac/tests/doc_D-register-places-page-numbers-correctly.sh
similarity index 100%
rename from tmac/tests/doc_D-places-page-numbers-correctly.sh
rename to tmac/tests/doc_D-register-places-page-numbers-correctly.sh
diff --git a/tmac/tests/s_PN-works.sh b/tmac/tests/s_PN-register-works.sh
similarity index 100%
rename from tmac/tests/s_PN-works.sh
rename to tmac/tests/s_PN-register-works.sh
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 0f393ef33..1b6613141 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -155,10 +155,10 @@ tmac_TESTS = \
   tmac/tests/an_AT-and-UC-footer-saved-and-restored.sh \
   tmac/tests/an_CS-register-works.sh \
   tmac/tests/an_CT-register-works.sh \
-  tmac/tests/an_FT-bad-value-should-not-trash-titles.sh \
+  tmac/tests/an_FT-register-value-should-not-trash-titles.sh \
   tmac/tests/an_HY-register-works.sh \
-  tmac/tests/an_LL-init-sanely.sh \
-  tmac/tests/an_ME-punct-hyphenates.sh \
+  tmac/tests/an_LL-register-initializes-sanely.sh \
+  tmac/tests/an_ME-second-argument-hyphenates.sh \
   tmac/tests/an_MR-works.sh \
   tmac/tests/an_MT-body-hyphenates.sh \
   tmac/tests/an_MT-works.sh \
@@ -170,7 +170,7 @@ tmac_TESTS = \
   tmac/tests/an_TS-adds-no-vertical-space.sh \
   tmac/tests/an_TS-do-not-keep-tables-when-cR-set.sh \
   tmac/tests/an_UE-breaks-before-long-URIs.sh \
-  tmac/tests/an_UE-punct-hyphenates.sh \
+  tmac/tests/an_UE-second-argument-hyphenates.sh \
   tmac/tests/an_UR-body-hyphenates.sh \
 

[groff] 17/30: [man]: Clarify language in style warning messages.

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

commit a6e9aea6c90b7bb10363924c156959c23ff4bae6
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 11:51:09 2024 -0500

[man]: Clarify language in style warning messages.

* tmac/an.tmac (TH): Clarify language in style warning messages.
---
 ChangeLog| 4 
 tmac/an.tmac | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 897cd8682..0bbdd354e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2024-10-11  G. Branden Robinson 
+
+   * tmac/an.tmac (TH): Clarify language in style warning messages.
+
 2024-10-11  G. Branden Robinson 
 
* tmac/an.tmac (TH): Simplify logic populating center header.
diff --git a/tmac/an.tmac b/tmac/an.tmac
index a231523ab..d45ee1631 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -337,14 +337,14 @@
 .  el  .ds an-extra2 \" empty; but .AT/.UC can override
 .
 .  if '\\*[an-extra1]'' \{\
-.ds an-msg .\\$0 missing third argument; suggest document\"
+.ds an-msg .\\$0 missing third argument; consider document\"
 .as an-msg " modification date in ISO 8601 format (-MM-DD)\"
 .an-style-warn \\*[an-msg]
 .rm an-msg
 .  \}
 .
 .  if '\\*[an-extra2]'' \{\
-.ds an-msg .\\$0 missing fourth argument; suggest package/project\"
+.ds an-msg .\\$0 missing fourth argument; consider package/project\"
 .\" Yes, that's one double quote, then three, then two.
 .as an-msg " name and version (e.g., """groff 1.23.0"")\"
 .an-style-warn \\*[an-msg]

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


[groff] 10/30: [mm]: Fix nits in new `Rfstyle` feature.

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

commit a0f39f40d6f6e31209c5935fad5d4930f6ba5fbe
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 03:37:04 2024 -0500

[mm]: Fix nits in new `Rfstyle` feature.

* contrib/mm/m.tmac (@reset, par@doit): Call `ref*set-mark-style`.

  (RS): Assign to string named in argument using the _current_ values of
  `ref*(` and `ref*)`, not those at package initialization time.

* contrib/mm/groff_mm.7.man (Registers) : Document that the
  effect of changing the register value is not necessarily immediate.
---
 contrib/mm/ChangeLog  | 12 
 contrib/mm/groff_mm.7.man |  8 
 contrib/mm/m.tmac |  4 +++-
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 927f08046..a1eb5f6cd 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,15 @@
+2024-10-11  G. Branden Robinson 
+
+   Fix nits in new `Rfstyle` feature.
+
+   * m.tmac (@reset, par@doit): Call `ref*set-mark-style`.
+   (RS): Assign to string named in argument using the _current_
+   values of `ref*(` and `ref*)`, not those at package
+   initialization time.
+
+   * groff_mm.7.man (Registers) : Document that the effect
+   of changing the register value is not necessarily immediate.
+
 2024-10-09  G. Branden Robinson 
 
* m.tmac: Support new `Rpfmt` string specifying the `LB` macro
diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 53ca2d75c..3de06991d 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -5494,6 +5494,14 @@ Value@Meaning
 .TE
 .
 .
+.IP
+Changes to
+.BR Rfstyle 's
+value
+may not take effect until the next heading or paragraphing macro call.
+.\" ...and in certain other cases we don't document.
+.
+.
 .\" XXX: Why is this not named `Rpej`?
 .TP
 .B Rpe
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 6812b00ef..087682a66 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -451,6 +451,7 @@ http://savannah.gnu.org/bugs/?group=groff.
 'ti 0
 .ps \\n[@ps]u
 .vs \\n[@vs]u
+.ref*set-mark-style \" in case the document has changed it
 ..
 .de misc@toupper
 .tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
@@ -536,6 +537,7 @@ http://savannah.gnu.org/bugs/?group=groff.
 .if \\n[par*do-indent] .ti +\\n[Pi]n
 .rr par*do-indent
 .nr par@suppress-indentation 0
+.ref*set-mark-style \" in case the document has changed it
 ..
 .\" ### module line ###
 .de SP
@@ -3117,7 +3119,7 @@ exceeds depth of nested lists (\\n[li*lvl])
 .\"
 .de RS
 .ref*set-mark-style \" in case the document changed it
-.if !''\\$1' .ds \\$1 \*[ref*(]\\n[ref*nr]\*[ref*)]
+.if !''\\$1' .ds \\$1 \\*[ref*(]\\n[ref*nr]\\*[ref*)]
 .nr ref*flag 1
 .am ref*mac
 .ref@start-print \\n[ref*nr]

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


[groff] 18/30: [man]: Fix code style nits.

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

commit 0cc0145d56245f037550ccebf3374f25eeb772d6
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 12:03:33 2024 -0500

[man]: Fix code style nits.

* tmac/an.tmac (AT, UC): Fix code style nits.  In formatted output
  comparisons, use `'` as the delimiter, as is done everywhere else in
  the file.  Drop leading quotating marks from string assignments when
  unnecessary (the value is known not to contain leading space).
---
 ChangeLog|  8 
 tmac/an.tmac | 24 
 2 files changed, 20 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0bbdd354e..e633f013b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-10-11  G. Branden Robinson 
+
+   * tmac/an.tmac (AT, UC): Fix code style nits.  In formatted
+   output comparisons, use `'` as the delimiter, as is done
+   everywhere else in the file.  Drop leading quotating marks from
+   string assignments when unnecessary (the value is known not to
+   contain leading space).
+
 2024-10-11  G. Branden Robinson 
 
* tmac/an.tmac (TH): Clarify language in style warning messages.
diff --git a/tmac/an.tmac b/tmac/an.tmac
index d45ee1631..881c41cf7 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -397,12 +397,12 @@
 .\" .AT [system-id[ release-id]]
 .de1 AT
 .  nop \\*[an-deprecation-warn]\\
-.  ds an-extra2 "7th Edition\"
-.  if "\\$1"3" .ds an-extra2 "7th Edition\"
-.  if "\\$1"4" .ds an-extra2 "System III\"
-.  if "\\$1"5" \{\
-.ie "\\$2"" .ds an-extra2 "System V\"
-.el .ds an-extra2 "System V Release \\$2\"
+.  ds an-extra2 7th Edition\"
+.  if '\\$1'3' .ds an-extra2 7th Edition\"
+.  if '\\$1'4' .ds an-extra2 System III\"
+.  if '\\$1'5' \{\
+.ie '\\$2'' .ds an-extra2 System V\"
+.el .ds an-extra2 System V Release \\$2\"
 .  \}
 .  ev an*env-header-and-footer
 .  an*abbreviate-inner-footer
@@ -413,12 +413,12 @@
 .\" .UC [system-id]
 .de1 UC
 .  nop \\*[an-deprecation-warn]\\
-.  ds an-extra2 "3rd Berkeley Distribution\"
-.  if "\\$1"3" .ds an-extra2 "3rd Berkeley Distribution\"
-.  if "\\$1"4" .ds an-extra2 "4th Berkeley Distribution\"
-.  if "\\$1"5" .ds an-extra2 "4.2 Berkeley Distribution\"
-.  if "\\$1"6" .ds an-extra2 "4.3 Berkeley Distribution\"
-.  if "\\$1"7" .ds an-extra2 "4.4 Berkeley Distribution\"
+.  ds an-extra2 3rd Berkeley Distribution\"
+.  if '\\$1'3' .ds an-extra2 3rd Berkeley Distribution\"
+.  if '\\$1'4' .ds an-extra2 4th Berkeley Distribution\"
+.  if '\\$1'5' .ds an-extra2 4.2 Berkeley Distribution\"
+.  if '\\$1'6' .ds an-extra2 4.3 Berkeley Distribution\"
+.  if '\\$1'7' .ds an-extra2 4.4 Berkeley Distribution\"
 .  ev an*env-header-and-footer
 .  an*abbreviate-inner-footer
 .  ev

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


[groff] 15/30: [man]: Rename internal strings and registers.

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

commit 7e108461d5a182b44e209115f661eb6d329b6e42
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 11:11:13 2024 -0500

[man]: Rename internal strings and registers.

* tmac/an.tmac: Rename internal strings and registers.

`an*topic` -> `an*ident`
`an*topic-abbv`-> `an*ident-abbv`
`an*topic-string`  -> `an*ident-string`
`an*topic-length`  -> `an*ident-length`
`an*topic-length-prev` -> `an*ident-length-prev`
`an*topic-style`   -> `an*ident-style`
---
 ChangeLog| 10 ++
 tmac/an.tmac | 54 +++---
 2 files changed, 37 insertions(+), 27 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index d8f7f44dc..f54e8b59d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-10-11  G. Branden Robinson 
+
+   * tmac/an.tmac: Rename internal strings and registers.
+   `an*topic` -> `an*ident`
+   `an*topic-abbv`-> `an*ident-abbv`
+   `an*topic-string`  -> `an*ident-string`
+   `an*topic-length`  -> `an*ident-length`
+   `an*topic-length-prev` -> `an*ident-length-prev`
+   `an*topic-style`   -> `an*ident-style`
+
 2024-10-11  G. Branden Robinson 
 
* src/devices/grops/psrm.cpp (read_uint_arg): When complaining
diff --git a/tmac/an.tmac b/tmac/an.tmac
index 5b9e0c796..bcd243416 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -320,8 +320,8 @@
 .  nr an*is-in-example 0
 .  nr an*is-in-link-text-diversion 0
 .
-.  ds an*topic "\\$1\"
-.  if \\n[CT] .stringup an*topic
+.  ds an*ident "\\$1\"
+.  if \\n[CT] .stringup an*ident
 .  ds an*section "\\$2\"
 .  ie (\\n[.$] > 4) .ds an-extra3 "\\$5\"
 .  el \{\
@@ -378,7 +378,7 @@
 .  \" HTML gets the topic without any abbreviation, since it's metadata.
 .  if \\n[an*is-output-html] \{\
 .DEVTAG-TL
-.nop \\*[an*topic]
+.nop \\*[an*ident]
 .DEVTAG-EO-TL
 .  \}
 .
@@ -484,51 +484,51 @@
 .
 .\" Abbreviate the page topic if it's too long for the header.  Leaves
 .\" string an-pageref defined for use in .PT and .an-footer.  Also
-.\" leaves an*topic-abbv for possible use by .PT and .BT re-definers.
+.\" leaves an*ident-abbv for possible use by .PT and .BT re-definers.
 .\" Call this only from within the header/footer environment.
 .de an*abbreviate-page-topic
-.  ds an*topic-abbv \\*[an*topic]\" might not get abbreviated at all
-.  ds an*topic-string \\*[an*topic]\"
+.  ds an*ident-abbv \\*[an*ident]\" might not get abbreviated at all
+.  ds an*ident-string \\*[an*ident]\"
 .  ds an-ellipsis \|.\|.\|.\|\"
 .  \" an*page-ref-string is left unmodified for internal use, such as
 .  \" PDF bookmarks.
-.  ds an*page-ref-string \\*[an*topic](\\*[an*section])\"
-.  ds an-pageref \\*[an*topic-abbv](\\*[an*section])\"
+.  ds an*page-ref-string \\*[an*ident](\\*[an*section])\"
+.  ds an-pageref \\*[an*ident-abbv](\\*[an*section])\"
 .  nr an-header-width \\w'\\*[an-pageref]\\*[an-extra3]\\*[an-pageref]'
 .  while (\\n[an-header-width] >= \\n[.lt]) \{\
 .\" The page topic is too long; trim some bits out of the middle.
-.length an*topic-length \\*[an*topic-string]
+.length an*ident-length \\*[an*ident-string]
 .\" roff uses truncating division.  Remove an additional character
 .\" on each side of the midpoint to account for the ellipsis we add
 .\" later.
-.nr an-mark1 (\\n[an*topic-length] / 2 - 2)
-.nr an-mark2 (\\n[an*topic-length] / 2 + 2)
-.ds an-prefix \\*[an*topic-string]\"
-.ds an-suffix \\*[an*topic-string]\"
+.nr an-mark1 (\\n[an*ident-length] / 2 - 2)
+.nr an-mark2 (\\n[an*ident-length] / 2 + 2)
+.ds an-prefix \\*[an*ident-string]\"
+.ds an-suffix \\*[an*ident-string]\"
 .\" Use extremum operators to ensure that the first and last
 .\" characters of the topic remain intact (in cases of pathological
 .\" shortening).
 .substring an-prefix 0 (\\n[an-mark1] >? 1)
-.substring an-suffix (\\n[an-mark2] = \\n[an*topic-length]) \
+.length an*ident-new-length \\*[an*ident-string]
+.ie (\\n[an*ident-new-length] >= \\n[an*ident-length]) \
 .  break
-.ds an-pageref \\*[an*topic-abbv](\\*[an*section])\"
+.ds an-pageref \\*[an*ident-abbv](\\*[an*section])\"
 .nr an-header-width \
\\w'\\*[an-pageref]\\*[an-extra3]\\*[an-pageref]'
 .  \}
-.  ds an-pageref \\*[an-lic]\f[\\*[MF]]\\*[an*topic-abbv]\\*[an-ic]\
+.  ds an-pageref \\*[an-lic]\f[\\*[MF]]\\*[an*ident-abbv]\\*[an-ic]\
 \f[R](\\*[an*section])\"
-.  rr an*topic-length-prev
+.  rr an*ident-length-prev
 .  rr an-mark1
 .  rr an-mark2
 .  rm an-prefix

[groff] 24/30: [mm]: Trivially refactor.

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

commit 8dff1abb6eb0006547e5bc5a11fdc7856cd6c4cd
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 04:31:32 2024 -0500

[mm]: Trivially refactor.

* contrib/mm/m.tmac: Trivially refactor.  Rename registers for clarity.

`par*number`  -> `par*nP-counter`
`par*number2` -> `par*Np-counter`
---
 contrib/mm/ChangeLog |  6 ++
 contrib/mm/m.tmac| 14 +++---
 2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 64637b1c4..21ac3f3fa 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,9 @@
+2024-10-12  G. Branden Robinson 
+
+   * m.tmac: Trivially refactor.  Rename registers for clarity.
+   `par*number`  -> `par*nP-counter`
+   `par*number2` -> `par*Np-counter`
+
 2024-10-12  G. Branden Robinson 
 
* m.tmac (initialization): Refactor.  Drop never-interpolated
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 49ba9aa5c..07ad99fcd 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -479,10 +479,10 @@ http://savannah.gnu.org/bugs/?group=groff.
 .nr par@suppress-indentation 0
 .nr hd*last-pos -1
 .nr hd*last-hsize -1
-.nr par*number 0 1
-.af par*number 01
-.nr par*number2 0 1
-.af par*number2 01
+.nr par*nP-counter 0 1
+.af par*nP-counter 00
+.nr par*Np-counter 0 1
+.af par*Np-counter 00
 .\"
 .\" paragraph
 .de P
@@ -502,7 +502,7 @@ http://savannah.gnu.org/bugs/?group=groff.
 .\}
 .nr par*indentation-eligible 1-\\n[par@suppress-indentation]
 .par@doit \\$*
-.if \\n[Np] \\n[H1].\\n+[par*number]\ \ \c
+.if \\n[Np] \\n[H1].\\n+[par*Np-counter]\ \ \c
 ..
 .\"
 .de nP
@@ -513,7 +513,7 @@ http://savannah.gnu.org/bugs/?group=groff.
 .\" A first-line indentation is meaningless for a numbered paragraph.
 .nr par*indentation-eligible 0
 .par@doit
-\\n[H2].\\n+[par*number2]\ \ \c
+\\n[H2].\\n+[par*nP-counter]\ \ \c
 ..
 .\"
 .de par@doit
@@ -1155,7 +1155,7 @@ numeric; got '\\$1'
 .ie \\n[hd*level]<=\\n[Hps] .SP (u;\\n[Hps2])
 .el .SP (u;\\n[Hps1])
 .\"
-.if \\$1=1&\\n[Np] .nr par*number 0
+.if \\$1=1&\\n[Np] .nr par*Np-counter 0
 .\" start diversion to measure size of header
 .di hd*div
 \\*[hd*mark]\\$2\\$3\\*[hd*suf-space]

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


[groff] 20/30: contrib/mm/ChangeLog: Fix old entry.

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

commit fdd6967c1a7dabd1f4da213fbfd99f9bca6dec5f
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 03:13:04 2024 -0500

contrib/mm/ChangeLog: Fix old entry.

See "HACKING" file, item 2 under "Documenting changes".
---
 contrib/mm/ChangeLog | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index a1eb5f6cd..c1e454f76 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -130,10 +130,9 @@
 
 2024-10-09  G. Branden Robinson 
 
-   * contrib/mm/m.tmac (initialization, LB, LI): Trivially
-   refactor.  Rename internal string `li*mark` to `li*mf`, since it
-   can be _either_ an arbitrary string _or_ an argument to the `af`
-   request.
+   * m.tmac (initialization, LB, LI): Trivially refactor.  Rename
+   internal string `li*mark` to `li*mf`, since it can be _either_
+   an arbitrary string _or_ an argument to the `af` request.
 
 2024-09-27  G. Branden Robinson 
 

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


[groff] 27/30: groff_mm(7): Clarify `Li`, `Pi` register behavior.

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

commit 4d674c45259812ae976e2f7b68daad7907d6a22a
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 05:21:25 2024 -0500

groff_mm(7): Clarify `Li`, `Pi` register behavior.
---
 contrib/mm/groff_mm.7.man | 11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index b0b5a3c71..fd4cb2f4b 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -5152,7 +5152,9 @@ and
 .
 .TP
 .B Li
-configures the text indentation applied to enumerated list types;
+configures the text indentation
+(in ens)
+applied to enumerated list types;
 that is,
 to items in
 .B AL
@@ -5357,10 +5359,11 @@ except when
 .
 .TP
 .B Pi
-configures the amount of indentation in ens applied
-to the first line of an unnumbered paragraph
+configures the indentation
+(in ens)
+applied to first line of an unnumbered paragraph that has such
 (see
-.BR P )
+.BR P );
 and the text indentation of non-enumerated list items;
 that is,
 to items in

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


[groff] 13/30: [grops]: Improve diagnostic.

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

commit a077a7abfaee8b075fe87b48c27ac54746a1a38f
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 10:59:15 2024 -0500

[grops]: Improve diagnostic.

* src/devices/grops/psrm.cpp (read_uint_arg): When complaining of
  invalid input (that we expect to be an ISO 646-encoded decimal
  integer), disclose what that input is.
---
 ChangeLog  | 6 ++
 src/devices/grops/psrm.cpp | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 22eee91ee..d8f7f44dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-10-11  G. Branden Robinson 
+
+   * src/devices/grops/psrm.cpp (read_uint_arg): When complaining
+   of invalid input (that we expect to be an ISO 646-encoded
+   decimal integer), disclose what that input is.
+
 2024-10-11  G. Branden Robinson 
 
* src/devices/grops/psrm.cpp (read_uint_arg): Boolify.
diff --git a/src/devices/grops/psrm.cpp b/src/devices/grops/psrm.cpp
index c5368f70e..dcd061824 100644
--- a/src/devices/grops/psrm.cpp
+++ b/src/devices/grops/psrm.cpp
@@ -90,7 +90,7 @@ static bool read_uint_arg(const char **pp, unsigned *res)
   const char *start = *pp;
   unsigned long n = strtoul(start, (char **)pp, 10);
   if (*pp == start) {
-error("not an integer");
+error("not an integer: '%1'", *pp);
 return false;
   }
   *res = unsigned(n);

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


[groff] 14/30: tmac/doc.tmac: Improve comments.

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

commit 1dd6a3133160ddf3abdee9cb5df6289736ce76ac
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 11:06:41 2024 -0500

tmac/doc.tmac: Improve comments.
---
 tmac/doc.tmac | 5 +
 1 file changed, 5 insertions(+)

diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index c926b6419..469a5ccf8 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -1,3 +1,5 @@
+.\" groff implementation of mdoc(7) package
+.\"
 .\" Copyright (c) 1991, 1993
 .\"   The Regents of the University of California.  All rights reserved.
 .\"
@@ -47,6 +49,9 @@
 .\" updating and extending documentation, etc.
 .
 .
+.\" Put site additions in the file mdoc.local, loaded near the end of
+.\" this file.  To add things to `Dd`, use '.am1 Dd'.
+.
 .if !\n(.g \
 .  ab groff mdoc macros require groff extensions; aborting
 .

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


[groff] 21/30: groff_mm(7): Clarify use of `Pi` register.

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

commit 056ee2ba830c03912bf4fdd983bef2a3e591b591
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 20:42:49 2024 -0500

groff_mm(7): Clarify use of `Pi` register.

Don't give it a measurement--just a dimensionless count of ens.
---
 contrib/mm/groff_mm.7.man | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 3de06991d..c18e71dab 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -5361,8 +5361,8 @@ except when
 .
 .TP
 .B Pi
-configures the amount of indentation applied
-to the first line of a paragraph
+configures the amount of indentation in ens applied
+to the first line of an unnumbered paragraph
 (see
 .BR P )
 and the text indentation of non-enumerated list items;

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


[groff] 25/30: [mm] Regression-test Savannah #63739.

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

commit dcfe27e3de446fe411626a132246d5b5a13afe90
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 05:06:07 2024 -0500

[mm] Regression-test Savannah #63739.

Unit-test `nP` macro.

* tests/nP-works.sh: Add unit test.
* mm.am (mm_TESTS): Run test.

Test fails at this commit.
---
 contrib/mm/ChangeLog |   7 ++
 contrib/mm/mm.am |   1 +
 contrib/mm/tests/nP-works.sh | 175 +++
 3 files changed, 183 insertions(+)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 21ac3f3fa..972f0e352 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,10 @@
+2024-10-12  G. Branden Robinson 
+
+   Regression-test Savannah #63739 (unit-test `nP` macro).
+
+   * tests/nP-works.sh: Add unit test.
+   * mm.am (mm_TESTS): Run test.
+
 2024-10-12  G. Branden Robinson 
 
* m.tmac: Trivially refactor.  Rename registers for clarity.
diff --git a/contrib/mm/mm.am b/contrib/mm/mm.am
index a78406c6a..f5d35f9e5 100644
--- a/contrib/mm/mm.am
+++ b/contrib/mm/mm.am
@@ -82,6 +82,7 @@ mm_TESTS = \
   contrib/mm/tests/memoranda-format-correctly.sh \
   contrib/mm/tests/ms-cover-sheet-robust-to-missing-AF.sh \
   contrib/mm/tests/mse_has-sufficient-footnote-space.sh \
+  contrib/mm/tests/nP-works.sh \
   contrib/mm/tests/place-equation-labels-correctly-in-displays.sh \
   contrib/mm/tests/remove-stale-bib-entry-data.sh \
   contrib/mm/tests/short-pages-do-not-overflow-stack.sh
diff --git a/contrib/mm/tests/nP-works.sh b/contrib/mm/tests/nP-works.sh
new file mode 100755
index 0..55a1755b5
--- /dev/null
+++ b/contrib/mm/tests/nP-works.sh
@@ -0,0 +1,175 @@
+#!/bin/sh
+#
+# Copyright (C) 2024 Free Software Foundation, Inc.
+#
+# This file 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/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+fail=
+
+wail () {
+echo ...FAILED >&2
+fail=YES
+}
+
+input='.
+.H 1 Opus
+.H 2 "De Redrum Unnatura"
+.nP
+Sed ut perspiciatis,
+unde omnis iste natus error sit voluptatem accusantium doloremque
+laudantium,
+totam rem aperiam eaque ipsa,
+quae ab illo inventore veritatis et quasi architecto beatae vitae dicta
+sunt,
+explicabo.
+.nP
+Nemo enim ipsam voluptatem,
+quia voluptas sit,
+aspernatur aut odit aut fugit,
+sed quia consequuntur magni dolores eos,
+qui ratione voluptatem sequi nesciunt,
+neque porro quisquam est,
+qui dolorem ipsum,
+quia dolor sit amet consectetur adipiscivelit,
+sed quia non-numquam eius modi tempora incidunt,
+ut labore et dolore magnam aliquam quaerat voluptatem.
+.H 3 "Siegesbeckia orientalis"
+.nP
+Quis autem vel eum iure reprehenderit,
+qui inea voluptate velit esse,
+quam nihil molestiae consequatur,
+vel illum,
+qui dolorem eum fugiat,
+quo voluptas nulla pariatur?
+.H 2 "Eternalii famishiis"
+.nP
+At vero eos et accusamus et iusto odio dignissimos ducimus,
+qui blanditiis praesentium voluptatum deleniti atque corrupti,
+quos dolores et quas molestias excepturi sint,
+obcaecati cupiditate non-provident,
+similique sunt in culpa,
+qui officia deserunt mollitia animi,
+id est laborum et dolorum fuga.
+.H 2 [redacted]
+.H 2 [redacted]
+.H 2 [redacted]
+.H 2 [redacted]
+.H 2 [redacted]
+.H 2 [redacted]
+.H 2 [redacted]
+.H 2 "Malleus Maleficarum"
+.nP
+Ut enim ad minima veniam,
+quis nostrum exercitationem ullam corporis suscipitlaboriosam,
+nisi ut aliquid ex ea commodi consequatur?
+.'
+
+output=$(printf "%s\n" "$input" | "$groff" -mm -Tascii -P-cbou | cat -s)
+echo "$output"
+
+# Expected output:
+#
+#- 1 -
+#
+#1.  Opus
+#
+#1.1  De Redrum Unnatura
+#
+#1.01  Sed  ut  perspiciatis, unde omnis iste natus error sit
+#  voluptatem accusantium  doloremque  laudantium,  totam
+#rem  aperiam eaque ipsa, quae ab illo inventore veritatis et
+#quasi architecto beatae vitae dicta sunt, explicabo.
+#
+#1.02  Nemo  enim  ipsam  voluptatem,  quia   voluptas   sit,
+#  aspernatur  aut  odit aut fugit, sed quia consequuntur
+#magni dolores eos, qui ratione  voluptatem  sequi  nesciunt,
+#neque  porro quisquam est, qui dolorem ipsum, quia dolor sit
+# 

[groff] 28/30: groff_mm(7): Fix style nit.

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

commit ad2f18efc93e9badbd0f3e33d847ac0a9c35c2ee
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 10:55:09 2024 -0500

groff_mm(7): Fix style nit.

Tighten wording; favor active voice over passive.
---
 contrib/mm/groff_mm.7.man | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index fd4cb2f4b..9c59b1e49 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -1964,12 +1964,13 @@ configures the indentation of text after headings.
 .
 Threshold register
 .B Hc
-enables the centering of headings;
-a heading level within both of the
+permits centering;
+.I mm
+centers a heading with a level below both of the
 .B Hb
 and
 .B Hc
-thresholds is centered.
+thresholds.
 .
 .
 .IP

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


[groff] 26/30: [mm]: Fix Savannah #63739.

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

commit bcda17efad5d996b089553d226599619acb5c4b7
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 04:31:50 2024 -0500

[mm]: Fix Savannah #63739.

Handle `nP` paragraphs more compatibly with DWB 3.3 mm.

* contrib/mm/m.tmac (nP): Apply a temporary indentation to the second
  output line of a paragraph to align it with the start of the paragraph
  text (not the tag/label) in the first.

  (H): Reset the `nP` paragraph counter when the first- or second-level
  section heading number increments.

* contrib/mm/groff_mm.7.man (Description): Drop notice of difference
  between DWB 3.3 and groff mm `nP` behavior.

  (Macros , Registers ): Document interaction of `nP` and `Np`
  features with run-in headings.

Fixes <https://savannah.gnu.org/bugs/?63739>.

NEWS: Add item.
---
 NEWS  |  6 ++
 contrib/mm/ChangeLog  | 17 +
 contrib/mm/groff_mm.7.man | 26 +++---
 contrib/mm/m.tmac |  5 -
 4 files changed, 38 insertions(+), 16 deletions(-)

diff --git a/NEWS b/NEWS
index 18aee6696..29f33d99f 100644
--- a/NEWS
+++ b/NEWS
@@ -466,6 +466,12 @@ Macro packages
 
 *  The m (mm) macro package now supports AT&T/DWB mm's `Rg` string.
 
+*  The m (mm) macro package's `nP` macro now behaves more like DWB mm's.
+   It applies a temporary indentation to the second output line of a
+   paragraph to align it with the start of the paragraph text (not the
+   tag/label) in the first, and resets the paragraph counter when the
+   first- or second-level section heading number increments.
+
 *  The s (ms) macro package now sets the vertical spacing register
defaults for normal (`VS`) and footnote (`FVS`) text to 120% of the
type size configured in the `PS` and `FPS` registers, respectively,
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 972f0e352..2720612d0 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,20 @@
+2024-10-12  G. Branden Robinson 
+
+   Handle `nP` paragraphs more compatibly with DWB 3.3 mm.
+
+   * m.tmac (nP): Apply a temporary indentation to the second
+   output line of a paragraph to align it with the start of the
+   paragraph text (not the tag/label) in the first.
+   (H): Reset the `nP` paragraph counter when the first- or
+   second-level section heading number increments.
+
+   * groff_mm.7.man (Description): Drop notice of difference
+   between DWB 3.3 and groff mm `nP` behavior.
+   (Macros , Registers ): Document interaction of `nP` and
+   `Np` features with run-in headings.
+
+   Fixes <https://savannah.gnu.org/bugs/?63739>.
+
 2024-10-12  G. Branden Robinson 
 
Regression-test Savannah #63739 (unit-test `nP` macro).
diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index c18e71dab..b0b5a3c71 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -226,17 +226,6 @@ DWB used a hard-coded value of 6\~ens.
 .
 .
 .IP \[bu]
-DWB
-.IR mm 's
-.B nP
-macro indented the second line of a paragraph to align it with the start
-of the text of the first
-(after the paragraph number);
-.IR "groff mm" 's
-does not.
-.
-.
-.IP \[bu]
 .I "groff mm"
 uses the same adjustment and font defaults in
 .I nroff
@@ -1962,9 +1951,10 @@ and register
 sets a threshold within which vertical space follows it.
 .
 If the heading level is above both of these,
-a
-.I run-in heading
-is produced;
+and the paragraph is not numbered,
+.I "groff mm"
+produces a
+.IR "run-in heading" ;
 paragraph text follows on the same output line.
 .
 Otherwise,
@@ -4947,7 +4937,13 @@ and
 sets the threshold for breaking the line after formatting a heading.
 .
 Text after headings at levels above this value is set on the same
-output line if possible;
+output line if possible.
+.
+Paragraphs numbered via
+.B nP
+or the
+.B Np
+register cause a break regardless;
 see
 .B H
 .RB ( 2 ).
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 07ad99fcd..817958fc1 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -510,10 +510,12 @@ http://savannah.gnu.org/bugs/?group=groff.
 .  tm Paragraph nl=\\n[nl], last=\\n[hd*last-pos]
 .  tm Paragraph .k=\\n[.k], hsize=\\n[hd*last-hsize]
 .\}
-.\" A first-line indentation is meaningless for a numbered paragraph.
+.\" `nP` handles indentation differently from `P`.
 .nr par*indentation-eligible 0
 .par@doit
 \\n[H2].\\n+[par*nP-counter]\ \ \c
+.\" Indent the paragraph's second line, too.
+'ti \w'\\n[H2].\\n[par*nP-counter]'u+2n
 ..
 .\"
 .de par@doit
@@ -1156,6 +1158,7 @@ numeric; got '\\$1'
 .el .SP (u;\\n[Hps1])
 .\"
 .if \\$1=1&\\n[Np] .nr par*Np-counter

[groff] 05/30: groff_mm(7): Fix error in `LB` description.

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

commit 6d899e9fc897a6ada99247b95a1a681350adea24
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 11:02:59 2024 -0500

groff_mm(7): Fix error in `LB` description.

There is no default list/mark type; the fourth argument is mandatory.
---
 contrib/mm/groff_mm.7.man | 4 
 1 file changed, 4 deletions(-)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 38a33a31b..52fbbf98c 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -2519,10 +2519,6 @@ even if it fits within
 .I text-indent;
 this is a GNU extension.
 .
-The default
-.I type
-.RB is\~ 0 .
-.
 .
 .IP
 The last two arguments manage vertical space.

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


[groff] 23/30: [mm]: Refactor `Np`/`H` interaction.

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

commit c236b4f149b53813768266ab6479b3a03a552b85
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 03:30:45 2024 -0500

[mm]: Refactor `Np`/`H` interaction.

* contrib/mm/m.tmac (initialization): Refactor.  Drop never-interpolated
  register `par*num-counter`.

  (par@reset-num): This macro was called in only one place, so delete
  it...

  (H): ...and open-code its logic at its lone call site.  Format complex
  numeric expressions in conditionals using the dense and
  AT&T-compatible manner of the rest of the package, omitting
  parentheses and spaces where possible.
---
 contrib/mm/ChangeLog | 11 +++
 contrib/mm/m.tmac|  9 +
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index fe12bd6ea..64637b1c4 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,14 @@
+2024-10-12  G. Branden Robinson 
+
+   * m.tmac (initialization): Refactor.  Drop never-interpolated
+   register `par*num-counter`.
+   (par@reset-num): This macro was called in only one place, so
+   delete it...
+   (H): ...and open-code its logic at its lone call site.  Format
+   complex numeric expressions in conditionals using the dense and
+   AT&T-compatible manner of the rest of the package, omitting
+   parentheses and spaces where possible.
+
 2024-10-12  G. Branden Robinson 
 
* tests/Np-register-works.sh: Add unit test.
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 087682a66..49ba9aa5c 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -483,13 +483,6 @@ http://savannah.gnu.org/bugs/?group=groff.
 .af par*number 01
 .nr par*number2 0 1
 .af par*number2 01
-.nr par*num-count 0 1
-.af par*num-count 01
-.\"reset numbered paragraphs, arg1 = headerlevel
-.de par@reset-num
-.if \\$1<3 .nr par*num-count 0
-.if (\\$1=1)&(\\n[Np]=1) .nr par*number 0
-..
 .\"
 .\" paragraph
 .de P
@@ -1162,7 +1155,7 @@ numeric; got '\\$1'
 .ie \\n[hd*level]<=\\n[Hps] .SP (u;\\n[Hps2])
 .el .SP (u;\\n[Hps1])
 .\"
-.par@reset-num \\n[hd*level]\" reset numbered paragraph
+.if \\$1=1&\\n[Np] .nr par*number 0
 .\" start diversion to measure size of header
 .di hd*div
 \\*[hd*mark]\\$2\\$3\\*[hd*suf-space]

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


[groff] 22/30: [mm]: Add unit test of `Np` register.

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

commit e7892010b956f81e38f0760dbeb93945138dfa84
Author: G. Branden Robinson 
AuthorDate: Sat Oct 12 03:14:11 2024 -0500

[mm]: Add unit test of `Np` register.

* contrib/mm/tests/Np-register-works.sh: Add unit test.
* contrib/mm/mm.am (mm_TESTS): Run test.
---
 contrib/mm/ChangeLog  |   5 ++
 contrib/mm/mm.am  |   1 +
 contrib/mm/tests/Np-register-works.sh | 150 ++
 3 files changed, 156 insertions(+)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index c1e454f76..fe12bd6ea 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,8 @@
+2024-10-12  G. Branden Robinson 
+
+   * tests/Np-register-works.sh: Add unit test.
+   * mm.am (mm_TESTS): Run test.
+
 2024-10-11  G. Branden Robinson 
 
Fix nits in new `Rfstyle` feature.
diff --git a/contrib/mm/mm.am b/contrib/mm/mm.am
index 8689e1d2c..a78406c6a 100644
--- a/contrib/mm/mm.am
+++ b/contrib/mm/mm.am
@@ -72,6 +72,7 @@ mm_TESTS = \
   contrib/mm/tests/ML-marks-work.sh \
   contrib/mm/tests/MT-1-reports-all-TM-numbers.sh \
   contrib/mm/tests/MT-5-includes-AT-in-SG.sh \
+  contrib/mm/tests/Np-register-works.sh \
   contrib/mm/tests/P-indentation-works.sh \
   contrib/mm/tests/VL-accommodates-overlong-mark.sh \
   contrib/mm/tests/flush-long-displays-at-end-of-input.sh \
diff --git a/contrib/mm/tests/Np-register-works.sh 
b/contrib/mm/tests/Np-register-works.sh
new file mode 100755
index 0..1fdc25c52
--- /dev/null
+++ b/contrib/mm/tests/Np-register-works.sh
@@ -0,0 +1,150 @@
+#!/bin/sh
+#
+# Copyright (C) 2024 Free Software Foundation, Inc.
+#
+# This file 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/>.
+#
+
+groff="${abs_top_builddir:-.}/test-groff"
+
+fail=
+
+wail () {
+echo ...FAILED >&2
+fail=YES
+}
+
+input='.
+.nr Np 1
+.H 1 "De Redrum Unnatura"
+.P
+Sed ut perspiciatis,
+unde omnis iste natus error sit voluptatem accusantium doloremque
+laudantium,
+totam rem aperiam eaque ipsa,
+quae ab illo inventore veritatis et quasi architecto beatae vitae dicta
+sunt,
+explicabo.
+.P
+Nemo enim ipsam voluptatem,
+quia voluptas sit,
+aspernatur aut odit aut fugit,
+sed quia consequuntur magni dolores eos,
+qui ratione voluptatem sequi nesciunt,
+neque porro quisquam est,
+qui dolorem ipsum,
+quia dolor sit amet consectetur adipiscivelit,
+sed quia non-numquam eius modi tempora incidunt,
+ut labore et dolore magnam aliquam quaerat voluptatem.
+.H 2 "Siegesbeckia orientalis"
+.P
+Quis autem vel eum iure reprehenderit,
+qui inea voluptate velit esse,
+quam nihil molestiae consequatur,
+vel illum,
+qui dolorem eum fugiat,
+quo voluptas nulla pariatur?
+.H 1 [redacted]
+.H 1 [redacted]
+.H 1 [redacted]
+.H 1 [redacted]
+.H 1 [redacted]
+.H 1 [redacted]
+.H 1 [redacted]
+.H 1 [redacted]
+.H 1 "Malleus Maleficarum"
+.P
+Ut enim ad minima veniam,
+quis nostrum exercitationem ullam corporis suscipitlaboriosam,
+nisi ut aliquid ex ea commodi consequatur?
+.'
+
+output=$(printf "%s\n" "$input" | "$groff" -mm -Tascii -P-cbou | cat -s)
+echo "$output"
+
+# Expected output:
+#   ‐ 1 ‐
+#
+#   1.  De Redrum Unnatura
+#
+#   1.01  Sed  ut  perspiciatis, unde omnis iste natus error sit
+#   voluptatem  accusantium  doloremque  laudantium,  totam  rem
+#   aperiam  eaque  ipsa,  quae  ab  illo inventore veritatis et
+#   quasi architecto beatae vitae dicta sunt, explicabo.
+#
+#   1.02  Nemo  enim  ipsam  voluptatem,  quia   voluptas   sit,
+#   aspernatur  aut  odit aut fugit, sed quia consequuntur magni
+#   dolores eos, qui ratione voluptatem  sequi  nesciunt,  neque
+#   porro  quisquam  est, qui dolorem ipsum, quia dolor sit amet
+#   consectetur adipiscivelit, sed quia  non‐numquam  eius  modi
+#   tempora incidunt, ut labore et dolore magnam aliquam quaerat
+#   voluptatem.
+#
+#   1.1  Siegesbeckia orientalis
+#
+#   1.03  Quis  autem  vel  eum  iure  reprehenderit,  qui  inea
+#   voluptate velit esse, quam nihil molestiae consequatur,  vel
+#   illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?
+#
+#   2.  [redacted]
+#
+#   3.  [redacted]
+#
+#   4.  [r

[groff] 03/30: contrib/mm/ChangeLog: Clarify old items.

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

commit 98c1c27846123745a2bbc8a1fd1f853c9e3757da
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 00:57:44 2024 -0500

contrib/mm/ChangeLog: Clarify old items.
---
 contrib/mm/ChangeLog | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index dd56c1d42..927f08046 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -93,15 +93,15 @@
 
* mm/0.MT: Stop putting a blank line between author names in the
document heading for memorandum types 0-3 and 6 if no
-   supplementary data for each author is being formatted.  This
-   change more accurately reproduces London & Reiser's 1978 paper
-   describing the porting of Unix to the VAX-11/780.
-   (cov@print-authors): New internal register `cov@au-line-counter`
+   further data for each author is formatted.  This change more
+   accurately reproduces London & Reiser's 1978 paper describing
+   the porting of Unix to the VAX-11/780.
+   (cov@print-authors): New internal register `cov*au-line-counter`
tracks how many output lines (more like items of per-author
data) have been emitted for the current author.  Only if it ends
up being more than one, call `SP 1` as before.  Remove register
when done.
-   (cov@print-au1, cov@print-au2): Increment `cov@au-line-counter`.
+   (cov@print-au1, cov@print-au2): Increment `cov*au-line-counter`.
 
 2024-10-09  G. Branden Robinson 
 

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


[groff] 02/30: ChangeLog: Clarify old items.

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

commit f1708ffcadab9a0d5dc3830ad5b9836232faa2d4
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 00:57:31 2024 -0500

ChangeLog: Clarify old items.
---
 ChangeLog | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2a19840d7..bba7e9212 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,8 +38,8 @@
 2024-10-09  G. Branden Robinson 
 
* src/preproc/tbl/table.cpp (table::add_entry): Quote the
-   contents of (ordinary) non-text-block table entries when
-   throwing diagnostics about their contents.
+   contents of ordinary (that is, non-text-block) table entries
+   when throwing diagnostics about their contents.
 
 2024-10-09  G. Branden Robinson 
 
@@ -181,7 +181,7 @@
 
 2024-09-26  G. Branden Robinson 
 
-   [gropdf]: Handle errors and abnormal exits.
+   [gropdf]: Make pdfom handle errors and abnormal exits.
 
* src/devices/gropdf/pdfmom.pl: Handle signaled and error exits
from groff pipeline.  Improve diagnostics.  Store "basename" of

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


[groff] 01/30: ANNOUNCE: Acknowledge Ross Burton.

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

commit 51704d0cea7d02e3e840b7d40c1d07b36ae68e11
Author: G. Branden Robinson 
AuthorDate: Thu Oct 10 19:22:28 2024 -0500

ANNOUNCE: Acknowledge Ross Burton.

...for Savannah #66316.
---
 ANNOUNCE | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ANNOUNCE b/ANNOUNCE
index 861e9bc52..09804f8b9 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -193,6 +193,7 @@ Peter Schaffter
 Phil Chadwick
 Pim
 Ralph Corderoy
+Ross Burton
 Sven Schober
 Tadziu Hoffman
 Thorsten Glaser

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


[groff] 08/30: groff_mm(7): Revise RP-related descriptions.

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

commit 9c642d9000f9f67edb5e1bbf5120f6c519ece5b6
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 01:35:22 2024 -0500

groff_mm(7): Revise RP-related descriptions.

...namely the `RP` macro, `RPX` hook macro, and `Rpfmt` string.
---
 contrib/mm/groff_mm.7.man | 24 +++-
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index baa5c7670..2c2e79757 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -3423,8 +3423,10 @@ automatically if references have accumulated.
 .
 .
 .IP
-References are formatted as a list with
-.BR LB ;
+.I "groff mm"
+calls
+.B LB
+to format the reference list;
 the
 .B Rpfmt
 string configures the list's appearance.
@@ -3442,16 +3444,18 @@ contains the reference list caption.
 .TP
 .B RPX
 This user-definable hook macro assumes responsibility for formatting
-the heading of the reference page produced when the document calls
-.B RP .
+the heading of the reference page that
+.B RP
+produces.
 .
 If not defined
 (the default),
-the reference list caption in the string
+.I mm
+sets the reference list caption in the string
 .B Rp
-is set after two vees of space,
+after two vees of space,
 centered in italics,
-and followed by another vee of space.
+followed by another vee of space.
 .
 .
 .br
@@ -4549,10 +4553,12 @@ specifies the
 .B LB
 arguments that
 .I "groff mm"
-uses to format the items in a reference list.
+uses to format the items in an
+.B RP
+reference list.
 .
 The default is
-.RB \[lq] "\[rs]\[rs]n[Li] 0 1 0 \[rs]& 0 0" \[rq].
+.RB \[lq] "\|\[rs]\[rs]n[Li] 0 1 0 \[rs]& 0\|" \[rq].
 .
 .
 .TP

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


[groff] 12/30: [grops]: Boolify `read_uint_arg()`.

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

commit 36e0cdebd00105c4b2a1e3009bab35b47da7d3dc
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 10:57:09 2024 -0500

[grops]: Boolify `read_uint_arg()`.

* src/devices/grops/psrm.cpp (read_uint_arg): Boolify.
---
 ChangeLog  | 4 
 src/devices/grops/psrm.cpp | 8 
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 075b7b895..22eee91ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2024-10-11  G. Branden Robinson 
+
+   * src/devices/grops/psrm.cpp (read_uint_arg): Boolify.
+
 2024-10-11  G. Branden Robinson 
 
* src/devices/grops/psrm.cpp (read_uint_arg): Thirty years ago
diff --git a/src/devices/grops/psrm.cpp b/src/devices/grops/psrm.cpp
index eb260eab6..c5368f70e 100644
--- a/src/devices/grops/psrm.cpp
+++ b/src/devices/grops/psrm.cpp
@@ -79,22 +79,22 @@ const char *resource_table[] = {
 
 const size_t NRESOURCES = array_length(resource_table);
 
-static int read_uint_arg(const char **pp, unsigned *res)
+static bool read_uint_arg(const char **pp, unsigned *res)
 {
   while (white_space(**pp))
 *pp += 1;
   if (**pp == '\0') {
 error("missing argument");
-return 0;
+return false;
   }
   const char *start = *pp;
   unsigned long n = strtoul(start, (char **)pp, 10);
   if (*pp == start) {
 error("not an integer");
-return 0;
+return false;
   }
   *res = unsigned(n);
-  return 1;
+  return true;
 }
 
 struct resource {

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


[groff] 16/30: [man]: Simplify logic populating center header.

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

commit db9862af21b1c6f564c6afa55117d3aa461d1c9e
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 11:46:19 2024 -0500

[man]: Simplify logic populating center header.

* tmac/an.tmac (TH): Simplify population of center header.
---
 ChangeLog|  4 
 tmac/an.tmac | 17 +
 2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f54e8b59d..897cd8682 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2024-10-11  G. Branden Robinson 
+
+   * tmac/an.tmac (TH): Simplify logic populating center header.
+
 2024-10-11  G. Branden Robinson 
 
* tmac/an.tmac: Rename internal strings and registers.
diff --git a/tmac/an.tmac b/tmac/an.tmac
index bcd243416..a231523ab 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -325,18 +325,11 @@
 .  ds an*section "\\$2\"
 .  ie (\\n[.$] > 4) .ds an-extra3 "\\$5\"
 .  el \{\
-.\" Simulate switch/case in roff.
-.  ie '\\$2'1' .ds an-extra3 \\*[an*section1]\"
-.el \{.ie '\\$2'2' .ds an-extra3 \\*[an*section2]\"
-.el \{.ie '\\$2'3' .ds an-extra3 \\*[an*section3]\"
-.el \{.ie '\\$2'4' .ds an-extra3 \\*[an*section4]\"
-.el \{.ie '\\$2'5' .ds an-extra3 \\*[an*section5]\"
-.el \{.ie '\\$2'6' .ds an-extra3 \\*[an*section6]\"
-.el \{.ie '\\$2'7' .ds an-extra3 \\*[an*section7]\"
-.el \{.ie '\\$2'8' .ds an-extra3 \\*[an*section8]\"
-.el \{.ie '\\$2'9' .ds an-extra3 \\*[an*section9]\"
-.el.ds an-extra3 \" empty
-.\}\}\}\}\}\}\}\}
+.ds an-extra3 \" empty
+.if \B'\\$2' \{\
+.  if ((\\$2 > 0) & (\\$2 < 10)) \
+.ds an-extra3 \\*[an*section\\$2]
+.\}
 .  \}
 .
 .  ds an-extra1 "\\$3\"

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


[groff] 11/30: [grops]: Migrate from `strtol()` to `strtoul()`.

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

commit 051d6f0946f6f2f021ae0a8e34e4b5ae32dd7f3d
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 10:55:44 2024 -0500

[grops]: Migrate from `strtol()` to `strtoul()`.

* src/devices/grops/psrm.cpp (read_uint_arg): Thirty years ago (see
  "ChangeLog.old"), James Clark converted some code in grolj4(1) from
  strtoul(3) to strtol(3), possibly because the function was not
  widespread or standardized.  Presumably that lesson was applied here
  as well.  It's standard now, in ISO C99, for which we require compiler
  support.  Migrate text-to-integer conversion and discard diagnosis of
  negative value.
---
 ChangeLog  | 10 ++
 src/devices/grops/psrm.cpp |  7 +--
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bba7e9212..075b7b895 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-10-11  G. Branden Robinson 
+
+   * src/devices/grops/psrm.cpp (read_uint_arg): Thirty years ago
+   {see "ChangeLog.old"}, James Clark converted some code in
+   grolj4(1) from strtoul(3) to strtol(3), possibly because the
+   function was not widespread or standardized.  Presumably that
+   lesson was applied here as well.  It's standard now, in ISO C99,
+   for which we require compiler support.  Migrate text-to-integer
+   conversion and discard diagnosis of negative value.
+
 2024-10-11  Deri James  
 
Don't use inbuilt pdf parser on user supplied data.
diff --git a/src/devices/grops/psrm.cpp b/src/devices/grops/psrm.cpp
index 1948a0807..eb260eab6 100644
--- a/src/devices/grops/psrm.cpp
+++ b/src/devices/grops/psrm.cpp
@@ -88,16 +88,11 @@ static int read_uint_arg(const char **pp, unsigned *res)
 return 0;
   }
   const char *start = *pp;
-  // XXX use strtoul
-  long n = strtol(start, (char **)pp, 10);
+  unsigned long n = strtoul(start, (char **)pp, 10);
   if (*pp == start) {
 error("not an integer");
 return 0;
   }
-  if (n < 0) {
-error("argument must not be negative");
-return 0;
-  }
   *res = unsigned(n);
   return 1;
 }

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


[groff] 04/30: doc/meref.me.in: Recast `n2` description.

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

commit d887cdf4be32f736e8a23ed3e7be7f32a87d7eae
Author: G. Branden Robinson 
AuthorDate: Fri Oct 11 01:03:48 2024 -0500

doc/meref.me.in: Recast `n2` description.

...again.
---
 doc/meref.me.in | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/doc/meref.me.in b/doc/meref.me.in
index 433d2b19f..a20754bc3 100644
--- a/doc/meref.me.in
+++ b/doc/meref.me.in
@@ -1859,8 +1859,10 @@ in the current font)].
 .DE
 Stop numbering output lines if
 .i n
-empty,
-otherwise continue with the number modified by
+[empty]
+is
+empty;
+otherwise resume using number
 \(+-\c
 .i n.
 .TL

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


[groff] 26/30: [man,mdoc]: Fix code style nits.

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

commit b46cc2ee2c98fbc439067331af19d4989cb19d9a
Author: G. Branden Robinson 
AuthorDate: Thu Oct 10 10:38:18 2024 -0500

[man,mdoc]: Fix code style nits.

* tmac/an.tmac:
* tmac/doc.tmac: Fix code style nits; parallelize handling of rendering
  option registers and strings.
---
 ChangeLog |  6 ++
 tmac/an.tmac  |  4 ++--
 tmac/doc.tmac | 45 +++--
 3 files changed, 35 insertions(+), 20 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 10460ee97..8d58062aa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-10-10  G. Branden Robinson 
+
+   * tmac/an.tmac:
+   * tmac/doc.tmac: Fix code style nits; parallelize handling of
+   rendering option registers and strings.
+
 2024-10-10  G. Branden Robinson 
 
* tmac/refer.tmac (ref*biblio-item-sfx): Define new string (if
diff --git a/tmac/an.tmac b/tmac/an.tmac
index 8221fc7c3..d06f3c71f 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -1515,7 +1515,7 @@ contains unsupported escape sequence
 .if !r CS \
 .  nr CS 0
 .
-.\" full capitalization of page topic
+.\" full capitalization of page identifier
 .if !r CT \
 .  nr CT 0
 .
@@ -1658,7 +1658,7 @@ contains unsupported escape sequence
 .if !r SN \
 .  nr SN 3n
 .
-.\" URI enablement desired
+.\" hyperlinked text desired
 .if !r U \
 .  nr U 1
 .
diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index bca57018d..8a39d0935 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -94,11 +94,21 @@
 .if r ps4html \
 .  nr doc-is-output-html 1
 .
-.\" Use -dAD to set the adjustment mode for ordinary body text.
+.\" adjustment mode
 .if !d AD \
 .  ds AD b\"
 .
-.\" Use -rC1 to consecutively number pages across multiple documents.
+.\" base paragraph indentation
+.if !r BP \
+.  nr BP 5n
+.
+.\" continuous rendering (one long page)
+.if !r cR \{\
+.  ie n .nr cR 1
+.  el   .nr cR 0
+.\}
+.
+.\" consecutive page numbering across multiple documents
 .\"
 .\" We must use consecutive page numbers when using PostScript to
 .\" generate HTML images; we must not reset the page number at the
@@ -114,17 +124,13 @@
 .if \n[doc-is-output-html] \
 .  nr C 1
 .
-.\" Use -rCS=1 to force capitalization of section headings.
-.if !r CS .nr CS 0
+.\" full capitalization of section headings
+.if !r CS \
+.  nr CS 0
 .
-.\" Use -rCT=1 to force capitalization of page titles in headers.
-.if !r CT .nr CT 0
-.
-.\" Use -rcR=0 for multiple pages instead of a single, very long page.
-.if !r cR \{\
-.  if t .nr cR 0
-.  if n .nr cR 1
-.\}
+.\" full capitalization of page identifier
+.if !r CT \
+.  nr CT 0
 .
 .\" If continuous rendering, tell tbl not to use keeps.
 .ie \n[cR] \
@@ -201,10 +207,12 @@
 .
 .\" \n[HY] is recognized for groff_man(7) compatibility, particularly
 .\" via andoc.tmac and man(1); see \n[doc-hyphen-flags] in doc-common.
-.if !r HY .nr HY 1
+.\"
+.\" hyphenation enablement
+.if !r HY \
+.  nr HY 1
 .
-.\" Use -rBP= to set the paragraph indentation amount.
-.if !r BP .nr BP 5n
+.\" groff mdoc does _not_ use groff man's `IN` register.
 .
 .\" LL and LT registers are handled by the doc-setup-page-layout macro.
 .
@@ -257,10 +265,11 @@
 .  \}
 .\}
 .
-.\" Use -rSN= to set the subsection heading indentation amount.
-.if !r SN .nr SN 3n
+.\" subsection indentation
+.if !r SN \
+.  nr SN 3n
 .
-.\" URI enablement desired
+.\" hyperlinked text desired
 .if !r U \
 .  nr U 1
 .

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


[groff] 15/30: [refer]: Parameterize list itemizer suffix.

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

commit 1f4057bd894bf785e00fc5fade900dd7c00da8c8
Author: G. Branden Robinson 
AuthorDate: Thu Oct 10 00:51:54 2024 -0500

[refer]: Parameterize list itemizer suffix.

* tmac/refer.tmac (ref*biblio-item-sfx): Define new string (if not
  already defined) to specify trailing punctuation for a bibliographic
  entry list item.  The default is a dot.

  (ref*end-print): Interpolate the new string instead of a literal dot.
---
 ChangeLog   | 8 
 tmac/refer.tmac | 9 -
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 93927035a..10460ee97 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2024-10-10  G. Branden Robinson 
+
+   * tmac/refer.tmac (ref*biblio-item-sfx): Define new string (if
+   not already defined) to specify trailing punctuation for a
+   bibliographic entry list item.  The default is a dot.
+   (ref*end-print): Interpolate the new string instead of a literal
+   dot.
+
 2024-10-09  G. Branden Robinson 
 
* src/preproc/tbl/table.cpp (table::add_entry): Quote the
diff --git a/tmac/refer.tmac b/tmac/refer.tmac
index 8ca2f1635..34193a666 100644
--- a/tmac/refer.tmac
+++ b/tmac/refer.tmac
@@ -48,6 +48,8 @@
 .\"   ref*item-end-hook -- stuff prepended to the ][ macro
 .\"   ref*biblio-start-hook -- stuff appended to the ]< macro
 .\"   ref*biblio-end-hook   -- stuff appended to the ]> macro
+.\"   ref*biblio-item-sfx   -- stuff appended to list item marks
+.\"in bibliography block
 .\"
 .\" The following strings must be defined:
 .\"
@@ -183,9 +185,14 @@
 ..
 .
 .
+.\" A macro package should set this to an empty string if it handles
+.\" suffixing the item enumerators itself in the listing.
+.if !d ref*biblio-item-sfx \
+.  ds ref*biblio-item-sfx .\"
+.
 .de ref*end-print
 .  ie d [F \
-.  ref*biblio-item-start "\\*([F."
+.  ref*biblio-item-start "\\*([F\\*[ref*biblio-item-sfx]"
 .  el \
 .  ref*biblio-item-start-nolabel
 .  nop \\*[ref*string]

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


[groff] 13/30: contrib/mm/refer-mm.tmac: Update comments.

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

commit aa04a409ca54c91fadcb04db1faa162242f37601
Author: G. Branden Robinson 
AuthorDate: Thu Oct 10 00:19:22 2024 -0500

contrib/mm/refer-mm.tmac: Update comments.

Ratchet copyright date up to most recent code change.

Clarify when `ref*refnum-start` and `ref*refnum-end` are used.

Drop useless recapitulation of file name in opening comment.

Wrap input lines at 72 columns.
---
 contrib/mm/refer-mm.tmac | 28 ++--
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/contrib/mm/refer-mm.tmac b/contrib/mm/refer-mm.tmac
index 800568abb..b0a8147a7 100644
--- a/contrib/mm/refer-mm.tmac
+++ b/contrib/mm/refer-mm.tmac
@@ -1,24 +1,23 @@
-.\" refer-mm.tmac
-.\"
 .\" Refer support for mm macros.
 .\"
-.\" Copyright (C) 2011-2020 Free Software Foundation, Inc.
+.\" Copyright (C) 2011-2022 Free Software Foundation, Inc.
 .\"   Written by Werner Lemberg (w...@gnu.org)
 .\"
 .\" This file 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
+.\" 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.
+.\" 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/>.
+.\" along with this program.  If not, see
+.\" <http://www.gnu.org/licenses/>.
 .\"
 .\" Please send comments to gr...@gnu.org.
 .
@@ -42,6 +41,7 @@
 .  ref@stop-print
 ..
 .
+.\" used in footnotes only, not the reference list produced by `RP`
 .ds ref*refnum-start \" empty
 .ds ref*refnum-end   .\"
 .
@@ -70,9 +70,9 @@
 .ds ref*spec!V """ " " "\fB""\fR"
 .ds ref*spec!dflt  ",  " "
 .
-.\" For the bibliography section, we emulate the .RS/.RF mechanism of mm by
-.\" collecting references (enclosed with .]- and .][) in macro 'ref*mac'.
-.\" This macro gets expanded while calling the .RP macro.
+.\" For the bibliography section, we emulate the .RS/.RF mechanism of mm
+.\" by collecting references (enclosed with .]- and .][) in macro
+.\" 'ref*mac'.  This macro gets expanded while calling the .RP macro.
 .
 .de ref*][-first-pass
 .  ec

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


[groff] 05/30: [tbl]: Make diagnostic messages more helpful.

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

commit 6d3986deac8a6e8d0bc70f612eedc7e184131b2e
Author: G. Branden Robinson 
AuthorDate: Wed Oct 9 11:15:38 2024 -0500

[tbl]: Make diagnostic messages more helpful.

* src/preproc/tbl/table.cpp (table::add_entry): Quote the contents of
  (ordinary) non-text-block table entries when throwing diagnostics
  about their contents.
---
 ChangeLog |  6 ++
 src/preproc/tbl/table.cpp | 36 +---
 2 files changed, 31 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ab995decb..93927035a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-10-09  G. Branden Robinson 
+
+   * src/preproc/tbl/table.cpp (table::add_entry): Quote the
+   contents of (ordinary) non-text-block table entries when
+   throwing diagnostics about their contents.
+
 2024-10-09  G. Branden Robinson 
 
* src/preproc/tbl/table.cpp (table::add_entry): Fix logic error
diff --git a/src/preproc/tbl/table.cpp b/src/preproc/tbl/table.cpp
index 83ffa7816..3ffbe3471 100644
--- a/src/preproc/tbl/table.cpp
+++ b/src/preproc/tbl/table.cpp
@@ -1535,8 +1535,9 @@ void table::add_entry(int r, int c, const string &str,
   if ((-1 == str.search('\n')) // not a text block, AND
  && ((-1 == controlpos) // (no control character in line OR
  || (0 == controlpos))) // control character at line start)
-   warning_with_file_and_line(fn, ln, "table entry contains"
-  " comment escape sequence '\\\"'");
+   warning_with_file_and_line(fn, ln, "comment escape sequence"
+  " '\\\"' in entry \"%1\"",
+  str.extract());
 }
 int gcommentpos = str.find("\\#");
 // If both types of comment are present, the first is what matters.
@@ -1547,21 +1548,34 @@ void table::add_entry(int r, int c, const string &str,
   if ((-1 == str.search('\n')) // not a text block, AND
  && ((-1 == controlpos) // (no control character in line OR
  || (0 == controlpos))) // control character at line start)
-   warning_with_file_and_line(fn, ln, "table entry contains"
-  " comment escape sequence '\\#'");
+   warning_with_file_and_line(fn, ln, "comment escape sequence"
+  " '\\#' in entry \"%1\"",
+  str.extract());
 }
 // A \! escape sequence after a comment has started is okay.
 int exclpos = str.find("\\!");
 if ((exclpos != -1)
&& ((-1 == commentpos)
-   || (exclpos < commentpos)))
-  warning_with_file_and_line(fn, ln, "table entry contains"
-" transparent throughput escape"
-" sequence '\\!'");
+   || (exclpos < commentpos))) {
+  if (-1 == str.search('\n')) // not a text block
+   warning_with_file_and_line(fn, ln, "transparent throughput"
+  " escape sequence '\\!' in entry"
+  " \"%1\"", str.extract());
+  else
+   warning_with_file_and_line(fn, ln, "transparent throughput"
+  " escape sequence '\\!' in text"
+  " block entry");
+}
 // An incomplete \z sequence at the entry's end causes problems.
-if (str.find("\\z") == (len - 2)) // max valid index is (len - 1)
-  error_with_file_and_line(fn, ln, "table entry ends with"
-  " zero-motion escape sequence '\\z'");
+if (str.find("\\z") == (len - 2)) { // max valid index is (len - 1)
+  if (-1 == str.search('\n')) // not a text block
+   error_with_file_and_line(fn, ln, "zero-motion escape sequence"
+" '\\z' at end of entry \"%1\"",
+str.extract());
+  else
+   error_with_file_and_line(fn, ln, "zero-motion escape sequence"
+" '\\z' at end of text block entry");
+}
   }
   char *s = str.extract();
   if (str.search('\n') != -1) { // if it's a text block

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


[groff] 18/30: [mm]: Handle `LB`'s fifth argument more flexibly.

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

commit 2bf1289377c4da4ba3b16bb91312321a640c336d
Author: G. Branden Robinson 
AuthorDate: Wed Oct 9 23:45:28 2024 -0500

[mm]: Handle `LB`'s fifth argument more flexibly.

* contrib/mm/m.tmac (LB): Accept a dummy character escape sequence as a
  synonym for an empty fifth argument.

* contrib/mm/groff_mm.7.man (Macros) : Document this.

This is to save the user from the tedium of figuring out how to escape
or quote an empty pair of double quotes as a macro argument in case they
indirectly assign to the (forthcoming) string that parameterizes the
reference list format.  The need for this is a knock-on effect of Bell's
antipathy for strong type systems.  Possibly the attitude is reflected
in a contemporaneous satire on advertising.

"Hey, hey, hey!  Calm down, you two--New Shimmer is both a floor wax
_and_ a dessert topping!" -- _Saturday Night Live_, 1976-01-10

(Holmdel was getting up to mm mischief at about this time.)
---
 contrib/mm/ChangeLog  | 7 +++
 contrib/mm/groff_mm.7.man | 4 +++-
 contrib/mm/m.tmac | 3 +++
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index b39568d01..7e319d363 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,10 @@
+2024-10-09  G. Branden Robinson 
+
+   * m.tmac (LB): Accept a dummy character escape sequence as a
+   synonym for an empty fifth argument.
+
+   * groff_mm.7.man (Macros) : Document this.
+
 2024-10-09  G. Branden Robinson 
 
* m.tmac (LB): Validate fifth (mark-or-format) argument.
diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index c66956543..84b5d92e4 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -2492,7 +2492,9 @@ assumes that the marks are not numeric.
 .
 If
 .I mark-or-format
-is unspecified,
+is empty
+(or the dummy character
+.RB \[lq] \[rs]& \[rq])
 .I mm
 sets items with a hanging indent;
 otherwise,
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 896444b73..500760a5e 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -2353,6 +2353,8 @@ breaking page
 .\" assign format
 .af li*cnt!\\n[li*lvl] 1
 .if \\n[li*type] \{\
+.  ie '\?\\*[li*mf]\?'\?\&\?' .af li*cnt!\\n[li*lvl] 0
+.  el \{\
 .  nr li*is-format-valid 0
 .  if \B'\\*[li*mf]'&\\*[li*mf]>-1 .nr li*is-format-valid 1
 .  if '\?\\*[li*mf]\?'\?a\?'   .nr li*is-format-valid 1
@@ -2365,6 +2367,7 @@ but mark argument '\\*[li*mf]' is not a valid register 
format; \
 assuming '0'
 .  ds li*mf 0\"
 .  \}
+.  \}
 .\}
 .\"
 .if \\n[li*lb-spc] .SP (u;\\n[li*lb-spc]*\\n[Lsp])

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


[groff] 10/30: [mm]: Recognize an `RPX` hook macro.

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

commit 9df225958389b4b377d40a12276fda32e6fdd36d
Author: G. Branden Robinson 
AuthorDate: Wed Oct 9 09:07:27 2024 -0500

[mm]: Recognize an `RPX` hook macro.

* contrib/mm/m.tmac (RP): Move `SP 2` call (spacing before reference
  list caption) from here...

  (ref@print-refs): ...to here.  Bracket the formatting of the caption
  in a conditional; if an `RPX` macro is defined, call that instead.

* contrib/mm/groff_mm.7.man (Macros) : Document facility.

* NEWS: Add item.
---
 NEWS  |  4 
 contrib/mm/ChangeLog  |  9 +
 contrib/mm/groff_mm.7.man | 15 +++
 contrib/mm/m.tmac | 11 +++
 4 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index ae3afe8a3..ef3f60076 100644
--- a/NEWS
+++ b/NEWS
@@ -433,6 +433,10 @@ Macro packages
`AFX`, which if defined is called by `AF` in lieu of the latter's
normal operation.  Applications include customization of letterhead.
 
+*  The m (mm) macro package now supports a user-definable hook macro
+   `RPX`, which if defined is called by `RP` to format the reference
+   list caption string `Rp` instead of the default formatting.
+
 *  The m (mm) macro package's `LI` macro now interprets its second
argument as a Boolean value indicating whether a space should
separate the list item mark from its prefix (the first argument).
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index c28c460b5..58944b3ce 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,12 @@
+2024-10-09  G. Branden Robinson 
+
+   * m.tmac (RP): Move `SP 2` call (spacing before reference list
+   caption) from here...
+   (ref@print-refs): ...to here.  Bracket the formatting of the
+   caption in a conditional; if an `RPX` macro is defined, call
+   that instead.
+   * groff_mm.7.man (Macros) : Document facility.
+
 2024-10-09  G. Branden Robinson 
 
* m.tmac (RP): Validate macro arguments.
diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 62cef24db..542452552 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -3433,6 +3433,21 @@ The string
 contains the reference list caption.
 .
 .
+.TP
+.B RPX
+This user-definable hook macro assumes responsibility for formatting
+the heading of the reference page produced when the document calls
+.B RP .
+.
+If not defined
+(the default),
+the reference list caption in the string
+.B Rp
+is set after two vees of space,
+centered in italics,
+and followed by another vee of space.
+.
+.
 .br
 .ne 5v
 .TP
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 6aa315a48..4503e8e7e 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -3123,7 +3123,6 @@ argument '\\$1' as '1'
 argument: '\\$2'
 .\}
 .if \\n[ref*i]<2 .SK
-.SP 2
 .ref@print-refs
 .if (\\n[ref*i]=0):(\\n[ref*i]=2) .SK
 .rr ref*reset-counter
@@ -3148,9 +3147,13 @@ argument: '\\$2'
 .\" prints the references
 .de ref@print-refs
 .toc@save 1 "" "\\*[Rp]" \\n[%]
-.ce
-\f2\\*[Rp]\fP
-.sp
+.ie d RPX .RPX
+.el \{\
+.  SP 2
+.  ce
+.  nop \f2\\*[Rp]\fP
+.  sp
+.\}
 .nr ref*ll \\n[.l]
 .misc@ev-keep ref*ev
 .ll \\n[ref*ll]u

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


[groff] 28/30: [mdoc]: Add a (helpful?) warning.

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

commit e219991c7c6d1a355199eec3f884dd595de7a663
Author: G. Branden Robinson 
AuthorDate: Thu Oct 10 10:42:54 2024 -0500

[mdoc]: Add a (helpful?) warning.

* tmac/doc.tmac (doc-enclose-string): Add warning.  mdoc input like this

.Sq ,

  ...is something I see from time to time; it's a conspicuous hazard of
  mdoc's macro system within a macro system.  It leads to an unhelpful
  diagnostic when GNU troff warnings are dialed up.

warning: register 'doc-type0' not defined

  Throw document maintainers, if not readers, a bone.

Observed in a shell (from the Sindh?  maybe the Punjab) known as Lokesh.

troff:../loksh/ksh.1:977: warning: register 'doc-type0' not defined
---
 ChangeLog | 16 
 tmac/doc.tmac |  2 ++
 2 files changed, 18 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 8d58062aa..18117793f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2024-10-10  G. Branden Robinson 
+
+   * tmac/doc.tmac (doc-enclose-string): Add warning.  mdoc input
+   like this
+
+ .Sq ,
+
+   ...is something I see from time to time; it's a conspicuous
+   hazard of mdoc's macro system within a macro system.  It leads
+   to an unhelpful diagnostic when GNU troff warnings are dialed
+   up.
+
+ warning: register 'doc-type0' not defined
+
+   Throw document maintainers, if not readers, a bone.
+
 2024-10-10  G. Branden Robinson 
 
* tmac/an.tmac:
diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index 8a39d0935..c926b6419 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -1724,6 +1724,8 @@
 .\" resp. suffix
 .ie (\n[doc-type\n[doc-arg-count]] == 3) \{\
 .  nr doc-reg-des (\n[doc-arg-count] - 1)
+.  if !r doc-type\n[doc-reg-des] \
+.doc-warn possible missing dummy character '\&' before argument
 .  while (\n[doc-type\n[doc-reg-des]] == 3) \
 .nr doc-reg-des -1
 .

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


[groff] 06/30: groff_mm(7): Clarify `Of` register behavior.

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

commit 389d7cc58146968e6fbbbc18b095b9d28770042a
Author: G. Branden Robinson 
AuthorDate: Wed Oct 9 21:27:15 2024 -0500

groff_mm(7): Clarify `Of` register behavior.
---
 contrib/mm/groff_mm.7.man | 4 
 1 file changed, 4 insertions(+)

diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index b289e1ebc..ce65908ae 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -5286,6 +5286,10 @@ see
 and
 .BR TB .
 .
+The punctuation in the separator is either a dot or the
+.B EM
+string.
+.
 The following values are recognized;
 the spaces shown are unpaddable
 .RB ( 0 ).

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


[groff] 14/30: [mm]: Add new `Rfstyle` register.

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

commit b563a25bf0ea46f85fc99e64d9d359d97a12151a
Author: G. Branden Robinson 
AuthorDate: Wed Oct 9 17:48:01 2024 -0500

[mm]: Add new `Rfstyle` register.

The package no longer superscripts _and_ brackets a reference mark (the
`Rf` string).  Instead, the new `Rfstyle` register controls its
formatting.  The default, 0, selects bracketing in nroff mode and
superscripting in troff mode.  Set `Rfstyle` to 3 in a document to
obtain groff mm's previous mark formatting behavior.

* contrib/mm/m.tmac (initialization): Assign zero to `Rfstyle`.  Define
  new `ref*{n,t}roff-{(,)}` strings.  Define `Rf` in terms of new
  `ref*(` and `ref*)` strings below.  Call `ref*set-mark-style`.

  (ref*set-mark-style): New macro maps a `Rfstyle` to 1 (nroff-style) or
  2 (troff-style) as described above and defines `ref*(` and `ref*)`
  strings per that value.

  (RS): Call `ref*set-mark-style`, handling the case where the document
  changes its reference mark formatting style midstream.

* contrib/mm/refer-mm.tmac ([., .]): Use new `ref*(` and `ref*)`
  strings.

* contrib/mm/groff_mm.7.man (Macros) : Cross reference `Rfstyle`
  register description.

  (Strings) : Drop incorrect (oversimplified) description of how the
  reference mark is formatted.

  (Registers) : Document it.

NEWS: Add item.
---
 NEWS  |  6 ++
 contrib/mm/ChangeLog  | 26 
 contrib/mm/groff_mm.7.man | 51 ++-
 contrib/mm/m.tmac | 36 ++---
 contrib/mm/refer-mm.tmac  |  6 +++---
 5 files changed, 110 insertions(+), 15 deletions(-)

diff --git a/NEWS b/NEWS
index ef3f60076..ff94d0b3b 100644
--- a/NEWS
+++ b/NEWS
@@ -398,6 +398,12 @@ Macro packages
now interprets an argument to its `-I` option in ens instead of ems
by default.
 
+*  The m (mm) macro package no longer superscripts _and_ brackets a
+   reference mark (the `Rf` string).  Instead, the new `Rfstyle`
+   register controls its formatting.  The default, 0, selects bracketing
+   in nroff mode and superscripting in troff mode.  Set `Rfstyle` to 3
+   in a document to obtain groff mm's previous mark formatting behavior.
+
 *  The m (mm) macro package's `Li` register now defaults to 5 ens (not
6) to align with the `Pi` register default.
 
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index e7cb91cb1..f99f03ea5 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,29 @@
+2024-10-09  G. Branden Robinson 
+
+   The package no longer superscripts _and_ brackets a reference
+   mark (the `Rf` string).  Instead, the new `Rfstyle` register
+   controls its formatting.  The default, 0, selects bracketing in
+   nroff mode and superscripting in troff mode.  Set `Rfstyle` to 3
+   in a document to obtain groff mm's previous mark formatting
+   behavior.
+
+   * m.tmac (initialization): Assign zero to `Rfstyle`.  Define new
+   `ref*{n,t}roff-{(,)}` strings.  Define `Rf` in terms of new
+   `ref*(` and `ref*)` strings below.  Call `ref*set-mark-style`.
+   (ref*set-mark-style): New macro maps a `Rfstyle` to 1
+   {nroff-style} or 2 {troff-style} as described above and defines
+   `ref*(` and `ref*)` strings per that value.
+   (RS): Call `ref*set-mark-style`, handling the case where the
+   document changes its reference mark formatting style midstream.
+
+   * refer-mm.tmac ([., .]): Use new `ref*(` and `ref*)` strings.
+
+   * groff_mm.7.man (Macros) : Cross reference `Rfstyle`
+   register description.
+   (Strings) : Drop incorrect (oversimplified) description of
+   how the reference mark is formatted.
+   (Registers) : Document it.
+
 2024-10-09  G. Branden Robinson 
 
* m.tmac: Refactor.  Define new internal strings `ref*(` and
diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 542452552..c66956543 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -3466,6 +3466,13 @@ where the reference mark should be and write the 
reference between
 .BR RS / RF
 on an input line after the reference mark.
 .
+The mark may be bracketed,
+superscripted,
+or both;
+see the
+.B \%Rfstyle
+register.
+.
 If
 .I reference-string
 is specified,
@@ -4524,15 +4531,6 @@ the number is used by the next
 .B RS
 call.
 .
-In
-.I troff
-mode,
-the marker is superscripted;
-in
-.I nroff
-mode,
-it is surrounded by square brackets.
-.
 .
 .TP
 .B Rp
@@ -5437,6 +5435,41 @@ and
 .BR 0 ).
 .
 .
+.TP
+.B Rfstyle
+determines the format of the reference number in the
+.B Rf
+string.
+.
+.I "groff mm"
+maps
+.B 0
+to
+.B 1
+in
+.I nroff
+mode
+and
+.B 2
+in
+.I troff
+mode
+.RB ( 0 ).
+.
+.
+.IP
+.TS
+tab(@);
+lb lb
+l l.
+Value@Meanin

[groff] 12/30: [mm]: Refactor in observance of DRY principle.

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

commit 8ecff34171a9f29f1113a0b29a02f0e236384a4c
Author: G. Branden Robinson 
AuthorDate: Wed Oct 9 11:44:52 2024 -0500

[mm]: Refactor in observance of DRY principle.

* m.tmac: Refactor.  Define new internal strings `ref*(` and `ref*)` to
  bracket reference marks.  Define `Rf` string in terms of these.

  (RS): If given an argument, use the new strings in the named string's
  contents instead of repeating the literal content now stored in the
  new strings.
---
 contrib/mm/ChangeLog | 9 +
 contrib/mm/m.tmac| 6 --
 2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 09e83e8c7..e7cb91cb1 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,12 @@
+2024-10-09  G. Branden Robinson 
+
+   * m.tmac: Refactor.  Define new internal strings `ref*(` and
+   `ref*)` to bracket reference marks.  Define `Rf` string in terms
+   of these.
+   (RS): If given an argument, use the new strings in the named
+   string's contents instead of repeating the literal content now
+   stored in the new strings.
+
 2024-10-09  G. Branden Robinson 
 
* mm/0.MT: Stop putting a blank line between author names in the
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 4503e8e7e..b955c758b 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -3062,12 +3062,14 @@ exceeds depth of nested lists (\\n[li*lvl])
 .aln :R ref*nr
 .nr ref*nr-width 5n
 .nr ref*flag 0 \" for end-of-text
-.ds Rf \v'-.4m'\s-3[\\n+[ref*nr]]\s0\v'.4m'
+.ds ref*( \v'-.4m'\s-3[
+.ds ref*) ]\s0\v'.4m'
+.ds Rf \*[ref*(]\\n+[ref*nr]\*[ref*)]
 .\"
 .\" start reference
 .\"
 .de RS
-.if !''\\$1' .ds \\$1 \v'-.4m'\s-3[\\n[ref*nr]]\s0\v'.4m'
+.if !''\\$1' .ds \\$1 \*[ref*(]\\n[ref*nr]\*[ref*)]
 .nr ref*flag 1
 .am ref*mac
 .ref@start-print \\n[ref*nr].

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


[groff] 27/30: tmac/an.tmac: Fix misleading comment.

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

commit 825a3d124b63723d4eea8339af6a2cd8ae72249b
Author: G. Branden Robinson 
AuthorDate: Thu Oct 10 10:38:48 2024 -0500

tmac/an.tmac: Fix misleading comment.
---
 tmac/an.tmac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tmac/an.tmac b/tmac/an.tmac
index d06f3c71f..5b9e0c796 100644
--- a/tmac/an.tmac
+++ b/tmac/an.tmac
@@ -453,7 +453,7 @@
 .  ie \\n[cR] .pl +1v
 .  el .sp (.5i - .5m)
 .  \" Attach a bookmark to the page header on the first page of a new
-.  \" man(7) document; a changed identifier and section indicates this.
+.  \" man(7) document; a changed identifier or section indicates this.
 .  if !'\\*[an*page-ref-string]'\\*[an*previous-page-ref-string]' \{\
 .nr an*bookmark-level (\\n[an*bookmark-base-level] + 1)
 .an*bookmark \\n[an*bookmark-level]  "\\*[an*page-ref-string]"

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


[groff] 24/30: [mdoc]: Add FSF copyright notices.

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

commit 511f7daa58a506fd34ec2a1a68273aa67c682743
Author: G. Branden Robinson 
AuthorDate: Thu Oct 10 10:14:54 2024 -0500

[mdoc]: Add FSF copyright notices.

Start dates reconstructed from Git history.  The Great Groff Mdoc
Rewrite of 2001 was certainly a watershed.
---
 tmac/doc.tmac | 2 ++
 tmac/groff_mdoc.7.man | 2 ++
 tmac/mdoc/doc-common  | 2 ++
 tmac/mdoc/doc-ditroff | 2 ++
 tmac/mdoc/doc-nroff   | 2 ++
 tmac/mdoc/doc-syms| 2 ++
 6 files changed, 12 insertions(+)

diff --git a/tmac/doc.tmac b/tmac/doc.tmac
index f7e5f1f74..bca57018d 100644
--- a/tmac/doc.tmac
+++ b/tmac/doc.tmac
@@ -1,6 +1,8 @@
 .\" Copyright (c) 1991, 1993
 .\"   The Regents of the University of California.  All rights reserved.
 .\"
+.\" Copyright (C) 2001-2024 Free Software Foundation, Inc.
+.\"
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
 .\" are met:
diff --git a/tmac/groff_mdoc.7.man b/tmac/groff_mdoc.7.man
index dfce54893..806d8372b 100644
--- a/tmac/groff_mdoc.7.man
+++ b/tmac/groff_mdoc.7.man
@@ -12,6 +12,8 @@
 .\" Copyright (C) 1990, 1993
 .\"   The Regents of the University of California.  All rights reserved.
 .\"
+.\" Copyright (C) 2001-2024 Free Software Foundation, Inc.
+.\"
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
 .\" are met:
diff --git a/tmac/mdoc/doc-common b/tmac/mdoc/doc-common
index 1ade688ac..9acc8086f 100644
--- a/tmac/mdoc/doc-common
+++ b/tmac/mdoc/doc-common
@@ -1,6 +1,8 @@
 .\" Copyright (c) 1991, 1993
 .\"   The Regents of the University of California.  All rights reserved.
 .\"
+.\" Copyright (C) 1999-2024 Free Software Foundation, Inc.
+.\"
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
 .\" are met:
diff --git a/tmac/mdoc/doc-ditroff b/tmac/mdoc/doc-ditroff
index 30a7a2f54..193671236 100644
--- a/tmac/mdoc/doc-ditroff
+++ b/tmac/mdoc/doc-ditroff
@@ -1,6 +1,8 @@
 .\" Copyright (c) 1991, 1993
 .\"   The Regents of the University of California.  All rights reserved.
 .\"
+.\" Copyright (C) 1994-2024 Free Software Foundation, Inc.
+.\"
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
 .\" are met:
diff --git a/tmac/mdoc/doc-nroff b/tmac/mdoc/doc-nroff
index 159effebc..0f8663daf 100644
--- a/tmac/mdoc/doc-nroff
+++ b/tmac/mdoc/doc-nroff
@@ -1,6 +1,8 @@
 .\" Copyright (c) 1991, 1993
 .\"   The Regents of the University of California.  All rights reserved.
 .\"
+.\" Copyright (C) 2001-2024 Free Software Foundation, Inc.
+.\"
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
 .\" are met:
diff --git a/tmac/mdoc/doc-syms b/tmac/mdoc/doc-syms
index c637fe242..479f70231 100644
--- a/tmac/mdoc/doc-syms
+++ b/tmac/mdoc/doc-syms
@@ -1,6 +1,8 @@
 .\" Copyright (c) 1991, 1993
 .\"   The Regents of the University of California.  All rights reserved.
 .\"
+.\" Copyright (C) 2001-2024 Free Software Foundation, Inc.
+.\"
 .\" Redistribution and use in source and binary forms, with or without
 .\" modification, are permitted provided that the following conditions
 .\" are met:

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


[groff] 29/30: [hdtbl]: Gather groff(1) options together.

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

commit bb7d7cc229dfcdc1f307b79f625e15d6c936f79b
Author: G. Branden Robinson 
AuthorDate: Thu Oct 10 18:13:32 2024 -0500

[hdtbl]: Gather groff(1) options together.

* contrib/hdtbl/hdtbl.am (.roff.ps): Move `-I`, `-d`, and `-m` groff
  options from this inference rule...

  (HDTBLGROFF): ...to this macro definition.
---
 contrib/hdtbl/ChangeLog |  6 ++
 contrib/hdtbl/hdtbl.am  | 13 +++--
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/contrib/hdtbl/ChangeLog b/contrib/hdtbl/ChangeLog
index a0a1e8d2f..edae8a77c 100644
--- a/contrib/hdtbl/ChangeLog
+++ b/contrib/hdtbl/ChangeLog
@@ -1,3 +1,9 @@
+2024-10-10  G. Branden Robinson 
+
+   * hdtbl.am (.roff.ps): Move `-I`, `-d`, and `-m` groff options
+   from this inference rule...
+   (HDTBLGROFF): ...to this macro definition.
+
 2022-06-21  G. Branden Robinson 
 
* hdtbl.am (HDTBLPROCESSEDEXAMPLEFILES): Add dependency on
diff --git a/contrib/hdtbl/hdtbl.am b/contrib/hdtbl/hdtbl.am
index 3dd60cf31..b6c334c18 100644
--- a/contrib/hdtbl/hdtbl.am
+++ b/contrib/hdtbl/hdtbl.am
@@ -1,4 +1,4 @@
-# Copyright (C) 2006-2020 Free Software Foundation, Inc.
+# Copyright (C) 2006-2024 Free Software Foundation, Inc.
 #  Written by Werner Lemberg 
 #  Automake migration by Bertrand Garrigues
 #
@@ -26,7 +26,11 @@ man7_MANS += contrib/hdtbl/groff_hdtbl.7
 HDTBLGROFF = \
   GROFF_COMMAND_PREFIX= \
   GROFF_BIN_PATH="$(GROFF_BIN_PATH)" \
-  $(GROFFBIN) $(FFLAG) $(MFLAG) -M$(hdtbl_srcdir) -t -p -e -U
+  $(GROFFBIN) $(FFLAG) \
+-dfontpath=$(top_srcdir)/font \
+-dsopath=$(hdtbl_srcdir)/ \
+-I $(doc_builddir) -I $(doc_srcdir) \
+ $(MFLAG) -M$(hdtbl_srcdir) -mhdtbl -t -p -e -U
 
 HDTBLTMACFILES = \
   contrib/hdtbl/hdtbl.tmac \
@@ -108,10 +112,7 @@ SUFFIXES += .roff .in .ps
 
 .roff.ps:
$(GROFF_V)$(MKDIR_P) `dirname $@` \
-   && $(HDTBLGROFF) -I $(doc_builddir) -I $(doc_srcdir) -Tps \
--dfontpath=$(top_srcdir)/font \
--dsopath=$(hdtbl_srcdir)/ \
--mhdtbl $< >$@
+   && $(HDTBLGROFF) -Tps $< >$@
 
 .in.roff:
$(AM_V_GEN)$(MKDIR_P) `dirname $@` \

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


[groff] 23/30: doc/meref.me.in: Fix style nit.

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

commit 79e6ac7e92d5aaeb396a7a82f7ac880c89cb1484
Author: G. Branden Robinson 
AuthorDate: Thu Oct 10 10:03:43 2024 -0500

doc/meref.me.in: Fix style nit.

Exorcise demons Gilbert & Sullivan.
---
 doc/meref.me.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/meref.me.in b/doc/meref.me.in
index 52e98cf41..433d2b19f 100644
--- a/doc/meref.me.in
+++ b/doc/meref.me.in
@@ -140,7 +140,7 @@ and with uppercase for text arguments.
 Default parameter values are shown in square brackets.
 The notation
 .i \(+-n
-indicates a numerical value with an optional leading sign.
+indicates a numeric value with an optional leading sign.
 Without the sign,
 it assigns a value
 .i n.

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


[groff] 19/30: [mm]: Trivially refactor.

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

commit 8f666ed5e9b17cd0f2912a651ddc3a30891f34c6
Author: G. Branden Robinson 
AuthorDate: Thu Oct 10 09:30:12 2024 -0500

[mm]: Trivially refactor.

* contrib/mm/m.tmac (ref@start-print): Employ dummy character as "empty"
  fifth argument to `LB` as prepared for.
---
 contrib/mm/ChangeLog | 5 +
 contrib/mm/m.tmac| 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 7e319d363..a93128cad 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,8 @@
+2024-10-09  G. Branden Robinson 
+
+   * m.tmac (ref@start-print): Employ dummy character as "empty"
+   fifth argument to `LB` as prepared for.
+
 2024-10-09  G. Branden Robinson 
 
* m.tmac (LB): Accept a dummy character escape sequence as a
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 500760a5e..dc8352909 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -3133,7 +3133,7 @@ exceeds depth of nested lists (\\n[li*lvl])
 .\"
 .de ref@start-print
 .di ref*div
-.LB \\n[Li] 0 1 1 "" 0 0
+.LB \\n[Li] 0 1 1 \& 0\"
 .LI "\\$1"
 ..
 .\"

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


[groff] 22/30: doc/meref.me.in: Make terminology more consistent.

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

commit cf9c062d16101959fe05d321130e65d36b9d7aac
Author: G. Branden Robinson 
AuthorDate: Thu Oct 10 10:02:56 2024 -0500

doc/meref.me.in: Make terminology more consistent.

We characterize arguments as "empty" in this document, not "missing".
---
 doc/meref.me.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/meref.me.in b/doc/meref.me.in
index aec80a358..52e98cf41 100644
--- a/doc/meref.me.in
+++ b/doc/meref.me.in
@@ -1859,7 +1859,7 @@ in the current font)].
 .DE
 Stop numbering output lines if
 .i n
-missing,
+empty,
 otherwise continue with the number modified by
 \(+-\c
 .i n.

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


[groff] 30/30: [hdtbl]: Fix Savannah #66316 (missing `grn` dep).

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

commit 12169aa269341753d491a69e9adb86c58dca039a
Author: G. Branden Robinson 
AuthorDate: Thu Oct 10 18:17:08 2024 -0500

[hdtbl]: Fix Savannah #66316 (missing `grn` dep).

* hdtbl.am (HDTBLPROCESSEDEXAMPLEFILES): Declare dependency on `grn`;
  because `-I` flags are used, it is dragged in even though not
  explicitly needed.  Resolves race against `grn`'s availability in the
  build tree.

Fixes <https://savannah.gnu.org/bugs/?66316>.  Thanks to Ross Burton for
the report.
---
 contrib/hdtbl/ChangeLog | 10 ++
 contrib/hdtbl/hdtbl.am  |  3 +--
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/contrib/hdtbl/ChangeLog b/contrib/hdtbl/ChangeLog
index edae8a77c..a6df88265 100644
--- a/contrib/hdtbl/ChangeLog
+++ b/contrib/hdtbl/ChangeLog
@@ -1,3 +1,13 @@
+2024-10-10  G. Branden Robinson 
+
+   * hdtbl.am (HDTBLPROCESSEDEXAMPLEFILES): Declare dependency on
+   `grn`; because `-I` flags are used, it is dragged in even though
+   not explicitly needed.  Resolves race against `grn`'s
+   availability in the build tree.
+
+   Fixes <https://savannah.gnu.org/bugs/?66316>.  Thanks to Ross
+   Burton for the report.
+
 2024-10-10  G. Branden Robinson 
 
* hdtbl.am (.roff.ps): Move `-I`, `-d`, and `-m` groff options
diff --git a/contrib/hdtbl/hdtbl.am b/contrib/hdtbl/hdtbl.am
index b6c334c18..3c37174f2 100644
--- a/contrib/hdtbl/hdtbl.am
+++ b/contrib/hdtbl/hdtbl.am
@@ -119,9 +119,8 @@ SUFFIXES += .roff .in .ps
&& sed -e "s|[@]fontdir[@]|$(fontdir)|" \
   -e "s|[@]EGREP[@]|$(EGREP)|" $< >$@
 
-
 $(HDTBLPROCESSEDEXAMPLEFILES): $(DOC_GNU_EPS) groff troff eqn pic tbl \
-  grops font/devps/stamp contrib/hdtbl/examples/common.roff
+  grops grn font/devps/stamp contrib/hdtbl/examples/common.roff
 
 uninstall_groffdirs: uninstall-hdtbl-hook
 uninstall-hdtbl-hook:

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


[groff] 16/30: [mm]: Refactor reference list formatting.

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

commit 3bc376d2ede58cb9f040e380f1ba49bb0c4a51e3
Author: G. Branden Robinson 
AuthorDate: Wed Oct 9 21:29:46 2024 -0500

[mm]: Refactor reference list formatting.

* contrib/mm/m.tmac (RS): Drop trailing dot from list item mark.

  (ref@start-print): Format list in terms of mm `LB` and `LI` macros
  instead of `in`, `ti`, and `sp` *roff requests.  This includes setting
  `LB`'s "type" argument to "1", putting a trailing dot after the mark.

  (ref@stop-print): Call `LE` macro instead of invoking `br` request.
---
 contrib/mm/ChangeLog | 11 +++
 contrib/mm/m.tmac| 11 +--
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index f99f03ea5..9109e80b3 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,14 @@
+2024-10-09  G. Branden Robinson 
+
+   * m.tmac: Refactor reference list formatting.
+   (RS): Drop trailing dot from list item mark.
+   (ref@start-print): Format list in terms of mm `LB` and `LI`
+   macros instead of `in`, `ti`, and `sp` *roff requests.  This
+   includes setting `LB`'s "type" argument to "1", putting a
+   trailing dot after the mark.
+   (ref@stop-print): Call `LE` macro instead of invoking `br`
+   request.
+
 2024-10-09  G. Branden Robinson 
 
The package no longer superscripts _and_ brackets a reference
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 5c684c6b3..24a581623 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -3102,7 +3102,7 @@ exceeds depth of nested lists (\\n[li*lvl])
 .if !''\\$1' .ds \\$1 \*[ref*(]\\n[ref*nr]\*[ref*)]
 .nr ref*flag 1
 .am ref*mac
-.ref@start-print \\n[ref*nr].
+.ref@start-print \\n[ref*nr]
 \\..
 .eo
 .am ref*mac RF
@@ -3117,13 +3117,12 @@ exceeds depth of nested lists (\\n[li*lvl])
 .\"
 .de ref@start-print
 .di ref*div
-.in \\n[ref*nr-width]u
-.ti -(\w@\\$1@u+1n)
-\\$1
-.sp -1
+.LB \\n[Li] 0 1 1 "" 0 0
+.LI "\\$1"
 ..
+.\"
 .de ref@stop-print
-.br
+.LE
 .di
 .ne \\n[dn]u
 .ev ref*ev2

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


[groff] 09/30: [mm]: Validate `RP` macro arguments.

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

commit eba88455ac8c947c333be9a90665970e7694789d
Author: G. Branden Robinson 
AuthorDate: Wed Oct 9 08:27:44 2024 -0500

[mm]: Validate `RP` macro arguments.

* contrib/mm/m.tmac (RP): Validate macro arguments.
---
 contrib/mm/ChangeLog |  4 
 contrib/mm/m.tmac| 19 ---
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 0b5d74194..c28c460b5 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,7 @@
+2024-10-09  G. Branden Robinson 
+
+   * m.tmac (RP): Validate macro arguments.
+
 2024-10-09  G. Branden Robinson 
 
* contrib/mm/m.tmac (initialization, LB, LI): Trivially
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 1e4b32942..6aa315a48 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -3107,13 +3107,26 @@ exceeds depth of nested lists (\\n[li*lvl])
 .  @warning \\$0: ignoring; no references defined
 .  return
 .\}
-.ie !''\\$2' .nr ref*i 0\\$2
-.el  .nr ref*i \\n[Rpe]
+.\" Wart: mm treats the first argument as Boolean based on its
+.\" (non-)emptiness, not a numeric value.
+.nr ref*reset-counter 1
+.if !''\\$1' \{\
+.  ie \B'\\$1' .nr ref*reset-counter \\$1
+.  el  .@warning \\$0: treating non-numeric first \
+argument '\\$1' as '1'
+.\}
+.if \\n[ref*reset-counter] .nr ref*nr 0 1
+.nr ref*i \\n[Rpe]
+.if !''\\$2' \{\
+.  ie \B'\\$2' .nr ref*i \\$2
+.  el  .@warning \\$0: ignoring non-numeric second \
+argument: '\\$2'
+.\}
 .if \\n[ref*i]<2 .SK
 .SP 2
 .ref@print-refs
-.if 0\\$1<1 .nr ref*nr 0 1
 .if (\\n[ref*i]=0):(\\n[ref*i]=2) .SK
+.rr ref*reset-counter
 ..
 .\"---
 .\" called by end-of-text!

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


[groff] 17/30: [mm]: Validate `LB` macro's 5th argument.

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

commit c243961bcecdde89d9678223d5d1ef6a76131a67
Author: G. Branden Robinson 
AuthorDate: Wed Oct 9 23:41:01 2024 -0500

[mm]: Validate `LB` macro's 5th argument.

* contrib/mm/m.tmac (LB): Validate fifth (mark-or-format) argument.
  Getting it wrong leads to surprising formatter diagnostics.  Since
  we're (ultimately) passing it to the `af` request, ensure that it's a
  nonnegative integer or in the set {a,A,i,I}.

The extra indentation is to make the next commit less noisy.
---
 contrib/mm/ChangeLog |  7 +++
 contrib/mm/m.tmac| 15 ++-
 2 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 9109e80b3..b39568d01 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,10 @@
+2024-10-09  G. Branden Robinson 
+
+   * m.tmac (LB): Validate fifth (mark-or-format) argument.
+   Getting it wrong leads to surprising formatter diagnostics.
+   Since we're (ultimately) passing it to the `af` request, ensure
+   that it's a nonnegative integer or in the set {a,A,i,I}.
+
 2024-10-09  G. Branden Robinson 
 
* m.tmac: Refactor reference list formatting.
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 24a581623..896444b73 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -2352,7 +2352,20 @@ breaking page
 .nr li*cnt!\\n[li*lvl] 0 1
 .\" assign format
 .af li*cnt!\\n[li*lvl] 1
-.if \\n[li*type] .if !'\\*[li*mf]'' .af li*cnt!\\n[li*lvl] \\*[li*mf]
+.if \\n[li*type] \{\
+.  nr li*is-format-valid 0
+.  if \B'\\*[li*mf]'&\\*[li*mf]>-1 .nr li*is-format-valid 1
+.  if '\?\\*[li*mf]\?'\?a\?'   .nr li*is-format-valid 1
+.  if '\?\\*[li*mf]\?'\?A\?'   .nr li*is-format-valid 1
+.  if '\?\\*[li*mf]\?'\?i\?'   .nr li*is-format-valid 1
+.  if '\?\\*[li*mf]\?'\?i\?'   .nr li*is-format-valid 1
+.  if !\\n[li*is-format-valid] \{\
+.  @warning \\$0: type argument is \\n[li*type] \
+but mark argument '\\*[li*mf]' is not a valid register format; \
+assuming '0'
+.  ds li*mf 0\"
+.  \}
+.\}
 .\"
 .if \\n[li*lb-spc] .SP (u;\\n[li*lb-spc]*\\n[Lsp])
 .in +\\n[li*tind]u

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


[groff] 02/30: src/libs/libgroff/string.cpp: Fix typo in comment.

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

commit ed1bf0fa572402687c3e0cad17dfc82dbfbe90b0
Author: G. Branden Robinson 
AuthorDate: Tue Oct 8 01:55:52 2024 -0500

src/libs/libgroff/string.cpp: Fix typo in comment.
---
 src/libs/libgroff/string.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/libs/libgroff/string.cpp b/src/libs/libgroff/string.cpp
index c7462109c..b48761703 100644
--- a/src/libs/libgroff/string.cpp
+++ b/src/libs/libgroff/string.cpp
@@ -284,7 +284,7 @@ int string::search(const char c) const
   return (p != 0 /* nullptr */) ? (p - ptr) : -1;
 }
 
-// Return index of substing `c` in string, -1 if not found.
+// Return index of substring `c` in string, -1 if not found.
 int string::find(const char *c) const
 {
   const char *p = ptr

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


[groff] 01/30: NEWS: Fix typo.

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

commit f7b9d3df8cad75b1cec8b30c6de71ac825deeb5f
Author: G. Branden Robinson 
AuthorDate: Mon Oct 7 20:27:48 2024 -0500

NEWS: Fix typo.
---
 NEWS | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/NEWS b/NEWS
index 58fd441cf..ae3afe8a3 100644
--- a/NEWS
+++ b/NEWS
@@ -224,9 +224,9 @@ Macro packages
keyword in `SY`'s single-argument form, and is used in computation of
the indentation of non-initial synopsis lines.  However, this
computed indentation can now also be overridden with that of the
-   previous syopsis item.  To do this, give any argument to
-   the `YS` macro call "closing" the synopsis whose indentation you want
-   to reuse.  When you're done with such a grouped synopsis, leave the
+   previous synopsis item.  To do this, give any argument to the `YS`
+   macro call "closing" the synopsis whose indentation you want to
+   reuse.  When you're done with such a grouped synopsis, leave the
argument off the final `YS` call.
 
In a "Synopsis" section of a man page, existing synopses consisting

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


[groff] 21/30: [mm]: Add new `Rpfmt` string.

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

commit fe58b231234bc5037f76203f7b24861b1bb347ac
Author: G. Branden Robinson 
AuthorDate: Thu Oct 10 09:30:55 2024 -0500

[mm]: Add new `Rpfmt` string.

* contrib/mm/m.tmac: Support new `Rpfmt` string specifying the `LB`
  macro arguments that the package uses to format the items in a
  reference list.

  (initialization): Define it.

  (ref@start-print): Use it.

* contrib/mm/groff_mm.7.man (Macros) : Cross reference `Rpfmt`
  register description and recast.

  (Strings) : Document it.
---
 NEWS  |  4 
 contrib/mm/ChangeLog  | 12 
 contrib/mm/groff_mm.7.man | 23 ++-
 contrib/mm/m.tmac |  4 +++-
 4 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/NEWS b/NEWS
index ff94d0b3b..18aee6696 100644
--- a/NEWS
+++ b/NEWS
@@ -458,6 +458,10 @@ Macro packages
example, a value of "3 4" more accurately reproduces London &
Reiser's 1978 paper describing the porting of Unix to the VAX-11/780.
 
+*  The m (mm) macro package now supports an `Rpfmt` string specifying
+   the `LB` macro arguments that the package uses to format the items in
+   a reference list.
+
 *  The m (mm) macro package now supports the `E` register as DWB mm did.
 
 *  The m (mm) macro package now supports AT&T/DWB mm's `Rg` string.
diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index 148d5c686..dd56c1d42 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,15 @@
+2024-10-09  G. Branden Robinson 
+
+   * m.tmac: Support new `Rpfmt` string specifying the `LB` macro
+   arguments that the package uses to format the items in a
+   reference list.
+   (initialization): Define it.
+   (ref@start-print): Use it.
+
+   * groff_mm.7.man (Macros) : Cross reference `Rpfmt` register
+   description and recast.
+   (Strings) : Document it.
+
 2024-10-10  G. Branden Robinson 
 
Make new `LB`-based approach to reference page work both with
diff --git a/contrib/mm/groff_mm.7.man b/contrib/mm/groff_mm.7.man
index 84b5d92e4..38a33a31b 100644
--- a/contrib/mm/groff_mm.7.man
+++ b/contrib/mm/groff_mm.7.man
@@ -3420,15 +3420,16 @@ automatically if references have accumulated.
 .
 .
 .IP
-References are list items,
-and thus are vertically separated
-(see
-.BR LB ).
+References are formatted as a list with
+.BR LB ;
+the
+.B Rpfmt
+string configures the list's appearance.
 .
 Setting register
 .B Ls
 .RB to\~ 0
-suppresses this spacing.
+suppresses spacing after the list.
 .
 The string
 .B Rp
@@ -4540,6 +4541,18 @@ call.
 .
 .
 .TP
+.B Rpfmt
+specifies the
+.B LB
+arguments that
+.I "groff mm"
+uses to format the items in a reference list.
+.
+The default is
+.RB \[lq] "\[rs]\[rs]n[Li] 0 1 0 \[rs]& 0 0" \[rq].
+.
+.
+.TP
 .B Rg
 interpolates the registered (trade) mark sign.
 .
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index 0d95d411d..6812b00ef 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -375,6 +375,8 @@ http://savannah.gnu.org/bugs/?group=groff.
 .nr Rfstyle 0
 .\" reference list page ejection policy
 .nr Rpe 0
+.\" reference list format (arguments to `LB`)
+.ds Rpfmt \\n[Li] 0 1 0 \& 0\"
 .\" use section-page page numbering?
 .nr Sectp 0
 .if (\n[N]=3):(\n[N]=5) \{\
@@ -3133,7 +3135,7 @@ exceeds depth of nested lists (\\n[li*lvl])
 .\"
 .de ref@start-print
 .di ref*div
-.LB \\n[Li] 0 1 0 \& 0\"
+.LB \\*[Rpfmt]
 .LI "\\$1."
 ..
 .\"

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


[groff] 20/30: [mm]: Make reference list more flexible.

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

commit bbc24d51d4704fd416385b2416dec441f10638dd
Author: G. Branden Robinson 
AuthorDate: Thu Oct 10 01:30:21 2024 -0500

[mm]: Make reference list more flexible.

Make new `LB`-based approach to reference page work both with documents
that use refer(1) to collect references and those that use only mm(7)'s
own facilities.

* contrib/mm/m.tmac (ref@start-print): Change `LB` list "type" argument
  from 1 (enumerated) to 0 (string-based).  This is because the
  reference marks are self-enumerating.  However, this loses their
  trailing dots, so update `LI` call to add them back in.

* contrib/mm/refer-mm.tmac (ref*biblio-item-sfx): Define as empty,
  overriding "refer.tmac"'s default.  As shown above, our own
  infrastructure supplies the dot suffix now.
---
 contrib/mm/ChangeLog | 14 ++
 contrib/mm/m.tmac|  4 ++--
 contrib/mm/refer-mm.tmac |  2 ++
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/contrib/mm/ChangeLog b/contrib/mm/ChangeLog
index a93128cad..148d5c686 100644
--- a/contrib/mm/ChangeLog
+++ b/contrib/mm/ChangeLog
@@ -1,3 +1,17 @@
+2024-10-10  G. Branden Robinson 
+
+   Make new `LB`-based approach to reference page work both with
+   documents that use refer(1) to collect references and those that
+   use only mm(7)'s own facilities.
+
+   * m.tmac (ref@start-print): Change `LB` list "type" argument
+   from 1 (enumerated) to 0 (string-based).  This is because the
+   reference marks are self-enumerating.  However, this loses their
+   trailing dots, so update `LI` call to add them back in.
+   * refer-mm.tmac (ref*biblio-item-sfx): Define as empty,
+   overriding "refer.tmac"'s default.  As shown above, our own
+   infrastructure supplies the dot suffix now.
+
 2024-10-09  G. Branden Robinson 
 
* m.tmac (ref@start-print): Employ dummy character as "empty"
diff --git a/contrib/mm/m.tmac b/contrib/mm/m.tmac
index dc8352909..0d95d411d 100644
--- a/contrib/mm/m.tmac
+++ b/contrib/mm/m.tmac
@@ -3133,8 +3133,8 @@ exceeds depth of nested lists (\\n[li*lvl])
 .\"
 .de ref@start-print
 .di ref*div
-.LB \\n[Li] 0 1 1 \& 0\"
-.LI "\\$1"
+.LB \\n[Li] 0 1 0 \& 0\"
+.LI "\\$1."
 ..
 .\"
 .de ref@stop-print
diff --git a/contrib/mm/refer-mm.tmac b/contrib/mm/refer-mm.tmac
index ae3ec5922..2bfc90d8b 100644
--- a/contrib/mm/refer-mm.tmac
+++ b/contrib/mm/refer-mm.tmac
@@ -92,6 +92,8 @@
 \\..
 ..
 .
+.ds ref*biblio-item-sfx \" empty (ref@start-print supplies the dot)
+.
 .de ref*biblio-end-hook
 .  als ][ ref*][-second-pass
 .  rm ref*item-start-hook

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


  1   2   3   4   5   6   7   8   9   10   >