~apreiml/hare-utils

4ec785119d36c32974afb798301b545de52ec092 — Armin Preiml 9 months ago c1b3878 master
memio
1 files changed, 4 insertions(+), 3 deletions(-)

M pemdump.ha
M pemdump.ha => pemdump.ha +4 -3
@@ 6,6 6,7 @@ use getopt;
use os;
use io;
use bufio;
use memio;

export fn main() void = {
	const cmd = getopt::parse(os::args,


@@ 42,7 43,7 @@ export fn main() void = {
			fmt::fatal("More than one cert");
		};

		let buf = bufio::dynamic(io::mode::WRITE);
		let buf = memio::dynamic();

		match (io::copy(&buf, &dec)) {
		case errors::invalid =>


@@ 54,9 55,9 @@ export fn main() void = {
		};

		if (binary) {
			io::writeall(os::stdout, bufio::buffer(&buf))!;
			io::writeall(os::stdout, memio::buffer(&buf))!;
		} else {
			hex::dump(os::stdout, bufio::buffer(&buf))!;
			hex::dump(os::stdout, memio::buffer(&buf))!;
		};
	};
};