X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Fmain.cpp;fp=source%2Fcore%2Fmain.cpp;h=0000000000000000000000000000000000000000;hp=fa28c1ffed271c2c6c03736d0bafcb71ad13841d;hb=609c9a508cfdc7b42c46c4f21d17639204165a00;hpb=b4806214e905752617691f851717033fd3f266c2 diff --git a/source/core/main.cpp b/source/core/main.cpp deleted file mode 100644 index fa28c1f..0000000 --- a/source/core/main.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#ifdef WIN32 -#include -#include -#include -#endif -#include "application.h" - -#ifdef WIN32 -using namespace std; -using namespace Msp; - -int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE /*hPrevInstance*/, LPSTR /*lpCmdLine*/, int /*nCmdShow*/) -{ - int argc = 0; - LPWSTR *argv_w = CommandLineToArgvW(GetCommandLineW(), &argc); - - unsigned max_size = 0; - for(int i=0; i(argv_buf); - char *argv_ptr = argv_buf+(argc+1)*sizeof(char *); - for(int i=0; i(argv_w[i]), wcslen(argv_w[i])*2); - arg = StringCodec::transcode(arg); - copy(arg.begin(), arg.end(), argv_ptr); - argv_ptr += arg.size(); - *argv_ptr++ = 0; - } - - LocalFree(argv_w); - int exit_code = Msp::Application::run(argc, argv, hInstance); - delete[] argv_buf; - return exit_code; -} - -#else -int main(int argc, char **argv) -{ - return Msp::Application::run(argc, argv); -} -#endif