~ecs/minuet

7b8856114b757102ef925c5fd08938af2bff26f7 — Ember Sawady 3 months ago 78bc778 minuet
fix compilation and improve spacing
1 files changed, 5 insertions(+), 2 deletions(-)

M main.ha
M main.ha => main.ha +5 -2
@@ 61,7 61,7 @@ fn dd(s: *state, m: mode) (void | exec::error) = {
		free(complements[i]);
	};

	for (true) :loop {
	for :loop (true) {
		// TODO: parallelism
		if (granularity < 2) granularity = 2;
		for (let i = 0z; i < len(complements); i += 1) {


@@ 135,7 135,6 @@ fn dd(s: *state, m: mode) (void | exec::error) = {
			granularity = s.nfail - s.npass;
		};
	};
	abort("unreachable");
};

fn run_test(s: *state, m: mode, changes: []bool) (result | exec::error) = {


@@ 159,6 158,7 @@ fn run_test(s: *state, m: mode, changes: []bool) (result | exec::error) = {
	for (let i = 0z; i < len(changes); i += 1) if (changes[i]) {
		io::writeall(f, s.chunks[i])?;
	};

	let cmd = exec::cmd(s.tester, path::string(&buf))?;
	let proc = exec::start(&cmd)?;
	let status = exec::wait(&proc)?;


@@ 192,6 192,7 @@ const usage: []getopt::help = [
fn _main() (void | exec::error) = {
	let s = state { ... };
	defer finish_state(&s);

	let cmd = getopt::parse(os::args, usage...);
	defer getopt::finish(&cmd);
	for (let i = 0z; i < len(cmd.opts); i += 1) switch (cmd.opts[i].0) {


@@ 217,10 218,12 @@ fn _main() (void | exec::error) = {
		};
	case => abort();
	};

	if (len(cmd.args) != 2) {
		getopt::printusage(os::stderr, os::args[0], usage)!;
		os::exit(1);
	};

	s.tester = cmd.args[0];
	s.testpath = cmd.args[1];
	let f = os::open(s.testpath)?;