Signed-off-by: Sebastian <sebastian@sebsite.pw>
---
graph/props+gen.ha | 2 +-
made/actions.ha | 2 +-
made/hist.ha | 2 +-
made/line.ha | 4 ++--
made/util.ha | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/graph/props+gen.ha b/graph/props+gen.ha
index 843f881..e24a71f 100644
--- a/graph/props+gen.ha
+++ b/graph/props+gen.ha
@@ -53,7 +53,7 @@ fn handle(
) (void | fs::error | utf8::invalid | strconv::invalid | strconv::overflow) = {
let f = os::open(path)?;
defer io::close(f)!;
- for (true) match (bufio::scanline(f)?) {
+ for (true) match (bufio::read_line(f)?) {
case io::EOF =>
break;
case let line: []u8 =>
diff --git a/made/actions.ha b/made/actions.ha
index bfbf7d9..10f8021 100644
--- a/made/actions.ha
+++ b/made/actions.ha
@@ -5,7 +5,7 @@ use sort;
// Pull new lines from other madeline instances into the in-memory history
fn update_hist(s: *state) (void | error) = {
- for (true) match (bufio::scanline(s.ctx.hist.source)?) {
+ for (true) match (bufio::read_line(s.ctx.hist.source)?) {
case io::EOF => break;
case let buf: []u8 =>
hist_add(s, strings::fromutf8(buf)?, false);
diff --git a/made/hist.ha b/made/hist.ha
index c4370c3..7f867bd 100644
--- a/made/hist.ha
+++ b/made/hist.ha
@@ -52,7 +52,7 @@ export fn histhandle(file: io::handle) (history | error) = {
...
};
- for (true) match (bufio::scanline(file)?) {
+ for (true) match (bufio::read_line(file)?) {
case io::EOF =>
break;
case let line: []u8 =>
diff --git a/made/line.ha b/made/line.ha
index 9c928c4..44c7639 100644
--- a/made/line.ha
+++ b/made/line.ha
@@ -27,7 +27,7 @@ export fn line(ctx: *context) (str | void | io::EOF | error) = {
fmt::fprint(s.out, "\x1b[6n")?;
// XXX: why doesn't error propagation work?
- for (true) match (bufio::scanrune(s.in)) {
+ for (true) match (bufio::read_rune(s.in)) {
case io::EOF =>
return eof;
case let e: io::error =>
@@ -115,7 +115,7 @@ export fn line(ctx: *context) (str | void | io::EOF | error) = {
case '\x15' => // ^u
kill(&s, &home, true);
case '\x16' => // ^v
- match (bufio::scanrune(s.in)) {
+ match (bufio::read_rune(s.in)) {
case io::EOF =>
return eof;
case let r: rune =>
diff --git a/made/util.ha b/made/util.ha
index 1b0b4da..a7287ea 100644
--- a/made/util.ha
+++ b/made/util.ha
@@ -20,7 +20,7 @@ fn appendstr(s: *state, st: str) void = {
s.pos += len(strings::toutf8(st));
};
-fn getbyte(s: *state) (u8 | error) = match (bufio::scanbyte(s.in)?) {
+fn getbyte(s: *state) (u8 | error) = match (bufio::read_byte(s.in)?) {
case io::EOF =>
return eof;
case let b: u8 =>
--
2.40.1