~ecs

https://ecs.d2evs.net

~ecs/public-inbox

Last active 4 months ago

~ecs/kaeosss

Last active 6 months ago

~ecs/fosc

Last active 8 months ago
View more

Recent activity

[PATCH gmni v6] Add 'i' to show media type parameters a day ago

From Eyal Sawady to ~sircmpwn/public-inbox

Also don't show media type parameters in prompt
---
On Fri Sep 25, 2020 at 11:10 AM EDT, Drew DeVault wrote:
> Am I reading this correctly that you're adding ; to the media type if it
> doesn't have it?

No, it's temporarily replacing the first ';' with NUL in order to not
print out the parameters in the prompt
 src/gmnlm.c | 128 ++++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 100 insertions(+), 28 deletions(-)

diff --git a/src/gmnlm.c b/src/gmnlm.c
index 43bc2b2..7506998 100644
--- a/src/gmnlm.c
[message trimmed]

[PATCH gmni v5] Add 'i' to show media type parameters a day ago

From Eyal Sawady to ~sircmpwn/public-inbox

Also don't show media type parameters in prompt
---
v4 -> v5:

- Fix a segfault when the first page loaded is paginated
- Fix a segfault and improve meta header on non-success status codes
- Fix a segfault on protocol errors
 src/gmnlm.c | 126 ++++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 98 insertions(+), 28 deletions(-)

diff --git a/src/gmnlm.c b/src/gmnlm.c
index 43bc2b2..a03db77 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
[message trimmed]

[PATCH gmni] gmnlm: show URL on untrusted cert a day ago

From Eyal Sawady to ~sircmpwn/public-inbox

---
Otherwise, unless you 'p' beforehand, there's no way to know which
server's fingerprint this should be.

I don't think it's worth parsing the URL to show just the host.
 src/gmnlm.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gmnlm.c b/src/gmnlm.c
index 180a798..4a37414 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -851,15 +851,15 @@ tofu_callback(enum tofu_error error, const char *fingerprint,
			"trust [o]nce; [a]bort\n"
[message trimmed]

[PATCH gmni v4] Add 'i' to show media type parameters a day ago

From Eyal Sawady to ~sircmpwn/public-inbox

Also don't show media type parameters in prompt
---
v3 -> v4: more refactoring and cleanup

On Thu Sep 24, 2020 at 6:14 PM EDT, Drew DeVault wrote:
> It seems like the logic flow of the switch statement in
> print_media_parameters is complex enough that the switch is poorly
> justified, and the goto as well.

I removed the goto, instead doing the nonlocal break by nulling `value`,
which lead to a cleaner loop. I also improved the \ case.

> I would also like to see the alloc/free code around handling the meta
> string improved.
[message trimmed]

[PATCH gmni v3] Add 'i' to show media type parameters a day ago

From Eyal Sawady to ~sircmpwn/public-inbox

Also don't show media type parameters in prompt
---
v2 -> v3: refactorings and cleanups
 src/gmnlm.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 78 insertions(+), 5 deletions(-)

diff --git a/src/gmnlm.c b/src/gmnlm.c
index 07d0000..e2ffd1f 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -35,6 +35,7 @@ struct browser {
	enum tofu_action tofu_mode;

	FILE *tty;
[message trimmed]

[PATCH gmni v2] Add 'i' to show media type parameters a day ago

From Eyal Sawady to ~sircmpwn/public-inbox

Also don't show media type parameters in prompt
---
v1 -> v2: parse media types, pretty-print parameters in info, don't show
  parameters in prompt
 src/gmnlm.c | 82 +++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 77 insertions(+), 5 deletions(-)

diff --git a/src/gmnlm.c b/src/gmnlm.c
index 07d0000..f1865af 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -35,6 +35,7 @@ struct browser {
	enum tofu_action tofu_mode;

[message trimmed]

[PATCH gmni] gmnlm: handle CRLF line endings 2 days ago

From Eyal Sawady to ~sircmpwn/public-inbox

Bare CRs are still printed as '.'.

Fixes https://todo.sr.ht/~sircmpwn/gmni/25
---
 src/gmnlm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gmnlm.c b/src/gmnlm.c
index 8dc4455..a7f040a 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -387,6 +387,9 @@ wrap(FILE *f, char *s, struct winsize *ws, int *row, int *col)
		case '\t':
			*col = *col + (8 - *col % 8);
[message trimmed]

[PATCH gmni] Add 'i' to show page info 2 days ago

From Eyal Sawady to ~sircmpwn/public-inbox

Also don't show page info in prompt
---
 src/gmnlm.c | 34 ++++++++++++++++++++++++++--------
 1 file changed, 26 insertions(+), 8 deletions(-)

diff --git a/src/gmnlm.c b/src/gmnlm.c
index def42ac..8dc4455 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -35,6 +35,7 @@ struct browser {
	enum tofu_action tofu_mode;

	FILE *tty;
	char *meta;
[message trimmed]

[PATCH gmni] gmnlm: p: require whitespace before link number 2 days ago

From Eyal Sawady to ~sircmpwn/public-inbox

In order to allow users to navigate to relative URLs starting with 'p'.
---
 src/gmnlm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gmnlm.c b/src/gmnlm.c
index 7fba942..def42ac 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -69,7 +69,7 @@ const char *help_msg =
	"The following commands are available:\n\n"
	"q\tQuit\n"
	"N\tFollow Nth link (where N is a number)\n"
	"p[N]\tShow URL of Nth link (where N is a number)\n"
[message trimmed]

[PATCH gmni v4] gmnlm: open bookmarks if started without URL 2 days ago

From Eyal Sawady to ~sircmpwn/public-inbox

---
v3 -> v4: when writing default bookmarks, use the current actual
  bookmark path
 src/gmnlm.c | 29 +++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/src/gmnlm.c b/src/gmnlm.c
index 25afbaf..7fba942 100644
--- a/src/gmnlm.c
+++ b/src/gmnlm.c
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
[message trimmed]