From 6d178b36a7ac2b0e5d67868fdcd3992ac04f2cd4 Mon Sep 17 00:00:00 2001 From: Dan Kelley Date: Wed, 21 Jun 2017 17:14:56 -0300 Subject: [PATCH] doc-building update Thanks to Damyan Ivanov for the patch. Below is the info from the associated message to the debian bug tracking system: Bug#865482: src:gri: FTBFS with perl 5.26 -- Unescaped left brace in regex is illegal Package: src:gri Version: 2.12.23-10 Severity: important Tags: patch upstream User: debian-perl@lists.debian.org Usertags: perl-5.26-transition gri fails to build with perl 5.26 currently in experimental. The attached patch makes it build again by escaping curly braces in regular expressions. -- dam -- System Information: Debian Release: 9.0 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores) Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8), LANGUAGE=bg_BG.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) --- doc/texinfo2HTML | 72 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/doc/texinfo2HTML b/doc/texinfo2HTML index 618d6ad..15962b3 100755 --- doc/texinfo2HTML +++ doc/texinfo2HTML @@ -119,7 +119,7 @@ while(get_a_line()) { next; } # Process image commands (NOT...it's there already) - if (/\@image{(.*)}/) { + if (/\@image\{(.*)\}/) { #print "\n"; next; } @@ -207,12 +207,12 @@ while(get_a_line()) { s,<,<,og; # Special tweak to make 'Gri' look cooler. # s, Gri , GRI ,og; - s,\@code{\@\@},\@code{TEXINFO2HTML-AT-AT},og; + s,\@code\{\@\@\},\@code{TEXINFO2HTML-AT-AT},og; s,\@},TEXINFO2HTML-CLOSE-BRACE,og; # retain inside e.g. @code{} s,\@\@,TEXINFO2HTML-AT-AT,og; - s,\@{,{,og; - s,\@TeX{},TeX,og; - s,\@dots{},...,og; + s,\@\{,{,og; + s,\@TeX\{\},TeX,og; + s,\@dots\{\},...,og; # Put in place-holders for some accents. I should check for all # of them, but for now, I'm just kludging in a couple, # to solve an immediate problem and to serve as a place-holder @@ -236,18 +236,18 @@ while(get_a_line()) { } next; } - while (/\@url{([^}]*)}/) { + while (/\@url\{([^}]*)\}/) { $the_url = $1; - s:\@url{[^}]*}:\@code{$the_url}:; + s:\@url\{[^}]*\}:\@code{$the_url}:; } - while (/\@uref{([^}]*)}/) { + while (/\@uref\{([^}]*)\}/) { @items = split(/,/, $1); if ($#items == 0) { - s:\@uref{[^}]*}:$items[0]:; + s:\@uref\{[^}]*\}:$items[0]:; } elsif ($#items == 1) { - s:\@uref{[^}]*}:$items[1]:; + s:\@uref\{[^}]*\}:$items[1]:; } elsif ($#items == 2) { - s:\@uref{[^}]*}:\@code{$items[2]}:; + s:\@uref\{[^}]*\}:\@code{$items[2]}:; } else { die "Cannot have more than 3 items in a 'uref' at \"$_\""; } @@ -329,7 +329,7 @@ while(get_a_line()) { while(get_a_line()) { next if /\@sp/; next if /\@cindex/; - s|\@anchor{([^}]*)}||g; + s|\@anchor\{([^}]*)\}||g; &process_examples(); # Handle HTML inserts if (/^\@c HTML (.*)/o) { @@ -345,10 +345,10 @@ while(get_a_line()) { } if (/\s*\@item\s*(.*)/o) { $the_item = $1; - $the_item =~ s:\@{:{:og; - $the_item =~ s:\@}:}:og; + $the_item =~ s:\@\{:{:og; + $the_item =~ s:\@\}:}:og; $the_item =~ s:\@\@:\@:og; - $the_item =~ s:\@code{([^}]*)}:`$1':og; + $the_item =~ s:\@code\{([^}]*)\}:`$1':og; print "
$start_item$the_item$end_item\n
"; } else { print "

" if (/^$/o); @@ -401,38 +401,38 @@ sub process_examples() { } else { s,\@value\{([^}]*)\},$value{$1},g; # Substitute set/value pair s,\@},},og; - s,\@{,{,og; + s,\@\{,{,og; } } sub sub_refs { - die "line $. of file: cannot have multiple refs on one line" if (/\@[px]*ref{(.*)}(.*)\@[px]*ref{(.*)}/); + die "line $. of file: cannot have multiple refs on one line" if (/\@[px]*ref\{(.*)\}(.*)\@[px]*ref\{(.*)\}/); # anchors - s|\@anchor{([^}]*)}||g; + s|\@anchor\{([^}]*)\}||g; # Change e.g. # @xref{Viewing} # into # see Viewing #if (/\@ref/){print "AAA[$_]AAA\n"; - s|\@ref{([^}]*)}|see $1|g; + s|\@ref\{([^}]*)\}|see $1|g; #print "BBB[$_]BBB\n";} - s|\@xref{([^}]*)}|see $1|g; - s|\@pxref{([^}]*)}|see $1.|g; - while (/\@url{([^}]*)}/) { + s|\@xref\{([^}]*)\}|see $1|g; + s|\@pxref\{([^}]*)\}|see $1.|g; + while (/\@url\{([^}]*)\}/) { $the_url = $1; - s:\@url{[^}]*}:\@code{$the_url}:; + s:\@url\{[^}]*\}:\@code{$the_url}:; } - while (/\@uref{([^}]*)}/) { + while (/\@uref\{([^}]*)\}/) { @items = split(/,/, $1); if ($#items == 0) { - s:\@uref{[^}]*}:$items[0]:; + s:\@uref\{[^}]*\}:$items[0]:; } elsif ($#items == 1) { - s:\@uref{[^}]*}:$items[1]:; + s:\@uref\{[^}]*\}:$items[1]:; } elsif ($#items == 2) { - s:\@uref{[^}]*}:\@code{$items[2]}:; + s:\@uref\{[^}]*\}:\@code{$items[2]}:; } else { die "Cannot have more than 3 items in a 'uref' at \"$_\""; } @@ -465,17 +465,17 @@ sub sub_headings { sub sub_emphasis { s,<<,<<,g; s,>>,>>,g; - s,\@emph{([^}]*)},$1,g; - s,\@strong{([^}]*)},$1,g; - s,\@footnote{([^}]*)}, [$1],g; - s,\@b{([^}]*)},$1,g; + s,\@emph\{([^}]*)\},$1,g; + s,\@strong\{([^}]*)\},$1,g; + s,\@footnote\{([^}]*)\}, [$1],g; + s,\@b\{([^}]*)\},$1,g; - s,\@code{([^}]*)},`$1',g; + s,\@code\{([^}]*)\},`$1',g; s,\@\@,\@,g; - s,\@samp{([^}]*)},`$1',g; - s,\@key{([^}]*)},`$1',g; - s,\@kbd{([^}]*)},`$1',g; - s,\@file{([^}]*)},`$1',g; + s,\@samp\{([^}]*)\},`$1',g; + s,\@key\{([^}]*)\},`$1',g; + s,\@kbd\{([^}]*)\},`$1',g; + s,\@file\{([^}]*)\},`$1',g; s,TEXINFO2HTML-CLOSE-BRACE,},g; s,TEXINFO2HTML-AT-AT,\@,g; s,TEXINFO2HTML-ACCENT-ACUTE-a,á,g;