summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2012-04-21 11:13:10 +0000
committerMatthias Melcher <fltk@matthiasm.com>2012-04-21 11:13:10 +0000
commiteb9b58c7cc5ca2692e5020a5d441b7085b730d9d (patch)
treecac9c7308e2dfd3573f09de03606ffdcd500d256
parent8ec35982ee1d5bf07c4feb3737125b719708a0e5 (diff)
Fl::arg now removes a command line argument that is added by Xcode. This will help "Demo" to run again
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9365 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_arg.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Fl_arg.cxx b/src/Fl_arg.cxx
index 73d07fd61..9fcdd38cb 100644
--- a/src/Fl_arg.cxx
+++ b/src/Fl_arg.cxx
@@ -173,7 +173,11 @@ int Fl::arg(int argc, char **argv, int &i) {
#ifdef __APPLE__
// The Finder application in MacOS X passes the "-psn_N_NNNNN" option
// to all apps...
- else if (strncmp(s, "psn_", 4) == 0) {
+ else if (strcmp(s, "NSDocumentRevisionsDebugMode") == 0) {
+ i++;
+ if (argv[i]) i++;
+ return 1;
+ } else if (strncmp(s, "psn_", 4) == 0) {
i++;
return 1;
}