From a80ce48339952fc754aa6a95de6ba4ad64b73e68 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Thu, 6 Oct 2016 08:55:22 +0000 Subject: Make source code of test/file_chooser.cxx platform-independent. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12014 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- test/file_chooser.cxx | 12 ++++-------- 1 file 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 -- cgit v1.2.3