Expand description
A terminal, hand-rolled on libc.
The syscall half only. ratatui draws every row (see tui::rata),
but none of its backends are linked: CrosstermBackend would add crossterm,
mio, signal-hook and parking_lot to do what is already here, on a tree whose
size (149 crates, 6.20 MiB) is a stated property of the product. So
termios for raw mode, TIOCGWINSZ for the size, poll(2) for input,
three sigactions to survive a resize and a kill, and Term::draw to put
the rows on the screen. libc is already in the tree for statfs.
Unix only, which is the same bet mmap, SIGTERM and the filesystem guard
already make.
StructsΒ§
EnumsΒ§
ConstantsΒ§
StaticsΒ§
- ORIG π
- The terminal settings as they were before
Term::enter.
FunctionsΒ§
- bail π β
- Give the terminal back, then die.
- csi π
- ok_
or_ πerrno - The
termioscallsβ contract:0, or-1and the reason is inerrno. - on_
signal π - Install
hforsig, withoutSA_RESTART. - parse π
- One key off the front of
b, orParsed::Needif what is there could still grow into a longer sequence. - poll_in π
- restore π
- Put the terminal back. Idempotent, because
Drop, the panic hook and a fatal signal can all reach it and a double panic would otherwise run it twice. - take_
one π - winch π β
- A resize. Nothing to do in the handler β the delivery itself is the message,
and it arrives as an
EINTRinpoll_in.