/* u2_term_ef_boil(): initial effects for loaded servers. */ void u2_term_ef_boil(c3_l ono_l) { if ( ono_l ) { u2_noun tid_l; for ( tid_l = 2; tid_l <= ono_l; tid_l++ ) { u2_noun tin = u2_dc("scot", c3__ud, tid_l); u2_noun pax = u2nq(c3__gold, c3__term, tin, u2_nul); u2_noun hud = u2nc(c3__wipe, u2_nul); u2_reck_plan(u2A, pax, hud); } } { u2_noun pax = u2nq(c3__gold, c3__term, '1', u2_nul); // u2_reck_plan(u2A, u2k(pax), u2nc(c3__init, u2k(u2h(u2A->own)))); u2_reck_plan(u2A, u2k(pax), u2nc(c3__blew, u2_term_get_blew(1))); u2_reck_plan(u2A, u2k(pax), u2nc(c3__hail, u2_nul)); u2z(pax); } }
/* u2_term_ef_bake(): initial effects for new terminal. */ void u2_term_ef_bake(u2_noun fav) { u2_noun pax = u2nq(c3__gold, c3__term, '1', u2_nul); u2_reck_plan(u2A, u2k(pax), u2nc(c3__boot, fav)); u2_reck_plan(u2A, u2k(pax), u2nc(c3__blew, u2_term_get_blew(1))); u2_reck_plan(u2A, u2k(pax), u2nc(c3__hail, u2_nul)); u2z(pax); }
/* u2_term_ef_ctlc(): send ^C on console. */ void u2_term_ef_ctlc(void) { u2_noun pax = u2nq(c3__gold, c3__term, '1', u2_nul); u2_reck_plan(u2A, pax, u2nt(c3__belt, c3__ctl, 'c')); }
/* _unix_desk_sync_into(): sync external changes to desk. */ static void _unix_desk_sync_into(u2_noun who, u2_noun hox, u2_noun syd, u2_udir* dir_u) { u2_noun xun, bur, doz, fav, pax; xun = _unix_dir_ankh(dir_u); bur = _unix_desk_peek(hox, u2k(syd), u2k(u2A->wen)); if ( (u2_no == u2_sing(u2h(xun), u2h(bur)))) //&& // (u2_no == _unix_ankh_sing(xun, bur)) ) { doz = u2_dc("cost", xun, bur); pax = u2nq(u2_blip, c3__sync, u2k(u2A->sen), u2_nul); fav = u2nq(c3__into, who, syd, u2nc(u2_yes, doz)); u2_reck_plan(u2A, pax, fav); } else { u2z(who); u2z(syd); u2z(xun); u2z(bur); } }
/* u2_term_ef_winc(): window change. Just console right now. */ void u2_term_ef_winc(void) { u2_noun pax = u2nq(c3__gold, c3__term, '1', u2_nul); u2_reck_plan(u2A, pax, u2nc(c3__blew, u2_term_get_blew(1))); }
void u2_http_ef_bake(void) { u2_noun pax = u2nq(c3__gold, c3__http, u2k(u2A->sen), u2_nul); u2_reck_plan(u2A, pax, u2nc(c3__born, u2_nul)); }
/* _term_io_belt(): send belt. */ static void _term_io_belt(u2_utty* uty_u, u2_noun blb) { u2_noun tid = u2_dc("scot", c3__ud, uty_u->tid_l); u2_noun pax = u2nq(c3__gold, c3__term, tid, u2_nul); u2_reck_plan(u2A, pax, u2nc(c3__belt, blb)); }
/* u2_unix_ef_init(): update filesystem for new acquisition. */ void u2_unix_ef_init(u2_noun who) { _unix_hot_gain(u2k(who), u2_yes); u2_reck_plan(u2A, u2nq(c3__gold, c3__sync, u2k(u2A->sen), u2_nul), u2nq(c3__into, who, u2_blip, u2nc(u2_yes, u2_nul))); }
/* _http_request_dead(): kill http request. */ static void _http_request_dead(u2_hreq* req_u) { u2_noun pox = _http_pox_to_noun(req_u->hon_u->htp_u->sev_l, req_u->hon_u->coq_l, req_u->seq_l); u2_reck_plan(u2_Host.arv_u, pox, u2nc(c3__thud, u2_nul)); }
/* _unix_time_cb(): timer callback. */ static void _unix_time_cb(uv_timer_t* tim_u, c3_i sas_i) { u2_lo_open(); { u2_reck_plan (u2A, u2nt(c3__gold, c3__clay, u2_nul), u2nc(c3__wake, u2_nul)); } u2_lo_shut(u2_no); }
// _lo_bench_noop(): benchmark no-op events. // static void _lo_bench_noop(c3_w num_w) { c3_w i_w; for ( i_w = 0; i_w < num_w; i_w++ ) { u2_reck_plan(u2A, u2nq(c3__gold, c3__term, 1, u2_nul), u2nc(c3__noop, u2_nul)); } u2_raft_work(u2A); }
/* _unix_time_cb(): timer callback. */ static void _unix_time_cb(uv_timer_t* tim_u) { if ( u2_nul == u2A->roe ) { u2_lo_open(); { u2_reck_plan (u2A, u2nt(u2_blip, c3__clay, u2_nul), u2nc(c3__wake, u2_nul)); } u2_lo_shut(u2_no); } }
/* _http_request(): dispatch http request, returning null if async. */ static void _http_request(u2_hreq* req_u) { u2_noun req = _http_request_to_noun(req_u); if ( u2_none != req ) { u2_noun pox = _http_pox_to_noun(req_u->hon_u->htp_u->sev_l, req_u->hon_u->coq_l, req_u->seq_l); u2_reck_plan(u2_Host.arv_u, pox, u2nq(c3__this, req_u->hon_u->htp_u->sec, u2nc(u2_yes, u2_ci_words(1, &req_u->ipf_w)), req)); } }
/* _unix_desk_sync_into(): sync external changes to desk. */ static void _unix_desk_sync_into(u2_noun who, u2_noun hox, u2_noun syd, u2_udir* dir_u) { u2_noun xun, bur, doz, fav, pax; xun = _unix_dir_arch(dir_u); bur = _unix_desk_peek(u2k(who), hox, syd, u2k(u2A->wen)); if ( u2_no == u2_sing(xun, bur) ) { doz = u2_dc("cyst", xun, bur); pax = u2nq(c3__gold, c3__sync, u2k(u2A->sen), u2_nul); fav = u2nq(c3__into, who, syd, u2nc(u2_yes, doz)); u2_reck_plan(u2A, pax, fav); } else { u2z(xun); u2z(bur); } }