diff --git a/src/options.c b/src/options.c index 4989f20..58ae78e 100644 --- a/src/options.c +++ b/src/options.c @@ -716,10 +716,6 @@ void options_print() tio_printf(" Input mode: %s", option_input_mode_to_string(option.input_mode)); tio_printf(" Output mode: %s", option_output_mode_to_string(option.output_mode)); tio_printf(" Alert: %s", option_alert_state_to_string(option.alert)); - if (option.map[0] != 0) - { - tio_printf(" Map flags: %s", option.map); - } if (option.log) { tio_printf(" Log file: %s", log_get_filename()); diff --git a/src/tty.c b/src/tty.c index 1724b1e..2adef9e 100644 --- a/src/tty.c +++ b/src/tty.c @@ -630,6 +630,32 @@ void tty_output_mode_set(output_mode_t mode) } } +static void mappings_print(void) +{ + if (map_i_cr_nl || map_ign_cr || map_i_ff_escc || map_i_nl_cr || + map_i_nl_crnl || map_o_cr_nl || map_o_del_bs || map_o_nl_crnl || + map_o_ltu || map_o_nulbrk || map_o_msblsb) + { + tio_printf(" Mappings:%s%s%s%s%s%s%s%s%s%s%s", + map_i_cr_nl ? " ICRNL" : "", + map_ign_cr ? " IGNCR" : "", + map_i_ff_escc ? " IFFESCC" : "", + map_i_nl_cr ? " INLCR" : "", + map_i_nl_crnl ? " INLCRNL" : "", + map_o_cr_nl ? " OCRNL" : "", + map_o_del_bs ? " ODELBS" : "", + map_o_nl_crnl ? " ONLCRNL" : "", + map_o_ltu ? " OLTU" : "", + map_o_nulbrk ? " ONULBRK" : "", + map_o_msblsb ? " MSB2LSB" : ""); + } + else + { + tio_printf(" Mappings: none"); + } + +} + void handle_command_sequence(char input_char, char *output_char, bool *forward) { char unused_char; @@ -908,6 +934,7 @@ void handle_command_sequence(char input_char, char *output_char, bool *forward) { rs485_print_config(); } + mappings_print(); break; case KEY_E: