diff options
| author | Manolo Gouy <Manolo> | 2016-10-06 08:55:22 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2016-10-06 08:55:22 +0000 |
| commit | a80ce48339952fc754aa6a95de6ba4ad64b73e68 (patch) | |
| tree | 2afd0ff58c2a6f8a5b65a64f5e03227e79109578 /test | |
| parent | c48dfb94cd536502f26e06995d541b1644734aea (diff) | |
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
Diffstat (limited to 'test')
| -rw-r--r-- | test/file_chooser.cxx | 12 |
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 |
