diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2016-02-01 23:39:07 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2016-02-01 23:39:07 +0000 |
| commit | 6f49c3e4198ccb420da0fee755874207546b8bcc (patch) | |
| tree | 08e7692c1fa8bfb304e22b93c5c4ef014a7e2404 /test | |
| parent | 6e16d033aefffab71e2674143bbb722bf43df7c0 (diff) | |
Clean up fl_args for OS X.
Xcode and OS X have the annoying habit of adding the process number and debug information on the command line if an an app is inside a bundle. This is a little cleanup that I thought was useful while going through the code. A better solution would be to remove those system specific arguments from the argc/argv list entirely, as they appear totally unexpected for most developers.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11111 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test')
| -rw-r--r-- | test/file_chooser.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/file_chooser.cxx b/test/file_chooser.cxx index 9e5427b3c..f7d2ec404 100644 --- a/test/file_chooser.cxx +++ b/test/file_chooser.cxx @@ -106,8 +106,11 @@ main(int argc, // I - Number of command-line arguments 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 if (argc > argn) filter->value(argv[argn]); |
