lynx-dev
[Top][All Lists]
Advanced

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

[Lynx-dev] lynx gopher telnet item fix


From: Ben Collver
Subject: [Lynx-dev] lynx gopher telnet item fix
Date: Mon, 6 Jan 2025 17:51:51 -0800

Good day,

The current version of lynx cannot open the telnet link in the following
gopher menu.

gopher://mud.nemesis.de/1

When the selector is empty, lynx uses a format with the wrong number
of arguments.

>From lynx2.9.2/WWW/Library/Implementation/HTGopher.c:

    const char *format = *selector ? "%s//%s@%s/" : "%s//%s/";
    ...
    HTSprintf0(&address, format, STR_TELNET_URL, selector, host);

The problem happens when the format calls for 2 arguments, but lynx
passes it 3.  Consequently, it ignores the host in the 3rd argument
and this results in a broken telnet item.

Attached is a patch to fix this problem.

This patch changes the format to always use four arguments.  When the
selector is empty, then both the selector and the following argument
are empty strings.  When the selector is not empty, then the selector
is followed by "@".

Best regards,
-Ben

Attachment: lynx-gopher-telnet-item.diff
Description: Text document


reply via email to

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