mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Extended hexadecimal mode.
While in hex mode (ctrl-t h) you can output hexadecimal values. E.g.: to send 0x0A you have to type 0A (always 2 characters). Added option -x, --hex to start in hexadecimal mode. Added option --newline-in-hex to interpret newline characters in hex mode. This is disabled by default, because, in my opinion, hex stream is fundamentally different from text, so a "new line" is meaningless in this context.
This commit is contained in:
parent
7d3b687eb4
commit
0b55981e52
5 changed files with 128 additions and 20 deletions
|
|
@ -29,7 +29,7 @@ char ansi_format[30];
|
|||
|
||||
void print_hex(char c)
|
||||
{
|
||||
if ((c == '\n') || (c == '\r'))
|
||||
if (((c == '\n') || (c == '\r')) && option.newline_in_hex)
|
||||
{
|
||||
printf("%c", c);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue