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:
g0mb4 2021-07-19 11:32:00 +02:00 committed by Martin Lund
parent 7d3b687eb4
commit 0b55981e52
5 changed files with 128 additions and 20 deletions

View file

@ -117,6 +117,16 @@ Map NL to CR-NL on output.
If defining more than one flag, the flags must be comma separated.
.RE
.TP
.BR \-x ", " \-\-hex
Start in hexadecimal mode.
.TP
.BR \-\-newline-in-hex
Interpret new line characters ('\\r', '\\n') in hexadecimal mode.
.TP
.BR \-c ", " "\-\-color " \fI<code>
@ -180,6 +190,14 @@ Toggle RTS
.IP "\fBctrl-t v"
Show version
.SH "HEXADECIMAL MODE"
.TP
In hexadecimal mode each incoming byte is printed out as a hexadecimal value.
.TP
By default there is \fBno new line\fR in this mode, but it can be turned on using the \fB--newline-in-hex\fR option.
.TP
Bytes can be sent in this mode by typing the \fBtwo-character hexadecimal\fR representation of the value, e.g.: to send \fI0xA\fR you must type \fI0a\fR or \fI0A\fR.
.SH "CONFIGURATION"
.PP
.TP 16n