~sircmpwn/hare-ssh

25c7fa44ec25b45239cd76dac7e8fb5041405d64 — Armin Preiml 1 year, 1 month ago 9da93c2
memio changes i've missed
3 files changed, 6 insertions(+), 6 deletions(-)

M cmd/sshkey/main.ha
M format/ssh/util.ha
M net/ssh/proto.ha
M cmd/sshkey/main.ha => cmd/sshkey/main.ha +2 -1
@@ 1,3 1,4 @@
use bufio;
use memio;
use encoding::hex;
use encoding::base64;


@@ 38,7 39,7 @@ export fn main() void = {
		tty::noecho(&termios)!;

		fmt::errorf("Enter passphrase: ")!;
		const pass = memio::scanline(tty)!;
		const pass = bufio::scanline(tty)!;
		tty::termios_restore(&termios);
		const pass = match (pass) {
		case io::EOF =>

M format/ssh/util.ha => format/ssh/util.ha +1 -0
@@ 1,3 1,4 @@
use bufio;
use endian;
use io;
use strings;

M net/ssh/proto.ha => net/ssh/proto.ha +3 -5
@@ 6,11 6,9 @@ use strings;
use types;

fn readbyte(src: *memio::stream) (u8 | protoerror) = {
	let b: [1]u8 = [0];
	match (io::read(src, b)!) {
	case let s: size =>
		assert(s == 1);
		return b[0];
	match (bufio::scanbyte(src)!) {
	case let b: u8 =>
		return b;
	case io::EOF =>
		return protoerror;
	};