patch_seq_terminal_read_char

Function patch_seq_terminal_read_char 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn patch_seq_terminal_read_char( stack: Stack, ) -> Stack
Expand description

Read a single character from stdin (blocking)

Stack effect: ( – Int )

Returns:

  • 0-255: The byte value read
  • -1: EOF or error

In raw mode, this returns immediately when a key is pressed. In cooked mode, this waits for Enter.

§Safety

Always safe to call