/*
- * tio - a simple TTY terminal I/O application
+ * tio - a simple TTY terminal I/O tool
*
- * Copyright (c) 2014-2017 Martin Lund
+ * Copyright (c) 2014-2022 Martin Lund
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include "tio/options.h"
-#include "tio/print.h"
-#include "tio/error.h"
+#include "options.h"
+#include "print.h"
+#include "error.h"
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]);
+ }
}