From 89ef8836260308f7110ec8b31a38a93fbed855a8 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 23 Jun 2010 10:00:00 +0000 Subject: [PATCH] 2010-06-23 11:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * include/hbdefs.h + Added new abstract type: HB_RECNO. To replace HB_ULONG usage where it means record number. * src/vm/hvm.c * src/vm/cmdarg.c * include/hbapi.h * include/hbvm.h * HB_ULONG -> HB_U32 for VM flags. --- harbour/ChangeLog | 13 ++++++++++++- harbour/include/hbapi.h | 2 +- harbour/include/hbdefs.h | 3 +++ harbour/include/hbvm.h | 6 +++--- harbour/src/vm/cmdarg.c | 4 ++-- harbour/src/vm/hvm.c | 14 +++++++------- 6 files changed, 28 insertions(+), 14 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7d1a1d4474..a3cf0ae5fb 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,17 @@ The license applies to all entries newer than 2009-04-28. */ +2010-06-23 11:59 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * include/hbdefs.h + + Added new abstract type: HB_RECNO. + To replace HB_ULONG usage where it means record number. + + * src/vm/hvm.c + * src/vm/cmdarg.c + * include/hbapi.h + * include/hbvm.h + * HB_ULONG -> HB_U32 for VM flags. + 2010-06-22 19:30 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/THbQtUI.prg + Started: .ui => .uic ( auto ) => .prg. @@ -26,7 +37,7 @@ * contrib/hbide/ideedit.prg * contrib/hbide/idefindreplace.prg - % Fixed: slowness caused in selection process when many + % Fixed: slowness caused in selection process when many lines were being selected. Now there is no overhead. Thanks to Itamar for reporting. diff --git a/harbour/include/hbapi.h b/harbour/include/hbapi.h index 68c5ee7918..d9a607ecf3 100644 --- a/harbour/include/hbapi.h +++ b/harbour/include/hbapi.h @@ -1024,7 +1024,7 @@ extern HB_BOOL hb_cmdargIsInternal( const char * szArg, int * piLen ); /* extern HB_BOOL hb_cmdargCheck( const char * pszName ); /* Check if a given internal switch (like //INFO) was set */ extern char * hb_cmdargString( const char * pszName ); /* Returns the string value of an internal switch (like //TEMPPATH:"C:\") */ extern int hb_cmdargNum( const char * pszName ); /* Returns the numeric value of an internal switch (like //F:90) */ -extern HB_ULONG hb_cmdargProcessVM( int*, int* ); /* Check for command line internal arguments */ +extern HB_U32 hb_cmdargProcessVM( int * pCancelKey, int * pCancelKeyEx ); /* Check for command line internal arguments */ #if defined( HB_OS_WIN ) extern HB_EXPORT HB_BOOL hb_winmainArgGet( void * phInstance, void * phPrevInstance, int * piCmdShow ); /* Retrieve WinMain() parameters */ #endif diff --git a/harbour/include/hbdefs.h b/harbour/include/hbdefs.h index 644a54638d..cd827da942 100644 --- a/harbour/include/hbdefs.h +++ b/harbour/include/hbdefs.h @@ -255,6 +255,9 @@ typedef unsigned int HB_UINT; typedef HB_LONG HB_ISIZ; /* TODO: Change to HB_SIZE, after HB_SIZE has been converted to signed type. TEMPORARY type. */ #endif +/* Harbour abstract types */ +typedef HB_RECNO HB_ULONG; + /* Convenience */ typedef HB_UCHAR HB_BYTE; diff --git a/harbour/include/hbvm.h b/harbour/include/hbvm.h index d57570bf59..8a0811ff70 100644 --- a/harbour/include/hbvm.h +++ b/harbour/include/hbvm.h @@ -192,9 +192,9 @@ extern HB_EXPORT void * hb_vmThreadState( void ); /* various flags for supported features */ #define HB_VMFLAG_HARBOUR 1 /* enable Harbour extension */ #define HB_VMFLAG_ARRSTR 16 /* support for string as array of bytes -ks */ -extern HB_EXPORT HB_ULONG hb_vmFlagEnabled( HB_ULONG flags ); -extern HB_EXPORT void hb_vmFlagSet( HB_ULONG flags ); -extern HB_EXPORT void hb_vmFlagClear( HB_ULONG flags ); +extern HB_EXPORT HB_U32 hb_vmFlagEnabled( HB_U32 flags ); +extern HB_EXPORT void hb_vmFlagSet( HB_U32 flags ); +extern HB_EXPORT void hb_vmFlagClear( HB_U32 flags ); HB_EXTERN_END diff --git a/harbour/src/vm/cmdarg.c b/harbour/src/vm/cmdarg.c index 88bced677c..03e6d0464f 100644 --- a/harbour/src/vm/cmdarg.c +++ b/harbour/src/vm/cmdarg.c @@ -483,10 +483,10 @@ HB_FUNC( HB_CMDLINE ) } /* Check for command line internal arguments */ -HB_ULONG hb_cmdargProcessVM( int *pCancelKey, int *pCancelKeyEx ) +HB_U32 hb_cmdargProcessVM( int * pCancelKey, int * pCancelKeyEx ) { char * cFlags; - HB_ULONG ulFlags = HB_VMFLAG_HARBOUR; + HB_U32 ulFlags = HB_VMFLAG_HARBOUR; if( hb_cmdargCheck( "INFO" ) ) { diff --git a/harbour/src/vm/hvm.c b/harbour/src/vm/hvm.c index 186abf70d2..c31aad4e71 100644 --- a/harbour/src/vm/hvm.c +++ b/harbour/src/vm/hvm.c @@ -276,14 +276,14 @@ static void * s_main_thread = NULL; /* Various compatibility flags */ -static HB_ULONG s_VMFlags = HB_VMFLAG_HARBOUR; +static HB_U32 s_VMFlags = HB_VMFLAG_HARBOUR; #undef hb_vmFlagEnabled -#define hb_vmFlagEnabled(flag) (s_VMFlags & (flag)) +#define hb_vmFlagEnabled( flag ) ( s_VMFlags & ( flag ) ) /* Keycodes to stop virtual machine */ -static int s_VMCancelKey = K_ALT_C; -static int s_VMCancelKeyEx = HB_K_ALT_C; +static int s_VMCancelKey = K_ALT_C; +static int s_VMCancelKeyEx = HB_K_ALT_C; /* SEQUENCE envelope items position from stack top active */ @@ -11464,17 +11464,17 @@ void hb_xvmWithObjectMessage( PHB_SYMB pSymbol ) #undef hb_vmFlagEnabled -HB_ULONG hb_vmFlagEnabled( HB_ULONG flags ) +HB_U32 hb_vmFlagEnabled( HB_U32 flags ) { return s_VMFlags & flags; } -void hb_vmFlagSet( HB_ULONG flags ) +void hb_vmFlagSet( HB_U32 flags ) { s_VMFlags |= flags; } -void hb_vmFlagClear( HB_ULONG flags ) +void hb_vmFlagClear( HB_U32 flags ) { s_VMFlags &= ~flags; }