ed

[hare] The standard editor
Log | Files | Refs | README | LICENSE

commit 76e309f80c64bc2c34cc6ddccc224eb3a738c3bb
parent 3419b64db4530d3ca383a5d7e2d1418a3aebd2ed
Author: Curtis Arthaud <uku82@gmx.fr>
Date:   Thu,  2 Nov 2023 08:19:56 +0100

update per upstream hare

Signed-off-by: Curtis Arthaud <uku82@gmx.fr>

Diffstat:
Mbuffer.ha | 2+-
Mcommand.ha | 1+
Mmain.ha | 5+++--
3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/buffer.ha b/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 @@ -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 @@ -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); };