From ea845b95f8c706cc22f2fcb14bc9703d4946a605 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Fri, 7 Jan 2011 09:19:06 +0000 Subject: [PATCH] 2011-01-07 10:18 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/src/vm/cmdarg.c + added support for //F: application runtime switch in DOS and OS2 Open Watcom builds, code by Lorenzo Fiorini and Maurilio Longo borrowed from xHarbour. --- harbour/ChangeLog | 6 ++++++ harbour/src/vm/cmdarg.c | 13 +++++++++++++ 2 files changed, 19 insertions(+) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8856356141..b8742ac13f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2011-01-07 10:18 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/src/vm/cmdarg.c + + added support for //F: application runtime switch in DOS + and OS2 Open Watcom builds, code by Lorenzo Fiorini and Maurilio + Longo borrowed from xHarbour. + 2011-01-07 10:10 UTC+0200 Petr Chornyj (myorg63 at mail.ru) * contrib/hblzf/3rd/liblzf/lzf.h + Applied path from liblzf.dif diff --git a/harbour/src/vm/cmdarg.c b/harbour/src/vm/cmdarg.c index f59708ebb9..c88cb7e52c 100644 --- a/harbour/src/vm/cmdarg.c +++ b/harbour/src/vm/cmdarg.c @@ -516,6 +516,7 @@ HB_U32 hb_cmdargProcessVM( int * pCancelKey, int * pCancelKeyEx ) { char * cFlags; HB_U32 ulFlags = HB_VMFLAG_HARBOUR; + int iHandles; if( hb_cmdargCheck( "INFO" ) ) { @@ -548,6 +549,18 @@ HB_U32 hb_cmdargProcessVM( int * pCancelKey, int * pCancelKeyEx ) if( hb_cmdargCheck( "BUILD" ) ) hb_verBuildInfo(); + iHandles = hb_cmdargNum( "F" ); + if( iHandles > 20 ) + { + #if defined( __WATCOMC__ ) + #if defined(HB_OS_OS2) + DosSetMaxFH( iHandles ); + #elif defined(HB_OS_DOS) + _grow_handles( iHandles ); + #endif + #endif + } + if( ( cFlags = hb_cmdargString( "FLAGS" ) ) != NULL ) { int i = 0;