Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tty: move tty impls to common file #102

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading