2010-11-17 21:11 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/include/hbpp.h
    ! removed repeated declaration of hb_pp_eof()

  * harbour/include/hbapicdp.h
  * harbour/include/hbapilng.h
  * harbour/include/hbgtcore.h
    * added extern declaration to HB_*_REQUEST() macros to pacify
      undeclared global functions warnings

  * harbour/include/hbstack.h
    ! added missing hb_stackDec() declaration

  * harbour/include/hbdefs.h
    ! added missing const in some endian macros
    * removed some unnecessary casting which may hide bugs
      in the code

  * harbour/include/hbapi.h
    ! removed repeated declaration of hb_strVal()

  * harbour/include/hbznet.h
    ! removed repeated declaration of hb_znetError()

  * harbour/include/hbcompdf.h
    * minor comment

  * harbour/src/vm/hvm.c
    ! added missing static to hb_vmTSVarClean() declaration
    * added extern hb_vmForceLink() declaration to pacify
      undeclared global functions warnings

  * harbour/src/vm/thread.c
    * make hb_threadInit() and hb_threadExit() internal HVM
      functions available only in MT mode

  * harbour/src/rtl/dates.c
    ! added missing static to hb_dateUnformatRaw() declaration

  * harbour/src/macro/macrolex.c
    * added extern hb_macro_yylex() declaration to pacify
      undeclared global functions warnings

  * harbour/src/rdd/workarea.c
    * added extern _hb_rddWorkAreaForceLink() declaration to pacify
      undeclared global functions warnings

  * harbour/src/compiler/complex.c
    * added extern hb_comp_yylex() declaration to pacify
      undeclared global functions warnings

  * harbour/contrib/hbnetio/netiocli.c
    ! added missing static to s_fileFlush() declaration

  * harbour/contrib/hbct/tempfile.prg
    ! respect in TmepFile() function default file attributes set by
      SetFCreate()

  * harbour/contrib/hbct/ctstrfil.h
    ! added missing declarations for ct_getfcreate() and ct_setfcreate()

  * harbour/contrib/hbwin/legacy.prg
    * removed dummy RETURN statement

  * harbour/contrib/xhb/fparse.c
    ! added missing static to hb_ParseLine() declaration

  * harbour/contrib/xhb/freadlin.c
    ! added missing static to hb_fsReadLine() declaration

  * harbour/contrib/xhb/txtline.c
    ! added missing static to hb_readLine() and hb_tabexpand() declarations
    ! fixed uninitialized variable warning exploited by above modification
      (static function was automatically inlined increasing optimizations)

  * harbour/contrib/xhb/hbserv.c
    ! removed repeated declaration of hb_isService() and hb_serviceExit()

  * harbour/contrib/xhb/cstructc.c
    * disabled public C functions hb_retclenAdoptRaw() and hb_retclenStatic()

  * harbour/contrib/xhb/xhbat.c
    * declare C function hb_AtSkipStrings() as static
      Warning: this functions is part of public xHarbour C API.

   ; TODO: The following functions are declared as public but without
           any prototypes in header files so they should be made static
           or we should add them to some header files:
               hbver.c:143:  hb_verHostCPU()
               hbjson.c:640: hb_jsonEncode()
               hbjson.c:665: hb_jsonDecode()
               sha2.c:228:   sha256_transf()
               sha2.c:445:   sha512_transf()
           I would like to ask authors to look at them and chose
           best solution.
This commit is contained in:
Przemyslaw Czerpak
2010-11-17 20:12:12 +00:00
parent 1fffde7667
commit bc30cabde4
26 changed files with 261 additions and 162 deletions

View File

@@ -16,6 +16,102 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-11-17 21:11 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbpp.h
! removed repeated declaration of hb_pp_eof()
* harbour/include/hbapicdp.h
* harbour/include/hbapilng.h
* harbour/include/hbgtcore.h
* added extern declaration to HB_*_REQUEST() macros to pacify
undeclared global functions warnings
* harbour/include/hbstack.h
! added missing hb_stackDec() declaration
* harbour/include/hbdefs.h
! added missing const in some endian macros
* removed some unnecessary casting which may hide bugs
in the code
* harbour/include/hbapi.h
! removed repeated declaration of hb_strVal()
* harbour/include/hbznet.h
! removed repeated declaration of hb_znetError()
* harbour/include/hbcompdf.h
* minor comment
* harbour/src/vm/hvm.c
! added missing static to hb_vmTSVarClean() declaration
* added extern hb_vmForceLink() declaration to pacify
undeclared global functions warnings
* harbour/src/vm/thread.c
* make hb_threadInit() and hb_threadExit() internal HVM
functions available only in MT mode
* harbour/src/rtl/dates.c
! added missing static to hb_dateUnformatRaw() declaration
* harbour/src/macro/macrolex.c
* added extern hb_macro_yylex() declaration to pacify
undeclared global functions warnings
* harbour/src/rdd/workarea.c
* added extern _hb_rddWorkAreaForceLink() declaration to pacify
undeclared global functions warnings
* harbour/src/compiler/complex.c
* added extern hb_comp_yylex() declaration to pacify
undeclared global functions warnings
* harbour/contrib/hbnetio/netiocli.c
! added missing static to s_fileFlush() declaration
* harbour/contrib/hbct/tempfile.prg
! respect in TmepFile() function default file attributes set by
SetFCreate()
* harbour/contrib/hbct/ctstrfil.h
! added missing declarations for ct_getfcreate() and ct_setfcreate()
* harbour/contrib/hbwin/legacy.prg
* removed dummy RETURN statement
* harbour/contrib/xhb/fparse.c
! added missing static to hb_ParseLine() declaration
* harbour/contrib/xhb/freadlin.c
! added missing static to hb_fsReadLine() declaration
* harbour/contrib/xhb/txtline.c
! added missing static to hb_readLine() and hb_tabexpand() declarations
! fixed uninitialized variable warning exploited by above modification
(static function was automatically inlined increasing optimizations)
* harbour/contrib/xhb/hbserv.c
! removed repeated declaration of hb_isService() and hb_serviceExit()
* harbour/contrib/xhb/cstructc.c
* disabled public C functions hb_retclenAdoptRaw() and hb_retclenStatic()
* harbour/contrib/xhb/xhbat.c
* declare C function hb_AtSkipStrings() as static
Warning: this functions is part of public xHarbour C API.
; TODO: The following functions are declared as public but without
any prototypes in header files so they should be made static
or we should add them to some header files:
hbver.c:143: hb_verHostCPU()
hbjson.c:640: hb_jsonEncode()
hbjson.c:665: hb_jsonDecode()
sha2.c:228: sha256_transf()
sha2.c:445: sha512_transf()
I would like to ask authors to look at them and chose
best solution.
2010-11-17 18:07 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbpgsql/postgres.c
+ Switched to built-in versioning macro instead of rolling our own.

View File

@@ -55,6 +55,9 @@
HB_EXTERN_BEGIN
extern int ct_getfcreate( void );
extern void ct_setfcreate( int iFileAttr );
extern HB_BOOL ct_getsafety( void );
extern void ct_setsafety( HB_BOOL bSafety );

View File

