1
1
mirror of https://github.com/wez/wezterm.git synced 2024-08-16 17:50:28 +03:00

replaced all psuedo by pseudo

This commit is contained in:
gitmpr 2024-06-17 00:15:51 +02:00
parent 1d3a459ca8
commit 3c0f950bbe
5 changed files with 12 additions and 12 deletions

View File

@ -1,5 +1,5 @@
//! This crate provides a cross platform API for working with the
//! psuedo terminal (pty) interfaces provided by the system.
//! pseudo terminal (pty) interfaces provided by the system.
//! Unlike other crates in this space, this crate provides a set
//! of traits that allow selecting from different implementations
//! at runtime.

View File

@ -1,5 +1,5 @@
use crate::cmdbuilder::CommandBuilder;
use crate::win::psuedocon::PsuedoCon;
use crate::win::pseudocon::PseudoCon;
use crate::{Child, MasterPty, PtyPair, PtySize, PtySystem, SlavePty};
use anyhow::Error;
use filedescriptor::{FileDescriptor, Pipe};
@ -14,7 +14,7 @@ impl PtySystem for ConPtySystem {
let stdin = Pipe::new()?;
let stdout = Pipe::new()?;
let con = PsuedoCon::new(
let con = PseudoCon::new(
COORD {
X: size.cols as i16,
Y: size.rows as i16,
@ -44,7 +44,7 @@ impl PtySystem for ConPtySystem {
}
struct Inner {
con: PsuedoCon,
con: PseudoCon,
readable: FileDescriptor,
writable: Option<FileDescriptor>,
size: PtySize,

View File

@ -13,7 +13,7 @@ use winapi::um::winbase::INFINITE;
pub mod conpty;
mod procthreadattr;
mod psuedocon;
mod pseudocon;
use filedescriptor::OwnedHandle;

View File

@ -1,4 +1,4 @@
use crate::win::psuedocon::HPCON;
use crate::win::pseudocon::HPCON;
use anyhow::{ensure, Error};
use std::io::Error as IoError;
use std::{mem, ptr};

View File

@ -63,20 +63,20 @@ lazy_static! {
static ref CONPTY: ConPtyFuncs = load_conpty();
}
pub struct PsuedoCon {
pub struct PseudoCon {
con: HPCON,
}
unsafe impl Send for PsuedoCon {}
unsafe impl Sync for PsuedoCon {}
unsafe impl Send for PseudoCon {}
unsafe impl Sync for PseudoCon {}
impl Drop for PsuedoCon {
impl Drop for PseudoCon {
fn drop(&mut self) {
unsafe { (CONPTY.ClosePseudoConsole)(self.con) };
}
}
impl PsuedoCon {
impl PseudoCon {
pub fn new(size: COORD, input: FileDescriptor, output: FileDescriptor) -> Result<Self, Error> {
let mut con: HPCON = INVALID_HANDLE_VALUE;
let result = unsafe {
@ -92,7 +92,7 @@ impl PsuedoCon {
};
ensure!(
result == S_OK,
"failed to create psuedo console: HRESULT {}",
"failed to create pseudo console: HRESULT {}",
result
);
Ok(Self { con })