integration du terminal dans le machin
This commit is contained in:
31
ui/t.c
31
ui/t.c
@@ -13,37 +13,6 @@
|
||||
|
||||
int verbosity;
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
int special_dumper(FILE *fp, unsigned char octet)
|
||||
{
|
||||
static int idx = 0;
|
||||
static unsigned char buffer[16];
|
||||
|
||||
int foo, c;
|
||||
|
||||
#if DEBUG_LEVEL > 1
|
||||
fprintf(stderr, "%s $%x %c\n", __func__, octet, octet);
|
||||
#endif
|
||||
|
||||
buffer[idx++] = octet;
|
||||
|
||||
if (idx==16) {
|
||||
fprintf(fp, "dmp : ");
|
||||
for (foo=0; foo<16; foo++) {
|
||||
fprintf(fp, "%02x ", buffer[foo]);
|
||||
if (7==foo) fprintf(fp, " ");
|
||||
}
|
||||
fprintf(fp, " - |");
|
||||
for (foo=0; foo<16; foo++) {
|
||||
c = buffer[foo];
|
||||
fprintf(fp, "%c", isprint(c) ? c : ' ');
|
||||
}
|
||||
fprintf(fp, "|\n"); fflush(fp);
|
||||
idx = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
void help(int k)
|
||||
|
||||
@@ -90,7 +90,7 @@ do {
|
||||
if (FD_ISSET(fd_local, &rfds)) {
|
||||
received = getch();
|
||||
|
||||
#if DEBUG_LEVEL
|
||||
#if DEBUG_LEVEL > 1
|
||||
sprintf(ligne, " got $%X\n", received);
|
||||
waddstr(glass, ligne); wrefresh(glass);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user