1
0
mirror of https://github.com/UzixLS/picocom.git synced 2025-07-19 07:21:18 +03:00

#73: for read stdin, changed naming to the same as for port read

This commit is contained in:
Joe Merten
2018-01-16 03:02:59 +01:00
parent 4845b66d99
commit a020a12f7a

View File

@ -275,6 +275,7 @@ struct tty_q {
.buff = NULL
};
#define STI_RD_SZ 128
#define TTY_RD_SZ 128
int tty_write_sz;
@ -1440,11 +1441,11 @@ loop(void)
if ( FD_ISSET(STI, &rdset) ) {
/* read from terminal */
char rx_buf[64];
char buff_rd[STI_RD_SZ];
int i;
do {
n = read(STI, rx_buf, sizeof(rx_buf));
n = read(STI, buff_rd, sizeof(buff_rd));
} while (n < 0 && errno == EINTR);
if (n == 0) {
stdin_closed = 1;
@ -1459,7 +1460,7 @@ loop(void)
}
for ( i = 0; i < n; i++ ) {
c = rx_buf[i];
c = buff_rd[i];
switch (state) {
case ST_COMMAND:
if ( c == opts.escape ) {