ce machin semble fonctionner ;)
This commit is contained in:
parent
913da05ee0
commit
7e17ba80e5
3
ui/t.c
3
ui/t.c
@ -31,8 +31,9 @@ if (idx==16) {
|
|||||||
fprintf(fp, "dmp : ");
|
fprintf(fp, "dmp : ");
|
||||||
for (foo=0; foo<16; foo++) {
|
for (foo=0; foo<16; foo++) {
|
||||||
fprintf(fp, "%02x ", buffer[foo]);
|
fprintf(fp, "%02x ", buffer[foo]);
|
||||||
|
if (7==foo) fprintf(fp, " ");
|
||||||
}
|
}
|
||||||
fprintf(fp, " - |");
|
fprintf(fp, " - |");
|
||||||
for (foo=0; foo<16; foo++) {
|
for (foo=0; foo<16; foo++) {
|
||||||
c = buffer[foo];
|
c = buffer[foo];
|
||||||
fprintf(fp, "%c", isprint(c) ? c : ' ');
|
fprintf(fp, "%c", isprint(c) ? c : ' ');
|
||||||
|
@ -84,17 +84,24 @@ do {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ('\r' != received) waddch(glass, received);
|
if ('\r' != received) waddch(glass, received);
|
||||||
|
|
||||||
// if ('\n' == received) waddch(glass, '\r');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*** est-ce le yuser avec son clavier ? */
|
/*** est-ce le yuser avec son clavier ? */
|
||||||
if (FD_ISSET(fd_local, &rfds)) {
|
if (FD_ISSET(fd_local, &rfds)) {
|
||||||
received = getch();
|
received = getch();
|
||||||
//XXX if (verbosity) {
|
|
||||||
//XXX sprintf(ligne, " $%02x from yuser\n", received);
|
#if DEBUG_LEVEL
|
||||||
//XXX waddstr(glass, ligne);
|
sprintf(ligne, " got $%X\n", received);
|
||||||
//XXX }
|
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);
|
putbyte(fd_remote, received);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user