More compatibility fixes

This commit is contained in:
Sasha Koshka 2024-10-11 17:16:33 -04:00
parent ea527a2065
commit cd3f296fc5
2 changed files with 5 additions and 3 deletions

View File

@ -32,7 +32,8 @@ export fn main() void = {
let post = false;
let anonymous = false;
for (let opt .. cmd.opts) {
for (let index = 0z; index < len(cmd.opts); index += 1) {
let opt = cmd.opts[index];
switch (opt.0) {
case 'b' =>
board = opt.1;

View File

@ -6,6 +6,7 @@ use io;
use os;
use path;
use strings;
use types;
// TODO
// two issues:
@ -44,7 +45,7 @@ export fn read(output: io::handle, board: str, number: int) (void | error) = {
static let output_wbuf: [os::BUFSZ]u8 = [0...];
let output = bufio::init(output, [], output_wbuf);
let file = bufio::newscanner(file);
let file = bufio::newscanner(file, types::SIZE_MAX);
defer bufio::finish(&file);
let saw_escape = false;
@ -87,7 +88,7 @@ export fn post(input: io::handle, board: str, user_name: (str | void)) (void | e
static let file_wbuf: [os::BUFSZ]u8 = [0...];
let file = bufio::init(file, [], file_wbuf);
let input = bufio::newscanner(input);
let input = bufio::newscanner(input, types::SIZE_MAX);
defer bufio::finish(&input);
let saw_break = false;