mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Improve printed output
Get rid of inconsistencies in the printed output (error printing, colors, etc.). Prepare for user configurable color. Cleanup.
This commit is contained in:
parent
5efd519d2e
commit
b6eac3f001
8 changed files with 122 additions and 66 deletions
16
src/error.c
16
src/error.c
|
|
@ -32,10 +32,14 @@ char error[2][1000];
|
|||
|
||||
void error_exit(void)
|
||||
{
|
||||
/* Always print errors but only print silent errors when in no autoconnect
|
||||
* mode */
|
||||
if (error[0][0] != 0)
|
||||
printf("\rError: %s\r\n", error[0]);
|
||||
else if ((error[1][0] != 0) && (option.no_autoconnect))
|
||||
printf("\rError: %s\r\n", error[1]);
|
||||
if (error[0][0] != 0)
|
||||
{
|
||||
/* Print error */
|
||||
tio_printf("Error: %s", error[0]);
|
||||
}
|
||||
else if ((error[1][0] != 0) && (option.no_autoconnect))
|
||||
{
|
||||
/* Print silent error */
|
||||
tio_printf("Error: %s", error[1]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue