comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not>
Subject: Re: Ada_GUI
Date: Fri, 8 Apr 2022 22:56:00 +0200	[thread overview]
Message-ID: <t2q7h0$osg$1@dont-email.me> (raw)
In-Reply-To: <t2ph0l$ur7$1@dont-email.me>

On 2022-04-08 16:31, Jeffrey R.Carter wrote:
> 
> I upgraded to a new version of Firefox last night and now favicon.ico is 
> appearing again if I have boot.html without "favicon.ico" in it. It still hangs 
> on startup for the version of boot.html with it.
> 
> ada_gui-gnoga-server-connection.adb at line 574 modifies boot.html to replace 
> "favicon.ico" with the icon name passed to Set_Up, if it contains that string 
> and a non-null icon name was given. Apparently that, or processing the modified 
> file, hangs. If boot.html does not contain that string, apparently favicon.ico 
> is used if it exists.

The replacement is done with procedure String_Replace, in Ada_Gui.Gnoga:

    procedure String_Replace
      (Source      : in out Ada.Strings.Unbounded.Unbounded_String;
       Pattern     : in     String;
       Replacement : in     String);
    --  Replace all instances of Pattern with Replacement in Source

However, there is a logic error in String_Replace: if Pattern = Replacement, it 
becomes an infinite loop. So the default value of Icon for Set_Up, or an 
explicit value of "favicon.ico", results in an infinite loop when this 
replacement is done.

Correcting it to return immediately in that case, and using the version of 
boot.html that contains the text that results in the replacement being 
performed, I get favicon.ico with the default value for Icon, and the specified 
file with an explicit value, provided that I clear cache between runs.

I will update Github with the correction soon, but in the meantime, interested 
persons can make the change themselves to use a different icon file.

-- 
Jeff Carter
"Blessed are they who convert their neighbors'
oxen, for they shall inhibit their girth."
Monty Python's Life of Brian
83

  reply	other threads:[~2022-04-08 20:56 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-05 16:26 Ada_GUI AdaMagica
2022-04-05 19:30 ` Ada_GUI Jeffrey R.Carter
2022-04-06  7:21   ` Ada_GUI Jeffrey R.Carter
2022-04-06 15:29     ` Ada_GUI AdaMagica
2022-04-06 15:38       ` Ada_GUI Jeffrey R.Carter
2022-04-06 15:52         ` Ada_GUI AdaMagica
2022-04-08 14:05           ` Ada_GUI AdaMagica
2022-04-08 14:31             ` Ada_GUI Jeffrey R.Carter
2022-04-08 20:56               ` Jeffrey R.Carter [this message]
2022-04-09 11:59               ` Ada_GUI AdaMagica
2022-04-09 13:38                 ` Ada_GUI Jeffrey R.Carter
2022-04-10 11:45                   ` Ada_GUI AdaMagica
2022-04-10 13:23                     ` Ada_GUI Jeffrey R.Carter
2022-04-10 12:12                   ` Ada_GUI AdaMagica
2022-04-06 15:31     ` Ada_GUI Jeffrey R.Carter
  -- strict thread matches above, loose matches on Subject: below --
2010-12-30 14:27 ada gui Robin
2010-12-30 19:54 ` Randy Brukardt
2010-12-31  8:11   ` Robin
2005-07-29  9:25 ada & gui Szymon Guz
2005-07-29 11:10 ` Ludovic Brenta
2005-07-29 11:43   ` Szymon Guz
2005-07-29 12:40     ` Alex R. Mosteo
2005-07-29 12:52       ` Szymon Guz
2005-07-29 13:16         ` Alex R. Mosteo
2005-07-29 13:58           ` Ludovic Brenta
2005-07-29 16:51           ` Simon Wright
2005-07-30  1:27             ` John B. Matthews
2005-07-30 10:21               ` Georg Bauhaus
2005-07-30 16:27                 ` John B. Matthews
2005-07-30 20:30               ` Simon Wright
2005-08-01  0:02                 ` John B. Matthews
2005-08-01 13:32               ` Marc A. Criley
2005-08-01 18:49                 ` Jeffrey Carter
2005-07-29 13:19         ` Ludovic Brenta
2005-07-29 14:12   ` Szymon Guz
2005-07-29 14:27     ` Ludovic Brenta
2005-07-29 14:27     ` Alex R. Mosteo
2005-07-29 11:28 ` Jeff Creem
2005-07-29 12:23   ` Szymon Guz
2005-07-29 13:27     ` Ludovic Brenta
2005-07-29 13:59       ` Szymon Guz
2005-07-29 14:20         ` Ludovic Brenta
2005-07-29 11:33 ` Martin Dowie
2005-07-29 14:59   ` Jacob Sparre Andersen
2005-07-29 12:31 ` Adrien Plisson
2005-08-02 16:11 ` Lucretia
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox