This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch master
in repository legacy-imlib2.

View the commit online.

commit 66fb3ccd88b9a44fd197d2f357aed7289affafc4
Author: Kim Woelders <k...@woelders.dk>
AuthorDate: Sat Oct 5 16:56:13 2024 +0200

    test: Colorize Skip message
    
    Now similar to other progress messages.
---
 test/test.cpp | 31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/test/test.cpp b/test/test.cpp
index 2048f2a..86a0220 100644
--- a/test/test.cpp
+++ b/test/test.cpp
@@ -45,23 +45,38 @@ main(int argc, char **argv)
 #define COL_WHT  "\x1B[37m"
 
 #include <stdarg.h>
-void
-pr_info(const char *fmt, ...)
+static void
+_pr_text(const char *col, const char *fmt, va_list args)
 {
     char            fmtx[1024];
-    va_list         args;
-
-    va_start(args, fmt);
 
     if (ttyout)
-        snprintf(fmtx, sizeof(fmtx), COL_YEL "[          ] -  %s%s\n",
-                 fmt, COL_RST);
+        snprintf(fmtx, sizeof(fmtx), "%s[          ] -  %s%s\n",
+                 col, fmt, COL_RST);
     else
         snprintf(fmtx, sizeof(fmtx), "[          ] -  %s\n", fmt);
     fmt = fmtx;
 
     vprintf(fmt, args);
+}
 
+static void
+pr_text(const char *col, const char *fmt, ...)
+{
+    va_list         args;
+
+    va_start(args, fmt);
+    _pr_text(col, fmt, args);
+    va_end(args);
+}
+
+void
+pr_info(const char *fmt, ...)
+{
+    va_list         args;
+
+    va_start(args, fmt);
+    _pr_text(COL_YEL, fmt, args);
     va_end(args);
 }
 
@@ -114,7 +129,7 @@ file_skip(const char *file)
     {
         if (strstr(file, skiplist[i]))
         {
-            printf("skip c %s\n", file);
+            pr_text(COL_MAG, "Skip '%s'", file);
             return true;
         }
     }

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to