integration du terminal dans le machin

This commit is contained in:
phyto
2019-05-20 18:20:18 +02:00
parent 7e17ba80e5
commit e0dcbebd30
6 changed files with 52 additions and 39 deletions

31
ui/t.c
View File

@@ -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)

View File

@@ -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