]> wimlib.net Git - wimlib/blobdiff - src/util.c
wimlib_vmsg(): fflush stderr
[wimlib] / src / util.c
index 5463c83af45748c07271ee50ec6c015e7d8f52ca..4733ba335644507b1cbd1039a6f8c0cb84290350 100644 (file)
@@ -158,6 +158,7 @@ wimlib_vmsg(const tchar *tag, const tchar *format,
                        tfprintf(stderr, T(": %"TS), buf);
                }
                tputc(T('\n'), stderr);
+               fflush(stderr);
                errno = errno_save;
 #ifndef DEBUG
        }
@@ -177,7 +178,7 @@ wimlib_error(const tchar *format, ...)
        va_list va;
 
        va_start(va, format);
-       wimlib_vmsg(T("[ERROR] "), format, va, false);
+       wimlib_vmsg(T("\r[ERROR] "), format, va, false);
        va_end(va);
 }
 
@@ -187,7 +188,7 @@ wimlib_error_with_errno(const tchar *format, ...)
        va_list va;
 
        va_start(va, format);
-       wimlib_vmsg(T("[ERROR] "), format, va, true);
+       wimlib_vmsg(T("\r[ERROR] "), format, va, true);
        va_end(va);
 }
 
@@ -197,7 +198,7 @@ wimlib_warning(const tchar *format, ...)
        va_list va;
 
        va_start(va, format);
-       wimlib_vmsg(T("[WARNING] "), format, va, false);
+       wimlib_vmsg(T("\r[WARNING] "), format, va, false);
        va_end(va);
 }
 
@@ -207,7 +208,7 @@ wimlib_warning_with_errno(const tchar *format, ...)
        va_list va;
 
        va_start(va, format);
-       wimlib_vmsg(T("[WARNING] "), format, va, true);
+       wimlib_vmsg(T("\r[WARNING] "), format, va, true);
        va_end(va);
 }
 
@@ -217,7 +218,6 @@ wimlib_warning_with_errno(const tchar *format, ...)
 void wimlib_debug(const tchar *file, int line, const char *func,
                  const tchar *format, ...)
 {
-
        va_list va;
        tchar buf[tstrlen(file) + strlen(func) + 30];