Skip to content
Snippets Groups Projects
Commit 25681f01 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

Better handling of '-psn_XXX' command line arg. from the Mac Finder
parent 091146c9
No related branches found
No related tags found
No related merge requests found
// $Id: CommandLine.cpp,v 1.49 2004-09-18 02:44:18 geuzaine Exp $ // $Id: CommandLine.cpp,v 1.50 2004-10-03 23:32:02 geuzaine Exp $
// //
// Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2004 C. Geuzaine, J.-F. Remacle
// //
...@@ -560,18 +560,19 @@ void Get_Options(int argc, char *argv[], int *nbfiles) ...@@ -560,18 +560,19 @@ void Get_Options(int argc, char *argv[], int *nbfiles)
} }
} }
#endif #endif
else {
#if defined(__APPLE__) #if defined(__APPLE__)
// The Mac Finder launches programs with special command line else if(!strncmp(argv[i] + 1, "psn", 3)) {
// arguments: just ignore them (and don't exit!) // The Mac Finder launches programs with a special command
fprintf(stderr, "Unknown option '%s'\n", argv[i]); // line argument of the form -psn_XXX: just ignore it silently
// (and don't exit!)
i++; i++;
#else }
#endif
else {
fprintf(stderr, "Unknown option '%s'\n", argv[i]); fprintf(stderr, "Unknown option '%s'\n", argv[i]);
CTX.terminal = 1; CTX.terminal = 1;
Print_Usage(argv[0]); Print_Usage(argv[0]);
exit(1); exit(1);
#endif
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment