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
This commit is contained in:
Manolo Gouy 2016-10-06 08:55:22 +00:00
parent c48dfb94cd
commit a80ce48339

View File

@ -103,15 +103,11 @@ main(int argc, // I - Number of command-line arguments
window = new Fl_Double_Window(400, 215, "File Chooser Test"); window = new Fl_Double_Window(400, 215, "File Chooser Test");
filter = new Fl_Input(50, 10, 315, 25, "Filter:"); filter = new Fl_Input(50, 10, 315, 25, "Filter:");
// Process standard arguments and find filter argument if present
int argn = 1; int argn = 1;
#ifdef __APPLE__ while (argn < argc) {
// OS X may add the process number as the first argument - ignore if (Fl::arg(argc, argv, argn) == 0) break;
// 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) if (argc > argn)
filter->value(argv[argn]); filter->value(argv[argn]);
else else