Browse Source

ce machin semble fonctionner ;)

phyto 6 months ago
parent
commit
7e17ba80e5
2 changed files with 15 additions and 7 deletions
  1. 2
    1
      ui/t.c
  2. 13
    6
      ui/terminal.c

+ 2
- 1
ui/t.c View File

@@ -31,8 +31,9 @@ if (idx==16) {
31 31
 	fprintf(fp, "dmp : ");
32 32
 	for (foo=0; foo<16; foo++) {
33 33
 		fprintf(fp, "%02x ", buffer[foo]);
34
+		if (7==foo)	fprintf(fp, " ");
34 35
 		}
35
-	fprintf(fp, " -  |");
36
+	fprintf(fp, "  -   |");
36 37
 	for (foo=0; foo<16; foo++) {
37 38
 		c = buffer[foo];
38 39
 		fprintf(fp, "%c", isprint(c) ? c : ' ');

+ 13
- 6
ui/terminal.c View File

@@ -84,17 +84,24 @@ do	{
84 84
 			}
85 85
 
86 86
 		if ('\r' != received) waddch(glass, received);
87
-
88
-		// if ('\n' == received) waddch(glass, '\r');
89 87
 		}
90 88
 
91 89
 	/*** est-ce le yuser avec son clavier ? */
92 90
 	if (FD_ISSET(fd_local, &rfds)) {
93 91
 		received = getch();
94
-		//XXX if (verbosity) {
95
-		//XXX	sprintf(ligne, " $%02x from yuser\n", received);
96
-		//XXX	waddstr(glass, ligne);
97
-		//XXX	}
92
+
93
+#if DEBUG_LEVEL
94
+		sprintf(ligne, " got $%X\n", received); 
95
+		waddstr(glass, ligne); wrefresh(glass);
96
+#endif
97
+
98
+		/* que doit-on faire avec ce qu'on
99
+			vient de recevoir ? */
100
+		if (0x04 == received) {		/* EOT (end of transmission) */
101
+			waddstr(glass, "--- EOT ---\n"); wrefresh(glass);
102
+			flag_exit = 1;
103
+			}
104
+
98 105
 		putbyte(fd_remote, received);		
99 106
 		}
100 107
 

Loading…
Cancel
Save