vere: renames terminal streams for clarity, removes unused uv_tcp_t

This commit is contained in:
Joe Bryan 2021-09-14 11:26:42 -04:00
parent 21f6c5c0e0
commit be17a9cabf
4 changed files with 13 additions and 14 deletions

View File

@ -126,10 +126,10 @@ u3_ptty_init(uv_loop_t* lup_u, const c3_c** err_c)
uty_u->wsz_f = _ttyf_get_winsize;
}
} else {
if ( 0 == (e = uv_pipe_init(lup_u, &uty_u->pin_u.pop_u, 0)) &&
0 == (e = uv_pipe_init(lup_u, &uty_u->pop_u.pop_u, 0)) &&
0 == (e = uv_pipe_open(&uty_u->pin_u.pop_u, 0)) &&
0 == (e = uv_pipe_open(&uty_u->pop_u.pop_u, 1)) )
if ( 0 == (e = uv_pipe_init(lup_u, &uty_u->pin_u.pip_u, 0)) &&
0 == (e = uv_pipe_init(lup_u, &uty_u->pop_u.pip_u, 0)) &&
0 == (e = uv_pipe_open(&uty_u->pin_u.pip_u, 0)) &&
0 == (e = uv_pipe_open(&uty_u->pop_u.pip_u, 1)) )
{
fprintf(stderr, "vere: running interactive in a terminal emulator is experimental\r\n"
" use -t to disable interactivity or use native Windows console\r\n") ;

View File

@ -147,10 +147,10 @@ u3_ptty_init(uv_loop_t* lup_u, const c3_c** err_c)
return NULL;
}
uv_pipe_init(lup_u, &uty_u->pin_u.pop_u, 0);
uv_pipe_init(lup_u, &uty_u->pop_u.pop_u, 0);
uv_pipe_open(&uty_u->pin_u.pop_u, 0);
uv_pipe_open(&uty_u->pop_u.pop_u, 1);
uv_pipe_init(lup_u, &uty_u->pin_u.pip_u, 0);
uv_pipe_init(lup_u, &uty_u->pop_u.pip_u, 0);
uv_pipe_open(&uty_u->pin_u.pip_u, 0);
uv_pipe_open(&uty_u->pop_u.pip_u, 1);
// Load old terminal state to restore.
//

View File

@ -229,9 +229,8 @@
/* u3_ustm: uv stream.
*/
typedef union _u3_ustm {
uv_pipe_t pop_u;
uv_tcp_t wax_u;
uv_tty_t tty_u;
uv_pipe_t pip_u;
uv_tty_t tty_u;
} u3_ustm;
/* u3_ttyf: simple unix tty function.

View File

@ -129,9 +129,9 @@ u3_term_log_init(void)
uty_u = c3_calloc(sizeof(u3_utty));
uty_u->fid_i = 1;
uv_pipe_init(u3L, &(uty_u->pin_u.pop_u), 0);
uv_pipe_init(u3L, &(uty_u->pop_u.pop_u), 0);
uv_pipe_open(&(uty_u->pop_u.pop_u), uty_u->fid_i);
uv_pipe_init(u3L, &(uty_u->pin_u.pip_u), 0);
uv_pipe_init(u3L, &(uty_u->pop_u.pip_u), 0);
uv_pipe_open(&(uty_u->pop_u.pip_u), uty_u->fid_i);
}
else {
// Initialize event processing. Rawdog it.