mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Merge pull request #22 from jwilk/error-handling
Added missing \r\n to warning messages
This commit is contained in:
commit
c1e1ffa1c2
1 changed files with 3 additions and 3 deletions
|
|
@ -79,7 +79,7 @@ void wait_for_tty_device(void)
|
||||||
/* Read one character */
|
/* Read one character */
|
||||||
status = read(STDIN_FILENO, &c_stdin[0], 1);
|
status = read(STDIN_FILENO, &c_stdin[0], 1);
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
printf("Warning: Could not read from stdin\n");
|
printf("Warning: Could not read from stdin\r\n");
|
||||||
|
|
||||||
/* Exit upon ctrl-t + q sequence */
|
/* Exit upon ctrl-t + q sequence */
|
||||||
c_stdin[2] = c_stdin[1];
|
c_stdin[2] = c_stdin[1];
|
||||||
|
|
@ -242,7 +242,7 @@ int connect_tty(void)
|
||||||
/* Input from stdin ready */
|
/* Input from stdin ready */
|
||||||
status = read(STDIN_FILENO, &c_stdin[0], 1);
|
status = read(STDIN_FILENO, &c_stdin[0], 1);
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
printf("Warning: Could not read from stdin");
|
printf("Warning: Could not read from stdin\r\n");
|
||||||
|
|
||||||
if ((c_stdin[0] != KEY_Q) && (c_stdin[0] != KEY_CTRL_T))
|
if ((c_stdin[0] != KEY_Q) && (c_stdin[0] != KEY_CTRL_T))
|
||||||
tainted = true;
|
tainted = true;
|
||||||
|
|
@ -260,7 +260,7 @@ int connect_tty(void)
|
||||||
/* Forward input to tty device */
|
/* Forward input to tty device */
|
||||||
status = write(fd, &c_stdin[0], 1);
|
status = write(fd, &c_stdin[0], 1);
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
printf("Warning: Could not write to tty device");
|
printf("Warning: Could not write to tty device\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write to log */
|
/* Write to log */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue