FLTK logo

[master] be6e5fa - Fluid: Fix commandline parameter error message

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] be6e5fa - Fluid: Fix commandline parameter error message "Matthias Melcher" Nov 23, 2022  
 
commit be6e5fad7252a2c40a798b538510d9c0842be3fb
Author:     Matthias Melcher <github@matthiasm.com>
AuthorDate: Wed Nov 23 10:59:43 2022 +0100
Commit:     Matthias Melcher <github@matthiasm.com>
CommitDate: Wed Nov 23 10:59:43 2022 +0100

    Fluid: Fix commandline parameter error message

 fluid/fluid.cxx | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git fluid/fluid.cxx fluid/fluid.cxx
index 39c98ee..252353b 100644
--- fluid/fluid.cxx
+++ fluid/fluid.cxx
@@ -1943,10 +1943,15 @@ int main(int argc,char **argv) {
       " -o <name> : .cxx output filename, or extension if <name> starts with '.'\n"
       " -h <name> : .h output filename, or extension if <name> 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;
   }
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.