Add independent input and output mode

Replaces -x, --hexadecimal option with --intput-mode and --output-mode
so it is possible to select hex or normal mode for both input and output
independently.

To obtain same behaviour as -x, --hexadecimal use the following
configuration:

input-mode = hex
output-mode = hex
This commit is contained in:
Martin Lund 2024-04-10 14:39:42 +02:00
parent fd6a246908
commit 2fff4d36d0
9 changed files with 254 additions and 78 deletions

View file

@ -213,9 +213,13 @@ static int data_handler(void *user, const char *section, const char *name,
{
option.local_echo = read_boolean(value, name);
}
else if (!strcmp(name, "hexadecimal"))
else if (!strcmp(name, "input-mode"))
{
option.hex_mode = read_boolean(value, name);
option.input_mode = input_mode_option_parse(value);
}
else if (!strcmp(name, "output-mode"))
{
option.output_mode = output_mode_option_parse(value);
}
else if (!strcmp(name, "timestamp"))
{