From be6e5fad7252a2c40a798b538510d9c0842be3fb Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Wed, 23 Nov 2022 10:59:43 +0100 Subject: [PATCH] Fluid: Fix commandline parameter error message --- fluid/fluid.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 39c98ee78..252353bb3 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -1943,10 +1943,15 @@ int main(int argc,char **argv) { " -o : .cxx output filename, or extension if starts with '.'\n" " -h : .h output filename, or extension if starts with '.'\n" " -d : enable internal debugging\n"; + const char *app_name = NULL; + if ( (argc > 0) && argv[0] && argv[0][0] ) + app_name = fl_filename_name(argv[0]); + if ( !app_name || !app_name[0]) + app_name = "fluid"; #ifdef _MSC_VER - fl_message("%s\n", msg); + fl_message(msg, app_name); #else - fprintf(stderr, "%s\n", msg); + fprintf(stderr, msg, app_name); #endif return 1; }