mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 03:23:09 +03:00
Output hi/lojacked fprintf in daemon mode
This commit is contained in:
parent
a94ea80337
commit
aba13f1120
19
v/term.c
19
v/term.c
@ -1067,7 +1067,7 @@ u2_term_io_hija(void)
|
||||
{
|
||||
u2_utty* uty_u = _term_main();
|
||||
|
||||
if ( u2_no == u2_Host.ops_u.dem && uty_u ) {
|
||||
if ( uty_u ) {
|
||||
if ( uty_u->fid_i > 2 ) {
|
||||
// We *should* in fact, produce some kind of fake FILE* for
|
||||
// non-console terminals. If we use this interface enough...
|
||||
@ -1075,9 +1075,7 @@ u2_term_io_hija(void)
|
||||
c3_assert(0);
|
||||
}
|
||||
else {
|
||||
#if 0
|
||||
uv_tty_set_mode(&uty_u->wax_u, 0);
|
||||
#else
|
||||
if ( u2_no == u2_Host.ops_u.dem ) {
|
||||
if ( 0 != tcsetattr(1, TCSADRAIN, &uty_u->bak_u) ) {
|
||||
c3_assert(!"hija-tcsetattr");
|
||||
}
|
||||
@ -1090,10 +1088,10 @@ u2_term_io_hija(void)
|
||||
if ( -1 == fcntl(0, F_SETFL, uty_u->cug_i) ) {
|
||||
c3_assert(!"hija-fcntl");
|
||||
}
|
||||
#endif
|
||||
write(uty_u->fid_i, "\r", 1);
|
||||
write(uty_u->fid_i, uty_u->ufo_u.out.el_y,
|
||||
strlen((c3_c*) uty_u->ufo_u.out.el_y));
|
||||
}
|
||||
return stdout;
|
||||
}
|
||||
}
|
||||
@ -1107,7 +1105,7 @@ u2_term_io_loja(int x)
|
||||
{
|
||||
u2_utty* uty_u = _term_main();
|
||||
|
||||
if ( u2_no == u2_Host.ops_u.dem && uty_u ) {
|
||||
if ( uty_u ) {
|
||||
if ( uty_u->fid_i > 2 ) {
|
||||
// We *should* in fact, produce some kind of fake FILE* for
|
||||
// non-console terminals. If we use this interface enough...
|
||||
@ -1115,9 +1113,10 @@ u2_term_io_loja(int x)
|
||||
c3_assert(0);
|
||||
}
|
||||
else {
|
||||
#if 0
|
||||
uv_tty_set_mode(&uty_u->wax_u, 1);
|
||||
#else
|
||||
if ( u2_yes == u2_Host.ops_u.dem ) {
|
||||
fflush(stdout);
|
||||
}
|
||||
else {
|
||||
if ( 0 != tcsetattr(1, TCSADRAIN, &uty_u->raw_u) ) {
|
||||
c3_assert(!"loja-tcsetattr");
|
||||
}
|
||||
@ -1130,8 +1129,8 @@ u2_term_io_loja(int x)
|
||||
if ( -1 == fcntl(0, F_SETFL, uty_u->nob_i) ) {
|
||||
c3_assert(!"loja-fcntl");
|
||||
}
|
||||
#endif
|
||||
_term_it_refresh_line(uty_u);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user