Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 43 lines 1.7 kB view raw
1Adapted from http://svn.savannah.gnu.org/viewvc/texinfo/ 2Author: gavin 3--- trunk/tp/Texinfo/Parser.pm 2018-06-04 19:51:36 UTC (rev 8006) 4+++ trunk/tp/Texinfo/Parser.pm 2018-07-13 15:31:28 UTC (rev 8007) 5@@ -5531,11 +5531,11 @@ 6 } 7 } elsif ($command eq 'clickstyle') { 8 # REMACRO 9- if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*/) { 10+ if ($line =~ /^\s+@([[:alnum:]][[:alnum:]\-]*)(\{\})?\s*/) { 11 $args = ['@'.$1]; 12 $self->{'clickstyle'} = $1; 13 $remaining = $line; 14- $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)({})?\s*(\@(c|comment)((\@|\s+).*)?)?//; 15+ $remaining =~ s/^\s+@([[:alnum:]][[:alnum:]\-]*)(\{\})?\s*(\@(c|comment)((\@|\s+).*)?)?//; 16 $has_comment = 1 if (defined($4)); 17 } else { 18 $self->line_error (sprintf($self->__( 19--- trunk/tp/Texinfo/Convert/XSParagraph/xspara.c 2018-07-13 15:31:28 UTC (rev 8007) 20+++ trunk/tp/Texinfo/Convert/XSParagraph/xspara.c 2018-07-13 15:39:29 UTC (rev 8008) 21@@ -248,6 +248,11 @@ 22 23 dTHX; 24 25+#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION > 8) 26+ /* needed due to thread-safe locale handling in newer perls */ 27+ switch_to_global_locale(); 28+#endif 29+ 30 if (setlocale (LC_CTYPE, "en_US.UTF-8") 31 || setlocale (LC_CTYPE, "en_US.utf8")) 32 goto success; 33@@ -320,6 +325,10 @@ 34 { 35 success: ; 36 free (utf8_locale); 37+#if PERL_VERSION > 27 || (PERL_VERSION == 27 && PERL_SUBVERSION > 8) 38+ /* needed due to thread-safe locale handling in newer perls */ 39+ sync_locale(); 40+#endif 41 /* 42 fprintf (stderr, "tried to set LC_CTYPE to UTF-8.\n"); 43 fprintf (stderr, "character encoding is: %s\n",