@@ -60,6 +60,9 @@ FUNCTION TempFile( cDir, cExt, nAttr )
IF ISCHARACTER( cExt ) .AND. !( Left( cExt, 1 ) == "." )
cExt := "." + cExt
ENDIF
IF ! ISNUMBER( nAttr )
nAttr := SetFCreate()
ENDIF
fhnd := hb_FTempCreateEx( @cName, cDir,, cExt, nAttr )

View File

@@ -1722,7 +1722,7 @@ static HB_FOFFSET s_fileSize( PHB_FILE pFile )
return llOffset;
}
void s_fileFlush( PHB_FILE pFile, HB_BOOL fDirty )
static void s_fileFlush( PHB_FILE pFile, HB_BOOL fDirty )
{
HB_SYMBOL_UNUSED( pFile );
HB_SYMBOL_UNUSED( fDirty );

View File

@@ -73,7 +73,6 @@ STATIC PROCEDURE Throw( oError )
__ErrInHandler()
ENDIF
Break( oError )
RETURN
STATIC FUNCTION ThrowOpError( nSubCode, cOperator, ... )
LOCAL oError

View File

@@ -87,9 +87,7 @@ static PHB_ITEM hb_itemPutCRaw( PHB_ITEM pItem, const char * szText, HB_SIZE nLe
return pItem;
}
#ifdef hb_itemPutCRawStatic
#undef hb_itemPutCRawStatic
#endif
#undef hb_itemPutCRawStatic
static PHB_ITEM hb_itemPutCRawStatic( PHB_ITEM pItem, const char * szText, HB_SIZE nLen )
{
HB_TRACE(HB_TR_DEBUG, ("hb_itemPutCRawStatic(%p, %s, %" HB_PFS "u)", pItem, szText, nLen));
@@ -110,21 +108,19 @@ static PHB_ITEM hb_itemPutCRawStatic( PHB_ITEM pItem, const char * szText, HB_SI
return pItem;
}
#ifdef hb_retclenAdoptRaw
#undef hb_retclenAdoptRaw
#endif
/*
#undef hb_retclenAdoptRaw
void hb_retclenAdoptRaw( const char * szText, HB_SIZE nLen )
{
hb_itemPutCRaw( hb_stackReturnItem(), szText, nLen );
}
#ifdef hb_retclenStatic
#undef hb_retclenStatic
#endif
#undef hb_retclenStatic
void hb_retclenStatic( const char * szText, HB_SIZE nLen )
{
hb_itemPutCRawStatic( hb_stackReturnItem(), szText, nLen );
}
*/
static HB_UINT SizeOfCStructure( PHB_ITEM aDef, HB_UINT uiAlign )
{

View File

@@ -80,7 +80,7 @@ FPARSE( cFile, cDelimiter ) -> array
/* adjustable, but this should be sufficient in normal situation */
#define MAX_READ 4096
/*----------------------------------------------------------------------------*/
void hb_ParseLine( PHB_ITEM pReturn, const char * szText, int iDelimiter, int * iWord )
static void hb_ParseLine( PHB_ITEM pReturn, const char * szText, int iDelimiter, int * iWord )
{
if( szText )
{

View File

@@ -58,7 +58,7 @@
#define READING_BLOCK 4096
char * hb_fsReadLine( HB_FHANDLE hFileHandle, HB_ISIZ * plBuffLen, const char ** pTerm, HB_ISIZ * pnTermSizes, HB_ISIZ nTerms, HB_BOOL * pbFound, HB_BOOL * pbEOF )
static char * hb_fsReadLine( HB_FHANDLE hFileHandle, HB_ISIZ * plBuffLen, const char ** pTerm, HB_ISIZ * pnTermSizes, HB_ISIZ nTerms, HB_BOOL * pbFound, HB_BOOL * pbEOF )
{
HB_ISIZ nPosTerm = 0, nPos, nPosition;
int nTries;

View File

@@ -98,12 +98,6 @@
* Global definition, valid for all systems
***************************************************/
HB_EXTERN_BEGIN
HB_BOOL hb_isService( void );
void hb_serviceExit( void );
HB_EXTERN_END
static void s_serviceSetHBSig( void );
static void s_serviceSetDflSig( void );
static void s_signalHandlersInit( void );

View File

@@ -56,7 +56,7 @@
#include "hbapiitm.h"
#include "hbapierr.h"
void hb_readLine( const char * szText, HB_SIZE nTextLen, HB_SIZE nLineLen, HB_SIZE nTabLen, HB_BOOL bWrap, char ** pTerm, HB_SIZE * pnTermSizes, HB_SIZE nTerms, HB_BOOL * pbFound, HB_BOOL * pbEOF, HB_ISIZ * pnEnd, HB_SIZE * pnEndOffset )
static void hb_readLine( const char * szText, HB_SIZE nTextLen, HB_SIZE nLineLen, HB_SIZE nTabLen, HB_BOOL bWrap, char ** pTerm, HB_SIZE * pnTermSizes, HB_SIZE nTerms, HB_BOOL * pbFound, HB_BOOL * pbEOF, HB_ISIZ * pnEnd, HB_SIZE * pnEndOffset )
{
HB_SIZE nPosTerm, nPosition;
HB_SIZE nPos, nCurrCol, nLastBlk;
@@ -64,17 +64,17 @@ void hb_readLine( const char * szText, HB_SIZE nTextLen, HB_SIZE nLineLen, HB_SI
HB_TRACE(HB_TR_DEBUG, ("hb_readLine(%p, %" HB_PFS "u, %" HB_PFS "u, %" HB_PFS "u, %d, %p, %p, %" HB_PFS "u, %p, %p, %p, %p)", szText, nTextLen, nLineLen, nTabLen, bWrap, pTerm, pnTermSizes, nTerms, pbFound, pbEOF, pnEnd, pnEndOffset ));
*pbFound = HB_FALSE;
*pbEOF = HB_FALSE;
*pnEnd = 0;
nCurrCol = 0;
nLastBlk = 0;
*pbFound = HB_FALSE;
*pbEOF = HB_FALSE;
*pnEnd = 0;
*pnEndOffset = 0;
nCurrCol = 0;
nLastBlk = 0;
if( nTextLen == 0 )
{
*pnEnd = -1;
*pnEndOffset = 0;
*pbEOF = HB_TRUE;
*pnEnd = -1;
*pbEOF = HB_TRUE;
return;
}
@@ -143,7 +143,7 @@ void hb_readLine( const char * szText, HB_SIZE nTextLen, HB_SIZE nLineLen, HB_SI
if( nCurrCol > nLineLen )
{
if( bWrap == HB_FALSE || nLastBlk == 0 )
if( !bWrap || nLastBlk == 0 )
{
*pnEnd = nPos-1;
*pnEndOffset = nPos;
@@ -160,7 +160,7 @@ void hb_readLine( const char * szText, HB_SIZE nTextLen, HB_SIZE nLineLen, HB_SI
}
}
if( *pbFound == HB_FALSE && bBreak == HB_FALSE )
if( !*pbFound && !bBreak )
{
*pnEnd = nTextLen - 1;
*pnEndOffset = nTextLen - 1;
@@ -168,7 +168,7 @@ void hb_readLine( const char * szText, HB_SIZE nTextLen, HB_SIZE nLineLen, HB_SI
}
}
HB_ISIZ hb_tabexpand( const char * szString, char * szRet, HB_ISIZ nEnd, HB_SIZE nTabLen )
static HB_ISIZ hb_tabexpand( const char * szString, char * szRet, HB_ISIZ nEnd, HB_SIZE nTabLen )
{
HB_ISIZ nPos, nSpAdded = 0;

View File

@@ -57,7 +57,7 @@
/* locates a substring in a string */
HB_SIZE hb_AtSkipStrings( const char * szSub, HB_SIZE nSubLen, const char * szText, HB_SIZE nLen )
static HB_SIZE hb_AtSkipStrings( const char * szSub, HB_SIZE nSubLen, const char * szText, HB_SIZE nLen )
{
char cLastChar = ' ';

View File

@@ -960,10 +960,9 @@ extern HB_EXPORT char * hb_strncpyTrim( char * pDest, const char * pSource, H
extern HB_EXPORT char * hb_strncpyLower( char * pDest, const char * pSource, HB_SIZE nLen ); /* copy an existing string buffer to another buffer, as lower case */
extern HB_EXPORT char * hb_strncpyUpper( char * pDest, const char * pSource, HB_SIZE nLen ); /* copy an existing string buffer to another buffer, as upper case */
extern HB_EXPORT char * hb_strncpyUpperTrim( char * pDest, const char * pSource, HB_SIZE nLen );
extern HB_EXPORT double hb_strVal( const char * szText, HB_SIZE nLen ); /* return the numeric value of a character string representation of a number */
extern HB_EXPORT const char * hb_strLTrim( const char * szText, HB_SIZE * nLen ); /* return a pointer to the first non-white space character */
extern HB_EXPORT HB_SIZE hb_strRTrimLen( const char * szText, HB_SIZE nLen, HB_BOOL bAnySpace ); /* return length of a string, ignoring trailing white space (or true spaces) */
extern HB_EXPORT double hb_strVal( const char * szText, HB_SIZE nLen );
extern HB_EXPORT double hb_strVal( const char * szText, HB_SIZE nLen ); /* return the numeric value of a character string representation of a number */
extern HB_EXPORT HB_MAXINT hb_strValInt( const char * szText, int * iOverflow );
extern HB_EXPORT char * hb_strRemEscSeq( char * szText, HB_SIZE * nLen ); /* remove C ESC sequences and converts them to Clipper chars */
extern HB_EXPORT char * hb_numToStr( char * szBuf, HB_SIZE nSize, HB_MAXINT nNumber );

View File

@@ -62,6 +62,7 @@ HB_EXTERN_BEGIN
/* This hack is needed to force preprocessing if id is also a macro */
#define HB_CODEPAGE_REQUEST( id ) HB_CODEPAGE_REQUEST_( id )
#define HB_CODEPAGE_REQUEST_( id ) HB_FUNC_EXTERN( HB_CODEPAGE_##id ); \
extern void hb_codepage_ForceLink_##id( void ); \
void hb_codepage_ForceLink_##id( void ) \
{ \
HB_FUNC_EXEC( HB_CODEPAGE_##id ); \

View File

@@ -64,6 +64,7 @@ HB_EXTERN_BEGIN
/* This hack is needed to force preprocessing if id is also a macro */
#define HB_LANG_REQUEST( id ) HB_LANG_REQUEST_( id )
#define HB_LANG_REQUEST_( id ) HB_FUNC_EXTERN( HB_LANG_##id ); \
extern void hb_lang_ForceLink_##id( void ); \
void hb_lang_ForceLink_##id( void ) \
{ \
HB_FUNC_EXEC( HB_LANG_##id ); \

View File

@@ -600,7 +600,7 @@ typedef struct __EXTERN
typedef struct _HB_MODULE
{
const char * szName;
HB_BOOL force;
HB_BOOL force; /* force module compilation */
struct _HB_MODULE * pNext;
} HB_MODULE, * PHB_MODULE;

View File

@@ -829,7 +829,7 @@ typedef HB_U32 HB_FATTR;
*/
#if defined( __GNUC__ )
# define HB_PUT_PTR( p, v ) _hb_put_ptr( ( HB_BYTE * ) ( p ), v )
# define HB_GET_PTR( p ) _hb_get_ptr( ( HB_BYTE * ) ( p ) )
# define HB_GET_PTR( p ) _hb_get_ptr( ( const HB_BYTE * ) ( p ) )
#elif !defined( HB_STRICT_ALIGNMENT )
# define HB_PUT_PTR( p, v ) do { *( void ** ) ( p ) = ( void * ) ( v ); } while ( 0 )
# define HB_GET_PTR( p ) ( *( void ** ) ( p ) )
@@ -1114,42 +1114,42 @@ typedef HB_U32 HB_FATTR;
# if defined( HB_BIG_ENDIAN )
# define HB_GET_BE_UINT16( p ) _hb_get_std_uint16( ( HB_BYTE * ) ( p ) )
# define HB_GET_BE_UINT16( p ) _hb_get_std_uint16( ( const HB_BYTE * ) ( p ) )
# define HB_PUT_BE_UINT16( p, w ) _hb_put_std_uint16( ( HB_BYTE * ) ( p ), w )
# define HB_GET_BE_UINT32( p ) _hb_get_std_uint32( ( HB_BYTE * ) ( p ) )
# define HB_GET_BE_UINT32( p ) _hb_get_std_uint32( ( const HB_BYTE * ) ( p ) )
# define HB_PUT_BE_UINT32( p, l ) _hb_put_std_uint32( ( HB_BYTE * ) ( p ), l )
# define HB_GET_BE_UINT64( p ) _hb_get_std_uint64( ( HB_BYTE * ) ( p ) )
# define HB_GET_BE_UINT64( p ) _hb_get_std_uint64( ( const HB_BYTE * ) ( p ) )
# define HB_PUT_BE_UINT64( p, q ) _hb_put_std_uint64( ( HB_BYTE * ) ( p ), q )
# define HB_GET_LE_UINT16( p ) _hb_get_rev_uint16( ( HB_BYTE * ) ( p ) )
# define HB_GET_LE_UINT16( p ) _hb_get_rev_uint16( ( const HB_BYTE * ) ( p ) )
# define HB_PUT_LE_UINT16( p, w ) _hb_put_rev_uint16( ( HB_BYTE * ) ( p ), w )
# define HB_GET_LE_UINT32( p ) _hb_get_rev_uint32( ( HB_BYTE * ) ( p ) )
# define HB_GET_LE_UINT32( p ) _hb_get_rev_uint32( ( const HB_BYTE * ) ( p ) )
# define HB_PUT_LE_UINT32( p, l ) _hb_put_rev_uint32( ( HB_BYTE * ) ( p ), l )
# define HB_GET_LE_UINT64( p ) _hb_get_rev_uint64( ( HB_BYTE * ) ( p ) )
# define HB_GET_LE_UINT64( p ) _hb_get_rev_uint64( ( const HB_BYTE * ) ( p ) )
# define HB_PUT_LE_UINT64( p, q ) _hb_put_rev_uint64( ( HB_BYTE * ) ( p ), q )
# else /* HB_LITTLE_ENDIAN */
# define HB_GET_BE_UINT16( p ) _hb_get_rev_uint16( ( HB_BYTE * ) ( p ) )
# define HB_GET_BE_UINT16( p ) _hb_get_rev_uint16( ( const HB_BYTE * ) ( p ) )
# define HB_PUT_BE_UINT16( p, w ) _hb_put_rev_uint16( ( HB_BYTE * ) ( p ), w )
# define HB_GET_BE_UINT32( p ) _hb_get_rev_uint32( ( HB_BYTE * ) ( p ) )
# define HB_GET_BE_UINT32( p ) _hb_get_rev_uint32( ( const HB_BYTE * ) ( p ) )
# define HB_PUT_BE_UINT32( p, l ) _hb_put_rev_uint32( ( HB_BYTE * ) ( p ), l )
# define HB_GET_BE_UINT64( p ) _hb_get_rev_uint64( ( HB_BYTE * ) ( p ) )
# define HB_GET_BE_UINT64( p ) _hb_get_rev_uint64( ( const HB_BYTE * ) ( p ) )
# define HB_PUT_BE_UINT64( p, q ) _hb_put_rev_uint64( ( HB_BYTE * ) ( p ), q )
# define HB_GET_LE_UINT16( p ) _hb_get_std_uint16( ( HB_BYTE * ) ( p ) )
# define HB_GET_LE_UINT16( p ) _hb_get_std_uint16( ( const HB_BYTE * ) ( p ) )
# define HB_PUT_LE_UINT16( p, w ) _hb_put_std_uint16( ( HB_BYTE * ) ( p ), w )
# define HB_GET_LE_UINT32( p ) _hb_get_std_uint32( ( HB_BYTE * ) ( p ) )
# define HB_GET_LE_UINT32( p ) _hb_get_std_uint32( ( const HB_BYTE * ) ( p ) )
# define HB_PUT_LE_UINT32( p, l ) _hb_put_std_uint32( ( HB_BYTE * ) ( p ), l )
# define HB_GET_LE_UINT64( p ) _hb_get_std_uint64( ( HB_BYTE * ) ( p ) )
# define HB_GET_LE_UINT64( p ) _hb_get_std_uint64( ( const HB_BYTE * ) ( p ) )
# define HB_PUT_LE_UINT64( p, q ) _hb_put_std_uint64( ( HB_BYTE * ) ( p ), q )
# endif
#else /* ! __GNUC__ */
# define HB_GET_STD_DOUBLE( p ) hb_get_std_double( ( HB_BYTE * ) ( p ) )
# define HB_GET_REV_DOUBLE( p ) hb_get_rev_double( ( HB_BYTE * ) ( p ) )
# define HB_GET_STD_DOUBLE( p ) hb_get_std_double( ( const HB_BYTE * ) ( p ) )
# define HB_GET_REV_DOUBLE( p ) hb_get_rev_double( ( const HB_BYTE * ) ( p ) )
# define HB_PUT_REV_DOUBLE( p, d ) \
do { \
union { \
@@ -1185,32 +1185,32 @@ typedef HB_U32 HB_FATTR;
# if !defined( HB_STRICT_ALIGNMENT ) && defined( HB_LITTLE_ENDIAN )
#define HB_GET_LE_UINT16( p ) ( *( HB_U16 * )( p ) )
#define HB_GET_LE_UINT16( p ) ( *( const HB_U16 * )( p ) )
#define HB_PUT_LE_UINT16( p, w ) ( *( HB_U16 * )( p ) = ( HB_U16 ) ( w ) )
#define HB_GET_LE_UINT32( p ) ( *( HB_U32 * )( p ) )
#define HB_GET_LE_UINT32( p ) ( *( const HB_U32 * )( p ) )
#define HB_PUT_LE_UINT32( p, l ) ( *( HB_U32 * )( p ) = ( HB_U32 ) ( l ) )
#define HB_GET_LE_UINT64( p ) ( *( HB_U64 * )( p ) )
#define HB_GET_LE_UINT64( p ) ( *( const HB_U64 * )( p ) )
#define HB_PUT_LE_UINT64( p, q ) ( *( HB_U64 * )( p ) = ( HB_U64 ) ( q ) )
# else
#define HB_GET_LE_UINT16( p ) ( ( HB_U16 ) \
( ( ( HB_U16 ) (( HB_BYTE * )( p ))[0] ) | \
( ( HB_U16 ) (( HB_BYTE * )( p ))[1] << 8 ) ) )
( ( ( HB_U16 ) (( const HB_BYTE * )( p ))[0] ) | \
( ( HB_U16 ) (( const HB_BYTE * )( p ))[1] << 8 ) ) )
#define HB_GET_LE_UINT32( p ) ( ( HB_U32 ) \
( ( ( HB_U32 ) (( HB_BYTE * )( p ))[0] ) | \
( ( HB_U32 ) (( HB_BYTE * )( p ))[1] << 8 ) | \
( ( HB_U32 ) (( HB_BYTE * )( p ))[2] << 16 ) | \
( ( HB_U32 ) (( HB_BYTE * )( p ))[3] << 24 ) ) )
( ( ( HB_U32 ) (( const HB_BYTE * )( p ))[0] ) | \
( ( HB_U32 ) (( const HB_BYTE * )( p ))[1] << 8 ) | \
( ( HB_U32 ) (( const HB_BYTE * )( p ))[2] << 16 ) | \
( ( HB_U32 ) (( const HB_BYTE * )( p ))[3] << 24 ) ) )
#define HB_GET_LE_UINT64( p ) ( ( HB_U64 ) \
( ( ( HB_U64 ) (( HB_BYTE * )( p ))[0] ) | \
( ( HB_U64 ) (( HB_BYTE * )( p ))[1] << 8 ) | \
( ( HB_U64 ) (( HB_BYTE * )( p ))[2] << 16 ) | \
( ( HB_U64 ) (( HB_BYTE * )( p ))[3] << 24 ) | \
( ( HB_U64 ) (( HB_BYTE * )( p ))[4] << 32 ) | \
( ( HB_U64 ) (( HB_BYTE * )( p ))[5] << 40 ) | \
( ( HB_U64 ) (( HB_BYTE * )( p ))[6] << 48 ) | \
( ( HB_U64 ) (( HB_BYTE * )( p ))[7] << 56 ) ) )
( ( ( HB_U64 ) (( const HB_BYTE * )( p ))[0] ) | \
( ( HB_U64 ) (( const HB_BYTE * )( p ))[1] << 8 ) | \
( ( HB_U64 ) (( const HB_BYTE * )( p ))[2] << 16 ) | \
( ( HB_U64 ) (( const HB_BYTE * )( p ))[3] << 24 ) | \
( ( HB_U64 ) (( const HB_BYTE * )( p ))[4] << 32 ) | \
( ( HB_U64 ) (( const HB_BYTE * )( p ))[5] << 40 ) | \
( ( HB_U64 ) (( const HB_BYTE * )( p ))[6] << 48 ) | \
( ( HB_U64 ) (( const HB_BYTE * )( p ))[7] << 56 ) ) )
#define HB_PUT_LE_UINT16( p, w ) do { \
(( HB_BYTE * )( p ))[0] = ( HB_BYTE )( w ); \
@@ -1236,32 +1236,32 @@ typedef HB_U32 HB_FATTR;
# if !defined( HB_STRICT_ALIGNMENT ) && defined( HB_BIG_ENDIAN )
#define HB_GET_BE_UINT16( p ) ( *( HB_U16 * )( p ) )
#define HB_GET_BE_UINT16( p ) ( *( const HB_U16 * )( p ) )
#define HB_PUT_BE_UINT16( p, w ) ( *( HB_U16 * )( p ) = ( HB_U16 ) ( w ) )
#define HB_GET_BE_UINT32( p ) ( *( HB_U32 * )( p ) )
#define HB_GET_BE_UINT32( p ) ( *( const HB_U32 * )( p ) )
#define HB_PUT_BE_UINT32( p, l ) ( *( HB_U32 * )( p ) = ( HB_U32 ) ( l ) )
#define HB_GET_BE_UINT64( p ) ( *( HB_U64 * )( p ) )
#define HB_GET_BE_UINT64( p ) ( *( const HB_U64 * )( p ) )
#define HB_PUT_BE_UINT64( p, q ) ( *( HB_U64 * )( p ) = ( HB_U64 ) ( q ) )
# else
#define HB_GET_BE_UINT16( p ) ( ( HB_U16 ) \
( ( ( HB_U16 ) (( HB_BYTE * )( p ))[0] << 8 ) | \
( ( HB_U16 ) (( HB_BYTE * )( p ))[1] ) ) )
( ( ( HB_U16 ) (( const HB_BYTE * )( p ))[0] << 8 ) | \
( ( HB_U16 ) (( const HB_BYTE * )( p ))[1] ) ) )
#define HB_GET_BE_UINT32( p ) ( ( HB_U32 ) \
( ( ( HB_U32 ) (( HB_BYTE * )( p ))[0] << 24 ) | \
( ( HB_U32 ) (( HB_BYTE * )( p ))[1] << 16 ) | \
( ( HB_U32 ) (( HB_BYTE * )( p ))[2] << 8 ) | \
( ( HB_U32 ) (( HB_BYTE * )( p ))[3] ) ) )
( ( ( HB_U32 ) (( const HB_BYTE * )( p ))[0] << 24 ) | \
( ( HB_U32 ) (( const HB_BYTE * )( p ))[1] << 16 ) | \
( ( HB_U32 ) (( const HB_BYTE * )( p ))[2] << 8 ) | \
( ( HB_U32 ) (( const HB_BYTE * )( p ))[3] ) ) )
#define HB_GET_BE_UINT64( p ) ( ( HB_U64 ) \
( ( ( HB_U64 ) (( HB_BYTE * )( p ))[0] << 56 ) | \
( ( HB_U64 ) (( HB_BYTE * )( p ))[1] << 48 ) | \
( ( HB_U64 ) (( HB_BYTE * )( p ))[2] << 40 ) | \
( ( HB_U64 ) (( HB_BYTE * )( p ))[3] << 32 ) | \
( ( HB_U64 ) (( HB_BYTE * )( p ))[4] << 24 ) | \
( ( HB_U64 ) (( HB_BYTE * )( p ))[5] << 16 ) | \
( ( HB_U64 ) (( HB_BYTE * )( p ))[6] << 8 ) | \
( ( HB_U64 ) (( HB_BYTE * )( p ))[7] ) ) )
( ( ( HB_U64 ) (( const HB_BYTE * )( p ))[0] << 56 ) | \
( ( HB_U64 ) (( const HB_BYTE * )( p ))[1] << 48 ) | \
( ( HB_U64 ) (( const HB_BYTE * )( p ))[2] << 40 ) | \
( ( HB_U64 ) (( const HB_BYTE * )( p ))[3] << 32 ) | \
( ( HB_U64 ) (( const HB_BYTE * )( p ))[4] << 24 ) | \
( ( HB_U64 ) (( const HB_BYTE * )( p ))[5] << 16 ) | \
( ( HB_U64 ) (( const HB_BYTE * )( p ))[6] << 8 ) | \
( ( HB_U64 ) (( const HB_BYTE * )( p ))[7] ) ) )
#define HB_PUT_BE_UINT16( p, w ) do { \
(( HB_BYTE * )( p ))[0] = ( HB_BYTE )( (w) >> 8 ); \
@@ -1295,11 +1295,11 @@ typedef HB_U32 HB_FATTR;
*/
#if defined( HB_FORCE_IEEE754_DOUBLE )
# define HB_GET_LE_DOUBLE( p ) hb_get_ieee754( ( HB_BYTE * ) ( p ) )
# define HB_GET_LE_DOUBLE( p ) hb_get_ieee754( ( const HB_BYTE * ) ( p ) )
# define HB_PUT_LE_DOUBLE( p, d ) hb_put_ieee754( ( HB_BYTE * ) ( p ), ( d ) )
# define HB_DBL2ORD( d, o ) hb_put_ord_ieee754( ( o ), *( d ) )
# define HB_ORD2DBL( o, d ) do { \
*d = hb_get_ord_ieee754( ( HB_BYTE * ) ( o ) ); \
*( d ) = hb_get_ord_ieee754( ( const HB_BYTE * ) ( o ) ); \
} while( 0 )
#elif defined( HB_BIG_ENDIAN )
@@ -1314,7 +1314,7 @@ typedef HB_U32 HB_FATTR;
#else
# define HB_GET_LE_DOUBLE( p ) ( *( double * )( p ) )
# define HB_GET_LE_DOUBLE( p ) ( *( const double * )( p ) )
# define HB_PUT_LE_DOUBLE( p, d ) ( *( double * )( p ) = ( double ) ( d ) )
#endif
@@ -1324,45 +1324,45 @@ typedef HB_U32 HB_FATTR;
#define HB_ORD2DBL( o, d ) do { \
if ( ( ( HB_BYTE * ) ( o ) )[ 0 ] & 0x80 ) { \
( ( HB_BYTE * ) ( d ) )[ 0 ] = ( ( HB_BYTE * ) ( o ) )[ 0 ]; \
( ( HB_BYTE * ) ( d ) )[ 1 ] = ( ( HB_BYTE * ) ( o ) )[ 1 ]; \
( ( HB_BYTE * ) ( d ) )[ 2 ] = ( ( HB_BYTE * ) ( o ) )[ 2 ]; \
( ( HB_BYTE * ) ( d ) )[ 3 ] = ( ( HB_BYTE * ) ( o ) )[ 3 ]; \
( ( HB_BYTE * ) ( d ) )[ 4 ] = ( ( HB_BYTE * ) ( o ) )[ 4 ]; \
( ( HB_BYTE * ) ( d ) )[ 5 ] = ( ( HB_BYTE * ) ( o ) )[ 5 ]; \
( ( HB_BYTE * ) ( d ) )[ 6 ] = ( ( HB_BYTE * ) ( o ) )[ 6 ]; \
( ( HB_BYTE * ) ( d ) )[ 7 ] = ( ( HB_BYTE * ) ( o ) )[ 7 ] ^ ( HB_BYTE ) 0x80; \
( ( HB_BYTE * ) ( d ) )[ 0 ] = ( ( const HB_BYTE * ) ( o ) )[ 0 ]; \
( ( HB_BYTE * ) ( d ) )[ 1 ] = ( ( const HB_BYTE * ) ( o ) )[ 1 ]; \
( ( HB_BYTE * ) ( d ) )[ 2 ] = ( ( const HB_BYTE * ) ( o ) )[ 2 ]; \
( ( HB_BYTE * ) ( d ) )[ 3 ] = ( ( const HB_BYTE * ) ( o ) )[ 3 ]; \
( ( HB_BYTE * ) ( d ) )[ 4 ] = ( ( const HB_BYTE * ) ( o ) )[ 4 ]; \
( ( HB_BYTE * ) ( d ) )[ 5 ] = ( ( const HB_BYTE * ) ( o ) )[ 5 ]; \
( ( HB_BYTE * ) ( d ) )[ 6 ] = ( ( const HB_BYTE * ) ( o ) )[ 6 ]; \
( ( HB_BYTE * ) ( d ) )[ 7 ] = ( ( const HB_BYTE * ) ( o ) )[ 7 ] ^ ( HB_BYTE ) 0x80; \
} else { \
( ( HB_BYTE * ) ( d ) )[ 0 ] = ( ( HB_BYTE * ) ( o ) )[ 0 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( d ) )[ 1 ] = ( ( HB_BYTE * ) ( o ) )[ 1 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( d ) )[ 2 ] = ( ( HB_BYTE * ) ( o ) )[ 2 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( d ) )[ 3 ] = ( ( HB_BYTE * ) ( o ) )[ 3 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( d ) )[ 4 ] = ( ( HB_BYTE * ) ( o ) )[ 4 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( d ) )[ 5 ] = ( ( HB_BYTE * ) ( o ) )[ 5 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( d ) )[ 6 ] = ( ( HB_BYTE * ) ( o ) )[ 6 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( d ) )[ 7 ] = ( ( HB_BYTE * ) ( o ) )[ 7 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( d ) )[ 0 ] = ( ( const HB_BYTE * ) ( o ) )[ 0 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( d ) )[ 1 ] = ( ( const HB_BYTE * ) ( o ) )[ 1 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( d ) )[ 2 ] = ( ( const HB_BYTE * ) ( o ) )[ 2 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( d ) )[ 3 ] = ( ( const HB_BYTE * ) ( o ) )[ 3 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( d ) )[ 4 ] = ( ( const HB_BYTE * ) ( o ) )[ 4 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( d ) )[ 5 ] = ( ( const HB_BYTE * ) ( o ) )[ 5 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( d ) )[ 6 ] = ( ( const HB_BYTE * ) ( o ) )[ 6 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( d ) )[ 7 ] = ( ( const HB_BYTE * ) ( o ) )[ 7 ] ^ ( HB_BYTE ) 0xFF; \
} } while ( 0 )
#define HB_DBL2ORD( d, o ) do { \
if ( *( double * )( d ) >= 0.0 ) { \
if( *( double * )( d ) == -0.0 ) *( double * )( d ) = 0.0; \
( ( HB_BYTE * ) ( o ) )[ 0 ] = ( ( HB_BYTE * ) ( d ) )[ 0 ] ^ ( HB_BYTE ) 0x80; \
( ( HB_BYTE * ) ( o ) )[ 1 ] = ( ( HB_BYTE * ) ( d ) )[ 1 ]; \
( ( HB_BYTE * ) ( o ) )[ 2 ] = ( ( HB_BYTE * ) ( d ) )[ 2 ]; \
( ( HB_BYTE * ) ( o ) )[ 3 ] = ( ( HB_BYTE * ) ( d ) )[ 3 ]; \
( ( HB_BYTE * ) ( o ) )[ 4 ] = ( ( HB_BYTE * ) ( d ) )[ 4 ]; \
( ( HB_BYTE * ) ( o ) )[ 5 ] = ( ( HB_BYTE * ) ( d ) )[ 5 ]; \
( ( HB_BYTE * ) ( o ) )[ 6 ] = ( ( HB_BYTE * ) ( d ) )[ 6 ]; \
( ( HB_BYTE * ) ( o ) )[ 7 ] = ( ( HB_BYTE * ) ( d ) )[ 7 ]; \
if ( *( d ) >= 0.0 ) { \
if( *( d ) == -0.0 ) *( d ) = 0.0; \
( ( HB_BYTE * ) ( o ) )[ 0 ] = ( ( const HB_BYTE * ) ( d ) )[ 0 ] ^ ( HB_BYTE ) 0x80; \
( ( HB_BYTE * ) ( o ) )[ 1 ] = ( ( const HB_BYTE * ) ( d ) )[ 1 ]; \
( ( HB_BYTE * ) ( o ) )[ 2 ] = ( ( const HB_BYTE * ) ( d ) )[ 2 ]; \
( ( HB_BYTE * ) ( o ) )[ 3 ] = ( ( const HB_BYTE * ) ( d ) )[ 3 ]; \
( ( HB_BYTE * ) ( o ) )[ 4 ] = ( ( const HB_BYTE * ) ( d ) )[ 4 ]; \
( ( HB_BYTE * ) ( o ) )[ 5 ] = ( ( const HB_BYTE * ) ( d ) )[ 5 ]; \
( ( HB_BYTE * ) ( o ) )[ 6 ] = ( ( const HB_BYTE * ) ( d ) )[ 6 ]; \
( ( HB_BYTE * ) ( o ) )[ 7 ] = ( ( const HB_BYTE * ) ( d ) )[ 7 ]; \
} else { \
( ( HB_BYTE * ) ( o ) )[ 0 ] = ( ( HB_BYTE * ) ( d ) )[ 0 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 1 ] = ( ( HB_BYTE * ) ( d ) )[ 1 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 2 ] = ( ( HB_BYTE * ) ( d ) )[ 2 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 3 ] = ( ( HB_BYTE * ) ( d ) )[ 3 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 4 ] = ( ( HB_BYTE * ) ( d ) )[ 4 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 5 ] = ( ( HB_BYTE * ) ( d ) )[ 5 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 6 ] = ( ( HB_BYTE * ) ( d ) )[ 6 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 7 ] = ( ( HB_BYTE * ) ( d ) )[ 7 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 0 ] = ( ( const HB_BYTE * ) ( d ) )[ 0 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 1 ] = ( ( const HB_BYTE * ) ( d ) )[ 1 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 2 ] = ( ( const HB_BYTE * ) ( d ) )[ 2 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 3 ] = ( ( const HB_BYTE * ) ( d ) )[ 3 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 4 ] = ( ( const HB_BYTE * ) ( d ) )[ 4 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 5 ] = ( ( const HB_BYTE * ) ( d ) )[ 5 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 6 ] = ( ( const HB_BYTE * ) ( d ) )[ 6 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 7 ] = ( ( const HB_BYTE * ) ( d ) )[ 7 ] ^ ( HB_BYTE ) 0xFF; \
} } while ( 0 )
# else /* HB_LITTLE_ENDIAN */
@@ -1389,25 +1389,25 @@ typedef HB_U32 HB_FATTR;
} } while ( 0 )
#define HB_DBL2ORD( d, o ) do { \
if ( *( double * )( d ) >= 0.0 ) { \
if( *( double * )( d ) == -0.0 ) *( double * )( d ) = 0.0; \
( ( HB_BYTE * ) ( o ) )[ 0 ] = ( ( HB_BYTE * ) ( d ) )[ 7 ] ^ ( HB_BYTE ) 0x80; \
( ( HB_BYTE * ) ( o ) )[ 1 ] = ( ( HB_BYTE * ) ( d ) )[ 6 ]; \
( ( HB_BYTE * ) ( o ) )[ 2 ] = ( ( HB_BYTE * ) ( d ) )[ 5 ]; \
( ( HB_BYTE * ) ( o ) )[ 3 ] = ( ( HB_BYTE * ) ( d ) )[ 4 ]; \
( ( HB_BYTE * ) ( o ) )[ 4 ] = ( ( HB_BYTE * ) ( d ) )[ 3 ]; \
( ( HB_BYTE * ) ( o ) )[ 5 ] = ( ( HB_BYTE * ) ( d ) )[ 2 ]; \
( ( HB_BYTE * ) ( o ) )[ 6 ] = ( ( HB_BYTE * ) ( d ) )[ 1 ]; \
( ( HB_BYTE * ) ( o ) )[ 7 ] = ( ( HB_BYTE * ) ( d ) )[ 0 ]; \
if ( *( d ) >= 0.0 ) { \
if( *( d ) == -0.0 ) *( d ) = 0.0; \
( ( HB_BYTE * ) ( o ) )[ 0 ] = ( ( const HB_BYTE * ) ( d ) )[ 7 ] ^ ( HB_BYTE ) 0x80; \
( ( HB_BYTE * ) ( o ) )[ 1 ] = ( ( const HB_BYTE * ) ( d ) )[ 6 ]; \
( ( HB_BYTE * ) ( o ) )[ 2 ] = ( ( const HB_BYTE * ) ( d ) )[ 5 ]; \
( ( HB_BYTE * ) ( o ) )[ 3 ] = ( ( const HB_BYTE * ) ( d ) )[ 4 ]; \
( ( HB_BYTE * ) ( o ) )[ 4 ] = ( ( const HB_BYTE * ) ( d ) )[ 3 ]; \
( ( HB_BYTE * ) ( o ) )[ 5 ] = ( ( const HB_BYTE * ) ( d ) )[ 2 ]; \
( ( HB_BYTE * ) ( o ) )[ 6 ] = ( ( const HB_BYTE * ) ( d ) )[ 1 ]; \
( ( HB_BYTE * ) ( o ) )[ 7 ] = ( ( const HB_BYTE * ) ( d ) )[ 0 ]; \
} else { \
( ( HB_BYTE * ) ( o ) )[ 0 ] = ( ( HB_BYTE * ) ( d ) )[ 7 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 1 ] = ( ( HB_BYTE * ) ( d ) )[ 6 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 2 ] = ( ( HB_BYTE * ) ( d ) )[ 5 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 3 ] = ( ( HB_BYTE * ) ( d ) )[ 4 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 4 ] = ( ( HB_BYTE * ) ( d ) )[ 3 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 5 ] = ( ( HB_BYTE * ) ( d ) )[ 2 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 6 ] = ( ( HB_BYTE * ) ( d ) )[ 1 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 7 ] = ( ( HB_BYTE * ) ( d ) )[ 0 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 0 ] = ( ( const HB_BYTE * ) ( d ) )[ 7 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 1 ] = ( ( const HB_BYTE * ) ( d ) )[ 6 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 2 ] = ( ( const HB_BYTE * ) ( d ) )[ 5 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 3 ] = ( ( const HB_BYTE * ) ( d ) )[ 4 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 4 ] = ( ( const HB_BYTE * ) ( d ) )[ 3 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 5 ] = ( ( const HB_BYTE * ) ( d ) )[ 2 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 6 ] = ( ( const HB_BYTE * ) ( d ) )[ 1 ] ^ ( HB_BYTE ) 0xFF; \
( ( HB_BYTE * ) ( o ) )[ 7 ] = ( ( const HB_BYTE * ) ( d ) )[ 0 ] ^ ( HB_BYTE ) 0xFF; \
} } while ( 0 )
# endif
@@ -1421,28 +1421,28 @@ typedef HB_U32 HB_FATTR;
* so we always have to build them from HB_BYTEs and cannot use C casting
*/
#define HB_GET_LE_INT24( p ) ( ( HB_I32 ) \
( ( ( HB_I32 ) (( HB_BYTE * )( p ))[0] ) | \
( ( HB_I32 ) (( HB_BYTE * )( p ))[1] << 8 ) | \
( ( HB_I32 ) (( HB_BYTE * )( p ))[2] << 16 ) | \
( ( HB_I32 ) ((( HB_BYTE * )( p ))[2] & 0x80 ? 0xFF : 0x00 ) << 24 ) ) )
( ( ( HB_I32 ) (( const HB_BYTE * )( p ))[0] ) | \
( ( HB_I32 ) (( const HB_BYTE * )( p ))[1] << 8 ) | \
( ( HB_I32 ) (( const HB_BYTE * )( p ))[2] << 16 ) | \
( ( HB_I32 ) ((( const HB_BYTE * )( p ))[2] & 0x80 ? 0xFF : 0x00 ) << 24 ) ) )
#define HB_GET_LE_UINT24( p ) ( ( HB_U32 ) \
( ( ( HB_U32 ) (( HB_BYTE * )( p ))[0] ) | \
( ( HB_U32 ) (( HB_BYTE * )( p ))[1] << 8 ) | \
( ( HB_U32 ) (( HB_BYTE * )( p ))[2] << 16 ) ) )
( ( ( HB_U32 ) (( const HB_BYTE * )( p ))[0] ) | \
( ( HB_U32 ) (( const HB_BYTE * )( p ))[1] << 8 ) | \
( ( HB_U32 ) (( const HB_BYTE * )( p ))[2] << 16 ) ) )
#define HB_PUT_LE_UINT24( p, u ) do { \
(( HB_BYTE * )( p ))[0] = ( HB_BYTE )( u ); \
(( HB_BYTE * )( p ))[1] = ( HB_BYTE )( (u) >> 8 ); \
(( HB_BYTE * )( p ))[2] = ( HB_BYTE )( (u) >> 16 ); \
} while ( 0 )
#define HB_GET_BE_INT24( p ) ( ( HB_I32 ) \
( ( ( HB_I32 ) (( HB_BYTE * )( p ))[2] ) | \
( ( HB_I32 ) (( HB_BYTE * )( p ))[1] << 8 ) | \
( ( HB_I32 ) (( HB_BYTE * )( p ))[0] << 16 ) | \
( ( HB_I32 ) ((( HB_BYTE * )( p ))[0] & 0x80 ? 0xFF : 0x00 ) << 24 ) ) )
( ( ( HB_I32 ) (( const HB_BYTE * )( p ))[2] ) | \
( ( HB_I32 ) (( const HB_BYTE * )( p ))[1] << 8 ) | \
( ( HB_I32 ) (( const HB_BYTE * )( p ))[0] << 16 ) | \
( ( HB_I32 ) ((( const HB_BYTE * )( p ))[0] & 0x80 ? 0xFF : 0x00 ) << 24 ) ) )
#define HB_GET_BE_UINT24( p ) ( ( HB_U32 ) \
( ( ( HB_U32 ) (( HB_BYTE * )( p ))[2] ) | \
( ( HB_U32 ) (( HB_BYTE * )( p ))[1] << 8 ) | \
( ( HB_U32 ) (( HB_BYTE * )( p ))[0] << 16 ) ) )
( ( ( HB_U32 ) (( const HB_BYTE * )( p ))[2] ) | \
( ( HB_U32 ) (( const HB_BYTE * )( p ))[1] << 8 ) | \
( ( HB_U32 ) (( const HB_BYTE * )( p ))[0] << 16 ) ) )
#define HB_PUT_BE_UINT24( p, u ) do { \
(( HB_BYTE * )( p ))[2] = ( HB_BYTE )( u ); \
(( HB_BYTE * )( p ))[1] = ( HB_BYTE )( (u) >> 8 ); \
@@ -1478,8 +1478,8 @@ typedef HB_U32 HB_FATTR;
#undef HB_DBL_LIM_INT64
#define UINT64_MAXDBL ( ( ( double ) UINT32_MAX + 1.0 ) * \
( ( double ) UINT32_MAX + 1.0 ) - 1.0 )
#define HB_GET_LE_INT64( p ) hb_get_le_int64( ( HB_BYTE * ) ( p ) )
#define HB_GET_LE_UINT64( p ) hb_get_le_uint64( ( HB_BYTE * ) ( p ) )
#define HB_GET_LE_INT64( p ) hb_get_le_int64( ( const HB_BYTE * ) ( p ) )
#define HB_GET_LE_UINT64( p ) hb_get_le_uint64( ( const HB_BYTE * ) ( p ) )
#define HB_PUT_LE_UINT64( p, d ) hb_put_le_uint64( ( HB_BYTE * ) ( p ), \
( double ) ( d ) )
#define HB_PCODE_MKLONGLONG( p ) ( ( double ) HB_GET_LE_INT64( p ) )

