~torresjrjr/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH ed] update for stdlib changes

Curtis Arthaud <uku82@gmx.fr>
Details
Message ID
<20231102071955.7232-2-uku82@gmx.fr>
DKIM signature
missing
Download raw message
Patch: +5 -3
Signed-off-by: Curtis Arthaud <uku82@gmx.fr>
---
 buffer.ha  | 2 +-
 command.ha | 1 +
 main.ha    | 5 +++--
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/buffer.ha b/buffer.ha
index 39ae796..da8793e 100644
--- a/buffer.ha
@@ -49,7 +49,7 @@ fn buf_read(buf: *Buffer, src: io::handle, a: size) (size, size) = {
	let ls: []*Line = [];
	let sz = 0z;
	for (true) {
		const bytes = match (bufio::scanline(src)) {
		const bytes = match (bufio::read_line(src)) {
		case let bs: []u8 =>
			yield bs;
		case io::EOF =>
diff --git a/command.ha b/command.ha
index 84c52b2..f28988a 100644
--- a/command.ha
+++ b/command.ha
@@ -83,6 +83,7 @@ fn lookupcmd(name: rune) CommandFn = {
	case '=' => return &cmd_linenumber;
	case '!' => return &cmd_shellescape;
	case '\x00' => return &cmd_null;
	case => abort();
	};
};

diff --git a/main.ha b/main.ha
index bb43169..abc1629 100644
--- a/main.ha
+++ b/main.ha
@@ -56,6 +56,7 @@ export fn main() void = {
			s.promptmode = true;
		case 's' =>
			s.suppressmode = true;
		case => abort();
		};
	};

@@ -86,7 +87,7 @@ export fn main() void = {
			fmt::error(s.prompt)!;
		};

		const rawline = match (bufio::scanline(os::stdin)) {
		const rawline = match (bufio::read_line(os::stdin)) {
		case let bs: []u8 =>
			yield bs;
		case io::EOF =>
@@ -136,7 +137,7 @@ export fn main() void = {
	// dumpbuffer(&s.buf);
};

@noreturn fn exit_usage(help: []getopt::help) void = {
fn exit_usage(help: []getopt::help) never = {
	getopt::printusage(os::stderr, os::args[0], help)!;
	os::exit(1);
};
--
2.42.0
Details
Message ID
<CWOBWRO2U279.1VY6NH3HK2UL4@torresjrjr.com>
In-Reply-To
<20231102071955.7232-2-uku82@gmx.fr> (view parent)
DKIM signature
missing
Download raw message
Hi Curtis,

Thanks for the patch. I haven't touched ed in a long time. It's not even
finished.

Applied to master as:

    commit 76e309f80c64bc2c34cc6ddccc224eb3a738c3bb
    Author: Curtis Arthaud <uku82@gmx.fr>
    Date:   Thu Nov 2 08:19:56 2023 +0100
    
        update per upstream hare
    
        Signed-off-by: Curtis Arthaud <uku82@gmx.fr>
Reply to thread Export thread (mbox)