]> git.tdb.fi Git - libs/core.git/blob - source/core/unix/main.cpp
Add a missing include
[libs/core.git] / source / core / unix / main.cpp
1 #include <cstring>
2 #include "application.h"
3
4 int main(int argc, char **argv)
5 {
6         void *data = 0;
7
8 #ifdef __APPLE__
9         /* Applications launched from Finder get a special argument, which would
10         interfere with GetOpt.  Remove it from argv but pass it as data so it can
11         be used to determine how the application was launhed. */
12         int j = 0;
13         for(int i=0; i<argc; ++i)
14         {
15                 if(!strncmp(argv[i], "-psn_", 5))
16                         data = argv[i];
17                 else
18                         argv[j++] = argv[i];
19         }
20         argc = j;
21         argv[j] = 0;
22 #endif
23
24         return Msp::Application::run(argc, argv, data);
25 }