deri pushed a commit to branch master
in repository groff.

commit c71b999842a52a58adcd935f7715ccfec5b7b328
Author: Deri James <[email protected]>
AuthorDate: Fri Mar 13 15:40:40 2026 +0000

    Use sequential tag names to avoid possible random duplicates.
    
    * src/devices/gropdf/gropdf.pl: Revert commit cdb97b959,
    switch to using serial tag names.
    
    Fixes <https://savannah.gnu.org/bugs/?68136>.
    
    Thanks to Dave Kemper for the code suggestion.
---
 ChangeLog                    | 11 +++++++++++
 src/devices/gropdf/gropdf.pl | 12 ++----------
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7f6e37fc1..4691e83f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2026-03-13  Deri James  <[email protected]>
+
+       Use sequential tag names to avoid possible random duplicates.
+
+       * src/devices/gropdf/gropdf.pl: Revert commit cdb97b959,
+       switch to using serial tag names.
+
+       Fixes <https://savannah.gnu.org/bugs/?68136>.
+
+       Thanks to Dave Kemper for the code suggestion.
+
 2026-03-09  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp (do_translate): Stop throwing
diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl
index 16ca4a5b2..3658cc649 100644
--- a/src/devices/gropdf/gropdf.pl
+++ b/src/devices/gropdf/gropdf.pl
@@ -223,12 +223,6 @@ my %StdEnc=(
 
 unshift(@ARGV,split(' ',$ENV{GROPDF_OPTIONS})) if exists($ENV{GROPDF_OPTIONS});
 
-# Initialize random seed for reproducible builds.
-if (defined($ENV{SOURCE_DATE_EPOCH}))
-{
-    srand($ENV{SOURCE_DATE_EPOCH});
-}
-
 my $gotzlib=0;
 my $gotinline=0;
 my $gotexif=0;
@@ -481,6 +475,7 @@ sub usage
     exit($had_error ? 2 : 0);
 }
 
+my $subtag_counter = 0xAAAAAA;
 my $fd;
 my @fdlist;
 my $frot;
@@ -5293,10 +5288,7 @@ sub SubTag
 {
     my $res;
 
-    foreach (1..6)
-    {
-       $res.=chr(int((rand(26)))+65);
-    }
+    ($res = sprintf ("%06X", $subtag_counter++)) =~ tr/0-9/Q-Z/;
 
     return($res.'+');
 }

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

Reply via email to