mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-26 00:12:28 +03:00
various: comments, clean-up
This commit is contained in:
parent
52512ed4d4
commit
97540ed638
@ -676,9 +676,9 @@
|
|||||||
|= lin=(pair @ud stub)
|
|= lin=(pair @ud stub)
|
||||||
^+ +>
|
^+ +>
|
||||||
?: =(mir lin) +>
|
?: =(mir lin) +>
|
||||||
%+ se-blit(mir lin) %mor
|
%- se-blit(mir lin)
|
||||||
?: =(q.mir q.lin) [%hop p.lin]~
|
?: =(q.mir q.lin) [%hop p.lin]
|
||||||
[[%hop 0] [%wyp ~] [%klr q.lin] [%hop p.lin] ~]
|
mor+[[%hop 0] [%wyp ~] [%klr q.lin] [%hop p.lin] ~]
|
||||||
::
|
::
|
||||||
++ se-just :: adjusted buffer
|
++ se-just :: adjusted buffer
|
||||||
|= [pom=stub lin=(pair @ud (list @c))]
|
|= [pom=stub lin=(pair @ud (list @c))]
|
||||||
|
@ -49,11 +49,9 @@ hijack :: MonadIO m => Int -> m ()
|
|||||||
hijack h = liftIO do
|
hijack h = liftIO do
|
||||||
putCSI 'r' [1, h-1] -- set scroll region to exclude bottom line
|
putCSI 'r' [1, h-1] -- set scroll region to exclude bottom line
|
||||||
putCSI 'S' [1] -- scroll up one 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 :: MonadIO m => m ()
|
||||||
lojack = liftIO do
|
lojack = liftIO do
|
||||||
putCSI 'r' [] -- reset scroll region
|
putCSI 'r' [] -- reset scroll region
|
||||||
cursorRestore -- restory cursor position
|
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?
|
//TODO could be static function if we pass in Terminal explicitly?
|
||||||
const onBlit = useCallback((ses: string, blit: Blit) => {
|
const onBlit = useCallback((ses: string, blit: Blit) => {
|
||||||
//TODO
|
|
||||||
if (!sessions[ses]) {
|
if (!sessions[ses]) {
|
||||||
console.log('on blit: no such session', ses);
|
console.log('on blit: no such session', ses);
|
||||||
return;
|
return;
|
||||||
|
@ -42,7 +42,7 @@ typedef struct _u3_h2o_serv {
|
|||||||
void* gen_u; // response generator
|
void* gen_u; // response generator
|
||||||
struct _u3_hcon* hon_u; // connection backlink
|
struct _u3_hcon* hon_u; // connection backlink
|
||||||
struct _u3_hreq* nex_u; // next in connection's list
|
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_hreq;
|
||||||
|
|
||||||
/* u3_hcon: incoming http connection.
|
/* u3_hcon: incoming http connection.
|
||||||
@ -57,7 +57,7 @@ typedef struct _u3_h2o_serv {
|
|||||||
struct _u3_http* htp_u; // server backlink
|
struct _u3_http* htp_u; // server backlink
|
||||||
struct _u3_hreq* req_u; // request list
|
struct _u3_hreq* req_u; // request list
|
||||||
struct _u3_hcon* nex_u; // next in server's 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_hcon;
|
||||||
|
|
||||||
/* u3_http: http server.
|
/* u3_http: http server.
|
||||||
|
@ -161,6 +161,9 @@ u3_term_log_init(void)
|
|||||||
|
|
||||||
// Construct raw termios configuration.
|
// 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;
|
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);
|
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) ) {
|
||||||
@ -772,23 +774,18 @@ _term_io_suck_char(u3_utty* uty_u, c3_y cay_y)
|
|||||||
// individual characters
|
// individual characters
|
||||||
//
|
//
|
||||||
else {
|
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));
|
_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);
|
_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));
|
_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));
|
_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 ) {
|
else if ( cay_y <= 26 ) {
|
||||||
_term_io_belt(uty_u, u3nt(c3__mod, c3__ctl, ('a' + (cay_y - 1))));
|
_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);
|
_term_read_cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
// XX groace hardcoded terminal number
|
//TODO reevaluate wrt dill sessions
|
||||||
//
|
//
|
||||||
u3_noun wir = u3nt(c3__term, '1', u3_nul);
|
u3_noun wir = u3nt(c3__term, '1', u3_nul);
|
||||||
u3_noun cad;
|
u3_noun cad;
|
||||||
@ -1667,10 +1664,6 @@ _term_io_talk(u3_auto* car_u)
|
|||||||
_term_ovum_plan(car_u, u3k(wir), cad);
|
_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
|
// refresh terminal state
|
||||||
//
|
//
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user