~sircmpwn/hare-compress

562706946871d1c994f60361883269916cbaa08e — Sertonix 6 months ago f537612 master
*: remove full module name usage
1 files changed, 6 insertions(+), 6 deletions(-)

M compress/gzip/.iconv/gen.ha
M compress/gzip/.iconv/gen.ha => compress/gzip/.iconv/gen.ha +6 -6
@@ 14,13 14,13 @@ export fn main() void = {

	fmt::fprintfln(out, "const iso88591: [256][]u8 = [", )!;
	for (let i = 0z; i < 256; i += 1) {
		let cmd = os::exec::cmd("iconv", "-f", "ISO88591", "-t", "UTF8")!;
		let cmd = exec::cmd("iconv", "-f", "ISO88591", "-t", "UTF8")!;

		let inpipe = exec::pipe();
		let outpipe = exec::pipe();
		os::exec::addfile(&cmd, os::stdin_file, inpipe.0);
		os::exec::addfile(&cmd, os::stdout_file, outpipe.1);
		let proc = os::exec::start(&cmd)!;
		exec::addfile(&cmd, os::stdin_file, inpipe.0);
		exec::addfile(&cmd, os::stdout_file, outpipe.1);
		let proc = exec::start(&cmd)!;

		// write to stdin
		io::write(inpipe.1, [i: u8])!;


@@ 32,8 32,8 @@ export fn main() void = {
		let data = io::drain(outpipe.0)!;
		io::close(outpipe.0)!;

		let status = os::exec::wait(&proc)!;
		os::exec::check(&status)!;
		let status = exec::wait(&proc)!;
		exec::check(&status)!;

		fmt::fprintf(out, "[")!;
		fmt::fprintf(out, "0x{:x}", data[0])!;