diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ecbf12615c..3901f75c15 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,13 @@ +19991007-01:16 GMT+1 Victor Szel + + source/vm/main.c (added) + source/vm/Makefile + include/hbsetup.h + + main.c added as an includer for mainwin.c or mainstd.c, selectable + via #defines in hbsetup.h, or via command line, just like the GTAPI + and MOUSEAPI selection. Can be used from all build systems. + * source/rtl/memoline.c + ! Small formatting fix. + 19991006-18:55 EDT Paul Tucker * makefile.vc * corrected creation of hbrun.exe diff --git a/harbour/include/hbsetup.h b/harbour/include/hbsetup.h index 8c6655d76b..3a0dbfc5fa 100644 --- a/harbour/include/hbsetup.h +++ b/harbour/include/hbsetup.h @@ -120,6 +120,15 @@ */ /*#define HARBOUR_STRICT_CLIPPER_COMPATIBILITY*/ +/* *********************************************************************** + * You can select here, what type of main entry will be used in the + * application (main() or WinMain()). + * + * By default the standard C main() function will be used. +*/ +/*#define HARBOUR_MAIN_STD*/ +/*#define HARBOUR_MAIN_WIN*/ + /* *********************************************************************** * These symbols defines if we want to use the GT API (and which platform * to build the GT API for, if using the GNU Make System). diff --git a/harbour/source/rtl/memoline.c b/harbour/source/rtl/memoline.c index 5ff93a2345..b86a9e4f7e 100644 --- a/harbour/source/rtl/memoline.c +++ b/harbour/source/rtl/memoline.c @@ -134,7 +134,7 @@ HARBOUR HB_MEMOLINE( void ) if( ulLineNumber == ulLines ) { ULONG ulSpAdded = 0; - char * pszLine = (char *)hb_xgrab( ulLineLength ); + char * pszLine = ( char * ) hb_xgrab( ulLineLength ); memset( pszLine, ' ', ulLineLength ); diff --git a/harbour/source/vm/Makefile b/harbour/source/vm/Makefile index d5801a84fc..2302195d2c 100644 --- a/harbour/source/vm/Makefile +++ b/harbour/source/vm/Makefile @@ -10,7 +10,7 @@ C_SOURCES=\ dynsym.c \ hvm.c \ initsymb.c \ - mainstd.c \ + main.c \ LIB=vm diff --git a/harbour/source/vm/main.c b/harbour/source/vm/main.c new file mode 100644 index 0000000000..8083dc0952 --- /dev/null +++ b/harbour/source/vm/main.c @@ -0,0 +1,44 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * Main entry point selector file + * + * Copyright 1999 Victor Szel + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version, with one exception: + * + * The exception is that if you link the Harbour Runtime Library (HRL) + * and/or the Harbour Virtual Machine (HVM) with other files to produce + * an executable, this does not by itself cause the resulting executable + * to be covered by the GNU General Public License. Your use of that + * executable is in no way restricted on account of linking the HRL + * and/or HVM code into it. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit + * their web site at http://www.gnu.org/). + * + */ + +#include "hbsetup.h" + +#if defined(HARBOUR_MAIN_STD) + #include "mainstd.c" +#elif defined(HARBOUR_MAIN_WIN) + #include "mainwin.c" +#else + #include "mainstd.c" /* Use the standard ANSI C entry point if not speficied */ +#endif