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 #include +#include #include #include @@ -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); }