Skip to content

Commit

Permalink
tty: move tty impls to common file
Browse files Browse the repository at this point in the history
  • Loading branch information
rockorager committed Oct 30, 2024
1 parent 41a6de5 commit a228e3e
Show file tree
Hide file tree
Showing 5 changed files with 781 additions and 790 deletions.
11 changes: 3 additions & 8 deletions src/main.zig
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const std = @import("std");
const builtin = @import("builtin");

const tty = @import("tty.zig");

pub const Vaxis = @import("Vaxis.zig");

pub const Loop = @import("Loop.zig").Loop;
Expand Down Expand Up @@ -28,14 +30,7 @@ pub const grapheme = @import("grapheme");
pub const Event = @import("event.zig").Event;
pub const Unicode = @import("Unicode.zig");

/// The target TTY implementation
pub const Tty = switch (builtin.os.tag) {
.windows => @import("windows/Tty.zig"),
else => if (builtin.is_test)
@import("test/Tty.zig")
else
@import("posix/Tty.zig"),
};
pub const Tty = tty.Tty;

/// The size of the terminal screen
pub const Winsize = struct {
Expand Down
198 changes: 0 additions & 198 deletions src/posix/Tty.zig

This file was deleted.

87 changes: 0 additions & 87 deletions src/test/Tty.zig

This file was deleted.

Loading

0 comments on commit a228e3e

Please sign in to comment.