]> git.sur5r.net Git - tio/blobdiff - src/error.c
New upstream version 1.34
[tio] / src / error.c
index b7624d848448b113d963bfca5997daf4e302d0c8..3090b351dab5d19b89bb3f4e44ee2ec4142e66e4 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * 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]);
+  }
 }