~ecs/mrsh-dev

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 madeline] Update per bufio function name changes

Details
Message ID
<20230908042138.31290-1-sebastian@sebsite.pw>
DKIM signature
pass
Download raw message
Patch: +6 -6
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
Details
Message ID
<CVEIIZL0ZV3Y.2E4RW341S97XL@monch>
In-Reply-To
<20230908042138.31290-1-sebastian@sebsite.pw> (view parent)
DKIM signature
missing
Download raw message
thanks!

to git@git.d2evs.net:~ecs/madeline
  0d00d20..7376e8a  madeline -> madeline
Reply to thread Export thread (mbox)