summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2020-06-19 08:59:48 -0700
committerGreg Ercolano <erco@seriss.com>2020-06-19 08:59:48 -0700
commit0dc16dd8c9478743645aeab6fe6fd7972e263561 (patch)
treedac3a5c2c5bd75564c58046fe25874f4d3dc67b9
parentdb07cea7580fbe6a92a62c9045e8877827d73d61 (diff)
Added fluid command line '-d' debug flag
-rw-r--r--fluid/fluid.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx
index 78c236755..8db15bfca 100644
--- a/fluid/fluid.cxx
+++ b/fluid/fluid.cxx
@@ -1699,6 +1699,7 @@ void set_modflag(int mf) {
////////////////////////////////////////////////////////////////
static int arg(int argc, char** argv, int& i) {
+ if (argv[i][1] == 'd' && !argv[i][2]) {G_debug=1; i++; return 1;}
if (argv[i][1] == 'u' && !argv[i][2]) {update_file++; batch_mode++; i++; return 1;}
if (argv[i][1] == 'c' && !argv[i][2]) {compile_file++; batch_mode++; i++; return 1;}
if (argv[i][1] == 'c' && argv[i][2] == 's' && !argv[i][3]) {compile_file++; compile_strings++; batch_mode++; i++; return 1;}
@@ -1756,7 +1757,8 @@ int main(int argc,char **argv) {
" -c : write .cxx and .h and exit\n"
" -cs : write .cxx and .h and strings and exit\n"
" -o <name> : .cxx output filename, or extension if <name> starts with '.'\n"
- " -h <name> : .h 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";
int len = (int)(strlen(msg) + strlen(argv[0]?argv[0]:"fluid") + strlen(Fl::help));
Fl_Plugin_Manager pm("commandline");
int i, n = pm.plugins();