diff --git a/ui/t.c b/ui/t.c index fdacc3b..40b726f 100644 --- a/ui/t.c +++ b/ui/t.c @@ -31,8 +31,9 @@ if (idx==16) { fprintf(fp, "dmp : "); for (foo=0; foo<16; foo++) { fprintf(fp, "%02x ", buffer[foo]); + if (7==foo) fprintf(fp, " "); } - fprintf(fp, " - |"); + fprintf(fp, " - |"); for (foo=0; foo<16; foo++) { c = buffer[foo]; fprintf(fp, "%c", isprint(c) ? c : ' '); diff --git a/ui/terminal.c b/ui/terminal.c index b053fff..fffdc31 100644 --- a/ui/terminal.c +++ b/ui/terminal.c @@ -84,17 +84,24 @@ do { } if ('\r' != received) waddch(glass, received); - - // if ('\n' == received) waddch(glass, '\r'); } /*** est-ce le yuser avec son clavier ? */ if (FD_ISSET(fd_local, &rfds)) { received = getch(); - //XXX if (verbosity) { - //XXX sprintf(ligne, " $%02x from yuser\n", received); - //XXX waddstr(glass, ligne); - //XXX } + +#if DEBUG_LEVEL + sprintf(ligne, " got $%X\n", received); + waddstr(glass, ligne); wrefresh(glass); +#endif + + /* que doit-on faire avec ce qu'on + vient de recevoir ? */ + if (0x04 == received) { /* EOT (end of transmission) */ + waddstr(glass, "--- EOT ---\n"); wrefresh(glass); + flag_exit = 1; + } + putbyte(fd_remote, received); }