gbranden pushed a commit to branch master
in repository groff.

commit df32a1df67b1d323648c76f0d57f46fb0b9f9c83
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Aug 23 00:15:38 2025 -0500

    [hdtbl]: Drop Control+G from macro files (1/2).
    
    * contrib/hdtbl/hdmisc.tmac (t*index): Replace Control+G character used
      in string processing with dummy character.  (It's not used for
      matching, but apparently to work around the `substring` request's
      unfortunate index handling.)
---
 contrib/hdtbl/ChangeLog   | 7 +++++++
 contrib/hdtbl/hdmisc.tmac | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/contrib/hdtbl/ChangeLog b/contrib/hdtbl/ChangeLog
index 850ae3173..1f82f68b4 100644
--- a/contrib/hdtbl/ChangeLog
+++ b/contrib/hdtbl/ChangeLog
@@ -1,3 +1,10 @@
+2025-08-23  G. Branden Robinson <[email protected]>
+
+       * hdmisc.tmac (t*index): Replace Control+G character used in
+       string processing with dummy character.  (It's not used for
+       matching, but apparently to work around the `substring`
+       request's unfortunate index handling.)
+
 2025-08-21  G. Branden Robinson <[email protected]>
 
        * hdtbl.tmac: Diagnose and skip loading the package in
diff --git a/contrib/hdtbl/hdmisc.tmac b/contrib/hdtbl/hdmisc.tmac
index 6df2d782a..9dd3cd6ba 100644
--- a/contrib/hdtbl/hdmisc.tmac
+++ b/contrib/hdtbl/hdmisc.tmac
@@ -148,12 +148,12 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>.
 .    return
 .  \}
 .
-.  length ** \\$1
+.  length ** \\$1\&
 .  length $2 \\$2
 .  nr * 0-1 1
 .
 .  while (\\n+[*] < \\n[**]) \{\
-.    ds * \\$1\"
+.    ds * \\$1\&\"
 .    substring * \\n[*] (\\n[*] <? (\\n[*] + \\n[$2] - 1))
 .    \" The surrounding \? escapes emulate string comparison.
 .    if "\?\\*[*]\?"\?\\$2\?" \

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to