View File

@@ -88,6 +88,7 @@ HB_EXTERN_BEGIN
#define HB_GT_REQUEST( id ) HB_GT_REQUEST_( _HB_GT_PREF_( id ) )
#define HB_GT_REQUEST_( id ) HB_GT_REQUEST__( id )
#define HB_GT_REQUEST__( id ) HB_FUNC_EXTERN( id ); \
extern void hb_gt_ForceLink_##id( void ); \
void hb_gt_ForceLink_##id( void ) \
{ \
HB_FUNC_EXEC( id ); \

View File

@@ -683,7 +683,6 @@ extern void hb_pp_addDefine( PHB_PP_STATE pState, const char * szDefName, con
extern void hb_pp_delDefine( PHB_PP_STATE pState, const char * szDefName );
extern HB_BOOL hb_pp_lasterror( PHB_PP_STATE pState );
extern int hb_pp_errorCount( PHB_PP_STATE pState );
extern HB_BOOL hb_pp_eof( PHB_PP_STATE pState );
extern void hb_pp_tokenUpper( PHB_PP_TOKEN pToken );
extern void hb_pp_tokenToString( PHB_PP_STATE pState, PHB_PP_TOKEN pToken );

View File

@@ -319,6 +319,7 @@ extern PHB_STACKRDD hb_stackRDD( void );
extern void ** hb_stackDebugInfo( void );
#ifdef _HB_API_INTERNAL_
extern void hb_stackDec( void );
extern void hb_stackDecrease( HB_SIZE nItems );
extern HB_ITEM_PTR hb_stackNewFrame( PHB_STACK_STATE pFrame, HB_USHORT uiParams );
extern void hb_stackOldFrame( PHB_STACK_STATE pFrame );
@@ -462,7 +463,7 @@ extern void hb_stackUpdateAllocator( void *, PHB_ALLOCUPDT_FUNC, int );
hb_itemRawMove( &hb_stack.Return, * hb_stack.pPos ); \
} while ( 0 )
#endif
#endif /* HB_STACK_SAFEMACROS */
#define hb_stackPush( ) do { \
if( ++hb_stack.pPos == hb_stack.pEnd ) \

View File

@@ -69,8 +69,6 @@ typedef long ( * HB_INET_RFUNC ) ( PHB_ZNETSTREAM, HB_SOCKET, void *, long, HB_M
typedef long ( * HB_INET_FFUNC ) ( PHB_ZNETSTREAM, HB_SOCKET, HB_MAXINT );
typedef void ( * HB_INET_CFUNC ) ( PHB_ZNETSTREAM );
extern HB_EXPORT int hb_znetError( PHB_ZNETSTREAM pStream );
extern HB_EXPORT PHB_ZNETSTREAM hb_znetOpen( int level, int strategy );
extern HB_EXPORT void hb_znetEncryptKey( PHB_ZNETSTREAM pStream, const void * keydata, int keylen );
extern HB_EXPORT void hb_znetClose( PHB_ZNETSTREAM pStream );

View File

@@ -474,6 +474,8 @@ static int hb_comp_dayTimeDecode( PHB_COMP_LEX pLex, PHB_PP_TOKEN pToken,
}
#endif
extern int hb_comp_yylex( YYSTYPE *yylval_ptr, HB_COMP_DECL );
int hb_comp_yylex( YYSTYPE *yylval_ptr, HB_COMP_DECL )
{
PHB_COMP_LEX pLex = HB_COMP_PARAM->pLex;

View File

@@ -265,6 +265,8 @@ static int hb_lexNumConv( YYSTYPE *yylval_ptr, PHB_MACRO_LEX pLex, HB_SIZE nLen
}
}
extern int hb_macro_yylex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro );
int hb_macro_yylex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro )
{
PHB_MACRO_LEX pLex = ( PHB_MACRO_LEX ) pMacro->pLex;

View File

@@ -2291,6 +2291,7 @@ HB_FUNC( __RDDPREALLOCATE )
}
HB_FUNC_EXTERN( RDDSYS );
extern void _hb_rddWorkAreaForceLink( void );
void _hb_rddWorkAreaForceLink( void )
{
HB_FUNC_EXEC( RDDSYS );

View File

@@ -245,7 +245,7 @@ char * hb_dateFormat( const char * szDate, char * szFormattedDate, const char *
return szFormattedDate;
}
int hb_dateUnformatRaw( const char * szDate, const char * szDateFormat, long * plDate )
static int hb_dateUnformatRaw( const char * szDate, const char * szDateFormat, long * plDate )
{
int d_value = 0, m_value = 0, y_value = 0;
int iSize = 0;

View File

@@ -6456,7 +6456,7 @@ static void hb_vmTSVRefMark( void * value )
}
/* destructor for terminated threads */
void hb_vmTSVarClean( void * pThreadItem )
static void hb_vmTSVarClean( void * pThreadItem )
{
if( HB_IS_COMPLEX( ( PHB_ITEM ) pThreadItem ) )
hb_itemClear( ( PHB_ITEM ) pThreadItem );
@@ -11906,6 +11906,7 @@ HB_FUNC( ERRORLEVEL )
Don't make this function static, because it's not called from
this file. [vszakats] */
extern void hb_vmForceLink( void );
void hb_vmForceLink( void )
{
HB_TRACE(HB_TR_DEBUG, ("hb_vmForceLink()"));

View File

@@ -119,11 +119,11 @@
static volatile HB_BOOL s_fThreadInit = HB_FALSE;
static PHB_ITEM s_pOnceMutex = NULL;
#if !defined( HB_MT_VM )
/* nothing */
#else
static PHB_ITEM s_pOnceMutex = NULL;
static int s_waiting_for_threads = 0;
@@ -196,6 +196,7 @@ static PHB_ITEM s_pOnceMutex = NULL;
#endif /* HB_MT_VM */
#if defined( HB_MT_VM )
void hb_threadInit( void )
{
if( !s_fThreadInit )
@@ -231,6 +232,7 @@ void hb_threadExit( void )
hb_taskExit();
#endif
}
#endif /* HB_MT_VM */
void hb_threadReleaseCPU( void )
{