Author: matt
Date: 2011-01-01 12:17:58 -0800 (Sat, 01 Jan 2011)
New Revision: 8164
Log:
OS X adds a -psn_... argument to command line calls. Ignore that.

Modified:
   branches/branch-1.3/test/file_chooser.cxx

Modified: branches/branch-1.3/test/file_chooser.cxx
===================================================================
--- branches/branch-1.3/test/file_chooser.cxx   2011-01-01 19:34:14 UTC (rev 
8163)
+++ branches/branch-1.3/test/file_chooser.cxx   2011-01-01 20:17:58 UTC (rev 
8164)
@@ -112,8 +112,14 @@
   window = new Fl_Double_Window(400, 215, "File Chooser Test");
 
   filter = new Fl_Input(50, 10, 315, 25, "Filter:");
-  if (argc > 1)
-    filter->value(argv[1]);
+  int argn = 1;
+#ifdef __APPLE__
+  // OS X may add the process number as the first argument - ignore
+  if (argc>argn && strncmp(argv[1], "-psn_", 5)==0)
+    argn++;
+#endif
+  if (argc > argn)
+    filter->value(argv[argn]);
   else
     filter->value("PDF Files (*.pdf)\t"
                   "PostScript Files (*.ps)\t"

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to