Dillo-dev
By thread
dillo-dev@mailman3.com
By month
Messages by month
- ----- 2026 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2000 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1999 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1998 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1997 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1996 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 1995 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- 3 participants
- 11667 messages
Re: dillo plugin patches
by John McCue
On Sat, Nov 01, 2025 at 09:20:39PM +0100, Rodrigo Arias wrote:
>Hi,
>
>>I'll try and backtrace, I never did that before, I usually
>>throw printfs all over the place. But ...
>>
>>the version from
>> git clone https://git.dillo-browser.org/plugins/gopher
>>
>>is working after I added this <sys/socket.h> to io.c to
>>compile it.
>
>Should be there:
>
>https://git.dillo-browser.org/plugins/gopher/tree/io.c?h=fix-bsd#n10
>
>Make sure you use the "fix-bsd" branch (currently at a32f745):
Thanks, I got the "fix-bsd" branch. Both OpenBSD and NetBSD
compiled without warnings. Plus testing succeeded, no
issues on either system. I think the issues are fixed.
[...]
>>
>>I attached the warnings to this email as warn_openbsd.txt in
>>case you want it. I think many of the warnings can be
>>ignored.
>>
>>NetBSD has no warnings and it too works fine.
>
>All those warnings should be fixed in the fix-bsd branch. Additional
>problems may be caught by the new CFLAGS flags that stick to the C99
>standard (no GNUsisms) and POSIX 2001.
Correct, no warnings anywhere.
>Best,
>Rodrigo.
Thanks for all your work,
John
Nov. 1, 2025
Re: dillo plugin patches
by Rodrigo Arias
Hi,
>I'll try and backtrace, I never did that before, I usually
>throw printfs all over the place. But ...
>
>the version from
> git clone https://git.dillo-browser.org/plugins/gopher
>
>is working after I added this <sys/socket.h> to io.c to
>compile it.
Should be there:
https://git.dillo-browser.org/plugins/gopher/tree/io.c?h=fix-bsd#n10
Make sure you use the "fix-bsd" branch (currently at a32f745):
% git clone -b fix-bsd https://git.dillo-browser.org/plugins/gopher
Cloning into 'gopher'...
% cd gopher
% git branch -v
* fix-bsd a32f745 Build with C99 standard and POSIX 2001
% grep sys/socket io.c
#include <sys/socket.h>
>I also checked the original version, that works now, very
>odd. I will play around with this to see if I could figure
>out what I may have done differently.
Thanks!
>After I added this <sys/socket.h> to io.c I can compile it
>on OpenBSD.
>
>I attached the warnings to this email as warn_openbsd.txt in
>case you want it. I think many of the warnings can be
>ignored.
>
>NetBSD has no warnings and it too works fine.
All those warnings should be fixed in the fix-bsd branch. Additional
problems may be caught by the new CFLAGS flags that stick to the C99
standard (no GNUsisms) and POSIX 2001.
Best,
Rodrigo.
Nov. 1, 2025
Re: dillo plugin patches
by John McCue
On Sat, Nov 01, 2025 at 12:34:17AM +0100, Rodrigo Arias wrote:
>Hi,
>
>I added an exception for your email to the list. Following replies
>should get archived.
Thanks
>On Fri, Oct 31, 2025 at 11:34:04AM -0400, John McCue wrote:
[...]
>>2. dpi.txt -- Corrects an odd issue on OpenBSD with the
>> gopher plugin. Access a gopher hole works fine on first
>> try, accessing a 2nd hole does nothing, no data is
>> presented. Selecting the "Stop" button in dillo works to
>> stop the attempted load. My wild guess is one of the
>> casts fixed the issue.
>
>I cannot reproduce this, with or without the patch. Tested in order:
>
>- gopher://gopher.quux.org:70/1/
>- gopher://gopher.floodgap.com/
>
>If you can reliably reproduce this, you could dump the backtrace while
>is "doing nothing" in case it got stuck in some network operation.
>
I'll try and backtrace, I never did that before, I usually
throw printfs all over the place. But ...
the version from
git clone https://git.dillo-browser.org/plugins/gopher
is working after I added this <sys/socket.h> to io.c to
compile it.
I also checked the original version, that works now, very
odd. I will play around with this to see if I could figure
out what I may have done differently.
[...]
>> buf[30] = '\0';
>>- rc = sscanf(buf, "<cmd='auth' msg='%4x' '>", key);
>>+ rc = sscanf(buf, "<cmd='auth' msg='%4x' '>", (unsigned int *) key);
>The address of key may not be aligned to the size of a word. Some
>architectures will cause an invalid access trying to write an int to a
>non-aligned address.
>
>A better solution is to declare key as an unsigned int. I applied your
>fixes and then changed the key variables.
This sounds fine by me, I just made changes to "get it working" :)
[...]
>>diff --git a/Makefile b/Makefile
>>index 1ff7047..e41e173 100644
>>--- a/Makefile
>>+++ b/Makefile
>>@@ -13,6 +13,7 @@ $(DPIDRC):
>> mkdir -p $(DPI_DIR)
>> if [ -f /etc/dillo/dpidrc ]; then cp /etc/dillo/dpidrc $@; \
>> elif [ -f /usr/local/etc/dillo/dpidrc ]; then cp /usr/local/etc/dillo/dpidrc $@; \
>>+ elif [ -f /usr/pkg/etc/dillo/dpidrc ]; then cp /usr/pkg/etc/dillo/dpidrc $@; \
>> else echo "Can't find dpidrc, is dillo installed?"; false; fi
>
>This is not in our upstream, but I would rather avoid having each
>possible path here. I added a DILLO_PREFIX variable, empty by default.
>So you can use `make install DILLO_PREFIX=/usr/pkg` to find dpidrc in
>your system. By default it only looks at /etc/dillo/dpidrc.
Fine by me.
>>diff --git a/io.c b/io.c
>>index 615f346..f437c2e 100644
>>--- a/io.c
>>+++ b/io.c
>>@@ -7,6 +7,7 @@
>>#include <fcntl.h>
>>#include <netdb.h>
>>#include <netinet/in.h>
>>+#include <sys/socket.h>
>
>Applied.
>
>>
>>#include "io.h"
>>
>
>I fixed several other problems and set the C standard to C99 and
>enabled POSIX 2001 by default in CFLAGS. I also performed the build
>with gcc and clang on Linux with -Werror -Wall -Wextra -pedantic as
>well as with -fsanitize=address to see if I catch something while
>running the plugin. Nothing so far.
>
>I pushed it here (we are moving away from GitHub):
>
> https://git.dillo-browser.org/plugins/gopher/log/?h=fix-bsd
>
>Let me know if you encounter problems building it on any BSD.
After I added this <sys/socket.h> to io.c I can compile it
on OpenBSD.
I attached the warnings to this email as warn_openbsd.txt in
case you want it. I think many of the warnings can be
ignored.
NetBSD has no warnings and it too works fine.
>Thanks!,
>Rodrigo.
John
Nov. 1, 2025
Re: dillo plugin patches
by Rodrigo Arias
Hi,
I added an exception for your email to the list. Following replies
should get archived.
On Fri, Oct 31, 2025 at 11:34:04AM -0400, John McCue wrote:
>Hi Rodrigo,
>
>Attached are these 3 patches, the third one is
>a very minor one for the gemini plugin's Makefile.
Thanks for the patches.
>1. io.txt -- A patch to io.c to avoid a compile error
> on OpenBSD. This is based upon the email I responded to
> earlier today.
>
>2. dpi.txt -- Corrects an odd issue on OpenBSD with the
> gopher plugin. Access a gopher hole works fine on first
> try, accessing a 2nd hole does nothing, no data is
> presented. Selecting the "Stop" button in dillo works to
> stop the attempted load. My wild guess is one of the
> casts fixed the issue.
I cannot reproduce this, with or without the patch. Tested in order:
- gopher://gopher.quux.org:70/1/
- gopher://gopher.floodgap.com/
If you can reliably reproduce this, you could dump the backtrace while
is "doing nothing" in case it got stuck in some network operation.
>3. gemini_mk.txt -- a simple change to the gemini plugin's
> Makefile. It allows the gemini plugin to 'compile' on
> NetBSD. NetBSD installs packages in /usr/pkg.
>
>As mentioned in the last email, I will be happy to test
>on OpenBSD and NetBSD.
>
>Thanks
>John
>diff --git a/dpi.c b/dpi.c
>index 7b38800..52547f8 100644
>--- a/dpi.c
>+++ b/dpi.c
>@@ -7,7 +7,7 @@
> #include "io.h"
>
> static void check_auth() {
>- char buf[30];
>+ char buf[31];
> int rc;
> char key[4], local_key[4];
> char keys[128];
>@@ -16,16 +16,16 @@ static void check_auth() {
> rc = read_all(STDIN_FILENO, buf, 29);
> if (rc < 0) err(1, "read auth");
> buf[30] = '\0';
>- rc = sscanf(buf, "<cmd='auth' msg='%4x' '>", key);
>+ rc = sscanf(buf, "<cmd='auth' msg='%4x' '>", (unsigned int *) key);
The address of key may not be aligned to the size of a word. Some
architectures will cause an invalid access trying to write an int to a
non-aligned address.
A better solution is to declare key as an unsigned int. I applied your
fixes and then changed the key variables.
> if (rc < 0) err(1, "auth: %.*s", 29, buf);
> if (rc < 1) errx(1, "auth: %.*s", 29, buf);
> home = getenv("HOME");
> if (!home) home = ".";
> sz = read_file(keys, sizeof(keys), "%s/.dillo/dpid_comm_keys", home);
> if (sz < 0) err(1, "read dillo comm keys");
>- rc = sscanf(keys, "%*d %4x' '>", local_key);
>- if (rc < 0) err(1, "comm key: %.*s", sz, keys);
>- if (rc < 1) errx(1, "comm key: %.*s", sz, keys);
>+ rc = sscanf(keys, "%*d %4x' '>", (unsigned int *) local_key);
>+ if (rc < 0) err(1, "comm key: %.*s", (int) sz, keys);
>+ if (rc < 1) errx(1, "comm key: %.*s", (int) sz, keys);
> if (memcmp(key, local_key, 4)) errx(1, "wrong dillo key");
> }
>
>@@ -38,7 +38,7 @@ static void get_url(char *url_buf, size_t url_len) {
> rc = read_all(STDIN_FILENO, buf, sizeof(buf));
> if (rc < 0) err(1, "read open_url");
> if (strncmp(buf, "<cmd='open_url' url='", 21)) {
>- err(1, "bad open_url cmd: %.*s", sizeof(buf), buf);
>+ err(1, "bad open_url cmd: %.*s", (int) sizeof(buf), buf);
> }
> len = url_len;
> rc = read_some(STDIN_FILENO, url_buf, &len);
>@@ -48,7 +48,7 @@ static void get_url(char *url_buf, size_t url_len) {
> if (url_buf[i] == '\'' && url_buf[i+1] == ' ') break;
> }
> if (i > len-3 || strncmp(url_buf + i, "' '>", 4)) {
>- err(1, "bad url end: %.*s", len, url_buf);
>+ err(1, "bad url end: %.*s", (int) len, url_buf);
> }
> url_buf[i] = '\0';
> }
>diff --git a/Makefile b/Makefile
>index 1ff7047..e41e173 100644
>--- a/Makefile
>+++ b/Makefile
>@@ -13,6 +13,7 @@ $(DPIDRC):
> mkdir -p $(DPI_DIR)
> if [ -f /etc/dillo/dpidrc ]; then cp /etc/dillo/dpidrc $@; \
> elif [ -f /usr/local/etc/dillo/dpidrc ]; then cp /usr/local/etc/dillo/dpidrc $@; \
>+ elif [ -f /usr/pkg/etc/dillo/dpidrc ]; then cp /usr/pkg/etc/dillo/dpidrc $@; \
> else echo "Can't find dpidrc, is dillo installed?"; false; fi
This is not in our upstream, but I would rather avoid having each
possible path here. I added a DILLO_PREFIX variable, empty by default.
So you can use `make install DILLO_PREFIX=/usr/pkg` to find dpidrc in
your system. By default it only looks at /etc/dillo/dpidrc.
> install-proto: $(DPIDRC)
>diff --git a/io.c b/io.c
>index 615f346..f437c2e 100644
>--- a/io.c
>+++ b/io.c
>@@ -7,6 +7,7 @@
> #include <fcntl.h>
> #include <netdb.h>
> #include <netinet/in.h>
>+#include <sys/socket.h>
Applied.
>
> #include "io.h"
>
I fixed several other problems and set the C standard to C99 and enabled
POSIX 2001 by default in CFLAGS. I also performed the build with gcc and
clang on Linux with -Werror -Wall -Wextra -pedantic as well as with
-fsanitize=address to see if I catch something while running the plugin.
Nothing so far.
I pushed it here (we are moving away from GitHub):
https://git.dillo-browser.org/plugins/gopher/log/?h=fix-bsd
Let me know if you encounter problems building it on any BSD.
Thanks!,
Rodrigo.
Oct. 31, 2025
Re: FWD - dillo gopher plugin issue (reddit)
by a1exï¼ dismail.de
Hi Rodrigo,
Rodrigo Arias <rodarima(a)gmail.com> wrote:
> I don't have a machine with OpenBSD at hand, can you test if the build
> succeeds using the current master code in OpenBSD with these CFLAGS?
> It does on Linux:
>
> % git
> clone https://git.dillo-browser.org/plugins/gopher && cd gopher % make CC=clang CFLAGS=
> "-Wall -std=c99 -D_POSIX_C_SOURCE=200112L"
$ make CC=clang CFLAGS="-Wall -std=c99 -D_POSIX_C_SOURCE=200112L"
clang -Wall -std=c99 -D_POSIX_C_SOURCE=200112L -I/usr/local/include -I/usr/X11R6/include -c io.c
io.c:84:20: error: use of undeclared identifier 'AF_UNSPEC'
84 | hints.ai_family = AF_UNSPEC;
| ^
io.c:95:8: warning: call to undeclared function 'socket'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
95 | fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol);
| ^
io.c:97:7: warning: call to undeclared function 'connect'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
97 | if (connect(fd, rp->ai_addr, rp->ai_addrlen) == 0) break;
| ^
2 warnings and 1 error generated.
> There are many warnings that should be fixed (as below), but the
> current includes should work otherwise. If not, does adding the extra
>
> + #include <sys/socket.h>
>
> line solves it?
Looks better, now we get this:
$ make CC=clang CFLAGS="-Wall -std=c99 -D_POSIX_C_SOURCE=200112L"
clang -Wall -std=c99 -D_POSIX_C_SOURCE=200112L -I/usr/local/include -I/usr/X11R6/include -c io.c
clang -Wall -std=c99 -D_POSIX_C_SOURCE=200112L -I/usr/local/include -I/usr/X11R6/include -c dpi.c
dpi.c:19:47: warning: format specifies type 'unsigned int *' but the argument has type 'char *' [-Wformat]
19 | rc = sscanf(buf, "<cmd='auth' msg='%4x' '>", key);
| ~~~ ^~~
| %3s
dpi.c:26:35: warning: format specifies type 'unsigned int *' but the argument has type 'char *' [-Wformat]
26 | rc = sscanf(keys, "%*d %4x' '>", local_key);
| ~~~ ^~~~~~~~~
| %3s
dpi.c:27:34: warning: field precision should have type 'int', but argument has type 'ssize_t' (aka 'long') [-Wformat]
27 | if (rc < 0) err(1, "comm key: %.*s", sz, keys);
| ~~^~ ~~
dpi.c:28:35: warning: field precision should have type 'int', but argument has type 'ssize_t' (aka 'long') [-Wformat]
28 | if (rc < 1) errx(1, "comm key: %.*s", sz, keys);
| ~~^~ ~~
dpi.c:18:2: warning: array index 30 is past the end of the array (that has type 'char[30]') [-Warray-bounds]
18 | buf[30] = '\0';
| ^ ~~
dpi.c:10:2: note: array 'buf' declared here
10 | char buf[30];
| ^
dpi.c:41:31: warning: field precision should have type 'int', but argument has type 'unsigned long' [-Wformat]
41 | err(1, "bad open_url cmd: %.*s", sizeof(buf), buf);
| ~~^~ ~~~~~~~~~~~
dpi.c:51:26: warning: field precision should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat]
51 | err(1, "bad url end: %.*s", len, url_buf);
| ~~^~ ~~~
7 warnings generated.
Regards,
Alex
Oct. 31, 2025
Re: FWD - dillo gopher plugin issue (reddit)
by Rodrigo Arias
Hi Alex, John,
On Thu, Oct 30, 2025 at 12:05:51PM +0000, a1ex(a)dismail.de wrote:
> Hi,
>
> I saw this issue on Reddit today pertaining to the Gopher plugin not
> working correctly on OpenBSD. It includes a fix (I haven't tested it):
>
> https://eddrit.com/r/openbsd/comments/1oj3ljg/dillo_gopher_plugin_issue_wor…
Thanks, I saw it as well. Nice frontend btw.
> Date: Thu, 30 Oct 2025 11:10:21 -0400
> From: John McCue <jmccue(a)jmcunx.com>
> To: a1ex(a)dismail.de
> Cc: dillo-dev(a)mailman3.com
> Subject: Re: Dillo gopher plugin on OpenBSD issue
>
>
> [...]
>
> Somehow I missed it seeing there was a list. I found another
> issues with the gopher plugin on OpenBSD.
>
> The issue I am testing is with dpi.c. On OpenBSD, it has to
> do with how clang works on OpenBSD. The diffs are below.
I can reproduce many issues on Linux with `CC=clang make`. I'm getting a
few more warnings that should be easy to solve.
> So far, with the changes to io.c and dpi.c, the plugin
> works fine on both OpenBSD and NetBSD.
>
> diff --git a/io.c b/io.c
> index 615f346..a10a0b3 100644
> --- a/io.c
> +++ b/io.c
> @@ -1,3 +1,4 @@
> +#include <sys/param.h>
> #include <string.h>
> #include <errno.h>
> #include <unistd.h>
> @@ -8,6 +9,12 @@
> #include <netdb.h>
> #include <netinet/in.h>
>
> +#ifdef OpenBSD
I don't think we need to handle OpenBSD differently, but instead make
the code portable by targeting C and POSIX standards.
> +#include <sys/socket.h>
This is always needed as we use socket(), but it should not be needed
here as it would be included via <netinet/in.h>, from netinet_in.h(0P):
> Inclusion of the <netinet/in.h> header may also make visible all
> symbols from <inttypes.h> and <sys/socket.h>
Not sure if OpenBSD follows this, otherwise can simply include it
unconditionally.
> +#include <net/if.h>
> +#include <net/route.h>
Needed?
> +#endif
> +
Building with:
% make CC=clang CFLAGS="-std=c11 -Wall -pedantic"
Already reveals many problems. We can probably lower the C standard to
C99.
I don't have a machine with OpenBSD at hand, can you test if the build
succeeds using the current master code in OpenBSD with these CFLAGS? It
does on Linux:
% git clone https://git.dillo-browser.org/plugins/gopher && cd gopher
% make CC=clang CFLAGS="-Wall -std=c99 -D_POSIX_C_SOURCE=200112L"
There are many warnings that should be fixed (as below), but the
current includes should work otherwise. If not, does adding the extra
+ #include <sys/socket.h>
line solves it?
> #include "io.h"
>
> int read_all(int fd, unsigned char *buf, size_t len) {
>
>
> diff --git a/dpi.c b/dpi.c
> index 7b38800..52547f8 100644
> --- a/dpi.c
> +++ b/dpi.c
> @@ -7,7 +7,7 @@
> #include "io.h"
>
> static void check_auth() {
> - char buf[30];
> + char buf[31];
> int rc;
> char key[4], local_key[4];
> char keys[128];
> @@ -16,16 +16,16 @@ static void check_auth() {
> rc = read_all(STDIN_FILENO, buf, 29);
> if (rc < 0) err(1, "read auth");
> buf[30] = '\0';
> - rc = sscanf(buf, "<cmd='auth' msg='%4x' '>", key);
> + rc = sscanf(buf, "<cmd='auth' msg='%4x' '>", (unsigned int *)
> key); if (rc < 0) err(1, "auth: %.*s", 29, buf);
The patch is badly mangled, better use `git send-patch` or attach it as
a file.
> if (rc < 1) errx(1, "auth: %.*s", 29, buf);
> home = getenv("HOME");
> if (!home) home = ".";
> sz = read_file(keys, sizeof(keys),
> "%s/.dillo/dpid_comm_keys", home); if (sz < 0) err(1, "read dillo comm
> keys");
> - rc = sscanf(keys, "%*d %4x' '>", local_key);
> - if (rc < 0) err(1, "comm key: %.*s", sz, keys);
> - if (rc < 1) errx(1, "comm key: %.*s", sz, keys);
> + rc = sscanf(keys, "%*d %4x' '>", (unsigned int *) local_key);
> + if (rc < 0) err(1, "comm key: %.*s", (int) sz, keys);
> + if (rc < 1) errx(1, "comm key: %.*s", (int) sz, keys);
> if (memcmp(key, local_key, 4)) errx(1, "wrong dillo key");
> }
>
> @@ -38,7 +38,7 @@ static void get_url(char *url_buf, size_t url_len) {
> rc = read_all(STDIN_FILENO, buf, sizeof(buf));
> if (rc < 0) err(1, "read open_url");
> if (strncmp(buf, "<cmd='open_url' url='", 21)) {
> - err(1, "bad open_url cmd: %.*s", sizeof(buf), buf);
> + err(1, "bad open_url cmd: %.*s", (int) sizeof(buf),
> buf); }
> len = url_len;
> rc = read_some(STDIN_FILENO, url_buf, &len);
> @@ -48,7 +48,7 @@ static void get_url(char *url_buf, size_t url_len) {
> if (url_buf[i] == '\'' && url_buf[i+1] == ' ') break;
> }
> if (i > len-3 || strncmp(url_buf + i, "' '>", 4)) {
> - err(1, "bad url end: %.*s", len, url_buf);
> + err(1, "bad url end: %.*s", (int) len, url_buf);
> }
> url_buf[i] = '\0';
> }
>
Thanks!,
Rodrigo.
Oct. 30, 2025
Fw: Dillo gopher plugin on OpenBSD issue
by a1exï¼ dismail.de
Forwarding to dillo-dev, since the list only accepts mails from
subscribers.
Begin forwarded message:
Date: Thu, 30 Oct 2025 11:10:21 -0400
From: John McCue <jmccue(a)jmcunx.com>
To: a1ex(a)dismail.de
Cc: dillo-dev(a)mailman3.com
Subject: Re: Dillo gopher plugin on OpenBSD issue
[...]
Somehow I missed it seeing there was a list. I found another
issues with the gopher plugin on OpenBSD.
The issue I am testing is with dpi.c. On OpenBSD, it has to
do with how clang works on OpenBSD. The diffs are below.
So far, with the changes to io.c and dpi.c, the plugin
works fine on both OpenBSD and NetBSD.
diff --git a/io.c b/io.c
index 615f346..a10a0b3 100644
--- a/io.c
+++ b/io.c
@@ -1,3 +1,4 @@
+#include <sys/param.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
@@ -8,6 +9,12 @@
#include <netdb.h>
#include <netinet/in.h>
+#ifdef OpenBSD
+#include <sys/socket.h>
+#include <net/if.h>
+#include <net/route.h>
+#endif
+
#include "io.h"
int read_all(int fd, unsigned char *buf, size_t len) {
diff --git a/dpi.c b/dpi.c
index 7b38800..52547f8 100644
--- a/dpi.c
+++ b/dpi.c
@@ -7,7 +7,7 @@
#include "io.h"
static void check_auth() {
- char buf[30];
+ char buf[31];
int rc;
char key[4], local_key[4];
char keys[128];
@@ -16,16 +16,16 @@ static void check_auth() {
rc = read_all(STDIN_FILENO, buf, 29);
if (rc < 0) err(1, "read auth");
buf[30] = '\0';
- rc = sscanf(buf, "<cmd='auth' msg='%4x' '>", key);
+ rc = sscanf(buf, "<cmd='auth' msg='%4x' '>", (unsigned int *)
key); if (rc < 0) err(1, "auth: %.*s", 29, buf);
if (rc < 1) errx(1, "auth: %.*s", 29, buf);
home = getenv("HOME");
if (!home) home = ".";
sz = read_file(keys, sizeof(keys),
"%s/.dillo/dpid_comm_keys", home); if (sz < 0) err(1, "read dillo comm
keys");
- rc = sscanf(keys, "%*d %4x' '>", local_key);
- if (rc < 0) err(1, "comm key: %.*s", sz, keys);
- if (rc < 1) errx(1, "comm key: %.*s", sz, keys);
+ rc = sscanf(keys, "%*d %4x' '>", (unsigned int *) local_key);
+ if (rc < 0) err(1, "comm key: %.*s", (int) sz, keys);
+ if (rc < 1) errx(1, "comm key: %.*s", (int) sz, keys);
if (memcmp(key, local_key, 4)) errx(1, "wrong dillo key");
}
@@ -38,7 +38,7 @@ static void get_url(char *url_buf, size_t url_len) {
rc = read_all(STDIN_FILENO, buf, sizeof(buf));
if (rc < 0) err(1, "read open_url");
if (strncmp(buf, "<cmd='open_url' url='", 21)) {
- err(1, "bad open_url cmd: %.*s", sizeof(buf), buf);
+ err(1, "bad open_url cmd: %.*s", (int) sizeof(buf),
buf); }
len = url_len;
rc = read_some(STDIN_FILENO, url_buf, &len);
@@ -48,7 +48,7 @@ static void get_url(char *url_buf, size_t url_len) {
if (url_buf[i] == '\'' && url_buf[i+1] == ' ') break;
}
if (i > len-3 || strncmp(url_buf + i, "' '>", 4)) {
- err(1, "bad url end: %.*s", len, url_buf);
+ err(1, "bad url end: %.*s", (int) len, url_buf);
}
url_buf[i] = '\0';
}
Oct. 30, 2025
FWD - dillo gopher plugin issue (reddit)
by a1exï¼ dismail.de
Hi,
I saw this issue on Reddit today pertaining to the Gopher plugin not
working correctly on OpenBSD. It includes a fix (I haven't tested it):
https://eddrit.com/r/openbsd/comments/1oj3ljg/dillo_gopher_plugin_issue_wor…
Regards,
Alex
Oct. 30, 2025
Re: New website dillo-browser.org
by Rodrigo Arias
Hi,
> There may be something we can tune in cgit or maybe in the git
> repository to make it faster. I'll need to dive a bit more on how git
> works under the hood to fix it.
This seems to be caused by cgit not implementing the git protocol v2,
which allows downloading only the needed objects. There is a patch
available, but never got merged. I might try to add it to our cgit or
configure the http server to send git requests directly to a git server.
Tracked here: https://bug.dillo-browser.org/504/
Best,
Rodrigo.
Oct. 10, 2025
Re: New website dillo-browser.org
by Kevin Koster
Rodrigo Arias wrote:
> On Mon, Sep 29, 2025 at 09:22:13AM +1000, Kevin Koster wrote:
>> This command works to change the Git repo URL if you've already
>> cloned from GitHub:
>>
>> git remote set-url origin https://git.dillo-browser.org/dillo
>>
>> It did take quite a while to respond to "git pull" after that.
>
> I'm not sure if there is a problem on our end or is it expected to take
> long. Here is what I see if I clone the repo from our cgit and github in
> my old netbook:
Same here, the total clone time seems similar to GitHub.
"git pull" is now responding much quicker too:
$ time git pull
Fetching objects: 536, done.
From https://git.dillo-browser.org/dillo
* [new branch] ci -> origin/ci
* [new branch] mouse-back-forward -> origin/mouse-back-forward
Already up to date.
real 0m 4.76s
user 0m 0.20s
sys 0m 0.26s
But there were changes pulled in last time whereas now it's
"already up to date". I know last time I was sure Git had hung and
started writing a post warning about that, checking back just in
case, and Git eventually finished while I was writing. At least a
minute or two for an operation that's usually fairly immediate. It
_could_ have coincidentally been a network issue or a problem
reading/writing storage on my end (actually eMMC flash) causing the
delay I suppose. Anyway so long as it works it's not really a
problem for me.
> Bonus: WIP bug tracker https://bug.dillo-browser.org/
Excellent! Although apparantly Dillo can't find a ← character
in the font I'm using (which is probably my problem, I like lean
font packages).
Oct. 5, 2025