Skip to content

Commit

Permalink
Have bin/vterm-dump.c specifically emit NUL/CAN/SUB/DEL
Browse files Browse the repository at this point in the history
  • Loading branch information
leonerd committed Jan 15, 2023
1 parent b891076 commit 5757ad4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/vterm-dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ static int parser_control(unsigned char control, void *user)
{
if(control < 0x20)
printf("%s%s%s", special_begin, name_c0[control], special_end);
else if(control == 0x7f)
printf("%s%s%s", special_begin, "DEL", special_end);
else if(control >= 0x80 && control < 0xa0 && name_c1[control - 0x80])
printf("%s%s%s", special_begin, name_c1[control - 0x80], special_end);
else
Expand Down Expand Up @@ -226,6 +228,7 @@ int main(int argc, char *argv[])
VTerm *vt = vterm_new(25, 80);
vterm_set_utf8(vt, 1);
vterm_parser_set_callbacks(vt, &parser_cbs, NULL);
vterm_parser_set_emit_nul(vt, true);

int len;
char buffer[1024];
Expand Down

0 comments on commit 5757ad4

Please sign in to comment.