From 722c3060524626d1f57489fc5f5dca4ebb498964 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 20 Jun 2010 17:30:31 +0000 Subject: [PATCH] 2010-06-20 19:29 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/vm/cmdarg.c * src/vm/fm.c * src/nortl/nortl.c * src/rtl/fmhb.c * include/hbapi.h + hb_xquery() return value changed from HB_ULONG to HB_SIZE. Also fixes all msvc64 warnings --- harbour/ChangeLog | 9 +++++++++ harbour/include/hbapi.h | 2 +- harbour/src/nortl/nortl.c | 4 ++-- harbour/src/rtl/fmhb.c | 2 +- harbour/src/vm/cmdarg.c | 4 ++-- harbour/src/vm/fm.c | 4 ++-- 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a3609d8e14..96af5e7e19 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,15 @@ The license applies to all entries newer than 2009-04-28. */ +2010-06-20 19:29 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * src/vm/cmdarg.c + * src/vm/fm.c + * src/nortl/nortl.c + * src/rtl/fmhb.c + * include/hbapi.h + + hb_xquery() return value changed from HB_ULONG to HB_SIZE. + Also fixes all msvc64 warnings + 2010-06-20 19:16 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * src/vm/macro.c * src/vm/estack.c diff --git a/harbour/include/hbapi.h b/harbour/include/hbapi.h index 9a30de411a..85c450a1cf 100644 --- a/harbour/include/hbapi.h +++ b/harbour/include/hbapi.h @@ -491,7 +491,7 @@ extern HB_EXPORT void * hb_xgrab( HB_SIZE ulSize ) HB_MALLOC_ATTR HB_ALLOC_SIZ extern HB_EXPORT void hb_xfree( void * pMem ); /* frees memory */ extern HB_EXPORT void * hb_xrealloc( void * pMem, HB_SIZE ulSize ) HB_ALLOC_SIZE_ATTR( 2 ); /* reallocates memory */ extern HB_EXPORT HB_SIZE hb_xsize( void * pMem ); /* returns the size of an allocated memory block */ -extern HB_EXPORT HB_ULONG hb_xquery( int iMode ); /* Query different types of memory information */ +extern HB_EXPORT HB_SIZE hb_xquery( int iMode ); /* Query different types of memory information */ extern HB_EXPORT HB_BOOL hb_xtraced( void ); extern HB_EXPORT void hb_xsetfilename( const char * szValue ); extern HB_EXPORT void hb_xsetinfo( const char * szValue ); diff --git a/harbour/src/nortl/nortl.c b/harbour/src/nortl/nortl.c index efe1dfbd9d..2170092c50 100644 --- a/harbour/src/nortl/nortl.c +++ b/harbour/src/nortl/nortl.c @@ -226,9 +226,9 @@ void hb_xfree( void * pMem ) /* frees fixed memory */ hb_errInternal( HB_EI_XFREENULL, "hb_xfree called with a NULL pointer", NULL, NULL ); } -HB_ULONG hb_xquery( int iMode ) +HB_SIZE hb_xquery( int iMode ) { - HB_ULONG ulResult = 0; + HB_SIZE ulResult = 0; #ifdef HB_FM_STATISTICS switch( iMode ) diff --git a/harbour/src/rtl/fmhb.c b/harbour/src/rtl/fmhb.c index 3bad9aed4a..9e4ae304d9 100644 --- a/harbour/src/rtl/fmhb.c +++ b/harbour/src/rtl/fmhb.c @@ -54,5 +54,5 @@ HB_FUNC( MEMORY ) { - hb_retnint( hb_xquery( hb_parni( 1 ) ) ); + hb_retns( hb_xquery( hb_parni( 1 ) ) ); } diff --git a/harbour/src/vm/cmdarg.c b/harbour/src/vm/cmdarg.c index 6864cf5e20..88bced677c 100644 --- a/harbour/src/vm/cmdarg.c +++ b/harbour/src/vm/cmdarg.c @@ -507,9 +507,9 @@ HB_ULONG hb_cmdargProcessVM( int *pCancelKey, int *pCancelKeyEx ) { char buffer[ 128 ]; #if defined( HB_CLP_STRICT ) - hb_snprintf( buffer, sizeof( buffer ), "DS avail=%luKB OS avail=%luKB EMM avail=%luKB", hb_xquery( HB_MEM_BLOCK ), hb_xquery( HB_MEM_VM ), hb_xquery( HB_MEM_EMS ) ); + hb_snprintf( buffer, sizeof( buffer ), "DS avail=%" HB_PFS "uKB OS avail=%" HB_PFS "uKB EMM avail=%" HB_PFS "uKB", hb_xquery( HB_MEM_BLOCK ), hb_xquery( HB_MEM_VM ), hb_xquery( HB_MEM_EMS ) ); #else - hb_snprintf( buffer, sizeof( buffer ), "DS avail=%luKB OS avail=%luKB EMM avail=%luKB MemStat:%s MT:%s", hb_xquery( HB_MEM_BLOCK ), hb_xquery( HB_MEM_VM ), hb_xquery( HB_MEM_EMS ), hb_xquery( HB_MEM_USEDMAX ) ? "On" : "Off", hb_vmIsMt() ? "On" : "Off" ); + hb_snprintf( buffer, sizeof( buffer ), "DS avail=%" HB_PFS "uKB OS avail=%" HB_PFS "uKB EMM avail=%" HB_PFS "uKB MemStat:%s MT:%s", hb_xquery( HB_MEM_BLOCK ), hb_xquery( HB_MEM_VM ), hb_xquery( HB_MEM_EMS ), hb_xquery( HB_MEM_USEDMAX ) ? "On" : "Off", hb_vmIsMt() ? "On" : "Off" ); #endif hb_conOutErr( buffer, 0 ); hb_conOutErr( hb_conNewLine(), 0 ); diff --git a/harbour/src/vm/fm.c b/harbour/src/vm/fm.c index bd4593bf32..03d2d96f5e 100644 --- a/harbour/src/vm/fm.c +++ b/harbour/src/vm/fm.c @@ -1206,9 +1206,9 @@ void hb_xexit( void ) /* Deinitialize fixed memory subsystem */ #endif -HB_ULONG hb_xquery( int iMode ) +HB_SIZE hb_xquery( int iMode ) { - HB_ULONG ulResult; + HB_SIZE ulResult; HB_TRACE(HB_TR_DEBUG, ("hb_xquery(%d)", iMode));