DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2510
Version: 1.3-current


Attached file "fluid-help-dialog.patch"...


Link: http://www.fltk.org/str.php?L2510
Version: 1.3-current
Index: fluid.cxx
===================================================================
--- fluid.cxx   (revision 8176)
+++ fluid.cxx   (working copy)
@@ -2293,27 +2293,35 @@
 }
 #endif
 
+int usage(const char *self) {
+  char out[8192];              // more than 4x a full 80x25 screen
+  sprintf(out,
+    "usage: %s <switches> name.fl\n"
+    " -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", self);
+  Fl_Plugin_Manager pm("commandline");
+  int i, n = pm.plugins();
+  for (i=0; i<n; i++) {
+    Fl_Commandline_Plugin *pi = (Fl_Commandline_Plugin*)pm.plugin(i);
+    if (pi) strcat(out, pi->help());
+  }
+  strcat(out, Fl::help);
+#ifdef WIN32
+  fl_message("%s", out);
+#else
+  fprintf(stderr, "%s", out);
+#endif
+  return 0;
+}
 
 int main(int argc,char **argv) {
   int i = 1;
   
-  if (!Fl::args(argc,argv,i,arg) || i < argc-1) {
-    fprintf(stderr,
-"usage: %s <switches> name.fl\n"
-" -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"
-            , argv[0]);
-    Fl_Plugin_Manager pm("commandline");
-    int i, n = pm.plugins();
-    for (i=0; i<n; i++) {
-      Fl_Commandline_Plugin *pi = (Fl_Commandline_Plugin*)pm.plugin(i);
-      if (pi) puts(pi->help());
-    }
-    fprintf(stderr, "%s\n", Fl::help);
-    return 1;
-  }
+  if (!Fl::args(argc,argv,i,arg) || i < argc-1)
+    return(usage(argv[0]));
+
   if (exit_early)
     exit(0);
   
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to