vere: clean up, rename, undo debug changes, etc.

This commit is contained in:
fang 2021-02-19 14:51:28 +01:00
parent ea1b348754
commit 66f37099ba
No known key found for this signature in database
GPG Key ID: EB035760C1BBA972
5 changed files with 14 additions and 31 deletions

View File

@ -195,8 +195,8 @@
// } inn; // } inn;
struct { struct {
uv_buf_t clear_u; // clear_screen uv_buf_t clear_u; // clear_screen
uv_buf_t el_u; // clr_bol clear to beginning uv_buf_t el_u; // clr_bol clear to end of line
// uv_buf_t el1_u; // clr_eol clear to end // uv_buf_t el1_u; // clr_eol clear to beginning of line
uv_buf_t ed_u; // clear to end of screen uv_buf_t ed_u; // clear to end of screen
uv_buf_t sc_u; // save cursor position uv_buf_t sc_u; // save cursor position
uv_buf_t rc_u; // restore cursor position uv_buf_t rc_u; // restore cursor position

View File

@ -453,21 +453,6 @@ _term_it_send_csi(u3_utty *uty_u, c3_c cmd_c, c3_w num_w, ...)
_term_it_dump_buf(uty_u, &cmd_u); _term_it_dump_buf(uty_u, &cmd_u);
} }
/* _term_it_send_cord(): write a cord.
*/
static void
_term_it_send_cord(u3_utty* uty_u,
u3_atom txt)
{
c3_w len_w = u3r_met(3, txt);
c3_y* hun_y = c3_malloc(len_w);
u3r_bytes(0, len_w, hun_y, txt);
_term_it_send(uty_u, len_w, hun_y);
u3z(txt);
}
/* _term_it_free_line(): wipe line stored by _term_it_save_line /* _term_it_free_line(): wipe line stored by _term_it_save_line
*/ */
static void static void
@ -573,10 +558,10 @@ _term_it_show_line(u3_utty* uty_u, c3_w* lin_w, c3_w wor_w)
_term_it_dump_buf(uty_u, &uty_u->ufo_u.out.rc_u); _term_it_dump_buf(uty_u, &uty_u->ufo_u.out.rc_u);
} }
/* _term_it_refresh_line(): refresh current line. /* _term_it_restore_line(): refresh current line.
*/ */
static void static void
_term_it_refresh_line(u3_utty* uty_u) //TODO rename restore _term_it_restore_line(u3_utty* uty_u)
{ {
u3_utat* tat_u = &uty_u->tat_u; u3_utat* tat_u = &uty_u->tat_u;
c3_w* lin_w = tat_u->mir.lin_w; c3_w* lin_w = tat_u->mir.lin_w;
@ -648,10 +633,10 @@ _term_it_save_line(u3_utty* uty_u, c3_w* lin_w, c3_w wor_w)
} }
} }
/* _term_it_show_more(): render newline, moving cursor down /* _term_it_show_nel(): render newline, moving cursor down
*/ */
static void static void
_term_it_show_more(u3_utty* uty_u) _term_it_show_nel(u3_utty* uty_u)
{ {
if ( c3y == u3_Host.ops_u.tem ) { if ( c3y == u3_Host.ops_u.tem ) {
_term_it_dump(uty_u, TERM_LIT("\n")); _term_it_dump(uty_u, TERM_LIT("\n"));
@ -778,6 +763,7 @@ _term_io_belt(u3_utty* uty_u, u3_noun blb)
{ {
u3_ovum* egg_u = _term_ovum_plan(uty_u->car_u, wir, cad); u3_ovum* egg_u = _term_ovum_plan(uty_u->car_u, wir, cad);
//REVIEW do we not want even a small delay here?
// no spinner delay on %ret // no spinner delay on %ret
// //
if ( c3__ret == u3h(blb) ) { if ( c3__ret == u3h(blb) ) {
@ -1129,7 +1115,7 @@ u3_term_stop_spinner(void)
uv_timer_stop(&tat_u->sun_u.tim_u); uv_timer_stop(&tat_u->sun_u.tim_u);
if ( c3y == tat_u->sun_u.diz_o ) { if ( c3y == tat_u->sun_u.diz_o ) {
_term_it_refresh_line(uty_u); _term_it_restore_line(uty_u);
tat_u->sun_u.end_d = _term_msc_out_host(); tat_u->sun_u.end_d = _term_msc_out_host();
tat_u->sun_u.diz_o = c3n; tat_u->sun_u.diz_o = c3n;
} }
@ -1503,7 +1489,7 @@ _term_ef_blit(u3_utty* uty_u,
} break; } break;
case c3__nel: { case c3__nel: {
_term_it_show_more(uty_u); _term_it_show_nel(uty_u);
} break; } break;
case c3__sav: { case c3__sav: {
@ -1526,9 +1512,7 @@ _term_ef_blit(u3_utty* uty_u,
} break; } break;
case c3__wyp: { case c3__wyp: {
if ( c3n == u3_Host.ops_u.tem ) { _term_it_clear_line(uty_u);
_term_it_clear_line(uty_u);
}
} break; } break;
} }
@ -1600,6 +1584,7 @@ u3_term_io_loja(int x)
} }
else { else {
if ( c3y == u3_Host.ops_u.tem ) { if ( c3y == u3_Host.ops_u.tem ) {
fprintf(stdout, "\n");
fflush(stdout); fflush(stdout);
} }
else { else {

View File

@ -373,8 +373,7 @@ _lord_plea_flog(u3_lord* god_u, u3_noun dat)
} }
c3_c* tan_c = u3r_string(dat); c3_c* tan_c = u3r_string(dat);
// u3C.stderr_log_f(tan_c); u3C.stderr_log_f(tan_c);
u3l_log("y%sy", tan_c);
c3_free(tan_c); c3_free(tan_c);
if ( 0 != pir_u->sog_f ) { if ( 0 != pir_u->sog_f ) {

View File

@ -301,7 +301,7 @@ _pier_on_lord_work_spin(void* ptr_v, u3_atom pin, c3_o del_o)
u3_term_start_spinner(pin, del_o); u3_term_start_spinner(pin, del_o);
} }
/* _pier_on_lord_work_spin(): stop spinner /* _pier_on_lord_work_spun(): stop spinner
*/ */
static void static void
_pier_on_lord_work_spun(void* ptr_v) _pier_on_lord_work_spun(void* ptr_v)

View File

@ -82,8 +82,7 @@ _cw_serf_send_slog(u3_noun hod)
static void static void
_cw_serf_send_stdr(c3_c* str_c) _cw_serf_send_stdr(c3_c* str_c)
{ {
// _cw_serf_send(u3nc(c3__flog, u3i_string(str_c))); _cw_serf_send(u3nc(c3__flog, u3i_string(str_c)));
_cw_serf_send(u3nc(c3__flog, u3i_string("lmao")));
} }