hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit a98e6e7415a660a10ec2bdcfdf3536793940bb6e
parent cf6493cc356f4d839abcde217f76177d6d0d872d
Author: Alexey Yerin <yyp@disroot.org>
Date:   Sun,  2 Jan 2022 18:52:33 +0300

os+freebsd: update to reflect bufio changes

Signed-off-by: Alexey Yerin <yyp@disroot.org>

Diffstat:
Mos/+freebsd/stdfd.ha | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/os/+freebsd/stdfd.ha b/os/+freebsd/stdfd.ha @@ -1,12 +1,12 @@ use bufio; use io; -let static_stdin_bufio: bufio::bufstream = bufio::bufstream { +export let stdin_bufio: bufio::bufstream = bufio::bufstream { source = 0, ... }; -let static_stdout_bufio: bufio::bufstream = bufio::bufstream { +export let stdout_bufio: bufio::bufstream = bufio::bufstream { source = 1, ... }; @@ -31,10 +31,12 @@ export def BUFSIZ: size = 4096; // 4 KiB @init fn init_stdfd() void = { static let stdinbuf: [BUFSIZ]u8 = [0...]; - stdin = bufio::static_buffered(0, stdinbuf, [], &static_stdin_bufio); + stdin_bufio = bufio::buffered(0, stdinbuf, []); + stdin = &stdin_bufio; static let stdoutbuf: [BUFSIZ]u8 = [0...]; - stdout = bufio::static_buffered(1, [], stdoutbuf, &static_stdout_bufio); + stdout_bufio = bufio::buffered(1, [], stdoutbuf); + stdout = &stdout_bufio; }; @fini fn fini_stdfd() void = {