+echo() +noecho()

This commit is contained in:
phyto 2019-05-20 18:57:09 +02:00
parent e0dcbebd30
commit 32379c5441
2 changed files with 6 additions and 4 deletions

View File

@ -52,6 +52,7 @@ for (idx=0; idx<nbloops; idx++) {
else if (0x14==key) { /* request for terminal */ else if (0x14==key) { /* request for terminal */
foo = run_the_terminal(sfd, " terminal ", 0); foo = run_the_terminal(sfd, " terminal ", 0);
putbyte(sfd, 'x'); putbyte(sfd, '\n');
sprintf(ligne, "retour terminal = %d", foo); sprintf(ligne, "retour terminal = %d", foo);
aff_message(ligne); sleep(1); aff_message(ligne); sleep(1);
} }

View File

@ -88,7 +88,9 @@ do {
/*** 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(); noecho();
received = wgetch(glass);
echo();
#if DEBUG_LEVEL > 1 #if DEBUG_LEVEL > 1
sprintf(ligne, " got $%X\n", received); sprintf(ligne, " got $%X\n", received);
@ -123,9 +125,8 @@ int foo;
// unsigned char byte; // unsigned char byte;
int fd_stdin; int fd_stdin;
lin_term = col_term = 4; /* position */ lin_term = 4; col_term = 9; /* position */
wid_term = 60; wid_term = 60; hei_term = 25; /* dimensions */
hei_term = 25;
fd_stdin = fileno(stdin); /* for select or pool */ fd_stdin = fileno(stdin); /* for select or pool */