Recent activity

Re: [PATCH hare] time::chrono: fix leak in TZ_LOCAL 1 year, 6 months ago

From to ~sircmpwn/hare-dev

> It mustn't free anything if TZ_LOCAL.name==TZ_LOCAL_NAME because 
fields are not heap-allocated in this case

it's heap-allocated in the definition, but init_tz_local() always calls 
load_tzif() which dynamically allocates zones and its contents, 
transitions, and posix_extend (assuming that no errors occurred, but
init_tz_local() ignores these anyway). maybe when errors do happen, it
shouldn't try to free anything?

> Is there a situation where TZ_LOCAL.name could equal a heap allocated
> time zone that happens to also be called "Local"?

i don't really know why TZ_LOCAL.name isn't heap-allocated, i don't see
a particular reason why you'd need it to be that way.

[PATCH hare] time::chrono: fix leak in TZ_LOCAL 1 year, 6 months ago

From iamthenoname to ~sircmpwn/hare-dev

---
 time/chrono/timezone.ha | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/time/chrono/timezone.ha b/time/chrono/timezone.ha
index 9051b6f9..e3412088 100644
--- a/time/chrono/timezone.ha
+++ b/time/chrono/timezone.ha
@@ -246,12 +246,12 @@ let TZ_LOCAL: timezone = timezone {
};

@fini fn free_tz_local() void = {
	free(TZ_LOCAL.transitions);
	switch(TZ_LOCAL.name) {
[message trimmed]

[PATCH hare v2] unix::passwd: improve getuid and getgid performance 1 year, 6 months ago

From iamthenoname to ~sircmpwn/hare-dev

---
 unix/passwd/group.ha  |  8 ++++++--
 unix/passwd/passwd.ha | 14 ++++++++------
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/unix/passwd/group.ha b/unix/passwd/group.ha
index a136c419..e60f2859 100644
--- a/unix/passwd/group.ha
+++ b/unix/passwd/group.ha
@@ -79,8 +79,10 @@ export fn getgroup(name: str) (grent | void) = {
	};
	defer io::close(file)!;

	let rbuf: [os::BUFSZ]u8 = [0...];
[message trimmed]

[PATCH hare] unix::passwd: improve getuid and getgid performance 1 year, 6 months ago

From iamthenoname to ~sircmpwn/hare-dev

---
 unix/passwd/group.ha  |  8 ++++++--
 unix/passwd/passwd.ha | 14 ++++++++------
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/unix/passwd/group.ha b/unix/passwd/group.ha
index a136c419..d7129e13 100644
--- a/unix/passwd/group.ha
+++ b/unix/passwd/group.ha
@@ -79,8 +79,10 @@ export fn getgroup(name: str) (grent | void) = {
	};
	defer io::close(file)!;

	let rbuf: [os::BUFSIZ]u8 = [0...];
[message trimmed]

[PATCH hare] time::chrono: fix memory leak in load_tzif() 1 year, 10 months ago

From iamthenoname to ~sircmpwn/hare-dev

Signed-off-by: iamthenoname <iamthenoname@perso.be>
---
 time/chrono/tzdb.ha | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/time/chrono/tzdb.ha b/time/chrono/tzdb.ha
index 2678cb44..28d05c3c 100644
--- a/time/chrono/tzdb.ha
+++ b/time/chrono/tzdb.ha
@@ -188,6 +188,7 @@ fn load_tzif(h: io::handle, tz: *timezone) (void | invalidtzif | io::error) = {
	case encoding::utf8::invalid =>
		return invalidtzif;
	});
	defer free(posix_extend);
[message trimmed]

[PATCH hautils] ls: new command 2 years ago

From iamthenoname to ~sircmpwn/hare-dev

---
 .gitignore |   1 +
 Makefile   |   1 +
 ls.ha      | 399 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 401 insertions(+)
 create mode 100644 ls.ha

diff --git a/.gitignore b/.gitignore
index 757c334..bfa47d4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@ dirname
env
false
[message trimmed]

Re: [PATCH v2 2/2] Implement NO_COLOR 2 years ago

From to ~blainsmith/public-inbox

Damn it, I forgot to add the project name in the subject again. Sorry 
about that, I'm new to patching and emails...

[PATCH v2 2/2] Implement NO_COLOR 2 years ago

From iamthenoname to ~blainsmith/public-inbox

---
 clrfmt/clrfmt.ha | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/clrfmt/clrfmt.ha b/clrfmt/clrfmt.ha
index fd99c97..533a597 100644
--- a/clrfmt/clrfmt.ha
+++ b/clrfmt/clrfmt.ha
@@ -124,14 +124,22 @@ export fn fprintln(s: style, c: color, h: io::handle, args: fmt::formattable...)
};

export fn fprint(s: style, c: color, h: io::handle, args: fmt::formattable...) (io::error | size) = {
	let s = fmt::fprintf(h, "{}[{};{}m", escape, s: int, c: int)?;
	let s = fmt::fprintf(h, "{}[{}", escape, s: int)?;
[message trimmed]

[PATCH v2 1/2] Use tabs instead of spaces 2 years ago

From iamthenoname to ~blainsmith/public-inbox

---
I'm not quite sure what causes the formatting issues, but I 
tried using a different editor instead.

 clrfmt/clrfmt.ha | 40 ++++++++++++++++++++--------------------
 main.ha          | 34 +++++++++++++++++-----------------
 2 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/clrfmt/clrfmt.ha b/clrfmt/clrfmt.ha
index 5711e81..fd99c97 100644
--- a/clrfmt/clrfmt.ha
+++ b/clrfmt/clrfmt.ha
@@ -58,37 +58,37 @@ export def BG_HI_CYAN: color = 106;
export def BG_HI_WHITE: color = 107;
[message trimmed]

[hare-clrfmt] Implement NO_COLOR detection 2 years ago

From iamthenoname to ~blainsmith/public-inbox

---
 clrfmt/clrfmt.ha | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/clrfmt/clrfmt.ha b/clrfmt/clrfmt.ha
index 48be517..64399ca 100644
--- a/clrfmt/clrfmt.ha
+++ b/clrfmt/clrfmt.ha
@@ -124,14 +124,22 @@ export fn fprintln(s: style, c: color, h: io::handle, args: fmt::formattable...)
};

export fn fprint(s: style, c: color, h: io::handle, args: fmt::formattable...) (io::error | size) = {
	let s = fmt::fprintf(h, "{}[{};{}m", escape, s: int, c: int)?;
	let s = fmt::fprintf(h, "{}[{}", escape, s: int)?;
[message trimmed]