commit 7f6e8f10fc0f34364464822f1b9a7e613a99c3f8
parent 3b966e65cac9e761e309308b064361fa2a723f85
Author: Ember Sawady <ecs@d2evs.net>
Date: Sun, 6 Aug 2023 18:10:43 +0000
cmd/haretype, cmd/ioctlgen: update for memio
these aren't compiled by default, so they were missed
Signed-off-by: Ember Sawady <ecs@d2evs.net>
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/cmd/haretype/main.ha b/cmd/haretype/main.ha
@@ -1,6 +1,5 @@
// License: GPL-3.0
// (c) 2021 Drew DeVault <sir@cmpwn.com>
-use bufio;
use fmt;
use getopt;
use hare::ast;
@@ -9,6 +8,7 @@ use hare::parse;
use hare::types;
use hare::unparse;
use io;
+use memio;
use os;
use path;
use strings;
@@ -21,7 +21,7 @@ fn typeinfo(
fmt::println("null")?;
yield types::lookup_builtin(store, ast::builtin_type::NULL);
} else {
- const stream = bufio::fixed(strings::toutf8(s), io::mode::READ);
+ const stream = memio::fixed(strings::toutf8(s));
defer io::close(&stream)!;
const lexer = lex::init(&stream, "-");
defer lex::finish(&lexer);
diff --git a/cmd/ioctlgen/main.ha b/cmd/ioctlgen/main.ha
@@ -6,6 +6,7 @@ use hare::lex::{ltok};
use hare::parse;
use hare::types;
use io;
+use memio;
use os;
use regex;
use strings;
@@ -102,7 +103,7 @@ fn loadtype(store: *types::typestore) void = {
};
fn parseioctl(store: *types::typestore, d: dir, params: str) ioctl = {
- const buf = bufio::fixed(strings::toutf8(params), io::mode::READ);
+ const buf = memio::fixed(strings::toutf8(params));
const lex = lex::init(&buf, "<ioctl>");
const rn = expect(&lex, ltok::LIT_RUNE).1 as rune;