mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-24 23:44:56 +03:00
various: comments, clean-up
This commit is contained in:
parent
52512ed4d4
commit
97540ed638
@ -676,9 +676,9 @@
|
||||
|= lin=(pair @ud stub)
|
||||
^+ +>
|
||||
?: =(mir lin) +>
|
||||
%+ se-blit(mir lin) %mor
|
||||
?: =(q.mir q.lin) [%hop p.lin]~
|
||||
[[%hop 0] [%wyp ~] [%klr q.lin] [%hop p.lin] ~]
|
||||
%- se-blit(mir lin)
|
||||
?: =(q.mir q.lin) [%hop p.lin]
|
||||
mor+[[%hop 0] [%wyp ~] [%klr q.lin] [%hop p.lin] ~]
|
||||
::
|
||||
++ se-just :: adjusted buffer
|
||||
|= [pom=stub lin=(pair @ud (list @c))]
|
||||
|
@ -49,11 +49,9 @@ hijack :: MonadIO m => Int -> m ()
|
||||
hijack h = liftIO do
|
||||
putCSI 'r' [1, h-1] -- set scroll region to exclude bottom line
|
||||
putCSI 'S' [1] -- scroll up one line
|
||||
cursorMove (h-2) 0 -- move cursor to empty space --TODO off-by-one?
|
||||
cursorMove (h-2) 0 -- move cursor to empty space
|
||||
|
||||
lojack :: MonadIO m => m ()
|
||||
lojack = liftIO do
|
||||
putCSI 'r' [] -- reset scroll region
|
||||
cursorRestore -- restory cursor position
|
||||
|
||||
--TODO consider ANSI.setSGR
|
||||
|
@ -160,7 +160,6 @@ export default function TermApp(props: TermAppProps) {
|
||||
|
||||
//TODO could be static function if we pass in Terminal explicitly?
|
||||
const onBlit = useCallback((ses: string, blit: Blit) => {
|
||||
//TODO
|
||||
if (!sessions[ses]) {
|
||||
console.log('on blit: no such session', ses);
|
||||
return;
|
||||
|
@ -42,7 +42,7 @@ typedef struct _u3_h2o_serv {
|
||||
void* gen_u; // response generator
|
||||
struct _u3_hcon* hon_u; // connection backlink
|
||||
struct _u3_hreq* nex_u; // next in connection's list
|
||||
struct _u3_hreq* pre_u; // next in connection's list
|
||||
struct _u3_hreq* pre_u; // prev in connection's list
|
||||
} u3_hreq;
|
||||
|
||||
/* u3_hcon: incoming http connection.
|
||||
@ -57,7 +57,7 @@ typedef struct _u3_h2o_serv {
|
||||
struct _u3_http* htp_u; // server backlink
|
||||
struct _u3_hreq* req_u; // request list
|
||||
struct _u3_hcon* nex_u; // next in server's list
|
||||
struct _u3_hcon* pre_u; // next in server's list
|
||||
struct _u3_hcon* pre_u; // prev in server's list
|
||||
} u3_hcon;
|
||||
|
||||
/* u3_http: http server.
|
||||
|
@ -161,6 +161,9 @@ u3_term_log_init(void)
|
||||
|
||||
// Construct raw termios configuration.
|
||||
//
|
||||
// makes input available per-character, does not echo input,
|
||||
// disables special input pre-processing, output post-processing.
|
||||
//
|
||||
{
|
||||
uty_u->raw_u = uty_u->bak_u;
|
||||
|
||||
@ -680,7 +683,6 @@ _term_io_belt(u3_utty* uty_u, u3_noun blb)
|
||||
{
|
||||
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
|
||||
//
|
||||
if ( c3__ret == u3h(blb) ) {
|
||||
@ -772,23 +774,18 @@ _term_io_suck_char(u3_utty* uty_u, c3_y cay_y)
|
||||
// individual characters
|
||||
//
|
||||
else {
|
||||
if ( (cay_y >= 32) && (cay_y < 127) ) {
|
||||
if ( (cay_y >= 32) && (cay_y < 127) ) { // visual ascii
|
||||
_term_io_belt(uty_u, u3nt(c3__txt, cay_y, u3_nul));
|
||||
}
|
||||
else if ( 0 == cay_y ) {
|
||||
else if ( 0 == cay_y ) { // null
|
||||
_term_it_dump_buf(uty_u, &uty_u->ufo_u.bel_u);
|
||||
}
|
||||
else if ( 8 == cay_y || 127 == cay_y ) {
|
||||
else if ( 8 == cay_y || 127 == cay_y ) { // backspace & delete
|
||||
_term_io_belt(uty_u, u3nc(c3__bac, u3_nul));
|
||||
}
|
||||
else if ( 13 == cay_y ) {
|
||||
else if ( 10 == cay_y || 13 == cay_y ) { // newline & carriage return
|
||||
_term_io_belt(uty_u, u3nc(c3__ret, u3_nul));
|
||||
}
|
||||
#if 0
|
||||
else if ( 6 == cay_y ) {
|
||||
_term_io_flow(uty_u); // XX hack
|
||||
}
|
||||
#endif
|
||||
else if ( cay_y <= 26 ) {
|
||||
_term_io_belt(uty_u, u3nt(c3__mod, c3__ctl, ('a' + (cay_y - 1))));
|
||||
}
|
||||
@ -1655,7 +1652,7 @@ _term_io_talk(u3_auto* car_u)
|
||||
_term_read_cb);
|
||||
}
|
||||
|
||||
// XX groace hardcoded terminal number
|
||||
//TODO reevaluate wrt dill sessions
|
||||
//
|
||||
u3_noun wir = u3nt(c3__term, '1', u3_nul);
|
||||
u3_noun cad;
|
||||
@ -1667,10 +1664,6 @@ _term_io_talk(u3_auto* car_u)
|
||||
_term_ovum_plan(car_u, u3k(wir), cad);
|
||||
}
|
||||
|
||||
// NB, term.c used to also start :dojo
|
||||
//
|
||||
// u3nq(c3__flow, c3__seat, c3__dojo, u3_nul)
|
||||
|
||||
// refresh terminal state
|
||||
//
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user