diff options
Diffstat (limited to 'src/pty.h')
-rw-r--r-- | src/pty.h | 21 |
1 files changed, 7 insertions, 14 deletions
@@ -21,25 +21,14 @@ typedef struct { size_t len; } pty_buf_t; -typedef void (*pty_read_cb)(void *, pty_buf_t *, bool); - -typedef struct { - uv_pipe_t *in; - uv_pipe_t *out; - bool paused; - - pty_read_cb read_cb; - void *ctx; -} pty_io_t; - struct pty_process_; typedef struct pty_process_ pty_process; -typedef void (*pty_exit_cb)(void *, pty_process *); +typedef void (*pty_read_cb)(pty_process *, pty_buf_t *, bool); +typedef void (*pty_exit_cb)(pty_process *); struct pty_process_ { int pid, exit_code, exit_signal; uint16_t columns, rows; - bool killed; #ifdef _WIN32 STARTUPINFOEXW si; HPCON pty; @@ -55,7 +44,11 @@ struct pty_process_ { uv_loop_t *loop; uv_async_t async; - pty_io_t *io; + uv_pipe_t *in; + uv_pipe_t *out; + bool paused; + + pty_read_cb read_cb; pty_exit_cb exit_cb; void *ctx; }; |