handle SO/SI but don't do anything yet (just don't crash)

This commit is contained in:
Mitchell Hashimoto
2022-06-25 10:06:40 -07:00
parent 090e580cc7
commit fb6800c8ce
2 changed files with 8 additions and 0 deletions

View File

@ -17,6 +17,10 @@ pub const C0 = enum(u7) {
VT = 0x0B,
/// Carriage return
CR = 0x0D,
/// Shift out
SO = 0x0E,
/// Shift in
SI = 0x0F,
};
/// The SGR rendition aspects that can be set, sometimes known as attributes.

View File

@ -67,6 +67,7 @@ pub fn Stream(comptime Handler: type) type {
}
fn execute(self: *Self, c: u8) !void {
// log.warn("C0: {}", .{c});
switch (@intToEnum(ansi.C0, c)) {
.NUL => {},
@ -100,6 +101,9 @@ pub fn Stream(comptime Handler: type) type {
try self.handler.carriageReturn()
else
log.warn("unimplemented execute: {x}", .{c}),
// TODO
.SO, .SI => log.warn("TODO: Shift out/Shift in", .{}),
}
}