mirror of
https://github.com/tio/tio.git
synced 2026-05-01 23:07:58 +02:00
Add option --raw/--raw-interactive and Ctrl-t j/J subcommand
Non-interactive operations (input from a pipe, running a shell command, XYMODEM transfers) often fail when mapping, soft flow control, or output delay are enabled. To reduce the hassle of switching settings, add the function shown in the title. The raw option can be set to one of the following: - off ... no effects - on ... soft-flow off, character mapping off, output delay enabled - on-nodelay ... soft-flow off, character mapping off, output delay disable raw option is for Piped-input / Shell command execution / XYMODEM transfering. default is on. raw-interactive option is for socket-mode and normal terminal use. default is off. You can type Ctrl-t j if you need to change raw setting for non-interactive case. it toggles the raw setting. You can type Ctrl-t J if you need to change raw setting of interactive case. it toggles the raw setting. It is useful when transferring files in socket mode.
This commit is contained in:
parent
3b7fe3d258
commit
321494b4e6
7 changed files with 357 additions and 102 deletions
11
src/tty.h
11
src/tty.h
|
|
@ -69,8 +69,18 @@ typedef struct
|
|||
bool reserved;
|
||||
} tty_line_config_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
STATE_INTERACTIVE,
|
||||
STATE_STARTING,
|
||||
STATE_PIPED_INPUT,
|
||||
STATE_EXEC_SHELL_COMMAND,
|
||||
STATE_XYMODEM,
|
||||
} state_t;
|
||||
|
||||
extern const char *device_name;
|
||||
extern bool interactive_mode;
|
||||
extern state_t state;
|
||||
|
||||
void stdout_configure(void);
|
||||
void stdin_configure(void);
|
||||
|
|
@ -88,3 +98,4 @@ GList *tty_search_for_serial_devices(void);
|
|||
void forward_to_tty(int fd, char output_char);
|
||||
ssize_t tty_write(int fd, const void *buffer, size_t count);
|
||||
void tty_sync(int fd);
|
||||
int tty_tcsetattr(int fd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue