octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #63810] Infinite loop in mk-qthelp.pl


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #63810] Infinite loop in mk-qthelp.pl
Date: Thu, 16 Feb 2023 04:21:08 -0500 (EST)

Update of bug #63810 (project octave):

              Depends on:                         => bugs #62648            

    _______________________________________________________

Follow-up Comment #4:

Since this seems to be fixed on the current stable branch, it is likely to be
fixed by cherry-picking the following change on top of the 7.3.0 release
tarball:
https://hg.savannah.gnu.org/hgweb/octave/raw-rev/ab6d276f6fcb

# HG changeset patch
# User Rik <rik@octave.org>
# Date 1668451079 28800
# Node ID ab6d276f6fcb90631131eeb6668efd4f54a36204
# Parent  662499ba0d21173006f99fc3b14b9a76a0e8670a
build: Enable building of Qt documentation with Texinfo >= 7.0 (bug #62648).

* doc/interpreter/mk-qthelp.pl: Update regular expressions that find the
start
of data in index.html and Function-index.html to include additional pattern
generated by Texinfo 7.0.

diff --git a/doc/interpreter/mk-qthelp.pl b/doc/interpreter/mk-qthelp.pl
--- a/doc/interpreter/mk-qthelp.pl
+++ b/doc/interpreter/mk-qthelp.pl
@@ -26,8 +26,11 @@
 open (my $HTML, "<", $htmlfname) or die "Unable to open $htmlfname";
 
 # Skip through preamble of file to find start of list
-while (($_ = <$HTML>) !~ /^<div class="contents">/ ) {;}
-while (($_ = <$HTML>) !~ /^<ul class="no-bullet">/ ) {;}
+while (defined ($_ = <$HTML>) and ! /^<div class="contents">/ ) {;}
+while (defined ($_ = <$HTML>)
+         and ! /^<ul class="(?:no-bullet|toc-numbered-mark)">/ ) {;}
+
+die "index.html: reached EOF without finding data start pattern" if eof
($HTML);
 
 $level = 0;
 while (<$HTML>)
@@ -68,7 +71,11 @@
 open ($HTML, "<", $htmlfname) or die "Unable to open $htmlfname";
 
 # Skip through preamble of file to find start of list
-while (($_ = <$HTML>) !~ /^<table class="index-fn/ ) {;}
+while (defined ($_ = <$HTML>)
+         and ! /^<table class="(?:index-fn|fn-entries)/ ) {;}
+
+die "Function-Index.html: reached EOF without finding data start pattern"
+  if eof ($HTML);
 
 while (<$HTML>)
 {


Does that work for you?



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63810>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]