NodeC  0.1
TTY

Terminal input and output. More...

Functions

char * async_tty_readline ()
 Read from the console. More...
 
void async_tty_write (const char *s)
 Write to the console. More...
 
void async_tty_write_err (const char *s)
 Write to the console on stderr. More...
 
void async_stop_on_enter (nodec_actionfun_t *action)
 Run an action until "enter" is pressed. More...
 
void async_tty_printf (const char *fmt,...)
 Write a formatted string to the console. More...
 
void async_tty_vprintf (const char *fmt, va_list args)
 Write a formatted string to the console. More...
 
void async_tty_printf_err (const char *fmt,...)
 Write a formatted string to the console on stderr. More...
 
void async_tty_vprintf_err (const char *fmt, va_list args)
 Write a formatted string to the console on stderr. More...
 

Detailed Description

Terminal input and output.

Function Documentation

◆ async_stop_on_enter()

void async_stop_on_enter ( nodec_actionfun_t action)

Run an action until "enter" is pressed.

Parameters
actionThe action to run.

◆ async_tty_printf()

void async_tty_printf ( const char *  fmt,
  ... 
)

Write a formatted string to the console.

Parameters
fmtThe format string to write to the console. Can contain ANSI escape sequences.
...Format arguments.

◆ async_tty_printf_err()

void async_tty_printf_err ( const char *  fmt,
  ... 
)

Write a formatted string to the console on stderr.

Parameters
fmtThe format string to write to the console. Can contain ANSI escape sequences.
...Format arguments.

◆ async_tty_readline()

char* async_tty_readline ( )

Read from the console.

Returns
The input read. Should be freed by the callee (see using_free()).

◆ async_tty_vprintf()

void async_tty_vprintf ( const char *  fmt,
va_list  args 
)

Write a formatted string to the console.

Parameters
fmtThe format string to write to the console. Can contain ANSI escape sequences.
argsFormat arguments.

◆ async_tty_vprintf_err()

void async_tty_vprintf_err ( const char *  fmt,
va_list  args 
)

Write a formatted string to the console on stderr.

Parameters
fmtThe format string to write to the console. Can contain ANSI escape sequences.
argsFormat arguments.

◆ async_tty_write()

void async_tty_write ( const char *  s)

Write to the console.

Parameters
sThe string to write to the console. Can contain ANSI escape sequences.

◆ async_tty_write_err()

void async_tty_write_err ( const char *  s)

Write to the console on stderr.

Parameters
sThe string to write to the console on stderr. Can contain ANSI escape sequences.