Sunday, 25 February 2024

[netsurf-dev] Re: netsurf: branch master updated. release/3.11-19-gbce0aa6fc

On 25/02/2024 10:28, NetSurf Browser Project (Commit Mailer) wrote:

> diff --git a/content/handlers/html/form.c b/content/handlers/html/form.c
> index afa40ac2e..8c8120877 100644
> --- a/content/handlers/html/form.c
> +++ b/content/handlers/html/form.c
> @@ -2002,13 +2002,18 @@ void form_radio_set(struct form_control *radio)
> if (radio->selected)
> return;
>
> - for (control = radio->form->controls; control;
> - control = control->next) {
> + for (control = radio->form->controls;
> + control != NULL;
> + control = control->next) {
> if (control->type != GADGET_RADIO)
> continue;
> +
> if (control == radio)
> continue;
> - if (strcmp(control->name, radio->name) != 0)
> +
> + if ((control->name != NULL) &&
> + (radio->name != NULL) &&
> + strcmp(control->name, radio->name) != 0)
> continue;
>
> if (control->selected) {

I think this now erroneously treats inputs with no name as being part of
the same radio button group[1]. If either input has no name, then they
cannot be part of the same group, so you probably wanted:

if (control->name == NULL || radio->name == NULL || strcmp(...))

The spec also treats empty names in the same way (i.e. the name
attribute is present, but its value is the empty string), so that
probably wants to be taken into account here, too.


J.


1. https://html.spec.whatwg.org/multipage/input.html#radio-button-group

Wednesday, 21 February 2024

[netsurf-dev] Re: [PATCH] Add missing tags according with WPT test

On 21/02/2024 10:50, Pierre Tachoire wrote:
> From: Pierre Tachoire <pierre@tch.re>
>
> According with https://wpt.live/dom/nodes/Node-cloneNode.html test,
> libdom missed some hmtl tags.
> This commit adds tt, acronym, big, bgsound, marquee, noframes, spacer,
> strike and nobr tags
> ---
> include/dom/html/html_elements.h | 9 +++++++++
> src/html/html_document.c | 27 +++++++++++++++++++++++++++
> 2 files changed, 36 insertions(+)
>

Applied, thanks!


John-Mark.

[netsurf-dev] [PATCH] Add missing tags according with WPT test

From: Pierre Tachoire <pierre@tch.re>

According with https://wpt.live/dom/nodes/Node-cloneNode.html test,
libdom missed some hmtl tags.
This commit adds tt, acronym, big, bgsound, marquee, noframes, spacer,
strike and nobr tags
---
include/dom/html/html_elements.h | 9 +++++++++
src/html/html_document.c | 27 +++++++++++++++++++++++++++
2 files changed, 36 insertions(+)

diff --git a/include/dom/html/html_elements.h b/include/dom/html/html_elements.h
index 5b54bbe..6e954c5 100644
--- a/include/dom/html/html_elements.h
+++ b/include/dom/html/html_elements.h
@@ -12,6 +12,7 @@
DOM_HTML_ELEMENT_STRINGS_ENTRY(_UNKNOWN) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(A) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(ABBR) \
+ DOM_HTML_ELEMENT_STRINGS_ENTRY(ACRONYM) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(ADDRESS) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(APPLET) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(AREA) \
@@ -23,6 +24,8 @@
DOM_HTML_ELEMENT_STRINGS_ENTRY(BASEFONT) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(BDI) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(BDO) \
+ DOM_HTML_ELEMENT_STRINGS_ENTRY(BGSOUND) \
+ DOM_HTML_ELEMENT_STRINGS_ENTRY(BIG) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(BLOCKQUOTE) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(BODY) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(BR) \
@@ -81,11 +84,14 @@
DOM_HTML_ELEMENT_STRINGS_ENTRY(MAIN) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(MAP) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(MARK) \
+ DOM_HTML_ELEMENT_STRINGS_ENTRY(MARQUEE) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(MENU) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(MENUITEM) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(META) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(METER) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(NAV) \
+ DOM_HTML_ELEMENT_STRINGS_ENTRY(NOBR) \
+ DOM_HTML_ELEMENT_STRINGS_ENTRY(NOFRAMES) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(NOSCRIPT) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(OBJECT) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(OL) \
@@ -108,7 +114,9 @@
DOM_HTML_ELEMENT_STRINGS_ENTRY(SELECT) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(SMALL) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(SOURCE) \
+ DOM_HTML_ELEMENT_STRINGS_ENTRY(SPACER) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(SPAN) \
+ DOM_HTML_ELEMENT_STRINGS_ENTRY(STRIKE) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(STRONG) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(STYLE) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(SUB) \
@@ -126,6 +134,7 @@
DOM_HTML_ELEMENT_STRINGS_ENTRY(TITLE) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(TR) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(TRACK) \
+ DOM_HTML_ELEMENT_STRINGS_ENTRY(TT) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(U) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(UL) \
DOM_HTML_ELEMENT_STRINGS_ENTRY(VAR) \
diff --git a/src/html/html_document.c b/src/html/html_document.c
index 5471f4f..cf3c25d 100644
--- a/src/html/html_document.c
+++ b/src/html/html_document.c
@@ -319,6 +319,8 @@ static inline dom_html_element_type _dom_html_document_get_element_type(
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_RP)
else
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_RT)
+ else
+ RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_TT)
break;
case 3:
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_DIV)
@@ -354,6 +356,8 @@ static inline dom_html_element_type _dom_html_document_get_element_type(
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_BDO)
else
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_WBR)
+ else
+ RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_BIG)
break;
case 4:
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_META)
@@ -395,6 +399,8 @@ static inline dom_html_element_type _dom_html_document_get_element_type(
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_BASE)
else
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_TIME)
+ else
+ RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_NOBR)
break;
case 5:
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_INPUT)
@@ -469,6 +475,10 @@ static inline dom_html_element_type _dom_html_document_get_element_type(
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_SOURCE)
else
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_STRONG)
+ else
+ RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_SPACER)
+ else
+ RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_STRIKE)
break;
case 7:
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_CAPTION)
@@ -486,6 +496,12 @@ static inline dom_html_element_type _dom_html_document_get_element_type(
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_SECTION)
else
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_SUMMARY)
+ else
+ RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_ACRONYM)
+ else
+ RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_BGSOUND)
+ else
+ RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_MARQUEE)
break;
case 8:
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_TEXTAREA)
@@ -509,6 +525,8 @@ static inline dom_html_element_type _dom_html_document_get_element_type(
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_PROGRESS)
else
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_TEMPLATE)
+ else
+ RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_NOFRAMES)
break;
case 10:
RETURN_IF_MATCH(upper, DOM_HTML_ELEMENT_TYPE_BLOCKQUOTE)
@@ -809,8 +827,10 @@ _dom_html_document_create_element_internal(
case DOM_HTML_ELEMENT_TYPE_EM:
case DOM_HTML_ELEMENT_TYPE_RP:
case DOM_HTML_ELEMENT_TYPE_RT:
+ case DOM_HTML_ELEMENT_TYPE_TT:
case DOM_HTML_ELEMENT_TYPE_BDI:
case DOM_HTML_ELEMENT_TYPE_BDO:
+ case DOM_HTML_ELEMENT_TYPE_BIG:
case DOM_HTML_ELEMENT_TYPE_DFN:
case DOM_HTML_ELEMENT_TYPE_KBD:
case DOM_HTML_ELEMENT_TYPE_NAV:
@@ -823,6 +843,7 @@ _dom_html_document_create_element_internal(
case DOM_HTML_ELEMENT_TYPE_CODE:
case DOM_HTML_ELEMENT_TYPE_MAIN:
case DOM_HTML_ELEMENT_TYPE_MARK:
+ case DOM_HTML_ELEMENT_TYPE_NOBR:
case DOM_HTML_ELEMENT_TYPE_RUBY:
case DOM_HTML_ELEMENT_TYPE_SAMP:
case DOM_HTML_ELEMENT_TYPE_ASIDE:
@@ -833,10 +854,16 @@ _dom_html_document_create_element_internal(
case DOM_HTML_ELEMENT_TYPE_HEADER:
case DOM_HTML_ELEMENT_TYPE_HGROUP:
case DOM_HTML_ELEMENT_TYPE_STRONG:
+ case DOM_HTML_ELEMENT_TYPE_SPACER:
+ case DOM_HTML_ELEMENT_TYPE_STRIKE:
+ case DOM_HTML_ELEMENT_TYPE_ACRONYM:
case DOM_HTML_ELEMENT_TYPE_ADDRESS:
case DOM_HTML_ELEMENT_TYPE_ARTICLE:
+ case DOM_HTML_ELEMENT_TYPE_BGSOUND:
+ case DOM_HTML_ELEMENT_TYPE_MARQUEE:
case DOM_HTML_ELEMENT_TYPE_SECTION:
case DOM_HTML_ELEMENT_TYPE_SUMMARY:
+ case DOM_HTML_ELEMENT_TYPE_NOFRAMES:
case DOM_HTML_ELEMENT_TYPE_NOSCRIPT:
case DOM_HTML_ELEMENT_TYPE_FIGCAPTION:
/* These have no specialisation: use HTMLElement */
--
2.43.0

Monday, 19 February 2024

[netsurf-dev] Improve french translation

Hi there,

Since a few weeks I've been working on improving the french
translation
of the browser.

Being a Linux user, I've been more involved in the gtk3 frontend,
however I tried to also review strings for other frontends as
well. What
I mean is that I've only take care to compile and visually check
the
result of my changes with a gtk3 build, and thus cannot guarantee
my
other fixes respect the display on other systems (utf8 support,
string
length, wording habbit…). I'd be very happy to improve my copy
with any
feedback.

You can find these changes under the two following patches (may be
applied in any order):

- for FatMessages:
https://git.umaneti.net/netsurf/patch/?id=a95d5cabb787a9b6116045d334bb0781022a65ab
- for builtin html pages:
https://git.umaneti.net/netsurf/patch/?id=0169b12fc8ca2ea9607da8465817b398f999980b

I also maintain a branch (including the previous patches) with
other
translation related improvement (like allowing the translation of
the
gtk3 history, cookies and bookmark windows, or the infopage
widget).

Let me know if I can already transmit those patches as well or if
you
prefer digest them one at a time (all my changes are in atomic
commit,
but order might be import).

Best regards,

Étienne

Friday, 16 February 2024

[netsurf-dev] [PATCH] test: nsgif: make failing tests fatal

Right now, failing tests is not currently considered fatal, and also the
definitions of "error" vs "failure" are reversed from how they are
usually intended. This corrects the usage and makes any instance of
either fatal.

See: https://github.com/gentoo/gentoo/pull/35142
---
test/runtest.sh | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/test/runtest.sh b/test/runtest.sh
index fd84847..27f45f2 100755
--- a/test/runtest.sh
+++ b/test/runtest.sh
@@ -53,14 +53,14 @@ for GIF in $(ls ${GIFTESTS});do
#echo "${GIF}"
gifdecode ${GIF}
ECODE=$?
- if [ "${ECODE}" -gt 127 ];then
- GIFTESTERRC=$((GIFTESTERRC+1))
- echo "Error ${GIF}"
+ if [ "${ECODE}" -eq 0 ];then
+ GIFTESTPASSC=$((GIFTESTPASSC+1))
else
- if [ "${ECODE}" -gt 0 ];then
- GIFTESTFAILC=$((GIFTESTFAILC+1))
+ if [ "${ECODE}" -gt 127 ];then
+ GIFTESTERRC=$((GIFTESTERRC+1))
+ echo "Error ${GIF}"
else
- GIFTESTPASSC=$((GIFTESTPASSC+1))
+ GIFTESTFAILC=$((GIFTESTFAILC+1))
fi
fi
done
@@ -68,7 +68,7 @@ done
echo "Tests:${GIFTESTTOTC} Pass:${GIFTESTPASSC} Fail:${GIFTESTFAILC}
Error:${GIFTESTERRC}"

# exit code
-if [ "${GIFTESTERRC}" -gt 0 ]; then
+if [ "${GIFTESTERRC}" -gt 0 ] || [ "${GIFTESTFAILC}" -gt 0 ]; then
exit 1
fi

--
2.43.1

Sunday, 11 February 2024

[netsurf-dev] Re: netsurf: branch jmb/ssl-purge created. release/3.11-16-g6bb70e881

On 09/02/2024 12:24, Michael Orlitzky wrote:
> On Thu, 2024-02-08 at 20:48 +0000, John-Mark Bell wrote:
>>
>> This builds fine for me against both OpenSSL 1.1.1 and 3.x. All our SDKs
>> contain 3.x so CI builds that use it should also be fine. However, I've
>> not actually tested LibreSSL and I believe at least one of the Amiga
>> builds uses AmiSSL.
>>
>> Can people who care about these things take a look at this change and
>> ensure it works for you?
>>
>
> I asked the reporter of,
>
> https://bugs.netsurf-browser.org/mantis/view.php?id=2855
>
>
> if he could test it, and it's confirmed working with libressl-3.8.2.

Great, thanks! I had to revert the merge, however, as certain of our CI
builders need upgrading first. Once that's done, I'll try again!


J.

[netsurf-dev] Re: netsurf: branch jmb/ssl-purge created. release/3.11-16-g6bb70e881

On 08/02/2024 21:05, Chris Young wrote:
> Hi,
>
> The AmigaOS 3 build uses AmiSSL (OpenSSL doesn't connect to any sites
> for some years on that platform for some reason). As long as it is
> building against AmiSSL 5.x it will be using the OpenSSL 3 API. I did
> update the SDK to v5 but I think it needs somebody to forcibly rebuild it.
>

Thanks -- not sure if the toolchain rebuild has happened since your
changes, but this change built successfully for AOS3 in CI so it might
be OK (I've reverted the change for other reasons, however!)


J.

Friday, 9 February 2024

[netsurf-dev] Re: netsurf: branch jmb/ssl-purge created. release/3.11-16-g6bb70e881

On Thu, 2024-02-08 at 20:48 +0000, John-Mark Bell wrote:
>
> This builds fine for me against both OpenSSL 1.1.1 and 3.x. All our SDKs
> contain 3.x so CI builds that use it should also be fine. However, I've
> not actually tested LibreSSL and I believe at least one of the Amiga
> builds uses AmiSSL.
>
> Can people who care about these things take a look at this change and
> ensure it works for you?
>

I asked the reporter of,

https://bugs.netsurf-browser.org/mantis/view.php?id=2855


if he could test it, and it's confirmed working with libressl-3.8.2.

Thursday, 8 February 2024

[netsurf-users] Re: Railtrail problem

In message <569b538d-63e8-499f-8824-05994c047354@netsurf-browser.org>
John-Mark Bell <jmb@netsurf-browser.org> wrote:

> On 02/02/2024 12:04, Geoffrey Baxendale (geoffrey.baxendale) wrote:
> > Hi,
> >
> > Has anybody any idea why www.railtrail.co.uk/ gives "Error occured when
> > fetching page".
>
> Yes -- this site uses near-obsolete cryptography. Against my better
> judgment, I've reintroduced support for it.
>
>
> John-Mark.
>
Thank's John-Mark, much appreciated. Works OK on 6649 on.

TTFN
--
Geoff.
Using Elesar Titanium.
Oxymoron of the day: "Computer Security"

[netsurf-users] Re: Railtrail problem

In message <569b538d-63e8-499f-8824-05994c047354@netsurf-browser.org>
John-Mark Bell <jmb@netsurf-browser.org> wrote:

> On 02/02/2024 12:04, Geoffrey Baxendale (geoffrey.baxendale) wrote:
> > Hi,
> >
> > Has anybody any idea why www.railtrail.co.uk/ gives "Error occured when
> > fetching page".
>
> Yes -- this site uses near-obsolete cryptography. Against my better
> judgment, I've reintroduced support for it.
>
>
> John-Mark.
>
Thank's John-Mark, much appreciated. Works OK on 6649 on.

TTFN
--
Geoff.
Using Elesar Titanium.
Oxymoron of the day: "Computer Security"

[netsurf-dev] Re: netsurf: branch jmb/ssl-purge created. release/3.11-16-g6bb70e881

Hi,

The AmigaOS 3 build uses AmiSSL (OpenSSL doesn't connect to any sites for some years on that platform for some reason). As long as it is building against AmiSSL 5.x it will be using the OpenSSL 3 API. I did update the SDK to v5 but I think it needs somebody to forcibly rebuild it.

Chris

8 Feb 2024 20:48:24 John-Mark Bell <jmb@netsurf-browser.org>:

On 08/02/2024 20:32, NetSurf Browser Project (Commit Mailer) wrote:
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/6bb70e88108c904d67e9af7c8e5b273f6cd6854f
...commit http://git.netsurf-browser.org/netsurf.git/commit/6bb70e88108c904d67e9af7c8e5b273f6cd6854f
...tree http://git.netsurf-browser.org/netsurf.git/tree/6bb70e88108c904d67e9af7c8e5b273f6cd6854f
The branch, jmb/ssl-purge has been created
         at  6bb70e88108c904d67e9af7c8e5b273f6cd6854f (commit)
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=6bb70e88108c904d67e9af7c8e5b273f6cd6854f
commit 6bb70e88108c904d67e9af7c8e5b273f6cd6854f
Author: John-Mark Bell <jmb@netsurf-browser.org>
Commit: John-Mark Bell <jmb@netsurf-browser.org>
     fetchers: drop support for ancient OpenSSL
          We now require 1.1.1 or later (and, preferably, 3.x).
          Also take the opportunity to add support for LibreSSL 3.5.0 or
     later (we still support ancient versions of this because 3.5.0 is
     still relatively modern -- give it a few more years and support
     for old LibreSSL can go, too)

[...]

This builds fine for me against both OpenSSL 1.1.1 and 3.x. All our SDKs contain 3.x so CI builds that use it should also be fine. However, I've not actually tested LibreSSL and I believe at least one of the Amiga builds uses AmiSSL.

Can people who care about these things take a look at this change and ensure it works for you?

Ta,


John-Mark.

[netsurf-users] Re: Railtrail problem

On 02/02/2024 12:04, Geoffrey Baxendale (geoffrey.baxendale) wrote:
> Hi,
>
> Has anybody any idea why www.railtrail.co.uk/ gives "Error occured when
> fetching page".

Yes -- this site uses near-obsolete cryptography. Against my better
judgment, I've reintroduced support for it.


John-Mark.

[netsurf-dev] Re: netsurf: branch jmb/ssl-purge created. release/3.11-16-g6bb70e881

On 08/02/2024 20:32, NetSurf Browser Project (Commit Mailer) wrote:
> Gitweb links:
>
> ...log http://git.netsurf-browser.org/netsurf.git/shortlog/6bb70e88108c904d67e9af7c8e5b273f6cd6854f
> ...commit http://git.netsurf-browser.org/netsurf.git/commit/6bb70e88108c904d67e9af7c8e5b273f6cd6854f
> ...tree http://git.netsurf-browser.org/netsurf.git/tree/6bb70e88108c904d67e9af7c8e5b273f6cd6854f
>
> The branch, jmb/ssl-purge has been created
> at 6bb70e88108c904d67e9af7c8e5b273f6cd6854f (commit)
>
> - Log -----------------------------------------------------------------
> commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=6bb70e88108c904d67e9af7c8e5b273f6cd6854f
> commit 6bb70e88108c904d67e9af7c8e5b273f6cd6854f
> Author: John-Mark Bell <jmb@netsurf-browser.org>
> Commit: John-Mark Bell <jmb@netsurf-browser.org>
>
> fetchers: drop support for ancient OpenSSL
>
> We now require 1.1.1 or later (and, preferably, 3.x).
>
> Also take the opportunity to add support for LibreSSL 3.5.0 or
> later (we still support ancient versions of this because 3.5.0 is
> still relatively modern -- give it a few more years and support
> for old LibreSSL can go, too)

[...]

This builds fine for me against both OpenSSL 1.1.1 and 3.x. All our SDKs
contain 3.x so CI builds that use it should also be fine. However, I've
not actually tested LibreSSL and I believe at least one of the Amiga
builds uses AmiSSL.

Can people who care about these things take a look at this change and
ensure it works for you?

Ta,


John-Mark.

[netsurf-dev] Re: [PATCH 1/1] bindings/xml/libxml_xmlparser.c: update for libxml2 >= 2.12.0

On 08/02/2024 03:08, Michael Orlitzky wrote:
> Version 2.12.0 of libxml2 changes a few functions to return (const
> xmlError *) where previously they returned only (xmlError *).
> Compilers generally are not happy with this. For example,
>
> bindings/xml/libxml_xmlparser.c: In function 'xml_parser_start_document':
> bindings/xml/libxml_xmlparser.c:327:16: error: assignment discards 'const'
> qualifier from pointer target type [-Werror=discarded-qualifiers]
> 327 | xmlerr = xmlCtxtGetLastError(parser->xml_ctx);
>
> This commit adds a few #ifdefs to handle both versions of the API
> cleanly. It's probably not the sexiest fix, but it's simple and gets
> the job done.

[...]

Applied, thanks!


John-Mark.

[netsurf-dev] Re: [PATCH 1/1] bindings/xml/libxml_xmlparser.c: add stdlib.h include

On 03/02/2024 16:49, Michael Orlitzky wrote:
> This file uses malloc() but does not include stdlib.h directly. With
> glibc, that apparently works out just fine... but with musl, it leads
> to implicit declaration warnings/errors, most likely because musl does
> not include stdlib.h transitively via any of the other headers used by
> this file.

[...]

Applied, thanks!


John-Mark.

Wednesday, 7 February 2024

[netsurf-dev] [PATCH 1/1] bindings/xml/libxml_xmlparser.c: update for libxml2 >= 2.12.0

Version 2.12.0 of libxml2 changes a few functions to return (const
xmlError *) where previously they returned only (xmlError *).
Compilers generally are not happy with this. For example,

bindings/xml/libxml_xmlparser.c: In function 'xml_parser_start_document':
bindings/xml/libxml_xmlparser.c:327:16: error: assignment discards 'const'
qualifier from pointer target type [-Werror=discarded-qualifiers]
327 | xmlerr = xmlCtxtGetLastError(parser->xml_ctx);

This commit adds a few #ifdefs to handle both versions of the API
cleanly. It's probably not the sexiest fix, but it's simple and gets
the job done.
---
bindings/xml/libxml_xmlparser.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)

diff --git a/bindings/xml/libxml_xmlparser.c b/bindings/xml/libxml_xmlparser.c
index 28aadf1..cd7f8ad 100644
--- a/bindings/xml/libxml_xmlparser.c
+++ b/bindings/xml/libxml_xmlparser.c
@@ -317,7 +317,11 @@ dom_xml_error dom_xml_parser_completed(dom_xml_parser *parser)
void xml_parser_start_document(void *ctx)
{
dom_xml_parser *parser = (dom_xml_parser *) ctx;
+#if LIBXML_VERSION >= 21200
+ const xmlError *xmlerr;
+#else
xmlErrorPtr xmlerr;
+

Saturday, 3 February 2024

[netsurf-users] Re: Railtrail problem

On 2 Feb 2024 as I do recall,
John Harrison wrote:

> In article <79a85e2c5b.thebears@geoffrey.baxendale@btinternet.com>,
> Geoffrey Baxendale <dmarc-noreply@freelists.org> (geoffrey.baxendale)
> wrote:
> > ... 5380 works and 5389 doesn't, so I wonder what changed.
>
> Presumably the CMS used to generate it was 'upgraded' and introduced a
> feature that causes the problem. I've seen that happen with several
> sites.

Yes, but it's the older versions of the *browser* that work...


> It works OK with Iris. Looking at the code it is heavy with JavaScript
> so I wouldn't expect it to work too well with NetSurf anyway, but I
> can't see why that would make the page appear not to exist.

I'm assuming that newer versions of NetSurf are doing some kind of
sanity check which the page is failing?


--
Harriet Bazley == Loyaulte me lie ==

St George for England - St Pancras for Scotland

[netsurf-dev] [PATCH 1/1] bindings/xml/libxml_xmlparser.c: add stdlib.h include

This file uses malloc() but does not include stdlib.h directly. With
glibc, that apparently works out just fine... but with musl, it leads
to implicit declaration warnings/errors, most likely because musl does
not include stdlib.h transitively via any of the other headers used by
this file.
---
bindings/xml/libxml_xmlparser.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/bindings/xml/libxml_xmlparser.c b/bindings/xml/libxml_xmlparser.c
index e4a6d80..28aadf1 100644
--- a/bindings/xml/libxml_xmlparser.c
+++ b/bindings/xml/libxml_xmlparser.c
@@ -6,6 +6,7 @@
*/

#include <stdbool.h>
+#include <stdlib.h>
#include <string.h>
#include <assert.h>

--
2.43.0

Friday, 2 February 2024

[netsurf-dev] Dead mailing list links

Just a heads up, the three mailing list links on the "Contacting the
Developers" page are down:

https://www.netsurf-browser.org/lists/netsurf-users
https://www.netsurf-browser.org/lists/netsurf-dev
https://www.netsurf-browser.org/lists/netsurf-commits

[netsurf-users] Re: Railtrail problem

In article <79a85e2c5b.thebears@geoffrey.baxendale@btinternet.com>,
Geoffrey Baxendale <dmarc-noreply@freelists.org> (geoffrey.baxendale)
wrote:
> ... 5380 works and 5389 doesn't, so I wonder what changed.

Presumably the CMS used to generate it was 'upgraded' and introduced a
feature that causes the problem. I've seen that happen with several
sites.

It works OK with Iris. Looking at the code it is heavy with JavaScript
so I wouldn't expect it to work too well with NetSurf anyway, but I
can't see why that would make the page appear not to exist.

The link in the NoScript command downloads with NetSurf OK (but doesn't
produce any content).

--
John Harrison
Website http://jaharrison.me.uk
Using 4té and ARMX6, both running RISC OS

[netsurf-users] Re: Railtrail problem

On 2 Feb 2024 Geoffrey Baxendale wrote:

> Hi,

> Has anybody any idea why www.railtrail.co.uk/ gives "Error occured when
> fetching page". It used to work. Looking at old versions 5380 works and
> 5389 doesn't, so I wonder what changed. (don't have 5381-5388)

Same here. It looks like it's got a load of javascript to handle the
changing pictures. I'm using 3.11.


--
Richard Porter http://www.minijem.plus.com
x: @westernexplorer mailto:ricp@minijem.plus.com

[netsurf-users] Railtrail problem

Hi,

Has anybody any idea why www.railtrail.co.uk/ gives "Error occured when
fetching page". It used to work. Looking at old versions 5380 works and
5389 doesn't, so I wonder what changed. (don't have 5381-5388)

TTFN
--
Geoff.
Using Elesar Titanium.
Oxymoron of the day: "Tight Slacks"