summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/file_chooser.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/file_chooser.cxx b/test/file_chooser.cxx
index f7d2ec404..f099b8c78 100644
--- a/test/file_chooser.cxx
+++ b/test/file_chooser.cxx
@@ -103,15 +103,11 @@ main(int argc, // I - Number of command-line arguments
window = new Fl_Double_Window(400, 215, "File Chooser Test");
filter = new Fl_Input(50, 10, 315, 25, "Filter:");
+ // Process standard arguments and find filter argument if present
int argn = 1;
-#ifdef __APPLE__
- // OS X may add the process number as the first argument - ignore
- // FIXME: Fl::args() should remove the Apple specific arguments form argc and argv
- if (argc>argn && strncmp(argv[1], "-psn_", 5)==0)
- argn++;
- if (argc>argn+1 && strcmp(argv[argn], "-NSDocumentRevisionsDebugMode") == 0)
- argn+=2;
-#endif
+ while (argn < argc) {
+ if (Fl::arg(argc, argv, argn) == 0) break;
+ }
if (argc > argn)
filter->value(argv[argn]);
else