2008-06-01 23:56 UTC+0100 Viktor Szakats (harbour.01 syenar hu)

* include/hbvm.h
   * source/vm/hvm.c
   * source/vm/extrap.c
     ! Fixed OS/2 problem reported by David.
       (BTW, do we need really need to remove the exception 
       handler before exiting? If yes, shouldn't we do the 
       same under Win32?)

   * source/common/hbstr.c
     ! Silenced one 'loss of significant digit' BCC warning.
This commit is contained in:
Viktor Szakats
2008-06-01 22:06:51 +00:00
parent 2924944bd2
commit c85b65ba18
5 changed files with 29 additions and 7 deletions

View File

@@ -8,6 +8,18 @@
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2008-06-01 23:56 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* include/hbvm.h
* source/vm/hvm.c
* source/vm/extrap.c
! Fixed OS/2 problem reported by David.
(BTW, do we need really need to remove the exception
handler before exiting? If yes, shouldn't we do the
same under Win32?)
* source/common/hbstr.c
! Silenced one 'loss of significant digit' BCC warning.
2008-06-01 17:35 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* contrib/hbsqlit3/hbsqlit3.c
- Not needed to #include "sqlite3/sqlite3.h"

View File

@@ -100,6 +100,7 @@ extern HB_EXPORT PHB_SYMB hb_vmProcessSymbolsEx( PHB_SYMB pSymbols, USHORT uiSym
#endif
extern void hb_vmSetExceptionHandler( void );
extern void hb_vmUnsetExceptionHandler( void );
extern HB_EXPORT void hb_vmSymbolInit_RT( void ); /* initialization of runtime support symbols */

View File

@@ -554,7 +554,7 @@ static BOOL hb_str2number( BOOL fPCode, const char* szNum, ULONG ulLen, HB_LONG
int iLimC;
lLimV = HB_LONG_MAX / 10;
iLimC = HB_LONG_MAX % 10;
iLimC = ( int ) ( HB_LONG_MAX % 10 );
iWidth = ulPos;

View File

@@ -164,9 +164,21 @@ void hb_vmSetExceptionHandler( void )
RegRec.ExceptionHandler = ( ERR ) hb_os2ExceptionHandler;
rc = DosSetExceptionHandler( &RegRec );
if( rc != NO_ERROR )
{
hb_errInternal( HB_EI_ERRUNRECOV, "Unable to setup exception handler (DosSetExceptionHandler())", NULL, NULL );
}
}
#endif
}
void hb_vmUnsetExceptionHandler( void )
{
#if defined(HB_OS_OS2) /* Add OS2TermHandler to this thread's chain of exception handlers */
{
EXCEPTIONREGISTRATIONRECORD RegRec; /* Exception Registration Record */
APIRET rc; /* Return code */
/* I don't do any check on return code since harbour is exiting in any case */
rc = DosUnsetExceptionHandler( &RegRec );
HB_SYMBOL_UNUSED( rc );
}
#endif
}

View File

@@ -490,10 +490,7 @@ HB_EXPORT void hb_vmInit( BOOL bStartMainProc )
hb_vmDo( iArgCount ); /* invoke it with number of supplied parameters */
}
#if defined(HB_OS_OS2)
/* I don't do any check on return code since harbour is exiting in any case */
rc = DosUnsetExceptionHandler( &RegRec );
#endif
hb_vmUnsetExceptionHandler();
}
HB_EXPORT int hb_vmQuit( void )