2018-12-10 12:21:31 +01:00
|
|
|
>From 1f27900352e04ff4f19bec1c1e9635adad2be31c Mon Sep 17 00:00:00 2001
|
|
|
|
From: Niko Tyni <ntyni@debian.org>
|
|
|
|
Date: Fri, 18 May 2018 10:40:00 +0100
|
|
|
|
Subject: [PATCH] Fix unescaped left braces in regexps, deprecated since Perl
|
|
|
|
5.27.8
|
|
|
|
|
|
|
|
This fixes test failures on recent Perl versions.
|
|
|
|
---
|
|
|
|
tp/Texinfo/Parser.pm | 4 ++--
|
|
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
|
2018-12-19 13:29:14 +01:00
|
|
|
Index: texinfo-6.5/tp/Texinfo/Parser.pm
|
|
|
|
===================================================================
|
|
|
|
--- texinfo-6.5.orig/tp/Texinfo/Parser.pm
|
|
|
|
+++ texinfo-6.5/tp/Texinfo/Parser.pm
|
2018-12-10 12:21:31 +01:00
|
|
|
@@ -5478,11 +5478,11 @@ sub _parse_special_misc_command($$$$)
|
|
|
|
}
|
|
|
|
} elsif ($command eq 'clickstyle') {
|
|
|
|
# REMACRO
|
|
|
|
- if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*/) {
|
|
|
|
+ if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)(\{\})?\s*/) {
|
|
|
|
$args = ['@'.$1];
|
|
|
|
$self->{'clickstyle'} = $1;
|
|
|
|
$remaining = $line;
|
|
|
|
- $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*(\@(c|comment)((\@|\s+).*)?)?//;
|
|
|
|
+ $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)(\{\})?\s*(\@(c|comment)((\@|\s+).*)?)?//;
|
|
|
|
$has_comment = 1 if (defined($4));
|
|
|
|
} else {
|
|
|
|
$self->line_error (sprintf($self->__(
|
2018-12-19 13:29:14 +01:00
|
|
|
Index: texinfo-6.5/tp/Texinfo/Convert/XSParagraph/xspara.c
|
|
|
|
===================================================================
|
|
|
|
--- texinfo-6.5.orig/tp/Texinfo/Convert/XSParagraph/xspara.c
|
|
|
|
+++ texinfo-6.5/tp/Texinfo/Convert/XSParagraph/xspara.c
|
|
|
|
@@ -248,6 +248,11 @@ xspara_init (void)
|
|
|
|
|
|
|
|
dTHX;
|
|
|
|
|
|
|
|
+#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION > 8)
|
|
|
|
+ /* needed due to thread-safe locale handling in newer perls */
|
|
|
|
+ switch_to_global_locale();
|
|
|
|
+#endif
|
|
|
|
+
|
|
|
|
if (setlocale (LC_CTYPE, "en_US.UTF-8")
|
|
|
|
|| setlocale (LC_CTYPE, "en_US.utf8"))
|
|
|
|
goto success;
|
|
|
|
@@ -320,6 +325,10 @@ failure:
|
|
|
|
{
|
|
|
|
success: ;
|
|
|
|
free (utf8_locale);
|
|
|
|
+#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION > 8)
|
|
|
|
+ /* needed due to thread-safe locale handling in newer perls */
|
|
|
|
+ sync_locale();
|
|
|
|
+#endif
|
|
|
|
/*
|
|
|
|
fprintf (stderr, "tried to set LC_CTYPE to UTF-8.\n");
|
|
|
|
fprintf (stderr, "character encoding is: %s\n",
|