[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master 72a8d6521 1/2: * src/tools/apinames.c (panic): Accept
From: |
Werner Lemberg |
Subject: |
[freetype2] master 72a8d6521 1/2: * src/tools/apinames.c (panic): Accept variable number of arguments. |
Date: |
Tue, 7 Mar 2023 01:49:01 -0500 (EST) |
branch: master
commit 72a8d652187b8bb82d7cee3abc63c9ac66909ffe
Author: Werner Lemberg <wl@gnu.org>
Commit: Werner Lemberg <wl@gnu.org>
* src/tools/apinames.c (panic): Accept variable number of arguments.
---
src/tools/apinames.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/tools/apinames.c b/src/tools/apinames.c
index 8a8b0822b..e1b085172 100644
--- a/src/tools/apinames.c
+++ b/src/tools/apinames.c
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <stdarg.h>
#include <string.h>
#include <ctype.h>
@@ -41,9 +42,20 @@ typedef enum OutputFormat_
static void
-panic( const char* message )
+panic( const char* fmt,
+ ... )
{
- fprintf( stderr, "PANIC: %s\n", message );
+ va_list ap;
+
+
+ fprintf( stderr, "PANIC: " );
+
+ va_start( ap, fmt );
+ vfprintf( stderr, fmt, ap );
+ va_end( ap );
+
+ fprintf( stderr, "\n" );
+
exit(2);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master 72a8d6521 1/2: * src/tools/apinames.c (panic): Accept variable number of arguments.,
Werner Lemberg <=