00001 /* 00002 Copyright (c) 2007-2009 Takashi Kitao 00003 All rights reserved. 00004 00005 Redistribution and use in source and binary forms, with or without 00006 modification, are permitted provided that the following conditions 00007 are met: 00008 00009 1. Redistributions of source code must retain the above copyright 00010 ` notice, this list of conditions and the following disclaimer. 00011 00012 2. Redistributions in binary form must reproduce the above copyright 00013 ` notice, this list of conditions and the following disclaimer in the 00014 ` documentation and/or other materials provided with the distribution. 00015 00016 3. The name of the author may not be used to endorse or promote products 00017 ` derived from this software without specific prior written permission. 00018 00019 THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 00020 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00021 OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00022 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 00023 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 00024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 00025 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 00026 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00027 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 00028 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00029 */ 00030 00031 00032 #ifndef POGOLYN_MAIN_H_ 00033 #define POGOLYN_MAIN_H_ 00034 00035 00036 #ifdef WIN32 00037 #include <windows.h> 00038 #endif 00039 00040 #include "pogolyn.h" 00041 00042 00043 #ifdef _MSC_VER 00044 #ifdef _DEBUG 00045 #pragma comment(lib, "pogolynd.lib") 00046 #else 00047 #pragma comment(lib, "pogolyn.lib") 00048 #endif 00049 #endif 00050 00051 00056 #ifdef WIN32 00057 #define pgMain() \ 00058 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) \ 00059 { \ 00060 pgSysMgr::setInitialDirectoryForSystem(__argc, __argv); \ 00061 \ 00062 extern void pgMain_(); \ 00063 pgMain_(); \ 00064 \ 00065 return 0; \ 00066 } \ 00067 void pgMain_() 00068 #else 00069 #define pgMain() \ 00070 int main(int argc, char* argv[]) \ 00071 { \ 00072 pgSysMgr::setInitialDirectoryForSystem(argc, argv); \ 00073 \ 00074 extern void pgMain_(); \ 00075 pgMain_(); \ 00076 \ 00077 return 0; \ 00078 } \ 00079 void pgMain_() 00080 #endif 00081 00082 00083 #endif // !POGOLYN_MAIN_H_
1.5.8