Skip to content

Commit

Permalink
replaced all psuedo by pseudo
Browse files Browse the repository at this point in the history
  • Loading branch information
gitmpr committed Jun 16, 2024
1 parent 1d3a459 commit 3c0f950
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pty/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 3 additions & 3 deletions pty/src/win/conpty.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand All @@ -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,
Expand Down Expand Up @@ -44,7 +44,7 @@ impl PtySystem for ConPtySystem {
}

struct Inner {
con: PsuedoCon,
con: PseudoCon,
readable: FileDescriptor,
writable: Option<FileDescriptor>,
size: PtySize,
Expand Down
2 changes: 1 addition & 1 deletion pty/src/win/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use winapi::um::winbase::INFINITE;

pub mod conpty;
mod procthreadattr;
mod psuedocon;
mod pseudocon;

use filedescriptor::OwnedHandle;

Expand Down
2 changes: 1 addition & 1 deletion pty/src/win/procthreadattr.rs
Original file line number Diff line number Diff line change
@@ -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};
Expand Down
12 changes: 6 additions & 6 deletions pty/src/win/psuedocon.rs → pty/src/win/pseudocon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 })
Expand Down

0 comments on commit 3c0f950

Please sign in to comment.