1/* 2 Title: polystub.c 3 4 Copyright (c) 2006, 2015 David C.J. Matthews 5 6 This library is free software; you can redistribute it and/or 7 modify it under the terms of the GNU Lesser General Public 8 License version 2.1 as published by the Free Software Foundation. 9 10 This library is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 Lesser General Public License for more details. 14 15 You should have received a copy of the GNU Lesser General Public 16 License along with this library; if not, write to the Free Software 17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18*/ 19 20// This is the start-up function for Poly/ML. It simply picks up the 21// pointer to the exported data and calls the main program. 22 23#ifdef HAVE_CONFIG_H 24#include "config.h" 25#elif defined(_WIN32) 26#include "winconfig.h" 27#else 28#error "No configuration file" 29#endif 30 31#include "../polyexports.h" 32 33#if (defined(_WIN32) && ! defined(__CYGWIN__)) 34int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 35{ 36 return PolyWinMain(hInstance, hPrevInstance, lpCmdLine, nCmdShow, &poly_exports); 37} 38 39#else 40int main(int argc, char *argv[]) 41{ 42 return polymain(argc, argv, &poly_exports); 43} 44 45#endif 46 47