mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Cleanup of error handling
Introduced consistent way of handling errors and printing error messages. Also upgraded some warnings to errors.
This commit is contained in:
parent
4e2bcde010
commit
ad551b363e
6 changed files with 106 additions and 81 deletions
|
|
@ -25,11 +25,12 @@
|
|||
#include <errno.h>
|
||||
#include "tio/options.h"
|
||||
#include "tio/print.h"
|
||||
#include "tio/error.h"
|
||||
|
||||
char *error = "";
|
||||
char error[1000];
|
||||
|
||||
void error_exit(void)
|
||||
{
|
||||
if ((error[0] != 0) && (option.no_autoconnect))
|
||||
printf("Error: %s\n", error);
|
||||
printf("\rError: %s\r\n", error);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue