summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Fl_arg.cxx17
-rw-r--r--src/fl_utf8.cxx1
-rw-r--r--test/file_chooser.cxx3
3 files changed, 13 insertions, 8 deletions
diff --git a/src/Fl_arg.cxx b/src/Fl_arg.cxx
index a013f1706..5928fac6a 100644
--- a/src/Fl_arg.cxx
+++ b/src/Fl_arg.cxx
@@ -175,19 +175,14 @@ int Fl::arg(int argc, char **argv, int &i) {
Fl_Tooltip::disable();
i++;
return 1;
- }
#ifdef __APPLE__
- // The Finder application in MacOS X passes the "-psn_N_NNNNN" option
- // to all apps...
- else if (strcmp(s, "NSDocumentRevisionsDebugMode") == 0) {
- i++;
- if (argv[i]) i++;
- return 1;
+ // The Finder application in MacOS X passes the "-psn_N_NNNNN" option
+ // to all apps...
} else if (strncmp(s, "psn_", 4) == 0) {
i++;
return 1;
- }
#endif // __APPLE__
+ }
const char *v = argv[i+1];
if (i >= argc-1 || !v)
@@ -205,6 +200,12 @@ int Fl::arg(int argc, char **argv, int &i) {
Fl::display(v);
#endif
+#ifdef __APPLE__
+ // Xcode in MacOS X may pass "-NSDocumentRevisionsDebugMode YES"
+ } else if (strcmp(s, "NSDocumentRevisionsDebugMode") == 0) {
+ // nothing to do
+#endif // __APPLE__
+
} else if (fl_match(s, "title", 2)) {
title = v;
diff --git a/src/fl_utf8.cxx b/src/fl_utf8.cxx
index be77bb3fc..3dc7a0557 100644
--- a/src/fl_utf8.cxx
+++ b/src/fl_utf8.cxx
@@ -724,6 +724,7 @@ int fl_stat(const char* f, struct stat *b) {
} // fl_stat()
+// TODO: add fl_chdir if we have fl_getcwd
/** Cross-platform function to get the current working directory
as a UTF-8 encoded value.
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]);